/* ============================================================
   ANIMATIONS - Keyframes, scroll-reveal, reduced-motion
   ============================================================ */

/* === CURSOR BLINK === */
@keyframes blink {
  50% { opacity: 0; }
}

/* === SCROLL REVEAL SYSTEM ===
   Elements with class "reveal" start hidden.
   JS adds "reveal--visible" when they enter the viewport.
*/
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children for grid items */
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }
.reveal:nth-child(5) { transition-delay: 400ms; }
.reveal:nth-child(6) { transition-delay: 500ms; }

/* === HERO CONTENT FADE IN === */
.hero__greeting,
.hero__name,
.hero__title,
.hero__subtitle,
.hero__cta {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.hero__greeting   { animation-delay: 0.2s; }
.hero__name       { animation-delay: 0.4s; }
.hero__title      { animation-delay: 0.6s; }
.hero__subtitle   { animation-delay: 0.8s; }
.hero__cta        { animation-delay: 1.0s; }

.hero__terminal {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === METRICS COUNTER GLOW ===
   Subtle glow pulse on the numbers when they finish counting
*/
.metrics__number--done {
  text-shadow: 0 0 20px var(--color-accent-glow);
}

/* === TIMELINE DOT PULSE === */
.timeline__dot {
  transition: box-shadow var(--transition-base);
}

.reveal--visible .timeline__dot {
  box-shadow: 0 0 0 4px var(--color-accent-dim);
}

/* === NAV SCROLL SHADOW ===
   Added via JS when scrolled past hero
*/
.site-header--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* === MOBILE NAV BACKDROP === */
.nav__list--open::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* ============================================================
   ACCESSIBILITY: 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 {
    opacity: 1;
    transform: none;
  }

  .hero__greeting,
  .hero__name,
  .hero__title,
  .hero__subtitle,
  .hero__cta,
  .hero__terminal {
    opacity: 1;
    transform: none;
  }
}
