:root {
  --bg: #07090e;
  --surface: #0e121b;
  --surface-2: #141a27;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.14);
  --amber: #f59e0b;
  --purple: #a78bfa;
  --rose: #fb7185;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

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

code, pre, .mono-dim {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 15% 5%, rgba(16, 185, 129, 0.12), transparent 65%),
    radial-gradient(50% 45% at 85% 10%, rgba(56, 189, 248, 0.11), transparent 65%),
    radial-gradient(45% 40% at 50% 95%, rgba(99, 102, 241, 0.08), transparent 70%);
  pointer-events: none;
}

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

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: grid;
  place-items: center;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.version-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

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

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

.btn-primary {
  background: var(--emerald);
  color: #042f2e;
}
.btn-primary:hover { background: #34d399; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.star-count, .cta-badge {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

/* Hero */
.hero {
  padding: 64px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero-copy {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
  flex-shrink: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(110deg, #34d399 0%, #38bdf8 55%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 auto 28px;
  max-width: 680px;
  font-size: 17px;
  color: var(--text-secondary);
}

.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-lead code {
  font-size: 0.9em;
  color: #67e8f9;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 6px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: rgba(14, 18, 27, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Interactive Dual-Display Simulator */
.demo-stage {
  background: rgba(14, 18, 27, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

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

.demo-tab:hover { color: var(--text); border-color: var(--border-strong); }
.demo-tab.active {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.45);
}

.dual-screen-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.25fr;
  gap: 18px;
}

.device-frame {
  background: #0a0d14;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device-frame.virtual {
  border-color: rgba(16, 185, 129, 0.35);
}

.device-topbar {
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.status-pill.sky { background: var(--sky-soft); color: var(--sky); }
.status-pill.emerald { background: var(--emerald-soft); color: var(--emerald); }

.mono-dim { font-size: 11px; color: var(--text-muted); }

.physical-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.mock-app-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

.mock-title { font-weight: 600; font-size: 14px; }
.mock-sub { font-size: 12px; color: var(--text-muted); }

.mock-lines { display: flex; flex-direction: column; gap: 9px; }
.mock-line {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.w-90 { width: 90%; }
.w-85 { width: 85%; }
.w-75 { width: 75%; }
.w-60 { width: 60%; }

.mock-notif {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.mock-notif-text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}
.mock-notif-text strong { color: var(--emerald); font-size: 12.5px; }
.mock-notif-text span { color: var(--text-secondary); }

.ime-shield {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.virtual-viewport {
  position: relative;
  min-height: 270px;
  padding: 16px;
  background: #06080d;
  flex: 1;
  overflow: hidden;
}

.virtual-trace {
  padding: 10px 14px;
  background: #0d121d;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.trace-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #042f2e;
  background: var(--emerald);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.virtual-trace code {
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scenario internals */
.som-card {
  position: relative;
  padding: 11px 12px;
  border-radius: 10px;
  background: #111827;
  border: 1.5px solid rgba(239, 68, 68, 0.75);
  margin-bottom: 10px;
}
.som-card.ad {
  border-color: rgba(245, 158, 11, 0.75);
  opacity: 0.65;
}
.som-card.input {
  border-color: rgba(16, 185, 129, 0.85);
}
.som-badge {
  position: absolute;
  top: -9px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  background: #ef4444;
}
.som-card.ad .som-badge { background: #d97706; }
.som-card.input .som-badge { background: #059669; }
.som-title { font-size: 13px; font-weight: 600; color: var(--text); }
.som-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.grid-canvas {
  position: relative;
  height: 238px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 75% 30%, rgba(56, 189, 248, 0.25), transparent 45%),
    radial-gradient(circle at 25% 75%, rgba(129, 140, 248, 0.22), transparent 50%),
    linear-gradient(135deg, #0b1120, #111827);
  border: 1px solid rgba(34, 211, 238, 0.35);
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(34, 211, 238, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 238, 0.2) 1px, transparent 1px);
  background-size: 20% 20%;
}

.grid-axis-top {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-evenly;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #67e8f9;
}
.grid-axis-top span, .grid-axis-left span {
  background: rgba(8, 13, 24, 0.85);
  padding: 1px 4px;
  border-radius: 4px;
}
.grid-axis-left {
  position: absolute;
  left: 4px;
  top: 24px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #67e8f9;
}

.hud-pill {
  position: absolute;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hud-tl { top: 28px; left: 48px; }
.hud-tr { top: 28px; right: 16px; border-color: rgba(16, 185, 129, 0.6); color: var(--emerald); }
.hud-br { bottom: 18px; right: 18px; background: rgba(16, 185, 129, 0.22); border-color: var(--emerald); color: #ecfdf5; }

.tap-ring {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.8);
  right: 54px;
  bottom: 20px;
  animation: tapPulse 1.8s infinite;
}

@keyframes tapPulse {
  0% { transform: scale(0.8); opacity: 1; }
  70% { transform: scale(1.45); opacity: 0.25; }
  100% { transform: scale(0.8); opacity: 1; }
}

.turn-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 12.5px;
}
.turn-card.live {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}
.turn-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 4px;
}
.turn-card.live .turn-head { color: var(--emerald); }

/* Sections */
.section {
  padding: 72px 22px;
}

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

.section-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--emerald);
  margin-bottom: 8px;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

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

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.18s, transform 0.18s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.card-icon.emerald { background: var(--emerald-soft); color: var(--emerald); }
.card-icon.sky { background: var(--sky-soft); color: var(--sky); }
.card-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.card-icon.purple { background: rgba(167, 139, 250, 0.15); color: var(--purple); }
.card-icon.rose { background: rgba(251, 113, 133, 0.15); color: var(--rose); }

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.card code {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 5px;
}

/* Architecture Explorer */
.arch-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  align-items: start;
}

.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arch-layer {
  text-align: left;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.arch-layer:hover { border-color: var(--border-strong); }
.arch-layer.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.5);
}

.layer-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 4px 8px;
  border-radius: 8px;
}

.arch-layer strong { display: block; font-size: 15px; margin-bottom: 3px; }
.arch-layer span { font-size: 13px; color: var(--text-secondary); }

.arch-inspector {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  min-height: 295px;
}

.arch-inspector h3 { margin: 0 0 8px; font-size: 20px; }
.arch-inspector p { margin: 0 0 16px; color: var(--text-secondary); font-size: 14.5px; }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tech-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

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

.compare-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

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

.col-tapuse {
  background: rgba(16, 185, 129, 0.06);
  color: var(--text);
  font-weight: 600;
}

.yes { color: var(--emerald); }
.no { color: var(--text-muted); }

/* Quick Start */
.steps-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 42px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--sky);
  background: var(--sky-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.step-card h3 { margin: 0; font-size: 17px; }
.step-card p { margin: 0; font-size: 14px; color: var(--text-secondary); }

.code-box {
  position: relative;
  margin-top: 6px;
  background: #06080d;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  overflow-x: auto;
}

.code-box pre { margin: 0; font-size: 12px; color: #cbd5e1; line-height: 1.6; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); }

/* Bottom CTA */
.cta-banner {
  background: linear-gradient(125deg, rgba(16, 185, 129, 0.14), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-banner h2 { margin: 0 0 6px; font-size: 26px; }
.cta-banner p { margin: 0; color: var(--text-secondary); max-width: 560px; }
.cta-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.footer {
  padding: 32px 22px 54px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer-meta { font-size: 13px; color: var(--text-muted); }

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
}
.footer-links a:hover { color: var(--text); }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dual-screen-grid, .bento-grid, .arch-layout, .steps-grid { grid-template-columns: 1fr; }
}
