:root {
  --bg: #070b14;
  --surface: rgba(15, 22, 38, 0.88);
  --surface-solid: #0f1626;
  --surface-high: #172138;
  --outline: rgba(40, 54, 85, 0.85);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --cyan: #38bdf8;
  --violet: #818cf8;
  --emerald: #34d399;
  --amber: #fbbf24;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-high: #eaf0fa;
  --outline: rgba(203, 213, 225, 0.95);
  --text: #0f172a;
  --muted: #475569;
  --cyan: #0284c7;
  --violet: #4f46e5;
  --emerald: #059669;
  --amber: #d97706;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

#neural-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
}

.brand-name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-tag {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 22px;
}

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

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

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

/* Buttons & Pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  padding: 12px 20px;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #ffffff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--cyan) 28%, transparent);
}

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

.btn-ghost {
  color: var(--cyan);
  background: transparent;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.pill-cyan {
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 14%, transparent);
  border-color: color-mix(in srgb, var(--cyan) 35%, transparent);
}

.pill-emerald {
  color: var(--emerald);
  background: color-mix(in srgb, var(--emerald) 14%, transparent);
  border-color: color-mix(in srgb, var(--emerald) 35%, transparent);
}

.pill-violet {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 14%, transparent);
  border-color: color-mix(in srgb, var(--violet) 35%, transparent);
}

.pill-amber {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  border-color: color-mix(in srgb, var(--amber) 35%, transparent);
}

/* Cards */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 32px;
  align-items: center;
  padding: 64px 0 42px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 24px;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--outline);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  color: var(--cyan);
}

.hero-stats span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Simulator */
.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.sim-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}

.offline-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.sim-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface-high);
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
}

.chip.active {
  color: var(--text);
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 16%, transparent);
}

.sim-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sim-input-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.88rem;
}

.sim-output {
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 14px;
}

.route-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sim-reason {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.sim-reply {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.sim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Sections */
.section {
  padding: 58px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

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

/* 8 Screens Showcase */
.screens-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  align-items: start;
}

.screen-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-tab {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.screen-tab.active {
  color: var(--text);
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 14%, var(--surface));
}

.phone-frame {
  padding: 20px;
  min-height: 360px;
}

.phone-notch {
  width: 90px;
  height: 6px;
  border-radius: 99px;
  background: var(--outline);
  margin: 0 auto 18px;
}

.phone-screen h3 {
  margin: 0 0 6px;
}

.screen-mock-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.mock-box {
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85rem;
}

.mock-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--cyan);
}

/* Architecture & Privacy */
.arch-grid,
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.privacy-grid h4 {
  margin: 0 0 8px;
  color: var(--emerald);
}

.privacy-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.module-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 14px;
}

.module-pills span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--surface-high);
  border: 1px solid var(--outline);
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.clean-list li + li {
  margin-top: 6px;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.copy-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: var(--surface-high);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  overflow-x: auto;
  font-size: 0.82rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--outline);
  padding: 28px 0 42px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--cyan);
}

@media (max-width: 960px) {
  .hero,
  .screens-layout,
  .arch-grid,
  .code-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .privacy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .bento-grid,
  .privacy-grid,
  .screen-mock-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
