/* Motion. Two systems, deliberately.

   1. TRANSITIONS — the shipped OrkaOS timing, read off the running product:
      0.22s / cubic-bezier(0.2, 0, 0, 1). Used for state changes that are not
      driven by a finger: theme flips, pane redistribution, hover, disclosure.

   2. SPRINGS — for anything a pointer touches. Apple parameterises a spring as
      DAMPING (overshoot) and RESPONSE (seconds to target); Motion / Framer Motion
      express the same thing as bounce + duration. Both are exported so JS reads the
      same numbers as CSS. Animate from the CURRENT on-screen value and the CURRENT
      velocity, never from the target — a gesture must be interruptible mid-flight. */
:root {
  --dur-instant: 0.1s; /* @kind other */
  --dur-fast: 0.16s; /* @kind other */
  --dur-base: 0.22s; /* @kind other */
  --dur-slow: 0.32s; /* @kind other */
  --dur-slower: 0.48s; /* @kind other */

  --ease-orka: cubic-bezier(0.2, 0, 0, 1); /* @kind other */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1); /* @kind other */
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0); /* @kind other */
  --ease-in-out: cubic-bezier(0.5, 0, 0.5, 1); /* @kind other */
  --ease-overshoot: cubic-bezier(0.34, 1.42, 0.5, 1); /* @kind other */

  --transition-base: var(--dur-base) var(--ease-orka); /* @kind other */
  --transition-pane: grid-template-columns var(--dur-base) var(--ease-orka); /* @kind other */

  /* Spring parameters. Read from JS:
     getComputedStyle(document.documentElement).getPropertyValue('--spring-ui-bounce') */
  --spring-ui-bounce: 0; /* @kind other */         --spring-ui-duration: 0.35; /* @kind other */
  --spring-move-bounce: 0; /* @kind other */       --spring-move-duration: 0.4; /* @kind other */
  --spring-sheet-bounce: 0.2;    --spring-sheet-duration: 0.3;
  --spring-momentum-bounce: 0.2; /* @kind other */ --spring-momentum-duration: 0.4; /* @kind other */

  /* Momentum projection and boundary resistance */
  --deceleration-rate: 0.998; /* @kind other */
  --rubberband-constant: 0.55; /* @kind other */

  /* Press feedback fires on pointer-DOWN, not on release */
  --press-scale: 0.97; /* @kind other */
  --press-scale-large: 0.99; /* @kind other */
  --press-dur: var(--dur-instant); /* @kind other */

  /* Gesture detail */
  --gesture-threshold: 10px; /* @kind spacing */
  --hit-min: 44px; /* @kind spacing */
  --hit-padding: 10px; /* @kind spacing */
}

/* A gentler equivalent, not the absence of feedback. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-base: 0.12s; /* @kind other */
    --dur-slow: 0.14s; /* @kind other */
    --dur-slower: 0.16s; /* @kind other */
    --ease-overshoot: var(--ease-out); /* @kind other */
    --spring-ui-duration: 0.001; /* @kind other */
    --spring-sheet-duration: 0.001; /* @kind other */
    --spring-sheet-bounce: 0; /* @kind other */
    --spring-momentum-bounce: 0; /* @kind other */
    --press-scale: 1; /* @kind other */
    --press-scale-large: 1; /* @kind other */
  }
}
