/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS.CSS — Keyframes, Transitions & Scroll Reveal Orchestration
   GPU Accelerated (Transform & Opacity only)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Keyframe Definitions ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.6);
  }
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.2);
  }
}

/* ── IntersectionObserver Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Stagger Delays for Grid Children */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

/* ── Hero Stagger Entrance ── */
.hero-stagger-1 { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.hero-stagger-2 { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.hero-stagger-3 { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
.hero-stagger-4 { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.hero-stagger-5 { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }

/* ── Floating Badge Animation ── */
.floating-element {
  animation: floatSlow 4s ease-in-out infinite;
}

/* ── Respect User Preferences (Accessibility) ── */
@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 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Ticker must always scroll — exempt from reduced-motion override */
  .ticker-content {
    animation: marquee 32s linear infinite !important;
    animation-duration: 32s !important;
    animation-iteration-count: infinite !important;
    white-space: nowrap !important;
  }
}
