/* Keyframes + scroll-reveal classes */

@keyframes gradient-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes lattice-drift {
  from { background-position: 0 0; }
  to   { background-position: 96px 166px; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50%      { opacity: 0.7;  transform: scale(1.05); }
}

@keyframes crystal-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(1.5deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hero-reveal {
  from { opacity: 0; transform: translate3d(0, 32px, 0); filter: blur(6px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

/* ----- Scroll reveal ----- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity var(--dur-reveal) var(--ease-out-soft),
    transform var(--dur-reveal) var(--ease-out-soft);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Stagger via nth-child delay inside a .stagger container */
.stagger > .reveal.is-visible:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal.is-visible:nth-child(2) { transition-delay: 100ms; }
.stagger > .reveal.is-visible:nth-child(3) { transition-delay: 200ms; }
.stagger > .reveal.is-visible:nth-child(4) { transition-delay: 300ms; }
.stagger > .reveal.is-visible:nth-child(5) { transition-delay: 400ms; }
.stagger > .reveal.is-visible:nth-child(6) { transition-delay: 500ms; }

/* Hero entrance (no scroll trigger — plays on load) */
.hero__content > * {
  opacity: 0;
  animation: hero-reveal 1s var(--ease-out-soft) forwards;
}

.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.25s; }
.hero__content > *:nth-child(3) { animation-delay: 0.4s; }
.hero__content > *:nth-child(4) { animation-delay: 0.55s; }
.hero__content > *:nth-child(5) { animation-delay: 0.7s; }

.hero__visual {
  opacity: 0;
  animation: fade-in 1.2s var(--ease-out-soft) 0.3s forwards;
}

/* ----- Reduced motion ----- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .hero__content > *,
  .hero__visual { opacity: 1; transform: none; filter: none; }

  .lattice { animation: none; }

  .hero__headline .grad { animation: none; }
}
