/* ============================================================
   ANIMATIONS — reveals, transitions, reduced-motion
   ============================================================ */

@keyframes scroll-line {
  0%   { top: -100%; }
  50%  { top: 0; }
  100% { top: 100%; }
}

/* scroll reveal (elements get [data-reveal]; JS adds .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 700ms cubic-bezier(0.33, 1, 0.68, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="2"] { transition-delay: 120ms; }
[data-reveal="3"] { transition-delay: 240ms; }

/* page fade-in (feels like turning a page in a photo book) */
body { animation: page-in 500ms cubic-bezier(0.33, 1, 0.68, 1); }
@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body.page-leaving { opacity: 0; transition: opacity 250ms ease; }

/* fullscreen nav link stagger */
.nav-fullscreen-links li {
  opacity: 0; transform: translateY(18px);
  transition: opacity 500ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 500ms cubic-bezier(0.33, 1, 0.68, 1);
}
.nav-fullscreen.is-open .nav-fullscreen-links li { opacity: 1; transform: none; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(2) { transition-delay: 60ms; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(3) { transition-delay: 120ms; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(4) { transition-delay: 180ms; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(5) { transition-delay: 240ms; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(6) { transition-delay: 300ms; }
.nav-fullscreen.is-open .nav-fullscreen-links li:nth-child(7) { transition-delay: 360ms; }

/* respect reduced motion */
@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .scroll-indicator::after { animation: none; }
}
