/* assets/motion.css — site-wide reduced-motion honouring.
 *
 * Most pages on this site inline their own <style> block, so there is no
 * single sheet to put this in. This file is linked from every page and
 * loads last, which is why the movement overrides carry !important —
 * they need to beat inline rules of equal specificity.
 *
 * Reduced motion means less movement, not no feedback. Deliberately kept:
 *   - opacity fades (they carry meaning: "this arrived", "this went away")
 *   - colour and border transitions
 *   - :active press feedback (a response to the user's own action)
 * Deliberately removed:
 *   - translate/scale movement on entrances
 *   - looping and decorative animation
 *   - smooth scroll hijacking
 */
@media (prefers-reduced-motion: reduce) {

  html { scroll-behavior: auto !important; }

  /* Entrances are forced to their finished state rather than merely
     un-translated. These elements start at opacity:0 and are revealed by
     an IntersectionObserver adding .visible; if any page ever gates that
     observer behind this same media query, a transform-only override
     would leave the content permanently invisible. Visibility beats the
     fade. index.html already does exactly this — matching it site-wide. */
  .reveal, .up-reveal, .app-slide,
  [class*="reveal"], [class*="fade-up"], [class*="slide-in"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Anything that loops (waveforms, pulse dots, blinking cursors,
     marquees, aurora washes) settles to a single resting state. */
  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }

  /* Entrance keyframes that animate INTO view must not be left at their
     0% state once the animation is neutralised above. */
  [style*="animation:fadeUp"], [style*="animation:fadeIn"],
  .fade-up, .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Hover lifts and card raises: no travel, but keep the colour change
     so the affordance is still legible. */
  a:hover, button:hover, [role="button"]:hover {
    transform: none !important;
  }
}
