/*
 * Scroll-triggered animations — vanilla CSS + IntersectionObserver
 * replacement for the abandoned AOS library (last updated 2018).
 *
 * The HTML still uses data-aos="..." and data-aos-delay="<ms>"
 * attributes — we kept them intact rather than rewriting 97 call
 * sites. scroll-animations.js handles the observation and adds the
 * .aos-animate class when an element enters the viewport.
 *
 * Animation types used on this site (and only these — anything
 * exotic that AOS supported but we never referenced has been
 * dropped):  fade-up, fade-down, fade-left, fade-right, zoom-in,
 * zoom-out.
 */

[data-aos] {
  opacity: 0;
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  will-change: opacity, transform;
}

[data-aos="fade-up"]    { transform: translateY(20px); }
[data-aos="fade-down"]  { transform: translateY(-20px); }
[data-aos="fade-left"]  { transform: translateX(20px); }
[data-aos="fade-right"] { transform: translateX(-20px); }
[data-aos="zoom-in"]    { transform: scale(0.92); }
[data-aos="zoom-out"]   { transform: scale(1.08); }

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* Honor OS-level motion-reduction preference (vestibular disorders,
 * motion-induced nausea). Elements render in their final state with
 * no transition. */
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
