/* src/styles/motion.css — NOT from the live site. Two rules of our own on top
 * of the live AOS stylesheet (aos.css), which stays verbatim.
 * Must load after base.css (html { scroll-behavior: smooth; }) and aos.css.
 */

/* Reduced motion. BRIEF Phase 2: "Respect prefers-reduced-motion"; DEVIATIONS
 * D-026. The live site animates and scrolls smoothly for everyone. When the
 * visitor's system asks for reduced motion, the scroll-reveal elements appear
 * in their final state with no transition (src/scripts/reveal.ts adds
 * "aos-animate" to all of them at once), and in-page links jump instead of
 * scrolling.
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-aos] {
    transition: none !important;
  }
}

/* The floor. DECISIONS round 18, decision 3; DEVIATIONS D-028. Content must
 * never stay invisible because of a script. aos.css hides every [data-aos]
 * element until a script reveals it; this undoes that, giving each element
 * AOS's final state (opacity 1, transform translateZ(0)) at once, unless
 * <html> has class "js-reveal". The inline script in <head>
 * (src/layouts/Base.astro) adds the class, and takes it away again if the
 * reveal has not reported within 3 s. No JavaScript, a failed script, or no
 * IntersectionObserver: everything is shown.
 */
html:not(.js-reveal) [data-aos] {
  opacity: 1 !important;
  transform: translateZ(0) !important;
  transition: none !important;
}
