@property --c1 { syntax: "<color>"; inherits: true; initial-value: #7dd3fc; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #c4b5fd; }

:root {
  --bg: #04050b;
  --bg-2: #080a16;
  --ink: #e9edf8;
  --ink-2: #aab2ca;
  --ink-3: #6d7593;
  --line: rgba(196, 210, 255, 0.09);
  --line-2: rgba(196, 210, 255, 0.16);
  --panel: rgba(9, 12, 24, 0.66);
  --c1: #7dd3fc;
  --c2: #c4b5fd;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5.5vw, 88px);
  color-scheme: dark;
  transition: --c1 1.2s ease, --c2 1.2s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.snap { scroll-snap-type: y proximity; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--c1) 40%, transparent); }
img { max-width: 100%; display: block; }
code, kbd, pre { font-family: var(--mono); }

/* ------------------------------------------------------------ backdrop -- */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 78% 38%, color-mix(in srgb, var(--c1) 13%, transparent), transparent 62%),
    radial-gradient(50vw 40vw at 10% 110%, color-mix(in srgb, var(--c2) 9%, transparent), transparent 70%),
    var(--bg);
}
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(200, 215, 255, 0.07) 1px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70vw 80vh at 72% 45%, #000 20%, transparent 75%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(4, 5, 11, 0.86) 30%, rgba(4, 5, 11, 0) 56%);
}

/* --------------------------------------------------------------- stage -- */
.stage {
  position: fixed; z-index: 1; pointer-events: none;
  top: 0; right: 0; width: 64vw; height: 100vh; height: 100svh;
}
.stage .brain-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- HUD -- */
.hud {
  position: fixed; z-index: 3; right: calc(var(--gutter) + 36px); bottom: 34px;
  display: grid; gap: 4px; justify-items: end; text-align: right; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-3);
}
.hud .role { font-family: var(--sans); font-size: 15px; letter-spacing: 0.04em; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.hud .role i { width: 8px; height: 8px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 22%, transparent), 0 0 18px var(--c1); animation: beat 1.6s ease-in-out infinite; }
.hud .area { color: color-mix(in srgb, var(--c1) 70%, var(--ink-2)); letter-spacing: 0.06em; font-size: 12px; }
@keyframes beat { 50% { transform: scale(0.7); opacity: 0.6; } }

.pager {
  position: fixed; z-index: 3; right: 22px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 14px; list-style: none; margin: 0; padding: 0;
}
.pager a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: transparent; transition: color 0.3s; }
.pager a::after { content: ""; width: 14px; height: 1px; background: var(--ink-3); transition: width 0.4s, background 0.4s; }
.pager a:hover { color: var(--ink-3); }
.pager a.on { color: var(--ink-2); }
.pager a.on::after { width: 34px; background: var(--c1); box-shadow: 0 0 10px var(--c1); }

/* ------------------------------------------------------------- header -- */
.top {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--gutter);
  background: linear-gradient(180deg, rgba(4, 5, 11, 0.85), rgba(4, 5, 11, 0));
}
.top.solid { background: rgba(4, 5, 11, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
.brand svg { width: 26px; height: 26px; }
.brand small { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--ink-3); letter-spacing: 0.16em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; padding: 8px 12px; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav a.cta { color: #05060c; background: var(--ink); font-weight: 500; margin-left: 8px; }
.nav a.cta:hover { background: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-2); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }

/* -------------------------------------------------------------- pages -- */
main { position: relative; z-index: 2; }
.page {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 96px;
  scroll-snap-align: start;
}
.col { width: min(620px, 46vw); }
.col.wide { width: min(720px, 52vw); }

.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--ink-3); text-transform: uppercase; margin: 0 0 22px; }
.kicker b { color: var(--c1); font-weight: 500; }
.kicker::after { content: ""; flex: 0 0 48px; height: 1px; background: linear-gradient(90deg, var(--c1), transparent); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(38px, 5.2vw, 74px); line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.45; }
.grad { background: linear-gradient(100deg, var(--ink) 30%, var(--c1) 70%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(16px, 1.25vw, 19px); color: var(--ink-2); margin: 22px 0 0; max-width: 34em; }
.lede strong { color: var(--ink); font-weight: 500; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 500; border: 1px solid var(--line-2); color: var(--ink); background: rgba(255, 255, 255, 0.03); transition: transform 0.2s, background 0.2s, border-color 0.2s; }
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--c1) 50%, transparent); background: rgba(255, 255, 255, 0.06); }
.btn.primary { color: #05060c; background: linear-gradient(100deg, #fff, color-mix(in srgb, var(--c1) 55%, #fff)); border-color: transparent; }
.btn svg { width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 0; margin-top: 54px; border-top: 1px solid var(--line); width: fit-content; }
.stats div { padding: 16px 30px 0 0; margin-right: 30px; }
.stats div + div { border-left: 1px solid var(--line); padding-left: 30px; }
.stats b { display: block; font-size: 28px; font-weight: 600; font-family: var(--mono); letter-spacing: -0.02em; }
.stats span { font-size: 13px; color: var(--ink-3); }

/* feature rows: numbered, ruled — no icon soup */
.rows { list-style: none; padding: 0; margin: 36px 0 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 54px 1fr; gap: 4px 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rows li > span { font-family: var(--mono); font-size: 12px; color: var(--c1); padding-top: 3px; }
.rows p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.rows code, .lede code, .note code { font-size: 0.88em; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--ink); }

.shot { margin: 34px 0 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #0b0e1b;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 60px -20px color-mix(in srgb, var(--c1) 40%, transparent); }
.shot figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); padding: 9px 14px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.shot .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }

.term { margin: 30px 0 0; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(6, 8, 18, 0.82); overflow: hidden; }
.term header { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.term pre { margin: 0; padding: 16px 18px; font-size: 13px; line-height: 1.7; overflow-x: auto; color: #cfd6ee; }
.term .k { color: var(--c1); } .term .s { color: #fbcfe8; } .term .c { color: var(--ink-3); } .term .n { color: #fde68a; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chips span { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); background: rgba(255, 255, 255, 0.02); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 34px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.grid2 > div { background: rgba(6, 8, 18, 0.9); padding: 18px 20px; }
.grid2 h3 { font-size: 15px; }
.grid2 p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.grid2 small { font-family: var(--mono); font-size: 11px; color: var(--c1); letter-spacing: 0.08em; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 8, 18, 0.7); }
.steps li::before { content: "0" counter(s); font-family: var(--mono); color: var(--c1); font-size: 13px; padding-top: 2px; }
.steps p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

.note { margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* ------------------------------------------------------------- footer -- */
.foot { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 40px var(--gutter) 48px; background: rgba(4, 5, 11, 0.92); color: var(--ink-3); font-size: 13px; }
.foot .in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot p { margin: 0; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; } .rv.d2 { transition-delay: 0.16s; } .rv.d3 { transition-delay: 0.24s; }

/* -------------------------------------------------------------- mobile -- */
@media (max-width: 960px) {
  .stage { width: 100vw; opacity: 0.42; }
  .backdrop::after { background: linear-gradient(180deg, rgba(4, 5, 11, 0.2), rgba(4, 5, 11, 0.7)); }
  .col, .col.wide { width: 100%; }
  .page { padding: 104px 16px 72px; }
  .top { padding: 14px 16px; }
  .hud { right: 16px; bottom: 16px; }
  .hud { display: none; }
  .pager { display: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; background: rgba(4, 5, 11, 0.96); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a.cta { margin: 6px 0 0; text-align: center; }
  .menu-btn { display: block; }
  .stats { grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  .stats div { padding-right: 10px; margin-right: 0; }
  .stats div + div { padding-left: 12px; }
  .stats b { font-size: 22px; }
  .grid2 { grid-template-columns: 1fr; }
  .foot { padding: 32px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
}

/* =============================================================== docs == */
.docs .stage { width: 44vw; opacity: 0.5; }
.docs .backdrop::after { background: linear-gradient(90deg, var(--bg) 0%, rgba(4, 5, 11, 0.94) 52%, rgba(4, 5, 11, 0.35) 78%); }
.docs .hud { right: 24px; }
.doc-wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 232px minmax(0, 760px); gap: 56px; padding: 104px var(--gutter) 80px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.toc p { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3); margin: 18px 0 6px; }
.toc p:first-child { margin-top: 0; }
.toc a { display: block; padding: 5px 10px; border-left: 1px solid var(--line); color: var(--ink-3); text-decoration: none; font-size: 14px; transition: color 0.2s, border-color 0.2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-color: var(--c1); }
.doc h1 { font-size: clamp(32px, 3.6vw, 48px); }
.doc > header .lede { max-width: 40em; }
.doc section { padding-top: 56px; scroll-margin-top: 80px; }
.doc section + section { border-top: 1px solid var(--line); margin-top: 56px; }
.doc h2 { font-size: clamp(24px, 2.2vw, 30px); display: flex; align-items: baseline; gap: 14px; }
.doc h2 small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--c1); letter-spacing: 0.1em; }
.doc h3 { font-size: 17px; margin-top: 30px; }
.doc p, .doc li { color: var(--ink-2); font-size: 15.5px; }
.doc p { margin: 14px 0 0; }
.doc strong { color: var(--ink); font-weight: 500; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 12px 0 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--ink-3); }
.doc a { color: var(--c1); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--c1) 35%, transparent); }
.doc :not(pre) > code { font-size: 0.86em; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); color: var(--ink); word-break: break-word; }
.doc kbd { font-size: 0.82em; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--ink); }
.path { font-family: var(--mono); font-size: 0.86em; color: var(--ink); white-space: nowrap; }
.path::before { content: ""; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.doc th { color: var(--ink-3); font-weight: 500; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.doc td:first-child { color: var(--ink); white-space: nowrap; }
.code { margin: 16px 0 0; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(6, 8, 18, 0.88); overflow: hidden; }
.code header { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.code button { background: none; border: 1px solid var(--line-2); color: var(--ink-2); font: inherit; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.code button:hover { color: var(--ink); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.65; color: #cfd6ee; }
.code .c { color: var(--ink-3); } .code .k { color: var(--c1); } .code .s { color: #fbcfe8; }
.tip { margin-top: 18px; padding: 14px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent); background: color-mix(in srgb, var(--c1) 6%, rgba(6, 8, 18, 0.85)); font-size: 14.5px; color: var(--ink-2); }
.tip b { color: var(--c1); font-weight: 500; margin-right: 6px; }
.tip.warn { border-color: rgba(251, 146, 60, 0.4); background: rgba(251, 146, 60, 0.07); }
.tip.warn b { color: #fdba74; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; }
.flow span { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.flow i { color: var(--ink-3); font-style: normal; }
.doc .shot { margin-top: 20px; }
@media (max-width: 1280px) { .docs .stage { opacity: 0.2; width: 60vw; } }
@media (max-width: 960px) {
  .doc-wrap { grid-template-columns: 1fr; gap: 24px; padding: 92px 16px 64px; }
  .toc { position: static; max-height: none; display: none; }
  .toc.open { display: block; }
  .docs .stage { opacity: 0.14; width: 100vw; }
  .toc-btn { display: inline-flex !important; }
  .doc table { display: block; overflow-x: auto; }
}
.toc-btn { display: none; margin-top: 18px; }

/* ============================================================== legal == */
.legal .doc-wrap { grid-template-columns: minmax(0, 780px); justify-content: start; }
.legal .stage { width: 40vw; opacity: 0.35; }
.legal .doc section { padding-top: 28px; }
.legal .doc section + section { margin-top: 28px; }
.legal .doc h2 { font-size: 20px; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 14px; letter-spacing: 0.04em; }
.todo { color: #fdba74; border-bottom: 1px dashed #fdba74; font-style: normal; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }
.plan { border: 1px solid var(--line-2); border-radius: 14px; padding: 22px; background: rgba(6, 8, 18, 0.85); }
.plan.hot { border-color: color-mix(in srgb, var(--c1) 55%, transparent); box-shadow: 0 0 40px -18px var(--c1); }
.plan h3 { margin: 0; font-size: 16px; }
.plan .price { font-size: 34px; font-weight: 600; margin: 12px 0 2px; font-family: var(--mono); letter-spacing: -0.02em; color: var(--ink); }
.plan .price small { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.plan ul { padding-left: 1.1em; }
.plan li { font-size: 14px; }
.doc h2.gap { margin-top: 48px; }
.term .copy, .code .copy { background: none; border: 1px solid var(--line-2); color: var(--ink-2); font: inherit; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.term .copy:hover { color: var(--ink); }
.shot img { width: 100%; height: auto; }
.doc .shot.rv { opacity: 1; transform: none; }
