:root {
  --bg: #09090b;
  --bg2: #111113;
  --bg3: #18181b;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.12);
  --text: #fafafa;
  --text2: #a1a1aa;
  --text3: #71717a;
  --accent: #6366f1;
  --accent2: #06b6d4;
  --ok: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;
  --radius: 10px;
  --radius-lg: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em;
}
.logo-mark { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  text-decoration: none; color: var(--text2); font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 500; }
.btn-nav {
  background: var(--accent) !important; color: #fff !important;
  padding: 7px 16px; border-radius: 6px; font-size: 0.85rem !important;
  font-weight: 500;
}

/* BUTTONS */
.btn-primary {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 8px; font-size: 0.95rem; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost {
  display: inline-block; color: var(--text2); border: 1px solid var(--border2);
  padding: 11px 22px; border-radius: 8px; font-size: 0.95rem; font-weight: 400;
  text-decoration: none; cursor: pointer; background: transparent;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* GRAD TEXT */
.grad-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent2);
  border: 1px solid rgba(6,182,212,0.3); border-radius: 100px;
  padding: 5px 14px; margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 24px;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text2); max-width: 580px;
  margin: 0 auto 36px; line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stat-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg2); padding: 20px 32px; gap: 32px;
}
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.stat-label { display: block; font-size: 0.8rem; color: var(--text2); margin-top: 2px; }
.stat-div { width: 1px; height: 32px; background: var(--border2); }
.hero-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* SECTION SHARED */
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 16px;
}
.section-sub { color: var(--text2); font-size: 1.05rem; max-width: 600px; margin-bottom: 48px; }
.section-eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}

/* PROBLEM */
.problem { padding: 80px 0; border-top: 1px solid var(--border); }
.problem-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.problem-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.problem-icon { font-size: 1.3rem; margin-bottom: 12px; opacity: 0.6; }
.problem-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.problem-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.55; }

/* HOW IT WORKS */
.how-it-works { padding: 80px 0; border-top: 1px solid var(--border); }
.layers { display: flex; flex-direction: column; gap: 48px; }
.layer { display: grid; grid-template-columns: 60px 1fr; gap: 28px; align-items: start; }
.layer-num {
  font-size: 2.5rem; font-weight: 700; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.layer-content h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
.layer-content > p { color: var(--text2); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.6; }
.layer-code {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.code-block {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: #c4c4cf; line-height: 1.6; padding: 20px 24px;
  display: block; white-space: pre; overflow-x: auto;
}

/* DEMO */
.demo-section { padding: 80px 0; border-top: 1px solid var(--border); }
.demo-tabs { display: flex; gap: 0; margin-bottom: 32px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; width: fit-content; }
.demo-tab {
  padding: 10px 24px; font-size: 0.9rem; font-weight: 500; cursor: pointer;
  background: transparent; border: none; color: var(--text2); transition: all 0.2s;
}
.demo-tab.active { background: var(--accent); color: #fff; }
.demo-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.demo-panel.hidden { display: none; }
.session-row { margin-bottom: 20px; }
.session-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.session-bubble {
  display: inline-block; padding: 10px 16px; border-radius: 8px; font-size: 0.88rem; line-height: 1.5;
  margin-bottom: 8px; max-width: 85%;
}
.session-bubble.user { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.25); display: block; }
.session-bubble.llm { background: var(--bg3); border: 1px solid var(--border); display: block; }
.session-note { font-size: 0.8rem; padding: 6px 12px; border-radius: 6px; display: inline-block; }
.session-note.ok { background: rgba(34,197,94,0.1); color: var(--ok); border: 1px solid rgba(34,197,94,0.2); }
.session-note.warn { background: rgba(245,158,11,0.1); color: var(--warn); border: 1px solid rgba(245,158,11,0.2); }
.session-note.error { background: rgba(239,68,68,0.1); color: var(--error); border: 1px solid rgba(239,68,68,0.2); }
.session-divider { text-align: center; color: var(--text3); font-size: 0.8rem; letter-spacing: 0.05em; padding: 16px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin: 20px 0; }

/* WHITE PAPER */
.whitepaper { padding: 80px 0; border-top: 1px solid var(--border); }

/* Teaser layout (index page) */
.wp-teaser {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2.5rem; flex-wrap: wrap;
}
.wp-teaser-left { flex: 1; min-width: 260px; }
.wp-teaser-right {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.75rem; padding-top: 0.5rem;
}
.wp-read-btn { white-space: nowrap; }
.wp-byline { font-size: 0.8rem; color: var(--text3); }
.wp-toc {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; margin-top: 1rem;
}
.wp-toc span {
  font-size: 0.75rem; color: var(--text3);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px;
}

/* Old full inline whitepaper styles (kept for compat) */
.wp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.wp-body { max-width: 720px; }
.wp-section { margin-bottom: 40px; }
.wp-section h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.wp-section h4 { font-size: 1rem; font-weight: 600; margin: 20px 0 10px; color: var(--text2); }
.wp-section p { font-size: 0.95rem; color: var(--text2); line-height: 1.75; margin-bottom: 14px; }
.wp-section code { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; background: var(--bg3); padding: 2px 6px; border-radius: 4px; color: var(--accent2); }
.wp-section strong { color: var(--text); font-weight: 600; }

/* CSS custom property aliases used by whitepaper.html inline styles */
:root {
  --indigo: #6366f1;
  --cyan: #06b6d4;
  --surface: #111113;
  --muted: #71717a;
  --text-secondary: #a1a1aa;
}

/* EARLY ACCESS */
.early-access { padding: 80px 0; border-top: 1px solid var(--border); }
.ea-inner { max-width: 540px; }
.ea-form { display: flex; gap: 10px; margin: 28px 0 12px; flex-wrap: wrap; }
.ea-input {
  flex: 1; min-width: 200px; padding: 12px 16px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}
.ea-input:focus { border-color: var(--accent); }
.ea-fine { font-size: 0.8rem; color: var(--text3); }
.ea-note { font-size: 0.95rem; color: var(--ok); margin-top: 12px; }

/* FOOTER */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 16px; }
.logo-text { font-weight: 600; font-size: 1rem; }
.footer-by { font-size: 0.85rem; color: var(--text3); margin-left: 8px; }
.footer-by a { color: var(--text2); text-decoration: none; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.85rem; color: var(--text2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.78rem; color: var(--text3); }

/* RESPONSIVE */
@media (max-width: 600px) {
  .layer { grid-template-columns: 1fr; }
  .layer-num { font-size: 1.8rem; }
  .hero-stat-row { flex-direction: column; gap: 16px; }
  .stat-div { width: 40px; height: 1px; }
  .nav-links a:not(.btn-nav) { display: none; }
  .wp-header { flex-direction: column; }
}
