/* GENERATED from frontend/foundations/motion.css — do not edit this copy. */
/* ============================================================================
   YWE motion foundations — temperament "Composed"
   Source of truth. Synced to per-surface copies by scripts/sync-frontend-foundations.mjs.
   Spec: docs/SPEC_MOTION_SYSTEM.md   Guide: docs/MOTION.md
   ============================================================================ */

:root {
  /* --- Duration scale ------------------------------------------------------
     Five element-type tiers, anchored on the Composed temperament. Pick by what
     the thing IS, not by how important it feels. */
  --dur-instant:  120ms;   /* tooltip, colour shift, micro-feedback */
  --dur-quick:    200ms;   /* hover, button press, icon swap */
  --dur-standard: 320ms;   /* cards, dropdowns, badges */
  --dur-emphasis: 460ms;   /* sheets, drawers, modals, tab panels */
  --dur-slow:     720ms;   /* page-level, dramatic reveal */
  --dur-spin:     720ms;   /* functional loop — deliberately NOT expressive */

  /* --- Easing --------------------------------------------------------------
     Entrances decelerate, exits accelerate. Springs are a separate vocabulary:
     the temperament sets the clock, it never decides whether a thing bounces. */
  --ease-enter:  cubic-bezier(.364, 0, .164, 1);
  --ease-exit:   cubic-bezier(.382, 0, 1,    1);
  --ease-both:   cubic-bezier(.364, 0, .164, 1);

  /* Both lifted from this codebase's own overshoot family rather than invented.
     --ease-spring is the curve that already had 55 uses. */
  --ease-spring:        cubic-bezier(.18, 1.16, .3,  1);
  --ease-spring-strong: cubic-bezier(.34, 1.5,  .64, 1);

  /* --- Displacement --------------------------------------------------------- */
  --rise:     9px;     /* entrance travel */
  --stagger:  81ms;    /* cascade step for a handful of items (~5) */
  --stagger-dense: 36ms; /* cascade step for collections — grids, carousels, lists */
  --lift:    -4px;     /* card hover lift */
  --lift-sm: -2px;     /* button hover lift */
  --press:   .982;     /* active-state scale */

  /* --- Tempo ----------------------------------------------------------------
     One clock everywhere. The original design had a second "instrument" register
     at x0.75 for work surfaces — that existed because the candidate temperament
     was Breath (640ms standard), which a dashboard genuinely could not wear.
     Composed is already 200/320/460; the multiplier only rushed motion that was
     brisk to begin with, so it is retired. Keep this at 1 unless the whole site
     should change pace, in which case this single number does it. */
  --tempo: 1;

  --t-instant:  calc(var(--dur-instant)  * var(--tempo));
  --t-quick:    calc(var(--dur-quick)    * var(--tempo));
  --t-standard: calc(var(--dur-standard) * var(--tempo));
  --t-emphasis: calc(var(--dur-emphasis) * var(--tempo));
  --t-slow:     calc(var(--dur-slow)     * var(--tempo));
  --t-stagger:  calc(var(--stagger)      * var(--tempo));
}

/* ----------------------------------------------------------------------------
   Reduced motion. Ambient and looping motion stops entirely; functional
   feedback survives at a near-instant clock so the interface still confirms
   itself rather than going dead.
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --tempo: .01;
    --rise: 0px;
    --stagger: 0ms;
    --lift: 0px;
    --lift-sm: 0px;
    --press: 1;
    --ease-spring: var(--ease-enter);
    --ease-spring-strong: var(--ease-enter);
  }
  /* Anything that loops forever should simply stop. */
  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
