/* Prime Motion — scroll runtime, structural rules only.
   The engine is js/scrollcraft.js (vanilla, no dependencies; it builds no DOM, it reads data-sc-*
   attributes off real markup and drives them from one scroll value). These are the rules it needs
   to function — the pinned stage, the pre-paint state of a cue, the once-only flow reveal, the pan
   rail — restated on the site's own tokens. Everything visual stays in site.css. */

/* a pinned act: the engine sets the act's height (span × viewport) and sticks the stage */
.sc-act--pinned { position: relative; }
.sc-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: clip;
  z-index: 1;
}

/* a cue: the engine writes opacity / transform inline; this is the state before its first read */
[data-sc-cue] { opacity: 0; will-change: opacity, transform; }
.sc-ready [data-sc-cue] { transition: none; }

/* the pan rail */
[data-sc-pan] { display: flex; will-change: transform; }

/* the flow reveal — fires once on entry; content that re-hides on the way back up is a defect */
[data-sc-in], [data-sc-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 620ms cubic-bezier(.16, 1, .3, 1), transform 620ms cubic-bezier(.16, 1, .3, 1);
}
[data-sc-in].sc-in, [data-sc-stagger] > .sc-in { opacity: 1; transform: none; }

/* counters: figures should not jitter as digits change */
[data-sc-count], .sc-nums { font-variant-numeric: tabular-nums; }

/* reduced motion: fewer and gentler, not zero — opacity still carries the reveal */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-sc-in], [data-sc-stagger] > * { transform: none; transition-duration: 220ms; }
  [data-sc-pan] { transform: none !important; }
}
