/* ══ MOTION TOKENS ═══════════════════════════════════════════  11 Sep 2026 ══
   One file, so a duration is never typed into a rule.

   Colour learned this lesson first: a hex typed into forty places becomes
   forty hexes. A duration behaves identically, and worse, because nobody can
   see that two 180ms transitions were meant to be the same 180ms.

   THE LADDER IS CARBON'S, and every rung has a job named against it rather
   than a feeling. Mason reference `interaction.md` i14.
     70ms   a button, a toggle, a checkbox
     110ms  a fade
     150ms  a small expansion, a short movement
     240ms  an expansion, a toast, a system alert
     400ms  a large expansion, an important notification
     700ms  dimming a background behind an overlay

   THE CURVES. A thing arriving decelerates. A thing leaving accelerates. A
   thing staying put uses the standard curve. i15. Carbon's productive set,
   because everything on this site except the index splash is productive work.

   EXIT IS FASTER THAN ENTRY. NN/g: an overlay may arrive over 300ms and should
   leave in 200-250. Arriving has to be read; leaving has to get out of the way.
   i12. That is why --dur-exit exists and is not the same as --dur-enter.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --dur-tap:    70ms;    /* button, toggle, checkbox                        */
  --dur-fade:  110ms;    /* opacity only                                    */
  --dur-base:  150ms;    /* the default: small expansion, short movement    */
  --dur-enter: 240ms;    /* something arriving: toast, panel, alert         */
  --dur-exit:  200ms;    /* the same thing leaving                          */
  --dur-large: 400ms;    /* a large expansion                               */
  --dur-dim:   700ms;    /* the ground behind an overlay                    */

  --ease-standard: cubic-bezier(.2, 0, .38, .9);
  --ease-enter:    cubic-bezier(0,  0, .38, .9);
  --ease-exit:     cubic-bezier(.2, 0, 1,   .9);
}

/* ── REDUCED MOTION ────────────────────────────────────────────────────────
   NOT `* { animation-duration: .01ms !important }`. That satisfies the letter
   of the preference and deletes the feedback the guidance asks you to keep.

   The spec's own words are that the user prefers an interface which "removes,
   reduces, or REPLACES motion-based animations", and WebKit, who originated
   the query, are blunter still: "Only remove the animations you know to be
   vestibular triggers. Unless a specific animation is likely to cause a
   problem, removing it prematurely only succeeds in making your site
   unnecessarily boring."

   So this file does one thing: it collapses every duration to a short
   cross-fade's worth of time. Transitions still fire, so a state change is
   still announced; nothing travels far enough to be a vestibular trigger.
   Anything that ROTATES or SCALES has to opt out for itself at the component,
   because those are the two the guidance actually names.

   Where the law sits, for the record: honouring this preference is WCAG 2.3.3,
   Level AAA. The Level A rule is 2.2.2 Pause Stop Hide, and it bites on
   anything moving, blinking or scrolling by itself for more than 5 seconds. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-tap: 1ms; --dur-fade: 1ms; --dur-base: 1ms;
    --dur-enter: 100ms; --dur-exit: 100ms; --dur-large: 100ms; --dur-dim: 1ms;
  }
}
