/* ============================================================
   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; }

/* ─── Gradient FAQ Open State (global — applied everywhere) ─ */
.faq-item.open {
  border-color: transparent !important;
  background: linear-gradient(#060d1f, #060d1f) padding-box,
              linear-gradient(135deg, #38bdf8, #6366f1, #f472b6) border-box !important;
  border: 1px solid transparent !important;
  box-shadow: 0 8px 32px rgba(56,189,248,0.15), 0 0 0 1px rgba(56,189,248,0.08);
}
.faq-item.open .faq-question {
  background: linear-gradient(135deg, rgba(56,189,248,0.07), rgba(99,102,241,0.05));
  border-radius: 12px 12px 0 0;
}
.faq-item.open .faq-question > span:first-child {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.faq-item.open .faq-answer-inner {
  background: linear-gradient(135deg, rgba(56,189,248,0.03), rgba(99,102,241,0.02));
  border-top-color: rgba(56,189,248,0.15);
}

#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  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: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: var(--gradient-btn);
  border-radius: 2px;
  animation: loader-fill 1.2s ease forwards;
}
@keyframes loader-fill {
  from { width: 0; }
  to { width: 100%; }
}
