/* ── Theme system ─────────────────────────────────────────────────────────── */
:root,
[data-theme="emerald"] {
  --bg: #0A0E0C;
  --surface: #111815;
  --surface2: #1A2420;
  --border: #243530;
  --text: #B0BEB6;
  --text-dim: #7A9088;
  --text-muted: #455B53;
  --accent: #1FA06E;
  --accent-dim: #145C40;
  --accent-glow: rgba(31, 160, 110, 0.15);
  --accent-glow2: rgba(31, 160, 110, 0.06);
  --metallic: #A8B8B0;
  --white: #D6DDD9;
  --warning: #C49A3C;
  --error: #BF4A4A;
  --info: #4A88D0;
  --gradient: linear-gradient(135deg, #1FA06E 0%, #145C40 100%);
}
[data-theme="obsidian"] {
  --bg: #0C0A08;
  --surface: #161210;
  --surface2: #1E1A16;
  --border: #3A3228;
  --text: #DDD6CC;
  --text-dim: #A69888;
  --text-muted: #6E6050;
  --accent: #D4A84A;
  --accent-dim: #8A6E2A;
  --accent-glow: rgba(212, 168, 74, 0.15);
  --accent-glow2: rgba(212, 168, 74, 0.06);
  --metallic: #C4B8A4;
  --white: #EDE8E0;
  --warning: #D4A84A;
  --gradient: linear-gradient(135deg, #D4A84A 0%, #8A6E2A 100%);
}
[data-theme="sapphire"] {
  --bg: #080A10;
  --surface: #0E1220;
  --surface2: #141A2E;
  --border: #243050;
  --text: #D0D6E4;
  --text-dim: #8090B0;
  --text-muted: #4A5878;
  --accent: #5B8DEF;
  --accent-dim: #2E5AAA;
  --accent-glow: rgba(91, 141, 239, 0.15);
  --accent-glow2: rgba(91, 141, 239, 0.06);
  --metallic: #B0B8CC;
  --white: #E0E4EE;
  --gradient: linear-gradient(135deg, #5B8DEF 0%, #2E5AAA 100%);
}
[data-theme="slate"] {
  --bg: #121418;
  --surface: #1A1D24;
  --surface2: #22262E;
  --border: #333940;
  --text: #D4D8DE;
  --text-dim: #8E95A0;
  --text-muted: #545B68;
  --accent: #38B2AC;
  --accent-dim: #1E6E6A;
  --accent-glow: rgba(56, 178, 172, 0.15);
  --accent-glow2: rgba(56, 178, 172, 0.06);
  --metallic: #AEB4BC;
  --white: #E4E6EA;
  --gradient: linear-gradient(135deg, #38B2AC 0%, #1E6E6A 100%);
}
[data-theme="ivory"] {
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --surface2: #F0EDE8;
  --border: #D8D4CC;
  --text: #5A5550;
  --text-dim: #908880;
  --text-muted: #B8B0A8;
  --accent: #1A7A5C;
  --accent-dim: #9ECAB8;
  --accent-glow: rgba(26, 122, 92, 0.1);
  --accent-glow2: rgba(26, 122, 92, 0.04);
  --metallic: #706860;
  --white: #2A2622;
  --gradient: linear-gradient(135deg, #1A7A5C 0%, #0D5A40 100%);
}

/* ── Reset & base ────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 0 32px; }
.wide { max-width: 1080px; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
nav .container { display: flex; align-items: center; }
nav .logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.3px;
}
nav .logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
nav .links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
nav .links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
nav .links a:hover { color: var(--accent); text-decoration: none; }
nav .links a.active { color: var(--accent); }
nav .links .download-btn {
  background: var(--gradient);
  color: var(--bg);
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
nav .links .download-btn:hover { opacity: 0.9; }

/* Theme switcher */
.theme-dots {
  display: flex;
  gap: 6px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}
.theme-dot:hover { transform: scale(1.2); }
.theme-dot.active { border-color: var(--white); }
.theme-dot[data-t="emerald"] { background: #1FA06E; }
.theme-dot[data-t="obsidian"] { background: #D4A84A; }
.theme-dot[data-t="sapphire"] { background: #5B8DEF; }
.theme-dot[data-t="slate"] { background: #38B2AC; }
.theme-dot[data-t="ivory"] { background: #F5F3EF; border: 2px solid #D8D4CC; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: 52px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.15;
  position: relative;
}
.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
  position: relative;
}
.hero .cta { display: inline-flex; gap: 14px; position: relative; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--gradient);
  color: var(--bg);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 30px var(--accent-glow); }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--metallic);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--border); }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-desc {
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 40px;
  max-width: 640px;
  line-height: 1.7;
}

/* ── Feature cards ────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow2);
  transform: translateY(-2px);
}
.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Stats row ────────────────────────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  padding: 48px 0;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}
.stat .num {
  font-size: 42px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ── Comparison table ─────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 0 -32px;
  padding: 0 32px;
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th {
  text-align: left;
  padding: 14px 18px;
  background: var(--surface2);
  color: var(--metallic);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
td:first-child { color: var(--metallic); font-weight: 500; white-space: nowrap; }
.yes { color: var(--accent); font-weight: 700; }
.no { color: var(--text-muted); }
.highlight-col { background: var(--accent-glow2); }

/* ── Callout ──────────────────────────────────────────────────────────────── */
.callout {
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: 14px;
  padding: 36px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
}
.callout h3 { color: var(--white); font-size: 20px; margin-bottom: 12px; font-weight: 700; }
.callout p { color: var(--text-dim); font-size: 16px; line-height: 1.7; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
footer .links { display: flex; gap: 24px; justify-content: center; margin-bottom: 12px; }
footer .links a { color: var(--text-dim); font-weight: 500; }
footer .links a:hover { color: var(--accent); }
footer .tagline { color: var(--metallic); font-style: italic; font-size: 14px; }

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  padding: 60px 0 32px;
  text-align: center;
}
.page-header h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.page-header p {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Prose ─────────────────────────────────────────────────────────────────── */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  margin: 48px 0 14px;
  letter-spacing: -0.3px;
}
.prose h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--metallic);
  margin: 32px 0 10px;
}
.prose p { margin-bottom: 18px; font-size: 16px; line-height: 1.8; }
.prose ul { padding-left: 24px; margin-bottom: 20px; }
.prose li { margin-bottom: 8px; line-height: 1.7; }
.prose li strong { color: var(--white); }

/* ── Feature showcase (features page) ─────────────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}
.feature-row:first-child { border-top: none; padding-top: 32px; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-row .text h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.feature-row .text p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
}
.feature-row .text ul {
  list-style: none;
  padding: 0;
}
.feature-row .text li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.feature-row .text li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.feature-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: 64px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  nav { padding: 12px 0; }
  nav .container { flex-wrap: wrap; gap: 12px; }
  nav .logo { font-size: 18px; }
  nav .links { gap: 16px; margin-left: auto; }
  nav .links a { font-size: 13px; }
  nav .links .download-btn { padding: 7px 14px; font-size: 12px; }
  .theme-dots { margin-left: 12px; padding-left: 12px; gap: 5px; }
  .theme-dot { width: 12px; height: 12px; }

  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 38px; }
  .hero .subtitle { font-size: 18px; }

  section { padding: 56px 0; }
  .section-title { font-size: 30px; }

  .feature-row { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .feature-row.reverse { direction: ltr; }
  .feature-visual { min-height: 160px; font-size: 56px; padding: 24px; }

  .features { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .feature-card { padding: 22px; }

  .page-header { padding: 48px 0 24px; }
  .page-header h1 { font-size: 34px; }
  .page-header p { font-size: 16px; }
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }

  /* Nav: stack into two rows */
  nav { padding: 12px 0; }
  nav .container {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }
  nav .logo { font-size: 17px; order: 1; }
  nav .links {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }
  nav .links a { font-size: 13px; }
  nav .links .download-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  .theme-dots {
    order: 2;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    gap: 6px;
  }
  .theme-dot { width: 14px; height: 14px; }

  /* Hero */
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 30px; line-height: 1.2; }
  .hero h1 br { display: none; }
  .hero .subtitle { font-size: 15px; margin-bottom: 28px; padding: 0 4px; }
  .hero .cta {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: stretch;
  }
  .btn {
    padding: 14px 24px;
    font-size: 15px;
    justify-content: center;
    width: 100%;
  }

  /* Stats */
  .stats {
    gap: 24px 32px;
    padding: 32px 0;
  }
  .stat .num { font-size: 30px; }
  .stat .label { font-size: 12px; }

  /* Sections */
  section { padding: 48px 0; }
  .section-label { font-size: 11px; margin-bottom: 10px; }
  .section-title { font-size: 24px; margin-bottom: 10px; }
  .section-desc { font-size: 15px; margin-bottom: 28px; }

  /* Features grid */
  .features { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { padding: 22px; border-radius: 12px; }
  .feature-card .icon { width: 40px; height: 40px; font-size: 20px; margin-bottom: 14px; }
  .feature-card h3 { font-size: 16px; }

  /* Feature rows on features page */
  .feature-row { padding: 32px 0; gap: 20px; }
  .feature-row .text h2 { font-size: 22px; }
  .feature-row .text p { font-size: 14px; }
  .feature-row .text li { font-size: 14px; }
  .feature-visual {
    min-height: 130px;
    font-size: 48px;
    padding: 20px;
  }

  /* Comparison table */
  .table-wrap {
    margin: 0 -18px;
    padding: 0 18px;
    -webkit-overflow-scrolling: touch;
  }
  .table-wrap::after {
    content: '';
    display: block;
    height: 8px;
  }
  table { font-size: 13px; min-width: 480px; }
  th, td { padding: 10px 12px; }
  th { font-size: 11px; }

  /* Callout */
  .callout { padding: 24px; margin: 32px 0; border-radius: 12px; }
  .callout h3 { font-size: 17px; }
  .callout p { font-size: 14px; }

  /* Page headers */
  .page-header { padding: 36px 0 20px; }
  .page-header h1 { font-size: 28px; }
  .page-header p { font-size: 15px; }

  /* Prose */
  .prose h2 { font-size: 22px; margin: 36px 0 12px; }
  .prose h3 { font-size: 16px; margin: 24px 0 8px; }
  .prose p { font-size: 15px; margin-bottom: 14px; }
  .prose ul { padding-left: 20px; }

  /* Footer */
  footer { padding: 32px 0; }
  footer .links {
    flex-wrap: wrap;
    gap: 14px 20px;
    padding: 0 12px;
  }
  footer .links a { font-size: 13px; }
}

/* Small mobile */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero h1 { font-size: 26px; }
  .hero .subtitle { font-size: 14px; }
  .section-title { font-size: 22px; }
  .stats { gap: 20px 24px; }
  .stat .num { font-size: 26px; }
  nav .links { gap: 12px; }
  nav .links a { font-size: 12px; }
}
