/* ---------- Keyframes ---------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ambientPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* ---------- Hero entrance (fires on load, not scroll-gated) ---------- */
.hero__eyebrow,
.hero__name,
.hero__tagline,
.hero__cta,
.hero__visual {
  opacity: 0;
  animation: fadeSlideUp var(--dur-slow) var(--ease-out) forwards;
}

.hero__eyebrow { animation-delay: 0.05s; }
.hero__name { animation-delay: 0.15s; }
.hero__tagline { animation-delay: 0.3s; }
.hero__cta { animation-delay: 0.45s; }
.hero__visual { animation-delay: 0.25s; }

.hero__decor {
  animation: ambientPulse 7s var(--ease-in-out) infinite;
}

/* ---------- Scroll-reveal engine (toggled by reveal.js) ---------- */
[data-animate] {
  opacity: 0;
}

[data-animate].is-visible {
  animation: fadeSlideUp var(--dur-base) var(--ease-out) forwards;
}

[data-animate="scale"].is-visible {
  animation-name: fadeSlideUp;
}

[data-animate-group] > * {
  opacity: 0;
}

[data-animate-group].is-visible > * {
  animation: fadeSlideUp var(--dur-base) var(--ease-out) forwards;
}

[data-animate-group].is-visible > *:nth-child(1) { animation-delay: 0.02s; }
[data-animate-group].is-visible > *:nth-child(2) { animation-delay: 0.1s; }
[data-animate-group].is-visible > *:nth-child(3) { animation-delay: 0.18s; }
[data-animate-group].is-visible > *:nth-child(4) { animation-delay: 0.26s; }
[data-animate-group].is-visible > *:nth-child(5) { animation-delay: 0.34s; }
[data-animate-group].is-visible > *:nth-child(6) { animation-delay: 0.42s; }

/* Timeline connector draw-in, toggled via .is-visible on .timeline */
.timeline.is-visible .timeline__line-fill {
  transform: scaleX(1);
}

/* Award fan-out: start stacked/flat, JS/CSS combo: cards animate to their rotated resting transform */
.award-card {
  opacity: 0;
  transform: translateY(30px) rotate(0deg) !important;
}

.awards.is-visible .award-card {
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.awards__collage > div:nth-child(1) .award-card { transition-delay: 0.02s; }
.awards__collage > div:nth-child(2) .award-card { transition-delay: 0.1s; }
.awards__collage > div:nth-child(3) .award-card { transition-delay: 0.18s; }
.awards__collage > div:nth-child(4) .award-card { transition-delay: 0.26s; }

@media (min-width: 768px) {
  .awards.is-visible .awards__collage > div:nth-child(1) .award-card { transform: rotate(-3deg) translateY(10px) !important; }
  .awards.is-visible .awards__collage > div:nth-child(2) .award-card { transform: rotate(2deg) !important; }
  .awards.is-visible .awards__collage > div:nth-child(3) .award-card { transform: rotate(-2deg) !important; }
  .awards.is-visible .awards__collage > div:nth-child(4) .award-card { transform: rotate(3deg) translateY(10px) !important; }
}

@media (max-width: 767px) {
  .awards.is-visible .award-card { transform: translateY(0) rotate(0deg) !important; }
}

/* ---------- Reduced motion: snap to final state, no animation ---------- */
@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;
  }

  .hero__eyebrow,
  .hero__name,
  .hero__tagline,
  .hero__cta,
  .hero__visual,
  [data-animate],
  [data-animate-group] > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__decor {
    animation: none !important;
  }

  .timeline__line-fill {
    transform: scaleX(1) !important;
  }
}
