:root {
  --bg: #07090e;
  --bg-elev: #0e121b;
  --bg-card: #121826;
  --bg-code: #0a0d14;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --claude: #d97757;
  --codex: #10b981;
  --agy: #38bdf8;
  --gemini: #818cf8;
  --amber: #f59e0b;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(56, 189, 248, 0.12), transparent 65%),
    radial-gradient(circle at 82% 20%, rgba(16, 185, 129, 0.07), transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.footer .brand-logo {
  height: 36px;
}

.bus-core-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bus-core-symbol {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  border-color: rgba(56, 189, 248, 0.7);
  color: #04131d;
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  color: #04131d;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.35);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

/* Hero */
.hero {
  padding: 64px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  border: 1px solid var(--border-strong);
  background: rgba(14, 18, 27, 0.85);
  margin-bottom: 20px;
}

.eyebrow strong {
  color: var(--emerald);
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 4.4vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 .hl {
  background: linear-gradient(90deg, #f8fafc 10%, #7dd3fc 60%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
}

.install-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 500px;
  padding: 10px 12px 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-code);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin-bottom: 20px;
}

.install-box code {
  font-family: var(--mono);
  font-size: 13.5px;
  color: #7dd3fc;
  white-space: nowrap;
  overflow-x: auto;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: var(--dim);
  font-family: var(--mono);
}

/* Live Bus Visualizer Card */
.bus-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.92), rgba(10, 13, 20, 0.96));
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.bus-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
}

.bus-workers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.node-btn {
  text-align: left;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.node-btn:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.node-btn.active {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2), 0 8px 24px rgba(56, 189, 248, 0.12);
}

.node-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.v-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.v-codex { background: var(--codex); box-shadow: 0 0 8px var(--codex); }
.v-agy { background: var(--agy); box-shadow: 0 0 8px var(--agy); }
.v-gemini { background: var(--gemini); box-shadow: 0 0 8px var(--gemini); }
.v-claude { background: var(--claude); box-shadow: 0 0 8px var(--claude); }

.node-sub {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

.bus-lines {
  display: block;
  width: 100%;
  height: 44px;
}

.bus-lines path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  transition: stroke 0.25s ease;
}

.bus-lines path.active {
  stroke: var(--cyan);
  stroke-width: 2;
  animation: dashFlow 1.2s linear infinite;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -16; }
}

.bus-core {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  font-family: var(--mono);
  font-size: 12px;
}

.bus-core strong {
  color: #e0f2fe;
}

.bus-core span {
  color: var(--muted);
  font-size: 11px;
}

.bus-lead {
  padding: 14px;
  border-radius: 11px;
  border: 1px solid rgba(217, 119, 87, 0.38);
  background: rgba(217, 119, 87, 0.07);
}

.bus-lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bus-log {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: #cbd5e1;
  min-height: 76px;
}

.bus-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--emerald);
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

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

.section-kicker {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

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

/* Grids & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

.card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 24px;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

/* Anti-Wrapper Comparison */
.compare-bad {
  background: rgba(14, 18, 27, 0.72);
  border-color: rgba(248, 113, 113, 0.22);
}

.compare-good {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(18, 24, 38, 0.95));
  border-color: rgba(16, 185, 129, 0.42);
}

.compare-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.compare-bad .compare-tag {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.compare-good .compare-tag {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.15);
}

.compare-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--muted);
}

.compare-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.compare-bad .compare-list li::before {
  content: "✕";
  color: #f87171;
  font-weight: 700;
}

.compare-good .compare-list li::before {
  content: "✓";
  color: var(--emerald);
  font-weight: 700;
}

.compare-good .compare-list li {
  color: var(--text);
}

/* Dual-Pane Demo */
.demo-shell {
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.demo-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.demo-tab.active {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.demo-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.demo-pane {
  background: var(--bg-code);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.pane-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}

.pane-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #dbeafe;
  white-space: pre-wrap;
  word-break: break-word;
}

.demo-summary-bar {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  background: rgba(16, 185, 129, 0.06);
  font-family: var(--mono);
  font-size: 12.5px;
  color: #6ee7b7;
}

/* Compatibility Matrix */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.matrix-table th,
.matrix-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.matrix-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
}

.vendor-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.pill-ok {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

.pill-info {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
}

/* Metrics */
.metric-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.metric-val.accent {
  color: var(--cyan);
}

.metric-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.metric-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* Steps */
.step-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Pricing */
.billing-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  gap: 4px;
  margin-top: 18px;
}

.billing-btn {
  padding: 7px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.billing-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--text);
}

.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.pricing-card.featured {
  border-color: rgba(56, 189, 248, 0.65);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), var(--bg-card) 55%);
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.14);
}

.popular-badge {
  position: absolute;
  top: -11px;
  right: 20px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--cyan);
  color: #04131d;
}

.price-tag {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}

.price-sub {
  font-size: 13px;
  color: var(--muted);
  min-height: 22px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  color: var(--emerald);
  margin-right: 9px;
  font-weight: 700;
}

.trust-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.trust-item {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(14, 18, 27, 0.65);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.trust-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

/* FAQ */
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.faq-item {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 16px 18px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 18px;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Docs Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 36px;
  padding: 40px 0 80px;
}

.docs-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}

.docs-sidebar a {
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 7px;
  transition: all 0.15s ease;
}

.docs-sidebar a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.docs-content section {
  margin-bottom: 44px;
  scroll-margin-top: 84px;
}

.docs-content h1 {
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.docs-content h2 {
  margin: 0 0 12px;
  font-size: 21px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.docs-content p,
.docs-content li {
  color: var(--muted);
  font-size: 15px;
}

.docs-content pre {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-code);
  font-family: var(--mono);
  font-size: 13px;
  color: #dbeafe;
  overflow-x: auto;
}

.docs-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: #7dd3fc;
}

.docs-content pre code {
  color: inherit;
}

.callout {
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 3px solid var(--amber);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
  font-size: 14px;
  margin: 14px 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  font-size: 13.5px;
  color: var(--dim);
}

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

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

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

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .demo-panes,
  .grid-2,
  .grid-3,
  .grid-4,
  .trust-strip,
  .faq-list,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .bus-workers {
    grid-template-columns: 1fr;
  }
}
