/* ExtremeIPTV.io — Design Tokens + Layout
   Palette: stripe-indigo | Type: Barlow Condensed + Barlow | Style: bento-modular
   Page shape: Split Studio */

:root {
  /* Palette — stripe-indigo */
  --canvas: #ffffff;
  --ink: #0a2540;
  --primary: #635bff;
  --primary-hover: #4b44d4;
  --primary-soft: rgba(99, 91, 255, 0.08);
  --surface: #f6f9fc;
  --muted: #697386;
  --border: #e3e8ee;
  --border-subtle: #f0f4f8;

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;

  /* Spacing (4px scale) */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-32: 32px;
  --s-48: 48px;
  --s-64: 64px;
  --s-96: 96px;
  --s-128: 128px;

  /* Radius — bento-modular */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-btn: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(10, 37, 64, 0.08), 0 2px 4px -2px rgba(10, 37, 64, 0.04);
  --shadow-lg: 0 12px 32px -8px rgba(10, 37, 64, 0.12), 0 4px 8px -4px rgba(10, 37, 64, 0.06);
  --shadow-hover: 0 16px 40px -8px rgba(10, 37, 64, 0.16);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { max-width: 65ch; }

.text-muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: var(--s-12);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-24);
}

section {
  padding: var(--s-96) 0;
}

@media (max-width: 768px) {
  section { padding: var(--s-64) 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  padding: var(--s-16) var(--s-32);
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--s-16) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: var(--s-32);
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease-out;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-links a:hover { color: var(--ink); }

.header-cta { display: flex; gap: var(--s-12); align-items: center; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-12);
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white, #fff);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    flex-direction: column;
    padding: var(--s-16) 0;
    z-index: 100;
  }
  .nav-links li { width: 100%; }
  .nav-links li a {
    display: block;
    padding: var(--s-12) var(--s-24);
  }
  .nav-open .nav-links { display: flex; }
  .header-cta .btn-ghost { display: none; }
  .mobile-toggle { display: block; }
  .site-header { position: relative; }
}

/* Hero */
.hero {
  padding: var(--s-128) 0 var(--s-96);
}

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--s-64);
  align-items: center;
}

.hero-content h1 { margin-bottom: var(--s-24); }

.hero-content p {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: var(--s-32);
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  gap: var(--s-16);
  flex-wrap: wrap;
  margin-bottom: var(--s-32);
}

.trust-badges {
  display: flex;
  gap: var(--s-24);
  flex-wrap: wrap;
}

.trust-badges span {
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.trust-badges span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img,
.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Section images */
.section-img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  margin-top: var(--space-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* Feature icons (SVG inline) */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--accent, #f97316);
  margin-bottom: 0.75rem;
}
.feature-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* Problem section: 2-col layout */
.problem-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.problem-image {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.problem-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Devices section: 2-col layout */
.devices-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 768px) {
  .devices-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.devices-image {
  order: -1;
}
@media (min-width: 768px) {
  .devices-image {
    order: 0;
    max-width: 450px;
    justify-self: end;
  }
}
.devices-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-lg);
  aspect-ratio: 3/2;
  object-fit: cover;
}

/* TV Mockup */
.tv-mockup {
  width: 100%;
  max-width: 560px;
}

.tv-screen {
  background: #0d1117;
  border-radius: var(--r-md) var(--r-md) 0 0;
  border: 3px solid #2a2a2a;
  border-bottom: none;
  aspect-ratio: 16/10;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.15), inset 0 0 30px rgba(0,0,0,0.5);
}

.tv-stand {
  width: 40%;
  height: 6px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #3a3a3a, #1a1a1a);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}

.player-ui {
  display: grid;
  grid-template-columns: 140px 1fr;
  height: 100%;
}

.player-sidebar {
  background: rgba(15, 20, 30, 0.95);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.channel-item {
  padding: 6px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.2s;
}

.channel-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border-left: 2px solid var(--accent);
}

.ch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.ch-dot.live {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.player-main {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #0d1117 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.player-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.05) 0%, transparent 70%);
}

.player-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  letter-spacing: 0.5px;
  animation: pulse-dot 2s infinite;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1;
}

.player-channel {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.player-title {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
  .hero { padding: var(--s-64) 0 var(--s-48); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-48); }
  .hero-visual { aspect-ratio: 16/9; }
  .player-ui { grid-template-columns: 110px 1fr; }
  .channel-item { font-size: 10px; padding: 5px 8px; }
}

/* Problem section */
.problem { background: var(--surface); }

.problem-content p {
  color: var(--muted);
  margin-bottom: var(--s-16);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.problem-content p:last-of-type { margin-bottom: 0; }

/* Steps section */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-32);
  margin-top: var(--s-48);
}

.step-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-32);
  position: relative;
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
}

.step-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-soft);
  color: var(--primary);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: var(--s-16);
}

.step-card h3 { margin-bottom: var(--s-12); }
.step-card p { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* Features bento */
.features-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  grid-template-rows: auto auto;
  gap: var(--s-24);
  margin-top: var(--s-48);
}

.feature-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-32);
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.feature-card h3 { margin-bottom: var(--s-12); }
.feature-card p { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }

.feature-card--large {
  grid-column: 1;
  grid-row: 1 / 3;
  padding: var(--s-48);
}

.features-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-24);
  margin-top: var(--s-24);
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: 1; grid-row: auto; padding: var(--s-32); }
  .features-secondary { grid-template-columns: 1fr; }
}

/* Pricing */
.pricing { background: var(--surface); }

.pricing-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--s-48);
}

.pricing-header p { margin: var(--s-16) auto 0; color: var(--muted); }

#pricing-tabs {
  display: flex;
  justify-content: center;
  gap: var(--s-8);
  margin-bottom: var(--s-32);
  flex-wrap: wrap;
}

.conn-tab {
  padding: var(--s-12) var(--s-24);
  border-radius: var(--r-btn);
  background: var(--canvas);
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  min-height: 44px;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.conn-tab:hover { border-color: var(--primary); }
.conn-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

#pricing-cards,
#pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-24);
}

.plan {
  background: var(--canvas);
  border-radius: var(--r-md);
  padding: var(--s-32);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
}

.plan:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.plan--popular {
  border: 2px solid var(--primary);
  position: relative;
}

.plan--popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--s-4) var(--s-16);
  border-radius: 20px;
  white-space: nowrap;
}

.plan__duration {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--s-8);
}

.plan__price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--s-4);
}

.plan__per { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--s-24); }

.plan__features {
  list-style: none;
  margin-bottom: var(--s-24);
  flex: 1;
}

.plan__features li {
  padding: var(--s-8) 0;
  font-size: 0.9375rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.plan__features li::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--primary-soft);
  border-radius: 50%;
  flex-shrink: 0;
}

.plan__cta {
  width: 100%;
  text-align: center;
}

@media (max-width: 1024px) {
  #pricing-cards,
  #pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  #pricing-cards,
  #pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

.pricing-trust {
  text-align: center;
  margin-top: var(--s-32);
  font-size: 0.875rem;
  color: var(--muted);
}

/* Social proof */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-24);
  margin-top: var(--s-48);
}

.testimonial-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-32);
}

.testimonial-card .stars {
  color: #f59e0b;
  font-size: 1.125rem;
  margin-bottom: var(--s-12);
  letter-spacing: 2px;
}

.rating-display {
  color: #f59e0b;
  font-size: 1.125rem;
  margin-top: var(--s-12);
}
.rating-display strong { color: var(--ink); }

.testimonial-card blockquote {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: var(--s-24);
  font-style: normal;
}

.testimonial-card cite {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-24);
  margin-top: var(--s-48);
  padding: var(--s-32);
  background: var(--surface);
  border-radius: var(--r-md);
}

.stat { text-align: center; }
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-label { font-size: 0.875rem; color: var(--muted); margin-top: var(--s-4); }

@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Devices */
.device-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
}

.device-list li {
  padding: var(--s-16);
  background: var(--surface);
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 0.9375rem;
}

.device-note {
  background: var(--primary-soft);
  border-radius: var(--r-md);
  padding: var(--s-32);
  margin-top: var(--s-24, 1.5rem);
}

.device-note h3 { margin-bottom: var(--s-12); }
.device-note p { color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 768px) {
  .device-list { grid-template-columns: 1fr; }
}

/* FAQ */
.faq { background: var(--surface); }

.faq-list {
  max-width: 800px;
  margin: var(--s-48) auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: var(--s-24) 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--muted);
  transition: transform 0.2s ease-out;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 0 var(--s-24);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Final CTA */
.final-cta {
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-96) var(--s-48);
  margin: var(--s-96) auto;
  max-width: 900px;
}

.final-cta h2 { margin-bottom: var(--s-16); }
.final-cta p { margin: 0 auto var(--s-32); color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--s-48) 0 var(--s-32);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-32);
  margin-bottom: var(--s-32);
  flex-wrap: wrap;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: var(--s-8);
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: var(--s-48);
}

.footer-links-col h4 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--s-12);
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.footer-links-col a {
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease-out;
  display: inline-flex;
  align-items: center;
  padding: var(--s-4) 0;
  min-height: 44px;
  min-width: 44px;
}

@media (max-width: 768px) {
  .footer-links-col a {
    padding: var(--s-8) 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

.footer-links-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--s-24);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-16);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .footer-top { flex-direction: column; }
  .footer-links { flex-direction: column; gap: var(--s-32); }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Utilities */
.section-header { margin-bottom: var(--s-48); }
.section-header.center { text-align: center; }
.section-header.center p { margin-left: auto; margin-right: auto; }
.section-header p { color: var(--muted); margin-top: var(--s-16); font-size: 1.0625rem; }

/* Mobile tap targets — ensure inline links are fingertip-friendly */
@media (max-width: 430px) {
  .feature-card p a,
  .device-note a,
  .device-list a,
  .faq-item p a,
  .step-card p a,
  .features-secondary a {
    display: inline-block;
    padding: 12px 8px;
    margin: -12px -8px;
  }
}
