:root {
  color-scheme: dark;
  --bg: #070709;
  --bg-elevated: #0f1013;
  --surface: #14151a;
  --surface-soft: #1c1e24;
  --surface-glass: rgba(15, 16, 20, 0.78);
  --text: #f5f5f7;
  --muted: #9ba1ad;
  --faint: #606674;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --green: #4ade80;
  --green-strong: #22c55e;
  --green-glow: rgba(74, 222, 128, 0.22);
  --blue: #60a5fa;
  --shadow: rgba(0, 0, 0, 0.6);
  --max-width: 1200px;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f8f9fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-soft: #edf0f5;
  --surface-glass: rgba(248, 249, 250, 0.85);
  --text: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --green: #16a34a;
  --green-strong: #15803d;
  --green-glow: rgba(22, 163, 74, 0.15);
  --blue: #2563eb;
  --shadow: rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Ambient Glow */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.12) 0%, rgba(96, 165, 250, 0.06) 50%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.section-shell { width: min(var(--max-width), calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 1; }

html, body { width: 100%; min-height: 100%; }

/* Sticky Header */
.site-header {
  position: sticky;
  top: 18px;
  z-index: 50;
  width: min(1280px, calc(100% - 48px));
  height: 68px;
  margin: 18px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px var(--shadow);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--green);
  background: var(--green-glow);
  color: var(--green);
  font: 700 13px/1 ui-monospace, monospace;
}

.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-github-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  transition: 0.2s ease;
}
.nav-github-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.theme-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  transition: 0.2s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
:root[data-theme='light'] .theme-icon-sun { display: none; }
:root[data-theme='light'] .theme-icon-moon { display: block; }

/* Hero */
.hero { padding: 76px 0 56px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-copy { width: min(100%, 920px); }
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--green);
  font: 600 12px/1 ui-monospace, monospace;
  margin-bottom: 24px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

h1 {
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 auto 20px;
  max-width: 900px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--green) 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lede {
  font-size: clamp(17px, 1.65vw, 20px);
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 34px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}
.button-primary { background: var(--text); color: var(--bg); border: 1px solid var(--text); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.15); }
.button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.button-secondary:hover { border-color: var(--border-strong); background: var(--surface-soft); transform: translateY(-2px); }

/* Launcher / Quickstart in Hero */
.terminal-launcher {
  width: min(100%, 620px);
  margin-inline: auto;
  max-width: 620px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px var(--shadow);
}
.launcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
}
.launcher-tabs { display: flex; gap: 6px; }
.launcher-tab {
  padding: 4px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.launcher-tab.active { background: var(--surface-soft); color: var(--text); font-weight: 600; }
.launcher-tag { font-size: 11px; color: var(--faint); font-family: ui-monospace, monospace; }

.launcher-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  text-align: left;
}
.prompt-sym { color: var(--green); font-weight: 700; user-select: none; }
.launcher-body code { flex: 1; overflow-x: auto; color: var(--text); white-space: nowrap; }
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.copy-button:hover { background: var(--border-strong); }

/* Video Frame with Window Chrome */
.hero-art { width: 100%; max-width: 1120px; margin: 56px auto 0; }
.video-container {
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.window-chrome {
  height: 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  justify-content: space-between;
}
.traffic-lights { display: flex; gap: 7px; }
.traffic-lights span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tl-red { background: #ff5f56; }
.tl-yellow { background: #ffbd2e; }
.tl-green { background: #27c93f; }
.window-title { font-size: 12px; color: var(--muted); font-weight: 500; }
.window-spacer { width: 44px; }
.hero-demo { width: 100%; height: auto; display: block; }

/* Trust Strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-block: 1px solid var(--border);
  margin-top: 50px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.trust-item .icon { color: var(--green); font-size: 18px; }

/* Interactive Showcase */
.showcase-section { padding: 90px 0 60px; }
.text-center { text-align: center; }
.eyebrow {
  color: var(--green);
  font: 700 12px/1.2 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.section-heading h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.03em; margin: 0 0 12px; }
.section-desc { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 16px; }

.showcase-card {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.showcase-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.showcase-tab {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.showcase-tab.active { color: var(--green); border-bottom-color: var(--green); background: var(--surface); }

.showcase-display { padding: 32px; }
.showcase-meta h3 { margin: 0 0 8px; font-size: 22px; }
.showcase-meta p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.showcase-viewport {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.interactive-img { width: 100%; height: auto; cursor: zoom-in; }
.zoom-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

/* Deep Feature Grid */
.deep-features { padding: 80px 0; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 48px;
}
.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-box:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.detail-section .feature-box {
  height: 100%;
}
.box-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.feature-box h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.02em; }
.feature-box p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }
.feature-shot-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  cursor: zoom-in;
}
.box-thumb { width: 100%; transition: transform 0.3s; }
.feature-box:hover .box-thumb { transform: scale(1.02); }

/* Architecture Section */
.arch-section { padding: 80px 0; }
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.arch-node {
  flex: 1;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}
.arch-node.active-node { border-color: var(--green); box-shadow: 0 0 24px var(--green-glow); }
.arch-icon { font-size: 32px; margin-bottom: 12px; }
.arch-node h4 { margin: 0 0 8px; font-size: 17px; }
.arch-node p { margin: 0; font-size: 13px; color: var(--muted); }
.arch-connector { font-size: 24px; color: var(--faint); font-weight: bold; }

/* Comparison Table */
.comp-section { padding: 80px 0; }
.table-wrap {
  overflow-x: auto;
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.comp-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.comp-table th, .comp-table td { padding: 18px 24px; border-bottom: 1px solid var(--border); }
.comp-table th { background: var(--bg-elevated); font-weight: 600; color: var(--muted); }
.comp-table .highlight-col { background: rgba(74, 222, 128, 0.04); font-weight: 600; }
.comp-table .check { color: var(--green); }
.comp-table .cross { color: var(--faint); }

/* CTA Section */
.cta-section { padding: 80px 0; }
.cta-box {
  background: radial-gradient(circle at top right, rgba(74, 222, 128, 0.15), transparent 60%), var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 60px 40px;
  text-align: center;
}
.cta-content h2 { font-size: clamp(28px, 4vw, 44px); margin: 12px 0; letter-spacing: -0.03em; }
.cta-content p { color: var(--muted); margin: 0 auto 30px; font-size: 17px; }
.cta-cli {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 14px;
  font-family: ui-monospace, monospace;
  margin-bottom: 28px;
}
.cta-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Footer */
.site-footer { padding: 50px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.footer-license { margin: 0; color: var(--faint); font-size: 13px; font-weight: normal; margin-left: 10px; }
.footer-links { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Lightbox Modal */
.lightbox-modal {
  border: none;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
}
.lightbox-modal::backdrop { background: transparent; }
.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  position: relative;
}
.lightbox-inner img { max-width: 90vw; max-height: 80vh; border-radius: 12px; border: 1px solid var(--border-strong); }
.lightbox-inner p { color: #fff; margin-top: 16px; font-size: 15px; font-weight: 500; }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
}

@media (max-width: 980px) {
  .nav-links { gap: 12px; }
  .nav-links a:nth-child(-n+4) { display: none; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section-shell { width: min(100% - 32px, var(--max-width)); }
  .site-header { width: calc(100% - 32px); padding: 0 14px; }
  .nav-links a:not(.nav-github-btn):not(.theme-toggle) { display: none; }
  .hero { padding-top: 58px; }
  h1 { font-size: clamp(40px, 11vw, 58px); }
  .hero-lede { font-size: 17px; }
  .hero-actions { margin-bottom: 28px; }
  .launcher-tag { display: none; }
  .launcher-body { padding-inline: 14px; }
  .arch-connector { display: none; }
  .showcase-display { padding: 16px; }
  .trust-strip { grid-template-columns: 1fr; }
  .detail-section .cards-grid { grid-template-columns: 1fr; }
}
