:root {
  --bg: #07090f;
  --bg-soft: #0d1119;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.08);
  --ink: #e8edf6;
  --ink-soft: #97a3b8;
  --ink-faint: #5e6a82;
  --cyan: #38e1d4;
  --violet: #8b7bff;
  --blue: #4d8dff;
  --amber: #ffb454;
  --red: #ff6b6b;
  --radius: 16px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---- animated graph background ---- */
#graph-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
.glow.c { width: 480px; height: 480px; background: var(--cyan); top: -160px; right: -120px; }
.glow.v { width: 520px; height: 520px; background: var(--violet); top: 40%; left: -200px; opacity: 0.35; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ---- logo mark ---- */
.mark { width: 32px; height: 32px; display: block; filter: drop-shadow(0 0 14px rgba(56, 225, 212, 0.5)); }

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 15, 0.6);
  border-bottom: 1px solid var(--panel-border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: 0.2px; font-size: 1.12rem; }
.wordmark { display: inline-flex; align-items: baseline; }
.wordmark .ohm {
  font-weight: 800;
  background: linear-gradient(120deg, var(--cyan), var(--violet) 60%, var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-right: 0.5px;
}
.nav-links { display: flex; gap: 30px; align-items: center; font-size: 0.92rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 9px 18px; border-radius: 10px;
  background: linear-gradient(120deg, var(--cyan), var(--blue));
  color: #04121a; font-weight: 600;
}
.nav-cta:hover { filter: brightness(1.08); }

/* ---- hero ---- */
header.hero { padding: 110px 0 90px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--panel-border); background: var(--panel);
  font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 28px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05;
  font-weight: 800; letter-spacing: -1.5px; margin-bottom: 22px;
}
h1 .grad {
  background: linear-gradient(110deg, var(--cyan), var(--violet) 60%, var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 660px; margin: 0 auto 38px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 14px 28px; border-radius: 12px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; transition: transform 0.15s, filter 0.15s; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: linear-gradient(120deg, var(--cyan), var(--blue)); color: #04121a; }
.btn.ghost { background: var(--panel); border-color: var(--panel-border); color: var(--ink); }

.terminal {
  margin: 60px auto 0; max-width: 720px; text-align: left;
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13,17,25,0.95), rgba(7,9,15,0.95));
  box-shadow: 0 40px 90px rgba(0,0,0,0.5); overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--panel-border); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.term-bar .r { background: #ff5f56; } .term-bar .y { background: #ffbd2e; } .term-bar .g { background: #27c93f; }
.term-bar span { margin-left: 8px; color: var(--ink-faint); font-family: var(--mono); font-size: 0.78rem; }
.term-body { padding: 20px 22px; font-family: var(--mono); font-size: 0.84rem; line-height: 1.8; }
.term-body .c1 { color: var(--ink-faint); }
.term-body .c2 { color: var(--cyan); }
.term-body .c3 { color: var(--ink); }
.term-body .crit { color: #ff6b6b; } .term-body .high { color: var(--amber); } .term-body .ok { color: #27c93f; }

/* ---- sections ---- */
section { padding: 90px 0; position: relative; z-index: 2; }
.eyebrow { color: var(--cyan); font-weight: 600; font-size: 0.82rem; letter-spacing: 1.5px; text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.8px; margin: 12px 0 16px; }
.lead { color: var(--ink-soft); max-width: 640px; font-size: 1.05rem; }
.center { text-align: center; } .center .lead { margin: 0 auto; }

.grid { display: grid; gap: 22px; margin-top: 52px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 28px 24px; transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.card:hover { border-color: rgba(56,225,212,0.4); transform: translateY(-4px); background: rgba(56,225,212,0.04); }
.card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(56,225,212,0.18), rgba(139,123,255,0.18)); border: 1px solid var(--panel-border); }
.card .ic svg { width: 23px; height: 23px; stroke: var(--cyan); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.12rem; margin-bottom: 9px; }
.card p { color: var(--ink-soft); font-size: 0.93rem; }
.step-num { font-family: var(--mono); color: var(--cyan); font-size: 0.8rem; margin-bottom: 6px; }

/* ---- principles / not ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; }
.principle { border-left: 2px solid var(--cyan); padding: 4px 0 4px 20px; margin-bottom: 26px; }
.principle:last-child { margin-bottom: 0; }
.principle h4 { font-size: 1.02rem; margin-bottom: 4px; }
.principle p { color: var(--ink-soft); font-size: 0.92rem; }
.not-list { list-style: none; }
.not-list li { padding: 12px 0 12px 30px; position: relative; color: var(--ink-soft); border-bottom: 1px solid var(--panel-border); }
.not-list li:last-child { border-bottom: none; }
.not-list li::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.not-list li b { color: var(--ink); }

/* ---- flow ---- */
.flow { display: flex; align-items: stretch; gap: 0; margin-top: 52px; flex-wrap: wrap; justify-content: center; }
.flow .node {
  flex: 1; min-width: 150px; text-align: center; padding: 22px 14px;
  border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); margin: 6px;
}
.flow .node .t { font-family: var(--mono); color: var(--cyan); font-size: 0.78rem; }
.flow .node h4 { margin: 6px 0 4px; font-size: 0.98rem; }
.flow .node p { font-size: 0.8rem; color: var(--ink-faint); }

/* ---- roadmap ---- */
.timeline { margin-top: 50px; border-left: 2px solid var(--panel-border); padding-left: 28px; }
.tl { position: relative; padding-bottom: 30px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: -36px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--ink-faint); }
.tl.done::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.tl .phase { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint); }
.tl.done .phase { color: var(--cyan); }
.tl h4 { font-size: 1.05rem; margin: 3px 0 5px; }
.tl p { color: var(--ink-soft); font-size: 0.92rem; }

/* ---- cta band ---- */
.band {
  margin: 30px 0; padding: 60px 40px; text-align: center;
  border: 1px solid var(--panel-border); border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(56,225,212,0.12), transparent 70%), var(--bg-soft);
}
.band h2 { margin-bottom: 14px; }

footer { border-top: 1px solid var(--panel-border); padding: 50px 0 40px; position: relative; z-index: 2; }
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.foot-note { color: var(--ink-faint); font-size: 0.85rem; max-width: 420px; margin-top: 14px; }
.foot-links { display: flex; gap: 40px; }
.foot-col h5 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); margin-bottom: 12px; }
.foot-col a { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 8px; }
.foot-col a:hover { color: var(--ink); }
.copyright { margin-top: 40px; color: var(--ink-faint); font-size: 0.82rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- docs pages ---- */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 50px; padding: 50px 0 90px; align-items: start; }
.docs-side { position: sticky; top: 92px; }
.docs-side h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); margin-bottom: 14px; }
.docs-side a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 2px; border-left: 2px solid transparent; }
.docs-side a:hover { color: var(--ink); background: var(--panel); }
.docs-side a.active { color: var(--cyan); border-left-color: var(--cyan); background: rgba(56,225,212,0.06); }
.docs-content { max-width: 760px; min-width: 0; }
.docs-content h1 { font-size: 2.2rem; letter-spacing: -1px; margin: 0 0 8px; text-align: left; }
.docs-content h2 { font-size: 1.5rem; margin: 38px 0 12px; padding-top: 14px; border-top: 1px solid var(--panel-border); }
.docs-content h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.docs-content h4 { font-size: 1.02rem; margin: 20px 0 6px; color: var(--ink); }
.docs-content p { color: var(--ink-soft); margin: 12px 0; }
.docs-content ul, .docs-content ol { color: var(--ink-soft); margin: 12px 0; padding-left: 24px; }
.docs-content li { margin: 6px 0; }
.docs-content a { color: var(--cyan); }
.docs-content a:hover { text-decoration: underline; }
.docs-content strong { color: var(--ink); }
.docs-content blockquote { border-left: 3px solid var(--amber); background: rgba(255,180,84,0.06); padding: 12px 18px; margin: 16px 0; border-radius: 0 8px 8px 0; color: var(--ink-soft); }
.docs-content code { font-family: var(--mono); font-size: 0.86em; background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 5px; color: var(--cyan); }
.docs-content pre { background: var(--bg-soft); border: 1px solid var(--panel-border); border-radius: 12px; padding: 18px; overflow-x: auto; margin: 16px 0; }
.docs-content pre code { background: none; padding: 0; color: var(--ink); font-size: 0.84rem; line-height: 1.7; }
.docs-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.9rem; }
.docs-content th, .docs-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--panel-border); }
.docs-content th { color: var(--ink); font-weight: 600; }
.docs-content td { color: var(--ink-soft); }
.docs-content hr { border: none; border-top: 1px solid var(--panel-border); margin: 28px 0; }

@media (max-width: 860px) {
  .g3, .g5 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-side { position: static; }
}
@media (max-width: 560px) {
  .g3, .g5 { grid-template-columns: 1fr; }
  header.hero { padding: 70px 0 60px; }
}
