/*
  Animations: scroll reveals ([data-reveal]), the hero entrance and the reduced-motion variant.
  main.js adds .is-in, counts up the stats and moves the band photo.
  Loads after stone.css.
*/

/* ---------- Animations ---------- */
/* Elements with data-reveal appear when they enter the viewport (see main.js).
   They are hidden only when JS runs (.js) and only when the system does not ask for reduced motion.
   The delay comes from --d: fixed in the hero, computed on scroll for elements that enter together.
   fill-mode "backwards": after the animation the element returns to its normal styles, with no leftover transforms. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in) { opacity: 0; }
  .js [data-reveal].is-in { animation: reveal 800ms var(--ease) var(--d, 0ms) backwards; }
  .js .frame.is-in img { animation: settle 1600ms var(--ease) var(--d, 0ms) backwards; }
  /* the band photo is 96px taller so the parallax never uncovers its edges */
  .js .band img { inset: -48px 0; height: calc(100% + 96px); }
}
@keyframes reveal { from { opacity: 0; translate: 0 24px; } }
@keyframes settle { from { scale: 1.08; } }
@media print { .js [data-reveal]:not(.is-in) { opacity: 1; } }

/* Fixed entrance order for the hero on load. The script keeps these values;
   the rest of the page gets --d from the script, in the order elements enter the viewport. */
.hero .eyebrow { --d: 0ms; }
.hero__title { --d: 90ms; }
.hero__lead { --d: 180ms; }
.hero__actions { --d: 270ms; }
.hero__trust { --d: 360ms; }
.frame { --d: 150ms; }
.card-float--a { --d: 500ms; }
.card-float--b { --d: 620ms; }
.tag-vertical { --d: 740ms; }

/* Reduced motion: no smooth scrolling, marquee stopped, instant transitions */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
