:root {
  color-scheme: light dark;

  --bg-light: #f8fafc;
  --bg-dark: #07080d;
  --surface-light: #ffffff;
  --surface-dark: #10121a;
  --surface-2-light: #f1f5f9;
  --surface-2-dark: #171a26;
  --text-light: #0f172a;
  --text-dark: #f8fafc;
  --muted-light: #475569;
  --muted-dark: #94a3b8;
  --border-light: rgba(15, 23, 42, 0.1);
  --border-dark: rgba(255, 255, 255, 0.08);
  --brand-light: #4f46e5;
  --brand-dark: #6366f1;
  --brand-glow: rgba(99, 102, 241, 0.22);

  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-2: var(--surface-2-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --border: var(--border-light);
  --brand: var(--brand-light);

  @media (prefers-color-scheme: dark) {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-2: var(--surface-2-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --brand: var(--brand-dark);
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --surface-2: light-dark(var(--surface-2-light), var(--surface-2-dark));
    --text: light-dark(var(--text-light), var(--text-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --brand: light-dark(var(--brand-light), var(--brand-dark));
  }

  accent-color: var(--brand);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 6px 20px var(--brand-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

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

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--brand-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.36);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

/* Hero Section */
.hero {
  padding: 72px 0 64px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 420px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  font-weight: 850;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #c084fc 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Interactive Hero Studio Demo */
.demo-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.platform-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.plat-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.plat-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.safezone-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  cursor: pointer;
}

.phone-frame {
  width: 290px;
  height: 510px;
  margin: 0 auto;
  border-radius: 36px;
  border: 7px solid #1e293b;
  background: #090d16;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phone-notch {
  width: 92px;
  height: 22px;
  background: #000;
  border-radius: 99px;
  margin: 10px auto 0;
  z-index: 4;
}

.phone-video-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #1e1b4b 0%, #311042 50%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.phone-subtitle-box {
  background: rgba(0, 0, 0, 0.75);
  color: #fde047;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(253, 224, 71, 0.4);
  z-index: 2;
}

/* Safe Zone Overlay */
.safezone-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  display: none;
}

.phone-frame.show-safezones .safezone-overlay {
  display: block;
}

.sz-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.28), rgba(239, 68, 68, 0.28) 8px, rgba(239, 68, 68, 0.12) 8px, rgba(239, 68, 68, 0.12) 16px);
  border-bottom: 1px dashed #ef4444;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fca5a5;
  padding-bottom: 4px;
}

.sz-right {
  position: absolute;
  right: 0;
  bottom: 110px;
  width: 58px;
  height: 210px;
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.28), rgba(239, 68, 68, 0.28) 8px, rgba(239, 68, 68, 0.12) 8px, rgba(239, 68, 68, 0.12) 16px);
  border-left: 1px dashed #ef4444;
  border-top: 1px dashed #ef4444;
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fca5a5;
}

.sz-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.28), rgba(239, 68, 68, 0.28) 8px, rgba(239, 68, 68, 0.12) 8px, rgba(239, 68, 68, 0.12) 16px);
  border-top: 1px dashed #ef4444;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fca5a5;
  padding-top: 4px;
}

.phone-ui-bottom {
  position: relative;
  z-index: 2;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.phone-handle {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-caption {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-caption-input {
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  field-sizing: content;
}

/* Bento Differentiators */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }

.bento-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 10px;
}

.bento-card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.bento-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.tg-preview {
  margin-top: 18px;
  background: #0e1621;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  border-left: 3px solid #38bdf8;
}

/* Savings Calculator & Competitor Table */
.calc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
}

.slider-wrap {
  margin: 20px 0;
}

.slider-wrap input[type="range"] {
  width: 100%;
  margin-top: 10px;
}

.price-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-row.highlight {
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  border-color: var(--brand);
}

.price-val {
  font-size: 1.25rem;
  font-weight: 800;
}

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

table.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.comp-table th, .comp-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.comp-table th {
  font-weight: 700;
  background: var(--surface-2);
}

/* FAQ */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

details.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.faq-item p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 920px) {
  .hero-grid, .calc-box {
    grid-template-columns: 1fr;
  }
  .span-7, .span-5, .span-6 {
    grid-column: span 12;
  }
  .nav-links {
    display: none;
  }
}
