/* ==========================================================================
   UPtv — High-Performance CSS Animations & Micro-Interactions
   ========================================================================== */

/* Infinite Marquee: Leftward */
@keyframes marqueeScrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Infinite Marquee: Rightward */
@keyframes marqueeScrollRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Subtle Pulsing for Live Activity Dot */
@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

/* Recommended Plan Badge Shimmer */
@keyframes badgeGlowPulse {
  0%, 100% {
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 28px rgba(229, 9, 20, 0.75);
  }
}

/* Hero Headline Cinematic Animations */
@keyframes headlineFadeUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes headlinePunchline {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    filter: drop-shadow(0 0 0 rgba(229, 9, 20, 0)) drop-shadow(0 0 0 rgba(0, 0, 0, 0));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 35px rgba(229, 9, 20, 0.45)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9));
  }
}

/* Subtle Hero Atmospheric Flare */
@keyframes ambientGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.08);
  }
}

/* Live Activity Toast Entrance */
@keyframes toastSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Live Activity Toast Exit */
@keyframes toastFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

/* Scroll Reveal Classes */
.reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Delay helpers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Accessibility: Support for 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;
  }
  
  .marquee-track,
  .marquee-track-reverse,
  .ticker-track {
    animation: none !important;
    overflow-x: auto !important;
    display: flex !important;
    gap: 16px !important;
    scroll-snap-type: x mandatory !important;
  }

  .reveal-init {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .hero-headline-top,
  .hero-headline-bottom,
  .hero-headline-line1,
  .hero-headline-line2 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    filter: drop-shadow(0 0 25px rgba(229, 9, 20, 0.35)) !important;
  }
}
