/* ============================================================
   IRON IPTV — Design System
   Premium tech / forge aesthetic
   ============================================================ */

:root {
  /* Color tokens — dark theme (default) */
  --bg: #0a0a0b;
  --bg-2: #0f0f11;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --border: #26262a;
  --border-strong: #3a3a40;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #ff5a1f;
  --accent-soft: rgba(255, 90, 31, 0.12);
  --accent-glow: rgba(255, 90, 31, 0.35);
  --success: #10b981;
  --warning: #f59e0b;

  /* Type */
  --font-sans: "Geist", -apple-system, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Radii */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 20px;
  --r-pill: 999px;

  /* Container */
  --container: 1280px;
  --container-narrow: 920px;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #fafaf9;
  --bg-2: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #f4f4f3;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #0a0a0b;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --accent-soft: rgba(255, 90, 31, 0.08);
}

/* Density */
[data-density="compact"] {
  --s-7: 32px;
  --s-8: 48px;
  --s-9: 72px;
  --s-10: 96px;
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
  font-size: 16px;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-7) 0; }
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; align-items: center; gap: var(--s-4); }
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.spacer { flex: 1; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) {
  .show-mobile { display: none !important; }
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 6vw, 88px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2vw, 28px); }
h4 { font-size: 18px; }
p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.5vw, 22px); color: var(--text-muted); line-height: 1.5; max-width: 64ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.eyebrow::before { content: "//"; opacity: 0.6; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 22px;
  border-radius: var(--r-2);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { background: #ff6a30; transform: translateY(-1px); box-shadow: 0 8px 32px -8px var(--accent-glow); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-muted); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { color: var(--accent); }
.btn-lg { padding: 18px 28px; font-size: 16px; }
.btn-sm { padding: 10px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-arrow::after { content: "→"; transition: transform 0.2s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: var(--s-5);
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-strong); }
.card-feature {
  padding: var(--s-6);
  position: relative;
  overflow: hidden;
}

/* ============================================================
   Site chrome — header & footer
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-3) var(--s-5);
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo__mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #c93606);
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 16px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.logo__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 3px;
  pointer-events: none;
}

.nav {
  display: flex;
  gap: var(--s-5);
  font-size: 14px;
  color: var(--text-muted);
}
.nav a { transition: color 0.15s; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 1px;
  background: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: var(--s-9) 0 var(--s-5);
  margin-top: var(--s-10);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--s-6);
  padding-bottom: var(--s-7);
}
.site-footer h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); font-size: 14px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer__legal {
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: var(--s-5) 0;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span:not(:last-child)::after { content: "/"; margin-left: var(--s-2); opacity: 0.5; }

/* ============================================================
   Page hero
   ============================================================ */
.page-hero {
  padding: var(--s-7) 0 var(--s-8);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.page-hero h1 { font-size: clamp(40px, 5vw, 72px); max-width: 18ch; }
.page-hero p { font-size: clamp(18px, 1.4vw, 20px); max-width: 60ch; margin-top: var(--s-4); }

/* ============================================================
   Placeholder image slots (typed)
   ============================================================ */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--surface) 0px, var(--surface) 12px,
      var(--surface-2) 12px, var(--surface-2) 24px);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  padding: var(--s-5);
  overflow: hidden;
  min-height: 160px;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-2);
  pointer-events: none;
}
.ph__label {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 6px 10px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
}
.ph-16-9 { aspect-ratio: 16/9; }
.ph-4-3 { aspect-ratio: 4/3; }
.ph-1-1 { aspect-ratio: 1/1; }

/* ============================================================
   Pricing cards
   ============================================================ */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
@media (max-width: 1100px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  position: relative;
  transition: all 0.2s;
}
.price-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.price-card--featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: 0 0 0 1px var(--accent), 0 24px 64px -32px var(--accent-glow);
}
.price-card__tag {
  position: absolute;
  top: -10px;
  right: var(--s-4);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.price-card__name {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.price-card__price { display: flex; align-items: baseline; gap: 4px; }
.price-card__amount { font-size: 56px; font-weight: 700; letter-spacing: -0.04em; }
.price-card__period { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.price-card__monthly { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.price-card__features { list-style: none; margin: 0; padding: var(--s-4) 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-3); font-size: 14px; color: var(--text-muted); }
.price-card__features li { display: flex; gap: var(--s-2); align-items: flex-start; }
.price-card__features li::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* ============================================================
   Stats block
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
}
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--bg-2);
  padding: var(--s-5);
}
.stat__value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat__value sup { font-size: 14px; color: var(--accent); top: -1em; }
.stat__label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-top: 6px; }

/* ============================================================
   Feature list
   ============================================================ */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  height: 100%;
}
.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
}
.feature h3 { font-size: 18px; }
.feature p { font-size: 14px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); padding: var(--s-5) 0; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  font-weight: 500;
  font-size: 17px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  transition: transform 0.2s;
  width: 24px;
  text-align: center;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--accent); }
.faq-item__body { padding-top: var(--s-3); color: var(--text-muted); font-size: 15px; max-width: 70ch; }

/* ============================================================
   Channel grid mock (visual asset)
   ============================================================ */
.channel-mock {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: var(--s-4);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.channel-mock__cell {
  background: var(--surface);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
.channel-mock__cell--hot { background: var(--accent); color: #fff; }
.channel-mock__cell--warm { background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--accent-soft); color: var(--accent); }
.channel-mock__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 100%);
  pointer-events: none;
}

/* ============================================================
   Testimonial
   ============================================================ */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.testimonial__quote { font-size: 15px; color: var(--text); line-height: 1.55; }
.testimonial__quote::before { content: "“"; color: var(--accent); font-size: 32px; line-height: 0; vertical-align: -10px; margin-right: 4px; }
.testimonial__author { display: flex; gap: var(--s-3); align-items: center; padding-top: var(--s-3); border-top: 1px solid var(--border); }
.testimonial__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.testimonial__name { font-size: 14px; font-weight: 500; }
.testimonial__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 500;
}
.field input, .field textarea, .field select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 100px; }

/* ============================================================
   Badge
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge--accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge--success { background: rgba(16,185,129,0.1); color: var(--success); border-color: transparent; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px currentColor; opacity: 0.9; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ============================================================
   Prose (article/blog content)
   ============================================================ */
.prose { max-width: 72ch; color: var(--text-muted); font-size: 17px; line-height: 1.7; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { color: var(--text); font-size: 32px; margin-top: 1.8em; padding-top: var(--s-5); border-top: 1px solid var(--border); }
.prose h3 { color: var(--text); font-size: 22px; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.4em 0; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--s-4);
  margin-left: 0;
  font-style: italic;
  color: var(--text);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
}

/* ============================================================
   Tweaks panel
   ============================================================ */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-3);
  padding: var(--s-4);
  min-width: 260px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
  font-size: 13px;
  display: none;
}
.tweaks[data-open="true"] { display: block; }
.tweaks__title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: var(--s-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks__row { display: flex; justify-content: space-between; align-items: center; padding: var(--s-2) 0; gap: var(--s-3); }
.tweaks__row label { color: var(--text-muted); }
.tweaks__swatches { display: flex; gap: 6px; }
.tweaks__swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.1s;
}
.tweaks__swatch[aria-pressed="true"] { border-color: var(--text); transform: scale(1.1); }
.tweaks__seg { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r-1); overflow: hidden; }
.tweaks__seg button { padding: 6px 10px; font-size: 12px; color: var(--text-muted); background: transparent; }
.tweaks__seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.tweaks__toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: none;
  align-items: center;
  gap: 6px;
}
.tweaks__toggle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============================================================
   Misc
   ============================================================ */
.divider-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-6) 0;
}
.divider-mono::before, .divider-mono::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: var(--r-1);
  color: var(--text-muted);
}

.glow-bg {
  position: relative;
  isolation: isolate;
}
.glow-bg::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(ellipse 600px 300px at 50% 0%, var(--accent-soft), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
