/* AB#284: motion level as a theme token (Site build grill pick 13).
   One attribute on <html> picks the level: data-motion="none" | "subtle" | "expressive".
   Components read only these tokens; they never hold their own durations or distances.
   The OS setting prefers-reduced-motion: reduce wins over every level (see the end of this file). */

:root,
:root[data-motion="subtle"] {
  /* Starting values from the AB#281 motion spike: feedback 120 ms, local change 180 ms, larger 240 ms. */
  --motion-fast: 120ms;      /* hover, focus, press feedback */
  --motion-standard: 180ms;  /* a panel opens, a status appears */
  --motion-slow: 240ms;      /* the largest transition on the page */
  --motion-distance: 4px;    /* how far things travel on entry */
  --motion-lift: -2px;       /* button hover lift */
  --motion-press: 0.98;      /* button press scale */
  --motion-stagger: 0ms;     /* delay between list items: none at subtle */
  --motion-loop: 2400ms;     /* the one hero loop */
  --motion-loop-state: running;
  --ease-enter: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-move: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-motion="none"] {
  --motion-fast: 0ms;
  --motion-standard: 0ms;
  --motion-slow: 0ms;
  --motion-distance: 0px;
  --motion-lift: 0px;
  --motion-press: 1;
  --motion-stagger: 0ms;
  --motion-loop: 0ms;
  --motion-loop-state: paused;
}

:root[data-motion="expressive"] {
  --motion-fast: 160ms;
  --motion-standard: 280ms;
  --motion-slow: 420ms;
  --motion-distance: 12px;
  --motion-lift: -3px;
  --motion-press: 0.96;
  --motion-stagger: 50ms;    /* 3 items: the last one starts 100 ms late, under the 150 ms cap */
  --motion-loop: 1800ms;
  --motion-loop-state: running;
  /* A small overshoot, only for things that move; never for errors or confirmations (AB#281 rule 10). */
  --ease-move: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* The OS setting wins over every level: all durations and distances go to zero. */
@media (prefers-reduced-motion: reduce) {
  :root,
  :root[data-motion] {
    --motion-fast: 0ms;
    --motion-standard: 0ms;
    --motion-slow: 0ms;
    --motion-distance: 0px;
    --motion-lift: 0px;
    --motion-press: 1;
    --motion-stagger: 0ms;
    --motion-loop: 0ms;
    --motion-loop-state: paused;
  }
}
