/* ============================================================
   StreamVault IPTV — Animations
   ============================================================ */

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 6px var(--neon); opacity: 1; }
  50% { box-shadow: 0 0 20px var(--neon), 0 0 40px rgba(56,189,248,0.4); opacity: 0.7; }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glow-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes border-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ─── Scroll-Triggered Reveal ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─── Hero Animations ────────────────────────────────────── */
.hero-content .hero-badge {
  animation: fade-in-up 0.8s 0.3s both;
}
.hero-content .hero-title {
  animation: fade-in-up 0.8s 0.5s both;
}
.hero-content .hero-sub {
  animation: fade-in-up 0.8s 0.7s both;
}
.hero-content .hero-btns {
  animation: fade-in-up 0.8s 0.9s both;
}

/* ─── Shimmer Loading ────────────────────────────────────── */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ─── Hover Glow ─────────────────────────────────────────── */
.hover-glow {
  transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(56,189,248,0.25), 0 8px 40px rgba(0,0,0,0.4);
}

/* ─── Logo Animation ─────────────────────────────────────── */
.logo-icon-ring {
  animation: glow-rotate 8s linear infinite;
  transform-origin: center;
}
.nav-logo:hover .logo-icon-ring { animation-duration: 2s; }

/* ─── Button Pulse ───────────────────────────────────────── */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  opacity: 0.5;
  animation: pulse-btn 2s infinite;
  z-index: -1;
}
@keyframes pulse-btn {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* ─── Stats Counter ──────────────────────────────────────── */
.stat-item { animation: count-up 0.6s ease both; }

/* ─── FAQ Open State — Light Mode (Airshift Stream) ─────── */
.faq-item.open {
  border-color: #93c5fd !important;
  background: #ffffff !important;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.1), 0 0 0 1px #bfdbfe !important;
}
.faq-item.open .faq-question {
  background: #eff6ff;
  color: #1e40af;
}
.faq-item.open .faq-question > span:first-child {
  color: #1e40af;
  background: none;
  -webkit-text-fill-color: #1e40af;
}
.faq-item.open .faq-icon {
  background: #1e40af !important;
  border-color: #1e40af !important;
  color: #fff !important;
  transform: rotate(45deg);
}
.faq-item.open .faq-answer-inner {
  background: #f8fafc;
  color: #4b5563;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

#page-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.loader-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e40af;
}
.loader-bar {
  width: 200px;
  height: 3px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: #1e40af;
  border-radius: 4px;
  animation: loader-fill 1.2s ease forwards;
}
@keyframes loader-fill {
  from { width: 0; }
  to { width: 100%; }
}
