@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #08090a;
  --panel: #0e0f11;
  --panel-2: #131417;
  --panel-3: #181a1d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f7f7f8;
  --ink-2: #a3aab4;
  --ink-3: #8a919c;
  --accent: #ff6a3d;
  --accent-ink: #1c0a03;
  --wrap: 1240px;
  --edge: clamp(20px, 4vw, 40px);
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; background: var(--bg); scroll-padding-top: 76px; }
body {
  margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink-2);
  font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h2, h3 { color: var(--ink); font-weight: 500; text-wrap: balance; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--edge); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-weight: 500; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.section-label, .kicker, .meta, .rig-title, .rig-sim, .spec-k, .step-num, .readout dt, .beta-tag, .scope-meta, .keycap-state, .keycap-name {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--ink-3);
}
.section-label { text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 6px; border: 1px solid transparent; font-weight: 500; font-size: 1rem; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(255,106,61,.35), 0 0 24px rgba(255,106,61,.22); }
.btn-primary:hover { background: #ff7f58; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--panel-3); border-color: rgba(255,255,255,.28); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 0.9rem; box-shadow: none; }
.text-link { color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .15s var(--ease); }
.text-link:hover { border-color: var(--accent); }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(8,9,10,.86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.topbar.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.nav-center { display: none; gap: 28px; font-size: 0.92rem; }
.nav-center a { color: var(--ink-2); transition: color .15s var(--ease); }
.nav-center a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; gap: 2px; font-family: var(--mono); font-size: 0.75rem; }
.lang a { padding: 6px 8px; color: var(--ink-3); border-radius: 4px; }
.lang a.active { color: var(--ink); background: var(--panel-3); }
@media (min-width: 860px) { .nav-center { display: flex; } }

/* ---------- hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 56px); }
.hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; grid-template-areas: "copy" "rig"; padding-bottom: 36px; }
.hero-copy { grid-area: copy; }
.kicker { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 22px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.hero h1 {
  font-weight: 500; color: var(--ink); line-height: 0.96; letter-spacing: -0.045em;
  font-size: clamp(3.6rem, 15vw, 8rem); margin-bottom: 28px;
}
.hero h1 .h1-2 { color: var(--ink-3); }
.hero h1 .h1-2::after { content: ""; display: inline-block; width: 0.09em; height: 0.78em; margin-left: 0.12em; background: var(--accent); transform: translateY(0.04em); }
.hero-lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; max-width: 34ch; color: var(--ink); }
.desktop-context { margin-top: 14px; font-size: 0.95rem; color: var(--ink-3); max-width: 40ch; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }

.mobile-handoff { display: none; margin-top: 22px; padding: 18px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.mobile-handoff .handoff-title { font-size: 1.05rem; margin-bottom: 4px; color: var(--ink); font-weight: 500; }
.mobile-handoff p { font-size: 0.9rem; margin-bottom: 14px; }
.mobile-handoff .btn { width: 100%; }
.handoff-download-link { display: inline-block; margin-top: 12px; color: var(--ink); font-size: 0.9rem; border-bottom: 1px solid var(--line-2); }
.copy-status { margin: 10px 0 0 !important; font-size: 0.85rem !important; color: var(--ink); min-height: 1.2em; }
.copy-link-fallback { width: 100%; margin-top: 10px; padding: 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 6px; font: inherit; }
.copy-link-fallback[hidden] { display: none; }
@media (max-width: 720px) { .mobile-handoff { display: block; } .hero-actions, .desktop-context { display: none; } }

/* rig (demo) */
.rig { grid-area: rig; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; align-self: end; }
.rig-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rig-title { color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; }
.rig-sim { text-align: right; }
.rig-tabs { display: flex; border-bottom: 1px solid var(--line); }
.rig-tabs button { flex: 1; min-height: 44px; background: transparent; border: 0; border-right: 1px solid var(--line); font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.rig-tabs button:last-child { border-right: 0; }
.rig-tabs button:hover { background: var(--panel-2); color: var(--ink); }
.rig-tabs button[aria-checked="true"] { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.rig-field { min-height: 132px; padding: 20px 18px; }
.rig-placeholder { color: var(--ink-3); font-size: 1rem; }
.rig-text { color: var(--ink); font-size: 1.2rem; line-height: 1.45; }
.rig-text[hidden], .rig-placeholder[hidden] { display: none; }
.rig-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); vertical-align: -0.14em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rig-static { color: var(--ink); font-size: 1.2rem; }
.rig-ctl { padding: 0 14px 14px; }
.keycap {
  width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  padding: 16px 18px 18px; background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 5px; border-radius: 8px;
  transition: transform .08s var(--ease), border-color .15s var(--ease), background .15s var(--ease), border-bottom-width .08s var(--ease);
}
.keycap:hover { background: #1d1f23; }
.keycap-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.keycap-name { color: var(--ink); font-size: 0.85rem; }
.keycap-hint { font-size: 1.2rem; color: var(--ink); font-weight: 500; letter-spacing: -0.02em; }
.keycap-state { text-transform: uppercase; letter-spacing: 0.08em; }
.keycap.is-down { transform: translateY(4px); border-bottom-width: 1px; border-color: var(--accent); background: #1d1512; }
.keycap.is-down .keycap-state { color: var(--accent); }
html[data-os="win"] .os-mac, html:not([data-os="win"]) .os-win { display: none; }

/* scope */
.scope { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.scope canvas { display: block; width: 100%; height: clamp(96px, 14vw, 150px); }
.scope-meta { position: absolute; left: var(--edge); top: 10px; display: flex; gap: 18px; }
.scope-meta span:first-child { color: var(--ink); }

/* spec strip */
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.spec-grid > div { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.spec-grid > div:nth-child(odd) { padding-right: 16px; }
.spec-grid > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.spec-v { color: var(--ink); font-size: 1.02rem; }
@media (min-width: 860px) {
  .spec-grid { grid-template-columns: repeat(4, 1fr); }
  .spec-grid > div { border-left: 1px solid var(--line); padding: 22px 20px; }
  .spec-grid > div:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- sections ---------- */
section { padding: clamp(72px, 10vw, 150px) 0 0; }
.spec-strip { padding: 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head .section-label { margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; }
.section-lede { margin-top: 18px; max-width: 46ch; font-size: 1.08rem; }

.reveal { opacity: 1; transform: none; }
.reveal.pending { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }

/* steps: indexed rail, no cards */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-2); }
.step { display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.step-num { padding-top: 6px; color: var(--accent); }
.step h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.1; }
.step p { grid-column: 2; margin-top: 8px; max-width: 40ch; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .step { display: block; padding: 28px 28px 34px 0; border-bottom: 0; }
  .step + .step { border-left: 1px solid var(--line); padding-left: 28px; }
  .step-num { display: block; margin-bottom: 70px; }
  .step p { margin-top: 12px; }
}
.setup { margin-top: 40px; display: grid; gap: 20px; padding: 22px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.setup-text { margin-top: 10px; color: var(--ink); max-width: 44ch; }
.setup-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.setup-links a { color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.setup-links a:hover { border-color: var(--accent); }
.install-note { font-size: 0.9rem; color: var(--ink-3); max-width: 60ch; }
@media (min-width: 860px) { .setup { grid-template-columns: 1.2fr 1fr; align-items: start; } .setup .install-note { grid-column: 1 / -1; } }

/* privacy */
.net { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--panel); }
.net-diagram { padding: 18px; border-bottom: 1px solid var(--line); }
.net-diagram { overflow-x: auto; }
.net-diagram svg { width: 100%; min-width: 560px; height: auto; display: block; }
.net .box { fill: var(--panel-2); stroke: var(--line-2); }
.net .node rect { fill: var(--bg); stroke: var(--line-2); }
.net .node text { fill: var(--ink); font: 500 15px var(--sans); }
.net .node-core rect { stroke: var(--accent); }
.net .lbl { fill: var(--ink-3); font: 400 11px var(--mono); letter-spacing: 0.08em; }
.net .wire { stroke: var(--ink-3); stroke-width: 1.4; fill: none; }
.net .wire.dead { stroke-dasharray: 3 6; stroke: var(--ink-3); opacity: .6; }
.net .wall path { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.net .cloud rect { stroke-dasharray: 3 4; }
.net .cloud text { fill: var(--ink-3); }
.net .packet { fill: var(--accent); animation: travel 3.2s var(--ease) infinite; }
@keyframes travel { 0% { transform: translateX(0); opacity: 0; } 8% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(256px); opacity: 0; } }
.net-off .net-diagram .cloud { opacity: .35; }
.net-panel { padding: 22px; display: grid; gap: 22px; align-content: start; }
.switch { display: inline-flex; align-items: center; gap: 14px; background: transparent; border: 0; padding: 0; cursor: pointer; text-align: left; min-height: 44px; }
.switch-track { width: 52px; height: 28px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-3); position: relative; flex: none; transition: background .15s var(--ease), border-color .15s var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 3px; background: var(--ink-2); transition: transform .2s var(--ease-out), background .15s var(--ease); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(24px); background: var(--ink); }
.switch-label { color: var(--ink); font-size: 1.05rem; }
.switch-label b { font-weight: 500; }
.readout { margin: 0; display: grid; }
.readout > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.readout dt { font-size: 0.78rem; }
.readout dd { margin: 0; font-family: var(--mono); font-size: 0.85rem; color: var(--ink); text-align: right; }
.readout dd.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--accent); border-radius: 50%; }
@media (min-width: 900px) {
  .net { grid-template-columns: 1.6fr 1fr; }
  .net-diagram { border-bottom: 0; border-right: 1px solid var(--line); padding: 28px; }
}
.ledger { margin: 0; margin-top: 40px; border-top: 1px solid var(--line-2); }
.ledger > div { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ledger dt { color: var(--ink); font-weight: 500; font-size: 1.1rem; }
.ledger dd { margin: 0; max-width: 56ch; }
@media (min-width: 860px) { .ledger > div { grid-template-columns: 240px 1fr; gap: 24px; } }

/* table */
.comparison-wrap { overflow-x: auto; }
.platform-comparison { width: 100%; border-collapse: collapse; min-width: 560px; }
.platform-comparison th, .platform-comparison td { text-align: left; padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.platform-comparison thead th { font-family: var(--mono); font-weight: 400; font-size: 0.78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; border-bottom-color: var(--line-2); }
.platform-comparison thead th span { color: var(--ink); }
.platform-comparison tbody th { color: var(--ink); font-weight: 500; font-size: 1.05rem; width: 52%; }
.platform-comparison td { color: var(--ink); font-family: var(--mono); font-size: 0.9rem; white-space: nowrap; }
.platform-comparison td.na { color: var(--ink-3); }
.feature-description { display: block; margin-top: 4px; font-family: var(--sans); font-weight: 400; font-size: 0.9rem; color: var(--ink-3); max-width: 52ch; }
.comparison-note { margin-top: 18px; font-size: 0.92rem; color: var(--ink-3); }
.comparison-note a, .download-help a, .download-support a, .faq-item a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.comparison-note a:hover, .download-help a:hover, .download-support a:hover, .faq-item a:hover { border-color: var(--accent); }

/* download */
.platforms { border-top: 1px solid var(--line-2); }
.platform { display: grid; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.platform h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.035em; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.beta-tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; letter-spacing: 0.08em; }
.meta { margin-top: 8px; }
.platform-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.btn-arrow { transition: transform .2s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }
@media (min-width: 900px) {
  .platform { grid-template-columns: 1.1fr 1.2fr auto; align-items: center; gap: 36px; }
  .platform-act { flex-direction: column; align-items: flex-start; }
}
.download-help { margin-top: 26px; font-size: 0.95rem; color: var(--ink-3); }
.download-support { margin-top: 8px; font-size: 0.95rem; color: var(--ink-3); }

/* faq */
.faq-grid { display: grid; gap: 8px; }
.faq-list { border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; color: var(--ink); font-size: 1.1rem; font-weight: 500; min-height: 48px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { font-family: var(--mono); color: var(--accent); transition: transform .2s var(--ease-out); flex: none; }
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-item p { padding: 0 0 22px; max-width: 62ch; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: 1fr 1.5fr; gap: 56px; } .faq-grid .sec-head { position: sticky; top: 96px; align-self: start; } }

/* footer */
.footer { margin-top: clamp(72px, 10vw, 150px); padding: 40px 0 56px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; }
.footer-copy { margin-top: 10px; font-size: 0.9rem; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.92rem; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } .footer-links { max-width: 460px; justify-content: flex-end; } }

.mobile-cta { position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40; min-height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 500; opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; transition: opacity .2s var(--ease), transform .2s var(--ease-out); }
.mobile-cta.visible { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
@media (min-width: 721px) { .mobile-cta { display: none; } }

/* desktop hero layout */
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr minmax(380px, 460px); grid-template-areas: "copy rig"; gap: 56px; align-items: end; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(5rem, 9.4vw, 8.4rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal.pending { opacity: 1; transform: none; }
  .net .packet { display: none; }
}
