/* ==========================================================================
   Hero Animations — Cinematic entrance, starfield, counters, scroll reveals
   ========================================================================== */

/* ---- Starfield Canvas ---- */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Ensure hero content sits above particles */
.hero__content {
  position: relative;
  z-index: 2;
}

/* ---- Entrance: Initial hidden states ---- */
.hero--animating .hero__title {
  opacity: 0;
  transform: translateY(30px);
}

.hero--animating .hero__tagline {
  opacity: 0;
  transform: translateY(20px);
}

.hero--animating .hero__stats {
  opacity: 0;
  transform: scale(1.3);
}

.hero--animating .hero__stat {
  opacity: 0;
  transform: scale(1.5);
}

.hero--animating .hero__cta {
  opacity: 0;
  transform: translateY(30px);
}

/* ---- Stats Glow Pulse ---- */
@keyframes statGlow {
  0%   { text-shadow: 0 0 0 transparent; }
  50%  { text-shadow: 0 0 20px rgba(0, 212, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.3); }
  100% { text-shadow: 0 0 8px rgba(0, 212, 255, 0.2); }
}

.hero__stat-number.glow-pulse {
  animation: statGlow 0.8s ease-out forwards;
}

/* ---- Logo Glow ---- */
@keyframes logoGlow {
  0%   { filter: drop-shadow(0 0 0 transparent); }
  40%  { filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.7)) drop-shadow(0 0 50px rgba(0, 229, 255, 0.3)); }
  100% { filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.15)); }
}

.nav__logo-img.logo-entrance {
  animation: logoGlow 1s ease-out 0.3s forwards;
}

/* ---- Scroll Reveal Sections ---- */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}

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

/* ---- Title Letter Animation (Splitting.js chars) ---- */
.hero__title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
}

.hero__title .whitespace {
  width: 0.3em;
  display: inline-block;
}

/* ---- Reduced Motion: skip all animations ---- */
@media (prefers-reduced-motion: reduce) {
  .hero--animating .hero__title,
  .hero--animating .hero__tagline,
  .hero--animating .hero__stats,
  .hero--animating .hero__stat,
  .hero--animating .hero__cta,
  .reveal-section {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-particles {
    display: none;
  }

  .hero__title .char {
    opacity: 1;
    transform: none;
  }
}
