/* Retenra motion layer.
   Premium redesign experiment, Phase 1, 2026-11-27. One shared
   set of easing curves, durations, and interaction treatments
   for every page, loaded after the shell stylesheet. Motion here
   is feedback, never a gate: routine transitions stay at or
   under about 200ms, nothing in this file delays an answer, a
   navigation, or a reading, and the reduced motion block at the
   end turns the decorative movement off while keeping every
   state change instant and readable. */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 260ms;
}

/* Page entrance: the main content settles in with a short fade
   and rise. It runs once on load and never repeats. */
@keyframes retenra-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: retenra-page-in var(--dur-3) var(--ease-out) both; }

/* Buttons feel tactile: color and shadow ease on hover, and a
   pressed button dips instead of just shrinking. */
.btn {
  transition: transform var(--dur-1) var(--ease-out),
    background-color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary:hover { box-shadow: var(--glow-primary-hover); }

/* Answer choices and other tappable rows answer the touch with
   a fast color settle only. Nothing moves, nothing waits. */
.option, .tab-tile {
  transition: background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

/* Cards that act as links lift a step toward the reader. */
a.card, a.plan-card, a.int-card, .tab-tile {
  transition-property: transform, box-shadow, background-color, border-color, color;
  transition-duration: var(--dur-2), var(--dur-2), var(--dur-1), var(--dur-1), var(--dur-1);
  transition-timing-function: var(--ease-out);
}
a.card:hover, a.plan-card:hover, a.int-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-3);
}
.tab-tile:hover { transform: translateY(-1px); box-shadow: var(--elev-2); }
.tab-tile:active { transform: translateY(0); }

/* Progress fills glide to their new width instead of jumping:
   the domain bars, the readiness meter, and the blueprint bars. */
.bar i, .meter .fill, .bp2-bar i {
  transition: width var(--dur-3) var(--ease-out);
}

/* Focused fields take the blue focus ring from the token file,
   so the glow reads as part of the design system. */
.field input:focus { outline-color: var(--blue); box-shadow: var(--glow-focus); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  box-shadow: var(--glow-focus);
}

/* Reduced motion: state changes still happen, instantly and
   readably; the travel between states is what goes away. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  main { animation: none !important; }
  .btn:active, .tab-tile:hover, .tab-tile:active,
  a.card:hover, a.plan-card:hover, a.int-card:hover { transform: none; }
}
