/* Amitid Animation Kit v2 — styles. Theme via CSS variables per site:
   --akx-ease, --akx-loader-bg, --ambient-color (on the ambient host). */
:root { --akx-ease: cubic-bezier(.22, .9, .3, 1); }

/* ---------- loader ---------- */
.akx-loader {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center; overflow: hidden;
  background: var(--akx-loader-bg, #111);
}
.akx-loader--lift { animation: akx-lift .9s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes akx-lift { to { transform: translateY(-100%); } }
html.akx-loading { overflow: hidden; }

/* hero entrance after the loader lifts */
.akx-hero-item { opacity: 0; }
html.akx-go .akx-hero-item { animation: akx-hero-in .85s var(--akx-ease) forwards; }
html.akx-go .akx-d1 { animation-delay: .15s; }
html.akx-go .akx-d2 { animation-delay: .35s; }
html.akx-go .akx-d3 { animation-delay: .55s; }
html.akx-go .akx-d4 { animation-delay: .75s; }
@keyframes akx-hero-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- text reveal (data-split) ---------- */
.akx-w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.akx-wi {
  display: inline-block; transform: translateY(110%);
  transition: transform .7s var(--akx-ease);
  transition-delay: calc(var(--wi, 0) * 55ms);
}
[data-split].in .akx-wi { transform: none; }
/* headlines hidden until the loader lifts, so the reveal never plays behind it */
html.akx-loading [data-split] { visibility: hidden; }

/* ---------- scroll reveals ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--akx-ease), transform .7s var(--akx-ease);
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal-group] > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s var(--akx-ease), transform .6s var(--akx-ease);
}
[data-reveal-group].in > * { opacity: 1; transform: none; }
[data-reveal-group].in > *:nth-child(2) { transition-delay: .1s; }
[data-reveal-group].in > *:nth-child(3) { transition-delay: .2s; }
[data-reveal-group].in > *:nth-child(4) { transition-delay: .3s; }
[data-reveal-group].in > *:nth-child(5) { transition-delay: .4s; }
[data-reveal-group].in > *:nth-child(6) { transition-delay: .5s; }
[data-reveal-group].in > *:nth-child(7) { transition-delay: .6s; }
[data-reveal-group].in > *:nth-child(8) { transition-delay: .7s; }

/* image unmasking */
[data-unmask] { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--akx-ease); }
[data-unmask].in { clip-path: inset(0 0 0 0); }

/* ---------- marquee ---------- */
[data-marquee] { overflow: hidden; white-space: nowrap; }
.akx-marq { display: inline-block; animation: akx-marq 26s linear infinite; }
[data-marquee]:hover .akx-marq { animation-play-state: paused; }
@keyframes akx-marq { to { transform: translateX(50%); } }
[dir="ltr"] .akx-marq { animation-name: akx-marq-ltr; }
@keyframes akx-marq-ltr { to { transform: translateX(-50%); } }

/* ---------- hover distort ---------- */
.akx-zoom { overflow: hidden; }
.akx-zoom img { transition: transform .8s var(--akx-ease); }
.akx-zoom:hover img { transform: scale(1.06) rotate(.4deg); }
.akx-gray2color img { filter: grayscale(1); transition: filter .5s var(--akx-ease), transform .8s var(--akx-ease); }
.akx-gray2color:hover img { filter: grayscale(0); transform: scale(1.04); }

/* ---------- sticky stack (cards peel over each other) ---------- */
.akx-stack > * { position: sticky; top: calc(70px + var(--stack-i, 0) * 14px); }

/* ---------- ambient canvas ---------- */
.akx-ambient { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- horizontal gallery ---------- */
[data-hgallery] { position: relative; }
[data-hgallery] .akx-viewport { position: sticky; top: 0; overflow: hidden; }
[data-hgallery] .akx-track { display: flex; will-change: transform; }

/* ---------- magnetic ---------- */
[data-magnetic] { will-change: transform; }
[data-magnetic]:active { scale: .96; }

/* ---------- reduced motion: everything lands calm and final ---------- */
@media (prefers-reduced-motion: reduce) {
  .akx-loader { display: none; }
  .akx-hero-item, html.akx-go .akx-hero-item { opacity: 1; animation: none; }
  .akx-wi { transform: none; transition: none; }
  html.akx-loading [data-split] { visibility: visible; }
  [data-reveal], [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
  [data-unmask] { clip-path: none; transition: none; }
  .akx-marq { animation: none; }
  [data-parallax], [data-kinetic] { transform: none !important; }
}
