/* Single source of truth for motion. Components reference these variables; they never
   contain a literal duration. test/motion.test.js enforces that — an animation vocabulary
   only stays consistent if there is exactly one place to change it. */

:root {
  --dur-instant: 90ms;
  --dur-quick: 160ms;
  --dur-normal: 240ms;
  --dur-slow: 420ms;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-instant: 1ms;
    --dur-quick: 1ms;
    --dur-normal: 1ms;
    --dur-slow: 1ms;
  }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.motion-fade-in {
  animation: rt-fade-in var(--dur-normal) var(--ease-out) both;
}

.motion-pop {
  animation: rt-pop var(--dur-quick) var(--ease-out) both;
}

@keyframes rt-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes rt-pop {
  from { transform: scale(0.96); }
  to   { transform: scale(1); }
}
