/* ============================================
   Better IPTV — Marketing site styles
   ============================================ */

:root {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --bg-elev-2: #1a2238;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --primary: #2b7fff;
  --primary-2: #5aa3ff;
  --primary-glow: rgba(43, 127, 255, 0.35);
  --accent: #00d4ff;
  --live: #ff3b5c;
  --fg: #f5f7fb;
  --muted: #8a94a6;
  --muted-2: #5f6a7f;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 20px 80px rgba(43, 127, 255, 0.25);
  --container: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ========== Ambient backgrounds ========== */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1000px 600px at 15% -10%, rgba(43, 127, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(0, 212, 255, 0.12), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(90, 163, 255, 0.10), transparent 60%);
}
.bg-grid::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

main, header, footer { position: relative; z-index: 1; }

/* ========== Nav ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(11, 18, 32, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-size: 16px; }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; color: var(--muted);
}
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: transform .2s;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle { display: none; font-size: 22px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switcher {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 28px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238a94a6' d='M0 0l5 6 5-6z'/></svg>") no-repeat right 10px center;
  color: var(--fg);
  appearance: none;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.lang-switcher:hover { border-color: var(--primary); }
.lang-switcher option { background: var(--bg-elev); color: var(--fg); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav[data-open="true"] .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-elev); padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav[data-open="true"] .nav-links a { padding: 12px 0; }
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: 0 10px 30px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px var(--primary-glow); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--fg); background: var(--surface);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); }

.store-badges {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; min-width: 160px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform .2s, background .2s, border-color .2s;
}
.store-badge:hover { transform: translateY(-2px); background: rgba(255,255,255,0.07); border-color: var(--primary); }
.store-badge .badge-icon { width: 24px; height: 24px; }
.store-badge .badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-badge .badge-text .small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.store-badge .badge-text .big { font-size: 14px; font-weight: 600; }

/* ========== Sections ========== */
section { padding: 96px 0; position: relative; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(43, 127, 255, 0.12);
  border: 1px solid rgba(43, 127, 255, 0.35);
  color: var(--primary-2);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 18px;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
.lead { font-size: clamp(1rem, 1.2vw, 1.125rem); color: var(--muted); }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-2) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ========== Hero ========== */
.hero { padding: 80px 0 60px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero p.lead { margin-bottom: 32px; max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero-visual {
  position: relative;
  display: flex; justify-content: center;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: -40px;
  background: radial-gradient(closest-side, var(--primary-glow), transparent 70%);
  filter: blur(30px);
  z-index: 0;
}
.hero-visual .device { position: relative; z-index: 1; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-ctas, .hero-meta, .store-badges { justify-content: center; }
}

/* ========== Device mockups ========== */
.device { position: relative; }

/* Phone */
.device--phone {
  width: 320px; height: 660px;
  border-radius: 48px;
  background: linear-gradient(160deg, #1a2238 0%, #0c1424 100%);
  padding: 14px;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.06) inset,
    0 30px 80px rgba(0, 0, 0, 0.5),
    var(--shadow-glow);
}
.device--phone .screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.device--phone::before {
  content: "";
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px; border-radius: 20px;
  background: #050810;
  z-index: 2;
}

/* Phone — landscape variant */
.device--phone-landscape { width: 640px; height: 320px; }
.device--phone-landscape .screen { border-radius: 32px; }
.device--phone-landscape::before {
  top: 50%; left: 20px; transform: translateY(-50%);
  width: 26px; height: 110px;
}
.dive-visual .device--phone-landscape { width: 560px; height: 280px; }
.dive-visual .device--phone-landscape::before { width: 22px; height: 92px; left: 17px; }
.dive-visual .device--phone-landscape .screen { border-radius: 28px; }
@media (max-width: 600px) {
  .device--phone-landscape,
  .dive-visual .device--phone-landscape { width: 100%; max-width: 420px; height: auto; aspect-ratio: 2 / 1; }
}

/* Laptop */
.device--laptop {
  width: 100%; max-width: 640px;
  aspect-ratio: 16 / 10;
  position: relative;
}
.device--laptop .laptop-frame {
  width: 100%; height: 100%;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(160deg, #1a2238 0%, #0c1424 100%);
  padding: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45), var(--shadow-glow);
}
.device--laptop .screen {
  width: 100%; height: 100%;
  border-radius: 6px; overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.device--laptop::after {
  content: "";
  display: block;
  width: 120%; height: 10px;
  margin: 0 -10%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #111a2c, #0a121f);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

/* TV */
.device--tv {
  width: 100%; max-width: 560px;
  aspect-ratio: 16 / 9;
  position: relative;
}
.device--tv .tv-frame {
  width: 100%; height: 100%;
  border-radius: 14px;
  background: linear-gradient(160deg, #1a2238 0%, #0c1424 100%);
  padding: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45), var(--shadow-glow);
}
.device--tv .screen {
  width: 100%; height: 100%;
  border-radius: 6px; overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.device--tv::after {
  content: "";
  display: block;
  width: 40%; height: 14px;
  margin: 4px auto 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #111a2c, #0a121f);
}

/* ========== App screenshots (inside screens) ========== */
.screen-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

/* ========== Features (differentiators) ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  transition: transform .3s, border-color .3s, background .3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(43,127,255,.25), rgba(0,212,255,.15));
  color: var(--primary-2);
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }

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

/* ========== Multi-device showcase ========== */
.devices-showcase {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 48px;
  align-items: end;
}
.devices-showcase .showcase-item { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.devices-showcase .showcase-item .label {
  text-align: center;
}
.devices-showcase .showcase-item .label h3 { margin-bottom: 4px; }
.devices-showcase .showcase-item .label p { color: var(--muted); font-size: 13px; }
.devices-showcase .device--phone { width: 210px; height: 433px; border-radius: 34px; }
.devices-showcase .device--phone::before { width: 72px; height: 18px; top: 14px; }
.devices-showcase .device--phone .screen { border-radius: 26px; }
.devices-showcase .device--tv { width: 520px; max-width: 100%; }
.devices-showcase .device--laptop { width: 400px; max-width: 100%; }

@media (max-width: 1100px) {
  .devices-showcase { grid-template-columns: 1fr; gap: 60px; }
  .devices-showcase .device--tv,
  .devices-showcase .device--laptop { width: 100%; max-width: 560px; }
}

/* ========== Feature deep-dive blocks ========== */
.dive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 60px 0;
}
.dive.reverse .dive-text { order: 2; }
.dive.reverse .dive-visual { order: 1; }
.dive h2 { margin-bottom: 18px; }
.dive p { color: var(--muted); margin-bottom: 18px; }
.dive ul { display: flex; flex-direction: column; gap: 10px; }
.dive ul li {
  display: flex; align-items: start; gap: 10px;
  color: var(--fg); font-size: 14px;
}
.dive ul li::before {
  content: "";
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(43,127,255,.2);
  display: inline-block;
  flex-shrink: 0; margin-top: 3px;
  position: relative;
}
.dive ul li {
  position: relative;
}
.dive .check {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0; margin-top: 2px;
  font-size: 12px; font-weight: 900;
}
.dive ul li::before { display: none; }

.dive-visual { display: flex; justify-content: center; position: relative; }
.dive-visual::before {
  content: "";
  position: absolute; inset: -30px;
  background: radial-gradient(closest-side, var(--primary-glow), transparent 70%);
  filter: blur(20px); z-index: 0;
}
.dive-visual .device { position: relative; z-index: 1; }
.dive-visual .device--phone:not(.device--phone-landscape) { width: 280px; height: 575px; }
.dive-visual .device--phone:not(.device--phone-landscape)::before { width: 92px; height: 22px; top: 17px; }
.dive-visual .device--phone:not(.device--phone-landscape) .screen { border-radius: 32px; }
.dive-visual .device--phone:not(.device--phone-landscape) { border-radius: 42px; }

@media (max-width: 960px) {
  .dive { grid-template-columns: 1fr; gap: 40px; }
  .dive.reverse .dive-text { order: 1; }
  .dive.reverse .dive-visual { order: 2; }
}

/* ========== Platforms grid ========== */
.platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.platform-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .2s, border-color .2s, background .2s;
}
.platform-card:hover { transform: translateY(-4px); border-color: var(--primary); background: rgba(43,127,255,.06); }
.platform-card svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--primary-2); }
.platform-card h3 { font-size: 15px; margin-bottom: 4px; }
.platform-card p { font-size: 12px; color: var(--muted); }

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

/* ========== Compatibility strip ========== */
.compat {
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(43,127,255,.18), rgba(0,212,255,.08));
  border: 1px solid rgba(43,127,255,.25);
  text-align: center;
}
.compat h2 { margin-bottom: 10px; }
.compat p { color: var(--muted); max-width: 620px; margin: 0 auto 18px; }
.compat .formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.compat .format-tag {
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 600;
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
}

/* ========== FAQ ========== */
.faq { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-q {
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 16px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+";
  font-size: 22px; font-weight: 400;
  color: var(--primary-2);
  transition: transform .2s;
}
.faq-item[open] .faq-q::after { content: "−"; }
.faq-a { padding: 0 24px 20px; color: var(--muted); font-size: 15px; }

/* ========== CTA ========== */
.final-cta {
  text-align: center;
  padding: 80px 32px;
  border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at center, rgba(43,127,255,.2), transparent 70%), var(--bg-elev);
  border: 1px solid var(--border-strong);
}
.final-cta h2 { margin-bottom: 14px; }
.final-cta p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }
.final-cta .store-badges { justify-content: center; }

/* ========== Footer ========== */
footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--muted); font-size: 14px; max-width: 340px; margin-top: 12px;
}
footer h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 14px; font-weight: 700;
}
footer ul { display: flex; flex-direction: column; gap: 10px; }
footer ul a { color: var(--fg); font-size: 14px; opacity: .8; }
footer ul a:hover { opacity: 1; color: var(--primary-2); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 13px;
  flex-wrap: wrap; gap: 10px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ========== Legal pages ========== */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}
.legal-page h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3rem); }
.legal-page .updated { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.legal-page .notice {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(255, 207, 59, 0.08);
  border: 1px solid rgba(255, 207, 59, 0.3);
  color: #ffcf3b;
  font-size: 13px;
  margin-bottom: 32px;
}
.legal-page h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.legal-page p, .legal-page li { color: #d4dae6; margin-bottom: 10px; line-height: 1.7; font-size: 15px; }
.legal-page ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.legal-page a { color: var(--primary-2); text-decoration: underline; }

/* ========== Utility ========== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

section.compact { padding: 40px 0; }

/* ========== Webview mode (embedded in app) ========== */
body.webview .nav,
body.webview footer,
body.webview .bg-grid { display: none !important; }
body.webview main { padding: 0; }
body.webview .legal-page { padding: 20px 16px 40px; max-width: 100%; }
body.webview .legal-page h1 { font-size: clamp(1.6rem, 6vw, 2rem); }
body.webview .legal-page h2 { font-size: 1.15rem; margin-top: 24px; }
body.webview .legal-page p,
body.webview .legal-page li { font-size: 15px; line-height: 1.65; }
body.webview { background: var(--bg); }

/* ========== Convenience translation notice ========== */
.convenience-notice {
  max-width: 820px;
  margin: 20px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: rgba(43, 127, 255, 0.08);
  border: 1px solid rgba(43, 127, 255, 0.25);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
body.webview .convenience-notice { margin: 16px; }

@media (max-width: 560px) {
  section { padding: 64px 0; }
  .device--phone { width: 280px; height: 575px; }
  .device--phone::before { width: 90px; height: 22px; top: 16px; }
}
