/* ============================================
   bestiptvusa.store — Mobile-First Responsive
   Cinema Black #0B0F19 | WCAG AA dark contrast
   ============================================ */

:root {
  --cinema-black: #0B0F19;
  --cinema-card: #111827;
  --cinema-card-deep: #111827;
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --accent-purple: #A855F7;
  --accent-orange: #F97316;
  --accent-green: #22C55E;
  --touch-min: 48px;
  --container-max: 80rem;
  --container-4k: 96rem;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cinema-black);
  color: var(--text-secondary);
  overflow-x: hidden;
}

/* ——— Layout containers ——— */
.page-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .page-container { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1024px) {
  .page-container { padding-left: 3rem; padding-right: 3rem; }
}
@media (min-width: 1920px) {
  .page-container { max-width: var(--container-4k); }
}

.section-pad {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .section-pad { padding-top: 3rem; padding-bottom: 3rem; }
}
@media (min-width: 1024px) {
  .section-pad { padding-top: 4rem; padding-bottom: 4rem; }
}

/* ——— Visual theme ——— */
.gradient-hero {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(168,85,247,0.18), transparent),
              radial-gradient(ellipse 60% 40% at 90% 50%, rgba(249,115,22,0.08), transparent),
              var(--cinema-black);
}
.hero-section {
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--cinema-black));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 640px) {
  .hero-inner { padding-top: 3.5rem; padding-bottom: 2.5rem; }
}
@media (min-width: 1024px) {
  .hero-inner { padding-top: 5rem; padding-bottom: 3rem; }
}
.hero-content {
  max-width: 42rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #C4B5FD;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media (min-width: 640px) {
  .hero-badge { font-size: 0.75rem; margin-bottom: 1.5rem; }
}
.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: hero-pulse 2s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.85); }
}
.hero-title {
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .hero-title { margin-bottom: 1.25rem; }
}
.hero-subheadline {
  max-width: 36rem;
  margin-bottom: 1.75rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}
@media (min-width: 640px) {
  .hero-subheadline {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.7;
  }
}
.hero-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hero-cta-row .btn-hero-primary,
.hero-cta-row .btn-hero-secondary {
  width: 100%;
}
@media (min-width: 480px) {
  .hero-cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
  .hero-cta-row .btn-hero-primary,
  .hero-cta-row .btn-hero-secondary {
    width: auto;
  }
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: var(--touch-min);
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #A855F7 0%, #7C3AED 50%, #F97316 100%);
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-hero-primary:hover,
.btn-hero-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  outline: 2px solid #C4B5FD;
  outline-offset: 2px;
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #F1F5F9;
  background: transparent;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-hero-secondary:hover,
.btn-hero-secondary:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.08);
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}
.hero-stat-card {
  padding: 1.125rem 0.75rem;
  text-align: center;
  border-radius: 1rem;
  background: rgba(21, 28, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (min-width: 640px) {
  .hero-stat-card { padding: 1.25rem 1rem; border-radius: 1.25rem; }
}
.hero-stat-value {
  font-size: 1.375rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .hero-stat-value { font-size: 1.5rem; }
}
.hero-stat-label {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
@media (min-width: 640px) {
  .hero-stat-label { font-size: 0.75rem; }
}
.about-infrastructure {
  background: var(--cinema-black);
}
.about-infrastructure-inner {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}
.about-infrastructure-label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-purple);
}
.about-infrastructure-body {
  font-size: 0.9375rem;
}
@media (min-width: 768px) {
  .about-infrastructure-body { font-size: 1rem; }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.gradient-mesh {
  background: linear-gradient(135deg, rgba(168,85,247,0.06) 0%, transparent 50%, rgba(249,115,22,0.04) 100%);
}
.glass {
  background: rgba(21,28,44,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.text-gradient {
  background: linear-gradient(135deg, #F97316, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ——— Touch-friendly CTAs (min 48px) ——— */
.btn-cta,
.btn-wa,
.btn-touch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-cta {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff;
}
.btn-cta:hover, .btn-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.35);
  outline: 2px solid #FDBA74;
  outline-offset: 2px;
}
.btn-wa {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #fff;
}
.btn-wa:hover, .btn-wa:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34,197,94,0.3);
  outline: 2px solid #86EFAC;
  outline-offset: 2px;
}

/* ——— Cards ——— */
.card-lift { transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
@media (hover: hover) {
  .card-lift:hover {
    transform: translateY(-4px);
    border-color: rgba(168,85,247,0.4);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(168,85,247,0.08);
  }
}
.pricing-standard { border-top: 3px solid var(--accent-purple); }
.pricing-family { border-top: 3px solid var(--accent-orange); }

/* ——— Pricing: swipe mobile / grid desktop ——— */
.pricing-scroll {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (max-width: 639px) {
  .pricing-scroll--swipe {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.75rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(168,85,247,0.4) transparent;
  }
  .pricing-scroll--swipe > .pricing-card {
    flex: 0 0 min(88vw, 340px);
    scroll-snap-align: start;
    max-width: min(88vw, 340px);
  }
  .pricing-scroll-hint {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
  }
}
@media (min-width: 640px) {
  .pricing-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .pricing-scroll-hint { display: none; }
}
@media (min-width: 1280px) {
  .pricing-scroll { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}

/* ——— GEO quick-answer leads ——— */
.geo-lead {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .geo-lead { font-size: 1rem; }
}
.geo-lead--left {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

/* ——— Plan toggle switcher ——— */
.plan-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .plan-toggle-wrap { margin-bottom: 2.5rem; }
}
.plan-toggle {
  display: inline-flex;
  width: 100%;
  max-width: 28rem;
  padding: 0.25rem;
  background: var(--cinema-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  gap: 0.25rem;
}
@media (min-width: 640px) {
  .plan-toggle { width: auto; max-width: none; }
}
.plan-toggle-btn,
.plan-tab {
  flex: 1;
  min-height: var(--touch-min);
  padding: 0.625rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (min-width: 640px) {
  .plan-toggle-btn,
  .plan-tab { flex: none; padding: 0.625rem 1.5rem; font-size: 0.875rem; }
}
.plan-toggle-btn.active,
.plan-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(249, 115, 22, 0.3));
  box-shadow: 0 2px 16px rgba(168, 85, 247, 0.25);
}

.plan-panel { display: none; }
.plan-panel.active { display: block; }

/* ——— Steps list ——— */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps-list li {
  counter-increment: step;
}
.step-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  background: var(--cinema-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  height: 100%;
}
.step-num {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #3B82F6, var(--accent-purple));
}
.icon-wrap {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.icon-wrap svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ——— Navigation ——— */
.nav-active { color: #fff !important; background: rgba(255,255,255,0.08); }

#mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

#mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: min(320px, 88vw);
  background: #151C2C;
  border-left: 1px solid #1E293B;
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
#mobile-drawer.is-open { transform: translateX(0); }

.drawer-link {
  display: flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s, color 0.15s;
}
.drawer-link:hover, .drawer-link:focus-visible {
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
}
.drawer-link.nav-active {
  color: #fff;
  background: rgba(168,85,247,0.15);
  border-left: 3px solid var(--accent-purple);
}

#menu-btn {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}
#menu-btn:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

body.menu-open { overflow: hidden; }

/* ——— FAQ ——— */
.faq-open .faq-body { display: block; }
.faq-open .faq-icon { transform: rotate(180deg); }
.faq-item button {
  min-height: var(--touch-min);
}

/* ——— Tables (GEO) ——— */
.geo-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; min-width: 560px; }
.geo-table th {
  background: var(--cinema-card);
  color: var(--text-primary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1E293B;
  font-weight: 600;
}
.geo-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1E293B;
  color: var(--text-secondary);
}
.geo-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  border: 1px solid #1E293B;
}

/* ——— Footer responsive ——— */
.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    text-align: left;
  }
}

/* ——— Typography scale ——— */
.heading-hero {
  font-size: clamp(1.75rem, 5vw + 0.5rem, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.heading-section {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
  line-height: 1.2;
}
.heading-sub {
  font-size: clamp(1.125rem, 2vw + 0.25rem, 1.5rem);
  line-height: 1.3;
}

/* ——— WCAG AA contrast helpers ——— */
.text-body { color: var(--text-secondary); }
.text-muted-accessible { color: var(--text-muted); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* ——— Smart TV / large screens ——— */
@media (min-width: 2560px) {
  html { font-size: 18px; }
  .page-container { max-width: 100rem; }
}

.seo-keywords { display: none; }

/* ——— Legal / policy pages ——— */
.legal-prose {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}
@media (min-width: 768px) {
  .legal-prose { font-size: 1rem; }
}
.legal-prose h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 {
  color: #E2E8F0;
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.legal-prose p { margin-bottom: 1rem; }
.legal-prose ul,
.legal-prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li { margin-bottom: 0.5rem; }
.legal-prose a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.legal-prose a:hover { color: #C4B5FD; }
.legal-prose strong { color: #F1F5F9; font-weight: 600; }
.legal-updated {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #1E293B;
  font-size: 0.8125rem;
}
.legal-nav a { color: var(--text-muted); text-decoration: none; }
.legal-nav a:hover { color: var(--accent-purple); text-decoration: underline; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
