/* ============================================
   RenDS — Primitive Motion Tokens
   ============================================
   Based on Apple HIG animation principles.
   Every animation must have purpose.
   Always respect prefers-reduced-motion.
   ============================================ */

:root {
  /* ─── Durations ─── */
  --duration-0:       0ms;
  --duration-fastest: 50ms;    /* micro-feedback (opacity flicker) */
  --duration-fast:    100ms;   /* instant response (active states) */
  --duration-normal:  150ms;   /* interaction feedback (hover, focus) */
  --duration-moderate:250ms;   /* small transitions (accordion, collapse) */
  --duration-slow:    300ms;   /* standard transitions (view change) */
  --duration-slower:  450ms;   /* modal entrance, complex transitions */
  --duration-slowest: 600ms;   /* page transitions, large animations */

  /* ─── Easing Curves ─── */
  /*
     Easings organized by *intent*. Use these names when writing
     new motion; the legacy aliases below keep existing components
     working unchanged.
  */

  --ease-linear:        linear;

  /* Standard — most common, balanced feel (legacy default) */
  --ease-default:       cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Decelerate — element arriving / entering / expanding.
     Preferred for ANY motion that ends at rest in the UI. */
  --ease-decelerate:    cubic-bezier(0.00, 0.00, 0.20, 1.00);

  /* Accelerate — element leaving / exiting / collapsing.
     Use only when the element goes off-screen or disappears. */
  --ease-accelerate:    cubic-bezier(0.40, 0.00, 1.00, 1.00);

  /* Standard in-out — symmetric, for in-flight position changes
     (not entering/exiting, just moving between two on-screen states). */
  --ease-standard:      cubic-bezier(0.20, 0.00, 0.00, 1.00);

  /* Emphasized (Material 3) — slower start, fast middle, gentle stop.
     Use for hero / attention-seeking transitions. */
  --ease-emphasized:    cubic-bezier(0.20, 0.00, 0.00, 1.00);
  --ease-emphasized-decelerate: cubic-bezier(0.05, 0.70, 0.10, 1.00);
  --ease-emphasized-accelerate: cubic-bezier(0.30, 0.00, 0.80, 0.15);

  /* Spring-soft — gentle overshoot, friendly feel */
  --ease-spring-soft:   cubic-bezier(0.34, 1.20, 0.64, 1.00);

  /* Spring-snappy — fast overshoot, playful (Apple sheet feel) */
  --ease-spring-snappy: cubic-bezier(0.20, 1.50, 0.40, 1.00);

  /* Bounce — noticeable overshoot (use sparingly) */
  --ease-bounce:        cubic-bezier(0.34, 1.56, 0.64, 1.00);

  /* ─── Legacy aliases (preserved verbatim) ─── */
  --ease-out:           var(--ease-decelerate);
  --ease-in:            var(--ease-accelerate);
  --ease-in-out:        cubic-bezier(0.645, 0.045, 0.355, 1);
  --ease-spring:        var(--ease-spring-soft);
  --ease-snappy:        var(--ease-standard);

  /* ─── Duration aliases (compatibility) ─── */
  --duration-100: var(--duration-fast);
  --duration-200: var(--duration-normal);
}

/* ─── Reduced Motion ───
   When user prefers reduced motion,
   all durations collapse to near-zero.
   Components still change state, just instantly. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fastest: 0ms;
    --duration-fast:    0ms;
    --duration-normal:  0ms;
    --duration-moderate:0ms;
    --duration-slow:    0ms;
    --duration-slower:  0ms;
    --duration-slowest: 0ms;
  }
}
