/* ==========================================================================
   Aspiro KIT · motion.css — the CSS half of motion.js.
   Starting states are applied ONLY under html.kit-motion (set by the head
   snippet in README). Under html.kit-static (?static, navigator.webdriver,
   prefers-reduced-motion, or a JS failure) every element is in its final,
   fully visible state, so full-page screenshots are never blank.
   ========================================================================== */

/* Lenis 1.3.27 (MIT, darkroom.engineering) — dist/lenis.css, inlined */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---- Reveal starting states ---------------------------------------------- */
.kit-motion [data-reveal]:not([data-reveal="stagger"]):not([data-reveal="card"]),
.kit-motion [data-reveal="stagger"] > *,
.kit-motion [data-reveal="card"],
.kit-motion [data-reveal="card"] [data-reveal-child] {
  opacity: 0;
}
[data-reveal="lines"] { text-wrap: wrap; }
.kit-motion [data-reveal="lines"] .kit-line-mask { overflow: clip; padding: .16em .08em .08em; margin: -.16em -.08em -.08em; }

/* ---- Pinned sections ------------------------------------------------------
   Static: steps are listed one after another (final, readable state).
   Pinning: steps overlap in one grid cell and cross-fade with scroll. */
[data-pin-steps] { display: grid; gap: var(--space-16); }
.kit-pinning [data-pin-steps] { gap: 0; }
.kit-pinning [data-pin-steps] > [data-pin-step] { grid-area: 1 / 1; }
.kit-pinning [data-pin-steps] > [data-pin-step]:not(:first-child) { opacity: 0; visibility: hidden; }
[data-pin-progress] { transform-origin: 0 50%; }
.kit-pinning [data-pin-progress] { transform: scaleX(0); }
[data-pin-marker] { transition: opacity var(--dur-ui) ease, color var(--dur-ui) ease; }
.kit-pinning [data-pin-marker]:not(.is-active) { opacity: 0.35; }

/* ---- Image sequence --------------------------------------------------------- */
.kit-sequence { position: relative; }
.kit-sequence > canvas { display: block; width: 100%; height: 100%; }

/* ---- Parallax layers: transforms are written to the `translate` property
        so they never fight GSAP's `transform` reveals on the same element. */
[data-depth] { will-change: translate; }
.kit-static [data-depth] { will-change: auto; translate: none !important; }

/* ---- Count-up: keep width stable while digits roll */
[data-count] { font-variant-numeric: tabular-nums; }
number-flow { --number-flow-char-height: 0.9em; --number-flow-mask-height: 0.18em; }

@media (prefers-reduced-motion: reduce) {
  [data-depth] { translate: none !important; }
}
