/* Keyframes + reduced-motion — DESIGN §3 / §4 */

/* Hero stagger entrance */
.hero-anim {
  opacity: 0;
  transform: translateY(12px);
}

/* No-JS fallback: show everything */
.no-js .hero-anim,
.no-js .step,
.no-js .flow-step {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.is-ready .hero-anim {
  animation: hero-in var(--dur-2) var(--ease-out) forwards;
}

.is-ready .hero-anim:nth-child(1) { animation-delay: 0ms; }
.is-ready .hero-anim:nth-child(2) { animation-delay: 70ms; }
.is-ready .hero-anim:nth-child(3) { animation-delay: 140ms; }
.is-ready .hero-anim:nth-child(4) { animation-delay: 210ms; }
.is-ready .hero-anim:nth-child(5) { animation-delay: 280ms; }

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optional CTA shimmer (once loop, slow) — disabled under reduced-motion */
.cta-primary.shimmer {
  position: relative;
  overflow: hidden;
}

.cta-primary.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: shimmer-sweep var(--dur-3) var(--ease-soft) 1.2s infinite;
  animation-iteration-count: infinite;
  animation-duration: 4.8s;
  pointer-events: none;
}

@keyframes shimmer-sweep {
  0%, 70% { transform: translateX(-120%); }
  85% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-anim,
  .is-ready .hero-anim,
  .step,
  .flow-step {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .cta-primary.shimmer::after,
  .preview-card::after {
    display: none !important;
    animation: none !important;
  }

  .hero-visual .preview-card,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .card:hover,
  .card:focus-within {
    transform: none;
  }
}

/* Legal pages (2026-09-26a): progress bar + TOC transitions off under reduced motion */
@media (prefers-reduced-motion: reduce) {
  .read-progress { display: none !important; }
  .legal-toc a::before, .refund-card { transition: none !important; }
  .refund-card:hover { transform: none; }
}
