/* ScaleGuard landing — hand-written, no framework, no external requests. Dark by default, light via [data-theme="light"]. */

:root {
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --card: rgba(255, 255, 255, .035);
  --card-solid: #12161d;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e8ecf3;
  --muted: #9ba6b8;
  --faint: #6f7b8f;
  --accent: #2dd4bf;
  --accent-2: #8b5cf6;
  --ok: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --code-bg: #0d1016;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --grid: rgba(255, 255, 255, .045);
  --radius: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #fafbfc;
  --bg-2: #f1f4f8;
  --card: #ffffff;
  --card-solid: #ffffff;
  --line: rgba(15, 23, 42, .1);
  --line-strong: rgba(15, 23, 42, .2);
  --text: #0f172a;
  --muted: #4b5a70;
  --faint: #76839a;
  --accent: #0d9488;
  --accent-2: #7c3aed;
  --ok: #059669;
  --bad: #e11d48;
  --warn: #b45309;
  --code-bg: #0f172a;
  --shadow: 0 30px 70px -35px rgba(15, 23, 42, .35);
  --grid: rgba(15, 23, 42, .05);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: .88em; background: var(--card); border: 1px solid var(--line); padding: .08em .4em; border-radius: 6px; }
pre { margin: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #04110f; padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; margin-inline: auto; justify-content: center; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { fill: none; flex: none; }

/* ─────────── nav ─────────── */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; letter-spacing: -.02em; text-decoration: none; }
.links { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.links a { color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 8px 10px; white-space: nowrap; border-radius: 8px; transition: color .15s, background .15s; }
.links a:hover { color: var(--text); background: var(--card); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn .moon { display: none; }
[data-theme="light"] .icon-btn .sun { display: none; }
[data-theme="light"] .icon-btn .moon { display: block; }
.menu { display: none; }

/* ─────────── buttons ─────────── */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15.5px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #05100e; background: linear-gradient(135deg, #2dd4bf, #5eead4 45%, #a78bfa); box-shadow: 0 10px 30px -10px rgba(45, 212, 191, .55); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(45, 212, 191, .75); transform: translateY(-1px); }
.btn-ghost { color: var(--text); background: var(--card); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--card) 70%, var(--text) 6%); }
.btn-ghost.gh { padding: 9px 14px; font-size: 14.5px; }

/* ─────────── sections ─────────── */
.sec { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.sec.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.sec h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 900px; font-weight: 750; }
.sub { color: var(--muted); font-size: clamp(17px, 1.7vw, 20px); max-width: 780px; margin-top: 18px; }
.fine { color: var(--faint); font-size: 14.5px; margin-top: 22px; max-width: 760px; }
.fine.center { max-width: 900px; }
.two > * { min-width: 0; }
.term pre, .term code { white-space: pre; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

/* ─────────── hero ─────────── */
.hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 6vw, 80px); overflow: clip; }
.hero-bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 18% 8%, rgba(45, 212, 191, .22), transparent 70%),
    radial-gradient(55% 50% at 86% 0%, rgba(139, 92, 246, .24), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
[data-theme="light"] .hero-bg { background:
    radial-gradient(60% 50% at 18% 8%, rgba(13, 148, 136, .13), transparent 70%),
    radial-gradient(55% 50% at 86% 0%, rgba(124, 58, 237, .13), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px; }
.hero-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); border: 1px solid var(--line); background: var(--card); padding: 7px 14px; border-radius: 999px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.hero h1 { font-size: clamp(42px, 7.6vw, 92px); font-weight: 800; margin-top: 26px; letter-spacing: -.035em; line-height: 1.02; }
.grad { background: linear-gradient(100deg, #2dd4bf 5%, #7dd3fc 40%, #a78bfa 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 760px; margin-top: 26px; color: var(--muted); font-size: clamp(17.5px, 2vw, 21px); }
.lede strong { color: var(--text); font-weight: 650; }

.install { width: min(680px, 100%); margin-top: 34px; text-align: left; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px 12px 0 0; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cmd { display: flex; align-items: center; gap: 10px; background: var(--code-bg); color: #e8ecf3; border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); }
.cmd[hidden] { display: none; }
.cmd code { flex: 1; background: none; border: 0; padding: 14px 0; font-size: clamp(13px, 1.7vw, 16px); white-space: nowrap; overflow-x: auto; scrollbar-width: none; color: inherit; }
.cmd code::-webkit-scrollbar { display: none; }
.prompt { color: var(--accent); margin-right: 8px; user-select: none; }
.copy { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .08); color: #e8ecf3; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 9px 13px; font: inherit; font-size: 14px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .15); }
.copy.done { background: rgba(52, 211, 153, .2); border-color: rgba(52, 211, 153, .5); }
.install-note { color: var(--faint); font-size: 14px; margin-top: 12px; text-align: center; }
.install.center { margin-top: 30px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; justify-content: center; }
.trust { list-style: none; padding: 0; margin: 38px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; color: var(--faint); font-size: 14.5px; }
.trust li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.trust a { color: var(--accent); }

.shot { position: relative; margin: 56px 0 0; width: 100%; }
.frame { border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; background: var(--card-solid); box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--card) 60%, transparent); }
.bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.frame img { width: 100%; height: auto; }
.s-light { display: none; }
[data-theme="light"] .s-dark, [data-theme="light"] picture { display: none; }
[data-theme="light"] .s-light { display: block; }
.float { position: absolute; display: flex; gap: 10px; align-items: center; text-align: left; padding: 11px 15px; border-radius: 13px; background: color-mix(in srgb, var(--card-solid) 92%, transparent); border: 1px solid var(--line-strong); box-shadow: var(--shadow); backdrop-filter: blur(10px); font-size: 14px; animation: bob 7s ease-in-out infinite; }
.float b { display: block; font-weight: 650; line-height: 1.2; }
.float small { color: var(--muted); font-size: 12.5px; }
.float .ok { color: var(--ok); } .float .bad { color: var(--bad); } .float .acc { color: var(--accent); }
.f1 { left: -14px; top: 22%; } .f2 { right: -14px; top: 46%; animation-delay: -2.4s; } .f3 { left: 6%; bottom: -22px; animation-delay: -4.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }


/* ─────────── hero 3D stage ─────────── */
.hero-top { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-copy { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.hero-stage { display: none; }
.hero.has-3d .hero-top { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; text-align: left; }
.hero.has-3d .hero-copy { align-items: flex-start; }
.hero.has-3d h1 { font-size: clamp(40px, 5.4vw, 80px); }
.hero.has-3d .lede { margin-left: 0; }
.hero.has-3d .cta-row, .hero.has-3d .trust { justify-content: flex-start; }
.hero.has-3d .install { margin-inline: 0; }
.hero.has-3d .install-note { text-align: left; }
.hero.has-3d .cmd code { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; padding: 12px 0; font-size: clamp(12.5px, 1.25vw, 15px); }
.hero.has-3d .hero-stage { display: block; }
.hero-stage { position: relative; width: 100%; aspect-ratio: 1.18 / 1; min-height: 380px; max-height: 620px; border-radius: 24px; overflow: hidden; cursor: crosshair; touch-action: pan-y; isolation: isolate;
  background: radial-gradient(70% 60% at 62% 45%, rgba(45, 212, 191, .13), transparent 70%), radial-gradient(60% 55% at 20% 85%, rgba(139, 92, 246, .16), transparent 70%), #070a12;
  border: 1px solid rgba(255, 255, 255, .13); box-shadow: var(--shadow), 0 0 90px -24px rgba(139, 92, 246, .5); }
.hero-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 80px rgba(0, 0, 0, .55); z-index: 1; }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; }
.hero-stage.live canvas { opacity: 1; }
.stage-hud, .stage-labels, .stage-ctl { position: absolute; z-index: 2; color: #dbe7f5; }
.stage-hud { left: 16px; top: 14px; right: 16px; pointer-events: none; text-align: left; }
.hud-counters { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.hud-counters span { color: #8ea0ba; } .hud-counters b { font-size: 15px; font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }
.hud-counters .ok b { color: #34d399; } .hud-counters .bad b { color: #fb7185; } .hud-counters .warn b { color: #fbbf24; }
.stage-hud .hud-log { position: static; margin: 10px 0 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.55; color: #7f90a8; white-space: pre; overflow: hidden; max-height: 5.6em; mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); }
.hud-log .ok { color: #7fe3c5; } .hud-log .bad { color: #fda4af; } .hud-log .warn { color: #fcd34d; } .hud-log b { color: inherit; font-weight: 700; }
.stage-labels { inset: 0; pointer-events: none; overflow: hidden; text-align: left; }
.stage-labels span { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .8s ease .3s; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: #c9f7f0; background: rgba(8, 12, 20, .72); border: 1px solid rgba(45, 212, 191, .38); padding: 2px 8px; border-radius: 999px; white-space: nowrap; will-change: transform; }
.hero-stage.live .stage-labels span { opacity: 1; }
.stage-labels .l-bad { color: #ffd5db; border-color: rgba(251, 113, 133, .5); }
.stage-labels .l-shield { color: #fff; border-color: rgba(167, 139, 250, .6); font-size: 11.5px; }
.stage-labels .l-nodes { color: #e3dcff; border-color: rgba(139, 92, 246, .5); }
.stage-ctl { left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12.5px; font-weight: 600; color: #e8f2ff; background: rgba(14, 20, 32, .78); border: 1px solid rgba(255, 255, 255, .16); padding: 7px 12px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); }
.chip:hover { border-color: rgba(45, 212, 191, .7); } .chip .ic { width: 15px; height: 15px; color: #fb7185; }
.chip[hidden] { display: none; }
.stage-hint { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: #6f7f97; }
@media (max-width: 1000px) {
  .hero.has-3d .hero-top { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero.has-3d .hero-copy { align-items: center; } .hero.has-3d .lede { margin-left: auto; } .hero.has-3d .cta-row, .hero.has-3d .trust { justify-content: center; } .hero.has-3d .install { margin-inline: auto; } .hero.has-3d .install-note { text-align: center; }
  .hero.has-3d h1 { font-size: clamp(40px, 9vw, 72px); }
  .hero-stage { aspect-ratio: 1.3 / 1; min-height: 340px; }
}
@media (max-width: 600px) { .stage-labels [data-label="rate"], .stage-labels [data-label="auth"] { display: none; } .stage-labels span { font-size: 9.5px; padding: 1px 6px; } .hud-log, .stage-hint { display: none; } .hero-stage { aspect-ratio: 1 / 0.9; min-height: 300px; } }

/* ─────────── why / swap ─────────── */
.swap { display: grid; grid-template-columns: 1fr 70px 1.15fr; gap: 0; align-items: stretch; margin-top: 52px; }
.swap-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--card); }
.swap-col h3 { font-size: 13px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; font-weight: 600; }
.before ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.before li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--line-strong); font-size: 15px; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s; }
.before li em { color: var(--faint); font-style: normal; font-size: 13px; }
.swap-mid { display: grid; place-items: center; color: var(--accent); }
.swap-mid .ic { width: 30px; height: 30px; }
.after { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--card)), color-mix(in srgb, var(--accent-2) 12%, var(--card))); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.after .one { display: grid; gap: 14px; justify-items: start; }
.after .one strong { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--card-solid) 85%, transparent); border: 1px solid var(--line-strong); }

/* ─────────── story ─────────── */
.story { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.story-stage { position: sticky; top: 88px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--card-solid); box-shadow: var(--shadow); overflow: hidden; }
.stage-inner { display: grid; grid-template-columns: 1fr 108px 1.35fr; gap: 14px; padding: 18px 18px 8px; }
.st-col h4, .st-gate h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; font-weight: 600; }
.who { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 8px; font-size: 13px; transition: opacity .5s, border-color .5s, box-shadow .5s; }
.who .ic { width: 17px; height: 17px; grid-row: span 2; color: var(--muted); }
.who b { font-weight: 600; line-height: 1.2; } .who small { color: var(--faint); font-size: 11.5px; }
.who.w-office, .who.w-partner { opacity: .5; } .who.w-laptop { opacity: .25; } .who.w-world { opacity: 1; border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.story.on-3 .w-office, .story.on-3 .w-partner { opacity: 1; border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); }
.story.on-4 .w-world { border-color: var(--line); opacity: .6; }
.story.on-5 .w-laptop { opacity: 1; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }

.st-gate { display: flex; flex-direction: column; align-items: center; border-radius: 14px; padding: 14px 8px; border: 1px dashed var(--line-strong); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent)); opacity: .22; transition: opacity .6s, border-color .6s; }
.story.on-2 .st-gate { opacity: 1; border-style: solid; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.gate-label { display: grid; justify-items: center; gap: 2px; text-align: center; } .gate-label b { font-size: 12.5px; } .gate-label small { color: var(--faint); font-size: 10.5px; line-height: 1.2; }
.layers { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; width: 100%; }
.layers li { display: grid; justify-items: center; gap: 3px; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 10.5px; line-height: 1.15; background: var(--bg-2); border: 1px solid var(--line); color: var(--faint); transition: color .5s, border-color .5s, background .5s; }
.layers .ic { width: 16px; height: 16px; }
.story.on-2 .l-https, .story.on-3 .l-acl, .story.on-4 .l-waf, .story.on-7 .l-log { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }

.app { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 7px; font-size: 13px; transition: border-color .5s, opacity .5s, transform .5s; }
.app b, .app .raw, .app .named { flex: 0 0 100%; }
.app b { display: block; font-weight: 650; }
.app span { font-family: var(--mono); font-size: 11px; color: var(--faint); overflow-wrap: anywhere; }
.app .raw { color: var(--bad); }
.app .named, .app .tag { display: none; }
.story.on-2 .app .raw { display: none; } .story.on-2 .app .named { display: block; color: var(--ok); }
.app .raw { display: block; }
.app .tag { margin-top: 3px; width: fit-content; padding: 2px 7px; border-radius: 999px; font-family: var(--font); font-size: 10.5px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--text); display: none; }
.story.on-3 .app .t-acl { display: inline-block; }
.story.on-4 .app .t-waf { display: inline-block; }
.app.late5, .app.late6 { display: none; }
.story.on-5 .app.late5 { display: flex; animation: pop .6s both; } .story.on-6 .app.late6 { display: flex; animation: pop .6s both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.story:not(.on-2) .app { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

.st-log { display: flex; align-items: center; gap: 14px; margin: 6px 18px 18px; padding: 11px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); min-height: 48px; }
.st-log b { color: var(--text); } .st-log b.r { color: var(--bad); }
.lg-on, .spark { display: none; } .lg-raw { color: var(--bad); }
.story.on-7 .lg-on { display: inline; flex: 1; } .story.on-7 .lg-raw { display: none; } .story.on-7 .spark { display: inline-flex; }
.spark { align-items: flex-end; gap: 3px; height: 26px; } .spark u { width: 5px; height: calc(var(--h) * 1%); background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 2px; text-decoration: none; }

.chapters { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.chapter { padding: 34px 0 38px 24px; border-left: 2px solid var(--line); position: relative; min-height: 46vh; opacity: .45; transition: opacity .4s, border-color .4s; }
.chapter.active { opacity: 1; border-left-color: var(--accent); }
.chapter::before { content: ""; position: absolute; left: -7px; top: 42px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); transition: background .3s, border-color .3s; }
.chapter.active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.ch-n { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.chapter h3 { font-size: clamp(24px, 2.7vw, 32px); margin: 10px 0 14px; letter-spacing: -.02em; }
.chapter p { color: var(--muted); font-size: 17px; } .chapter p + p { margin-top: 14px; }
.chapter .note { color: var(--text); font-weight: 560; border-left: 3px solid var(--accent-2); padding-left: 14px; }
.story[data-nojs] .chapter { opacity: 1; min-height: 0; }

/* ─────────── flow ─────────── */
.flow { margin-top: 52px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--card-solid); padding: clamp(18px, 3vw, 34px); box-shadow: var(--shadow); }
.scenarios { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.sc { font: inherit; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; transition: all .15s; }
.sc:hover { color: var(--text); border-color: var(--line-strong); }
.sc.on { color: #05100e; background: linear-gradient(135deg, #2dd4bf, #a78bfa); border-color: transparent; font-weight: 600; }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; position: relative; }
.track li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 0 4px; color: var(--faint); transition: color .3s; }
.track li::before { content: ""; position: absolute; top: 24px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.track li:first-child::before { display: none; }
.track li i { position: relative; z-index: 1; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-strong); transition: all .3s; }
.track li b { font-size: 13.5px; font-weight: 600; color: var(--muted); } .track li small { font-size: 11.5px; line-height: 1.2; }
.track li.pass i { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--bg-2)); }
.track li.pass::before { background: var(--ok); }
.track li.pass b { color: var(--text); }
.track li.stop i { color: var(--bad); border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--bg-2)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 16%, transparent); }
.track li.stop::before { background: var(--bad); }
.track li.stop b { color: var(--text); }
.track li.cur i { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); border-color: var(--accent); color: var(--accent); }
.track li.special i { color: var(--accent-2); border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, var(--bg-2)); }
.result { display: flex; align-items: center; gap: 16px; margin-top: 34px; padding: 18px 20px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.badge { font-family: var(--mono); font-weight: 700; font-size: 17px; padding: 8px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); white-space: nowrap; }
.badge.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.badge.cache { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.res-text b { display: block; font-size: 17px; } .res-text span { color: var(--muted); font-size: 15.5px; }
.logline { margin-top: 12px; padding: 13px 16px; border-radius: 12px; background: var(--code-bg); color: #cbd5e1; font-family: var(--mono); font-size: 13px; overflow-x: auto; }
.flow-foot { color: var(--faint); font-size: 14.5px; margin-top: 16px; }

/* ─────────── steps ─────────── */
.steps { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.num { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-weight: 800; color: #05100e; background: linear-gradient(135deg, #2dd4bf, #a78bfa); }
.step h3 { font-size: 22px; } .step > p { color: var(--muted); font-size: 16px; }
.term { margin-top: auto; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line-strong); padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 12.8px; line-height: 1.65; color: #cbd5e1; }
.term code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.term .p { color: var(--accent); } .term .d { color: #7d8aa0; } .term .ok { color: #34d399; } .term .warn { color: #fbbf24; }
.term.big { font-size: clamp(12.5px, 1.4vw, 14.5px); padding: 22px 24px; box-shadow: var(--shadow); }
.term .line { display: inline; }
.mini-ui { margin-top: auto; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; }
.mu-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--card-solid); border: 1px solid var(--line); font-size: 13.5px; }
.mu-row i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); } .mu-row i.y { background: var(--warn); }
.mu-row span { color: var(--faint); font-size: 12px; }
.mu-add { text-align: center; padding: 9px; border-radius: 9px; border: 1px dashed var(--line-strong); color: var(--accent); font-size: 13.5px; font-weight: 600; }

.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.path { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.path .ic { width: 26px; height: 26px; color: var(--accent); }
.path h3 { font-size: 19px; } .path p { color: var(--muted); font-size: 15.5px; }
.path pre { margin-top: auto; padding: 14px 16px; border-radius: 10px; background: var(--code-bg); color: #cbd5e1; font-family: var(--mono); font-size: 12.8px; overflow-x: auto; line-height: 1.6; }
.path pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* ─────────── safeexpose ─────────── */
.safe { background: linear-gradient(180deg, var(--bg-2), color-mix(in srgb, var(--accent-2) 8%, var(--bg-2))); }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: var(--muted); font-size: 16.5px; }
.ticks li b { color: var(--text); }
.ticks .ic { width: 22px; height: 22px; color: var(--ok); margin-top: 2px; }
.oss-badge { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; margin-top: 30px; padding: 18px 20px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.oss-badge .ic { width: 26px; height: 26px; color: var(--accent); } .oss-badge p { font-size: 15.5px; color: var(--muted); } .oss-badge b { color: var(--text); } .oss-badge a { overflow-wrap: anywhere; }
.safe-demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.safe-install { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.cmd { min-width: 0; }
.safe-install { display: grid; gap: 8px; } .safe-install > span { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); } .safe-install small { color: var(--faint); font-size: 13.5px; }
.safe-install .cmd code { font-size: 12.5px; }
.flag { display: inline-block; vertical-align: middle; margin-left: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: #05100e; background: linear-gradient(135deg, #2dd4bf, #a78bfa); font-weight: 700; }

/* ─────────── features ─────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 52px; }
.card { grid-column: span 2; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--accent) 50%, transparent); }
.card.c-wide { grid-column: span 3; }
.card.flagship { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 10%, var(--card)), color-mix(in srgb, var(--accent-2) 10%, var(--card))); }
.card > .ic { width: 28px; height: 28px; color: var(--accent); }
.card h3 { font-size: 20px; } .card p { color: var(--muted); font-size: 15.5px; } .card p strong { color: var(--text); }
.strip { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 30px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--muted); font-size: 15px; }
.strip span { display: inline-flex; align-items: center; gap: 10px; } .strip .ic { color: var(--accent); width: 19px; height: 19px; }

.gallery { margin-top: 44px; }
.g-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.g-tabs button { font: inherit; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.g-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }

/* ─────────── functions ─────────── */
.code { border-radius: 16px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.code-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .16); } .code-bar span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: #7d8aa0; overflow-wrap: anywhere; }
.code pre { padding: 22px 24px; overflow-x: auto; font-family: var(--mono); font-size: 13.6px; line-height: 1.75; color: #d6deeb; }
.code code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.code .c { color: #6b7a90; font-style: italic; } .code .k { color: #c792ea; } .code .s { color: #a5e8c3; } .code .n { color: #f78c6c; }

/* ─────────── performance ─────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 46px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 26px; }
.stat b { display: block; font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -.03em; line-height: 1; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; }
.bars { margin: 40px 0 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.bars figcaption { color: var(--faint); font-size: 14px; margin-bottom: 20px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 280px) 1fr 56px; align-items: center; gap: 16px; padding: 7px 0; font-size: 15px; }
.bar-row span { color: var(--muted); } .bar-row em { font-style: normal; font-family: var(--mono); color: var(--muted); text-align: right; }
.bar-row div { height: 12px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar-row i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--faint); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.bars.in .bar-row i { width: calc(var(--v) * 1%); }
.bar-row.you span, .bar-row.you em { color: var(--text); font-weight: 700; }
.bar-row.you i { background: linear-gradient(90deg, #2dd4bf, #8b5cf6); }


/* ─────────── high availability simulator ─────────── */
.ha { margin-top: 48px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--card-solid); padding: clamp(18px, 3vw, 34px); box-shadow: var(--shadow); }
.ha-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.hb { font: inherit; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; transition: all .15s; }
.hb:hover:not([disabled]) { color: var(--text); border-color: var(--line-strong); }
.hb.on { color: #05100e; background: linear-gradient(135deg, #2dd4bf, #a78bfa); border-color: transparent; font-weight: 600; }
.hb[disabled] { opacity: .38; cursor: not-allowed; }
.hb[data-hs="promote"]:not([disabled]), .hb[data-hs="return"]:not([disabled]) { border-color: var(--accent); color: var(--text); }
.ha-map { display: grid; gap: 16px; }
.ha-clients { position: relative; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 14.5px; }
.ha-clients b { color: var(--text); } .ha-clients small { color: var(--faint); font-size: 13px; }
.ha-clients::after { content: ""; position: absolute; left: 50%; bottom: -17px; width: 2px; height: 16px; background: linear-gradient(var(--line-strong), var(--accent)); }
.ha-sites { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.site { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--bg-2); }
.site.dr { border-style: dashed; border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.site h4 { font-size: 13.5px; margin-bottom: 12px; letter-spacing: 0; } .site h4 em { color: var(--faint); font-style: normal; font-weight: 400; margin-left: 6px; }
.nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.node { position: relative; padding: 14px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card-solid); display: grid; gap: 4px; transition: border-color .35s, box-shadow .35s, opacity .35s, transform .35s; }
.node b { font-size: 14px; } .node .role { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.node .led { position: absolute; top: 13px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); transition: background .35s, box-shadow .35s; }
.node[data-state="master"] { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); } .node[data-state="master"] .role { color: var(--accent); }
.node[data-state="standby"] { border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line)); } .node[data-state="standby"] .led { background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.node[data-state="candidate"] { border-color: var(--warn); } .node[data-state="candidate"] .role { color: var(--warn); } .node[data-state="candidate"] .led { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); animation: pulse 1s ease-in-out infinite; }
.node[data-state="down"] { opacity: .5; border-color: var(--bad); transform: scale(.97); } .node[data-state="down"] .role { color: var(--bad); } .node[data-state="down"] .led { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 20%, transparent); }
@keyframes pulse { 50% { transform: scale(1.5); } }
.ha-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ha-stats div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.ha-stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ha-stats dd { margin: 4px 0 0; font-weight: 650; font-size: 15.5px; } .ha-stats dd.ok { color: var(--ok); } .ha-stats dd.bad { color: var(--bad); } .ha-stats dd.warn { color: var(--warn); }
.ha-msg { margin-top: 22px; padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.ha-msg b { display: block; font-size: 17px; } .ha-msg span { display: block; margin-top: 4px; color: var(--muted); font-size: 15.5px; }
.ha-cards { margin-top: 34px; }
.ha-setup { margin-top: 56px; align-items: start; }
.h3 { font-size: 24px; letter-spacing: -.02em; }
@media (max-width: 900px) { .ha-sites { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ha-stats { grid-template-columns: 1fr; } }

/* ─────────── table ─────────── */
.table-wrap { margin-top: 44px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cmp { width: 100%; border-collapse: collapse; min-width: 820px; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmp thead th { color: var(--text); font-weight: 650; background: var(--bg-2); position: sticky; top: 0; }
.cmp tbody th { text-align: left; font-weight: 500; color: var(--text); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .us { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--text); }
.cmp thead .us { background: color-mix(in srgb, var(--accent) 18%, var(--bg-2)); color: var(--accent); }
.cmp b { font-weight: 650; } .cmp b.y { color: var(--ok); } .cmp b.n { color: var(--bad); font-weight: 560; }

/* ─────────── faq ─────────── */
.faq { margin-top: 40px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--accent); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding: 0 0 22px; font-size: 16.5px; max-width: 70ch; }

/* ─────────── final + footer ─────────── */
.final { padding: clamp(80px, 11vw, 140px) 0; text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(139, 92, 246, .22), transparent 70%), radial-gradient(50% 70% at 20% 100%, rgba(45, 212, 191, .16), transparent 70%); border-top: 1px solid var(--line); }
.final h2 { font-size: clamp(34px, 5.4vw, 64px); margin-inline: auto; font-weight: 800; }
.final .sub { margin-inline: auto; }
.foot { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--bg-2); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; }
.foot-brand p { color: var(--muted); margin-top: 14px; max-width: 34ch; font-size: 15px; }
.foot nav { display: grid; gap: 9px; align-content: start; }
.foot h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; font-weight: 600; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 15px; } .foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot-end { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }

/* ─────────── reveal-on-scroll (only when JS is running) ─────────── */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ─────────── responsive ─────────── */
@media (max-width: 1180px) {
  .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0; }
  .links.open { display: flex; }
  .links a { padding: 12px 8px; font-size: 16px; }
  .menu { display: inline-grid; }
  .nav-in { gap: 10px; } .brand { margin-right: auto; }
  .story { grid-template-columns: 1fr; gap: 12px; }
  .story-stage { top: 68px; z-index: 5; }
  .stage-inner { grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 10px 4px; }
  .st-in { display: none; }
  .st-col h4 { margin-bottom: 6px; }
  .st-gate { padding: 8px 6px; } .layers { margin-top: 8px; gap: 5px; } .layers li { padding: 5px 2px; font-size: 9.5px; } .layers .ic { width: 13px; height: 13px; }
  .gate-label small { display: none; }
  .apps-grid, .st-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; } .st-apps h4 { grid-column: 1 / -1; margin-bottom: 0; }
  .app { padding: 6px 9px; margin-bottom: 0; } .app b { font-size: 12.5px; } .app span { font-size: 10px; } .app .tag { display: none !important; }
  .st-log { margin: 4px 10px 10px; padding: 7px 11px; min-height: 0; font-size: 11.5px; }
  .chapter { min-height: 50vh; padding-top: 24px; }
}
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .steps, .paths { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card.c-wide { grid-column: span 1; }
  .card.c-wide { grid-column: span 2; }
  .swap { grid-template-columns: 1fr; gap: 10px; } .swap-mid { transform: rotate(90deg); padding: 4px; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f1 { left: 4px; } .f2 { right: 4px; }
  .track { grid-template-columns: 1fr; gap: 0; }
  .track li { grid-template-columns: 50px 1fr; grid-template-rows: auto auto; text-align: left; justify-items: start; column-gap: 14px; padding: 8px 0; }
  .track li i { grid-row: span 2; } .track li::before { top: -28px; left: 24px; width: 2px; height: 36px; } .track li:first-child::before { display: none; }
  .result { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: min(1200px, 100% - 28px); }
  .btn-ghost.gh span { display: none; }
  .bento, .stats { grid-template-columns: minmax(0, 1fr); } .card.c-wide { grid-column: span 1; }
  .float { display: none; }
  .bar-row { grid-template-columns: 1fr 52px; } .bar-row div { grid-column: 1 / -1; order: 3; } .bar-row span { grid-column: 1; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .cmd { flex-wrap: wrap; padding: 8px; } .cmd code { flex-basis: 100%; padding: 8px 6px; } .copy { margin-left: auto; }
  .stage-inner { grid-template-columns: 1fr; } .st-in { display: none; }
  .st-gate { display: block; padding: 6px; } .layers { grid-template-columns: repeat(4, 1fr); margin-top: 6px; } .gate-label { display: none; }
  .st-log { margin: 4px 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
@media print { .nav, .float, .hero-bg { display: none; } body { background: #fff; color: #000; } }

/* ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   MISSION CONTROL THEME: near-black, cinematic, oversized uppercase type, hairline grids, square corners.
   (Layered over the base styles above; dark only.)
   ═════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
:root, [data-theme="light"] {
  --bg: #000; --bg-2: #040508; --card: transparent; --card-solid: #000;
  --line: rgba(255, 255, 255, .16); --line-strong: rgba(255, 255, 255, .34);
  --text: #fff; --muted: #a7adb8; --faint: #747b88;
  --accent: #2dd4bf; --accent-2: #8b5cf6; --ok: #34d399; --bad: #fb7185; --warn: #fbbf24;
  --code-bg: #05070a; --shadow: none; --grid: rgba(255, 255, 255, .035);
  --font: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif; color-scheme: dark;
}
body { counter-reset: sec; background: #000; font-weight: 400; letter-spacing: .005em; }
*:not(.led):not(.dot) { border-radius: 0 !important; }
.chapter::before { border-radius: 50%; }
html { scroll-padding-top: 72px; }

/* navigation: transparent over the hero, solid once you scroll */
.nav { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom: 1px solid transparent; backdrop-filter: none; transition: background .3s, border-color .3s; }
.nav.scrolled { background: rgba(0, 0, 0, .82); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav-in { height: 72px; }
.brand { text-transform: uppercase; letter-spacing: .34em; font-weight: 600; font-size: 14px; }
.links a { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: #cfd4dc; padding: 10px 11px; }
.links a:hover { background: none; color: #fff; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.icon-btn, .btn-ghost.gh { border-color: var(--line-strong); background: transparent; }
@media (max-width: 1180px) { .links { top: 72px; background: rgba(0, 0, 0, .96); } }

/* buttons: hairline outlines, small tracked caps */
.btn { padding: 15px 28px; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .85); box-shadow: none; transition: background .2s, color .2s; }
.btn:hover { background: #fff; color: #000; transform: none; box-shadow: none; }
.btn-primary { background: #fff; color: #000; } .btn-primary:hover { background: transparent; color: #fff; box-shadow: none; }
.btn-ghost, .btn-ghost.gh { padding: 15px 28px; color: #fff; } .btn-ghost.gh { padding: 11px 18px; }
.btn-ghost:hover { background: #fff; color: #000; }

/* hero: full viewport, the scene runs edge to edge */
.hero { min-height: 100svh; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; background: #000; position: relative; overflow: clip; }
.hero-bg { background: radial-gradient(60% 50% at 78% 40%, rgba(45, 212, 191, .10), transparent 70%), radial-gradient(50% 50% at 90% 70%, rgba(139, 92, 246, .12), transparent 70%); -webkit-mask-image: none; mask-image: none; }
.hero .hero-stage { position: absolute; inset: 0; width: auto; aspect-ratio: auto; min-height: 0; max-height: none; border: 0; box-shadow: none; background: transparent; cursor: crosshair; }
.hero .hero-stage::after { display: none; }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .62) 34%, rgba(0, 0, 0, 0) 64%), linear-gradient(0deg, rgba(0, 0, 0, .95) 0%, rgba(0, 0, 0, 0) 34%), linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 20%); }
.hero-copy { position: relative; z-index: 3; align-items: flex-start; text-align: left; padding: 140px 0 clamp(96px, 14vh, 150px); }
.kicker { font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase; color: #dfe3ea; margin-bottom: 26px; display: flex; align-items: center; gap: 16px; }
.kicker::before { content: ""; width: 44px; height: 1px; background: #fff; }
.hero h1 { font-size: clamp(46px, 8.6vw, 150px); font-weight: 700; letter-spacing: .012em; text-transform: uppercase; line-height: .96; margin: 0; }
.hero .grad { background: none; -webkit-text-fill-color: transparent; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .95); }
.hero .lede { max-width: 500px; margin: 28px 0 0; font-size: 16px; color: #c3c8d0; text-align: left; }
.hero .lede strong { color: #fff; font-weight: 600; }
.hero .cta-row { justify-content: flex-start; margin-top: 34px; }
.hero .install { width: min(520px, 100%); margin: 34px 0 0; }
.tabs { padding: 0; gap: 22px; border-radius: 0; } .tabs button { padding: 8px 0; border: 0; border-bottom: 1px solid transparent; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.tabs button[aria-selected="true"] { background: none; box-shadow: none; color: #fff; border-bottom-color: #fff; }
.cmd { background: rgba(0, 0, 0, .55); border: 1px solid var(--line-strong); box-shadow: none; padding: 4px 4px 4px 16px; backdrop-filter: blur(6px); }
.cmd code { font-size: clamp(12.5px, 1.2vw, 14.5px); white-space: normal; overflow-wrap: anywhere; line-height: 1.5; padding: 12px 0; }
.copy { border: 1px solid var(--line-strong); background: transparent; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 10px 14px; } .copy:hover { background: #fff; color: #000; }
.install-note { text-align: left; font-size: 12px; color: var(--faint); }

/* mission telemetry: corner readouts, a ticking clock */
.telemetry { position: absolute; z-index: 3; left: max(20px, calc((100vw - 1200px) / 2)); top: 92px; display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #aeb5c0; }
.telemetry b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.telemetry .tl { display: inline-block; width: 7px; height: 7px; background: var(--ok); margin-right: 10px; border-radius: 50% !important; animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero-meta { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; margin: 0; padding: 18px max(20px, calc((100vw - 1200px) / 2)); justify-content: flex-start; gap: 10px 34px; border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #aeb5c0; }
.hero-meta li::before { display: none; } .hero-meta strong { color: #fff; font-weight: 500; } .hero-meta a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.scroll-cue { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 64px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #aeb5c0; text-decoration: none; }
.scroll-cue i { width: 1px; height: 54px; background: linear-gradient(#fff, transparent); animation: cue 2.4s ease-in-out infinite; } @keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero .stage-hud { left: auto; right: max(20px, calc((100vw - 1200px) / 2)); top: 92px; width: min(380px, 38vw); text-align: right; }
.hero .hud-counters { justify-content: flex-end; } .hero .stage-hud .hud-log { display: none; }
.hero .stage-ctl { left: auto; right: max(20px, calc((100vw - 1200px) / 2)); bottom: 70px; justify-content: flex-end; width: auto; }
.hero .stage-hint { display: none; }
.chip { background: rgba(0, 0, 0, .6); border-color: var(--line-strong); letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; padding: 9px 14px; }
.stage-labels span { background: rgba(0, 0, 0, .7); border-radius: 0; letter-spacing: .14em; text-transform: uppercase; font-size: 9.5px; }
@media (max-width: 1000px) {
  .hero-copy { padding-top: 46svh; } .hero-shade { background: linear-gradient(0deg, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .75) 45%, rgba(0, 0, 0, 0) 75%), linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 20%); }
  .hero .stage-hud { top: 80px; width: 60%; } .hero .stage-ctl { right: 20px; bottom: 76px; } .scroll-cue { display: none; } .telemetry span:nth-child(3) { display: none; }
}
@media (max-width: 600px) { .hero h1 { font-size: clamp(40px, 12.5vw, 64px); } .hero .stage-ctl { bottom: auto; top: 118px; right: 20px; } .hero-meta { font-size: 9.5px; } .telemetry { top: 84px; } }

/* slides: generous, numbered sections with hairline dividers */
.sec { padding: clamp(96px, 13vw, 190px) 0; border-top: 1px solid var(--line); background: #000; }
.sec.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { font-family: var(--font); font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase; color: #fff; opacity: .75; margin-bottom: 26px; }
.eyebrow::before { counter-increment: sec; content: counter(sec, decimal-leading-zero) "  /  "; opacity: .55; }
.sec h2 { font-size: clamp(32px, 5.6vw, 86px); font-weight: 700; letter-spacing: .015em; text-transform: uppercase; line-height: 1.02; max-width: 1100px; }
.sub { font-size: clamp(16px, 1.5vw, 19px); color: #a7adb8; max-width: 640px; }
.fine { color: var(--faint); }
.final h2, .final .sub { text-align: center; } .final { border-top: 1px solid var(--line); background: #000; }
.final h2 { font-size: clamp(38px, 7.4vw, 120px); -webkit-text-stroke: 1.5px #fff; color: transparent; }

/* surfaces: no boxes, no glow; content sits on hairlines */
.pill { display: none; }
.frame { border: 1px solid var(--line-strong); background: #000; box-shadow: none; } .bar { background: #05070a; } .bar i { background: rgba(255, 255, 255, .22); }
.float { display: none; }
.bento, .steps, .paths, .stats { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card, .step, .path, .stat { background: #000; border: 0; padding: clamp(24px, 3vw, 40px); transition: background .25s; }
.card:hover, .path:hover { background: #05070a; transform: none; box-shadow: none; }
.card.flagship { background: #04080a; border: 0; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .5); }
.card h3, .step h3, .path h3 { text-transform: uppercase; letter-spacing: .12em; font-size: 14px; font-weight: 600; }
.card > .ic, .path .ic { width: 24px; height: 24px; color: #fff; stroke-width: 1.4; }
.num { background: none; color: #fff; border: 1px solid #fff; width: 34px; height: 34px; font-weight: 500; }
.stat b { font-size: clamp(46px, 6.4vw, 104px); font-weight: 300; letter-spacing: -.02em; background: none; -webkit-text-fill-color: #fff; color: #fff; }
.stat span { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--faint); margin-top: 16px; }
.swap-col, .flow, .ha, .story-stage, .bars, .strip, .table-wrap, .oss-badge, .result, .mini-ui { background: #000; border: 1px solid var(--line); box-shadow: none; }
.after { background: #030a09; border-color: rgba(45, 212, 191, .45); }
.faq details { background: transparent; border: 0; border-top: 1px solid var(--line); padding: 0; } .faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary h3 { font-size: 16px; font-weight: 500; letter-spacing: .01em; }
.term, .code, .path pre, .logline { background: #05070a; border: 1px solid var(--line); box-shadow: none; }
.code-bar { border-bottom: 1px solid var(--line); }
.who, .app, .layers li, .node, .ha-stats div, .ha-msg, .st-log, .mu-row { background: #04060a; box-shadow: none; }
.sc, .hb, .g-tabs button { background: transparent; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; padding: 10px 16px; border-color: var(--line-strong); color: #cfd4dc; }
.sc.on, .hb.on, .g-tabs button[aria-selected="true"] { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.track li i { border-radius: 0; } .bar-row i, .bar-row div { border-radius: 0; }
.cmp thead th { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; background: #04060a; } .cmp .us { background: rgba(45, 212, 191, .07); }
.foot { background: #000; } .foot h4, .foot nav a { text-transform: uppercase; letter-spacing: .16em; font-size: 11.5px; }
.flag { background: none; color: var(--accent); border: 1px solid var(--accent); letter-spacing: .14em; }
.chapter .note { border-left-color: #fff; }
.ticks .ic { color: #fff; }
.sec .grad, .grad { background: none; }
@media (prefers-reduced-motion: reduce) { .telemetry .tl, .scroll-cue i { animation: none; } }

/* phones: keep the scene decorative so it never collides with the headline */
@media (max-width: 600px) {
  .hero .telemetry { display: none; }
  .hero .stage-hud { top: 84px; left: 16px; right: 16px; }
  .hero .hud-counters { justify-content: flex-start; }
  .hero .stage-ctl { top: auto; bottom: 14px; right: 16px; }
  .hero .scroll-cue { display: none; }
}

/* hero readability: solid dark column for the copy, smaller headline, scene stays right */
@media (min-width: 901px) {
  .hero-shade { background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.94) 36%, rgba(0,0,0,.55) 52%, rgba(0,0,0,0) 68%), linear-gradient(0deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,0) 30%), linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 18%); }
  .hero h1 { font-size: clamp(44px, 5.6vw, 96px); }
  .hero .lede { max-width: 440px; font-size: 17px; color: #e3e6ea; }
  .hero .install { width: min(500px, 100%); }
  .hero .cmd code, .hero.has-3d .cmd code { font-size: 13px; white-space: nowrap; overflow-wrap: normal; }
}

/* hero: graphic on top, copy underneath at every width */
@media (min-width: 1001px) {
  .hero { min-height: 0; }
  .hero-copy { padding-top: clamp(520px, 62svh, 680px); padding-bottom: 110px; }
  .hero-shade { background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.95) 45%, rgba(0,0,0,.6) 62%, rgba(0,0,0,0) 78%), linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 18%); }
  .hero .stage-hud { top: 84px; } .hero .stage-labels [data-label="nodes"] { display: none; }
  .hero .stage-ctl { bottom: auto; top: 118px; }
  .scroll-cue { display: none; }
}

/* hero copy centred under the graphic */
.hero-copy { align-items: center; text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; text-align: center; }
.hero .cta-row, .hero .hero-meta { justify-content: center; }
.hero .install { margin-inline: auto; text-align: left; }
.hero .install-note { text-align: center; }
.hero .tabs { justify-content: center; }
.hero .kicker { justify-content: center; }
.hero .kicker::before { display: none; }
.hero .hero-copy { width: 100%; max-width: 1200px; margin-inline: auto; box-sizing: border-box; padding-inline: 20px; }
.hero h1 { text-align: center; }
.hero.has-3d .hero-copy { align-items: center; }
.hero.has-3d .lede { margin-left: auto; margin-right: auto; }
.hero.has-3d .install { margin-inline: auto; }
.hero.has-3d .install-note { text-align: center; }
.hero.has-3d .cta-row, .hero.has-3d .hero-meta { justify-content: center; }

.hero .stage-labels span { border: 0; background: none; color: #dfe6ef; font-size: 10.5px; letter-spacing: .22em; padding: 0; text-shadow: 0 0 8px #000; }
.hero .stage-labels .l-bad { color: #fda4af; } .hero .stage-labels .l-shield { color: #fff; }

/* less clutter: no status row or counters over the graphic */
.hero .telemetry, .hero .stage-hud { display: none; }

/* smoothness: solid header once scrolled (no blur over moving content), no pop-in reveals */
.nav.scrolled { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav { transition: border-color .2s; }
.js .rv { opacity: 1; transform: none; transition: none; }
.cmd { backdrop-filter: none; background: rgba(0, 0, 0, .7); }
.hero-stage { contain: strict; }
.hero { content-visibility: visible; }
