:root, .viewport, .catch-fig, .part-img {
  --bg: #0b0c0d;
  --bg2: #111213;
  --card: #15171a;
  --line: #24272c;
  --ink: #eef1f4;
  --mute: #8b929c;
  --dim: #5d636c;
  --ok: #2fd08b;
  --ok-soft: rgba(47, 208, 139, .14);
  --bad: #ff3b45;
  --warn: #ff9a3c;
  --on-ok: #04130c;
  --ok-hi: #4be3a0;
  --lead: #b9bfc7;
  --nav-bg: rgba(11, 12, 13, .78);
  --field: #0e0f11;
  --tab-bg: #0f1012;
  --tab-on: #23272c;
  --integ-ink: #c9ced5;
  --tax-ink: #d6b4b6;
  --n: #1b1e22;
  --n-tax: #221416;
  --n-tax-ink: #e4b6b9;
  --n-ok: #142520;
  --n-final: #15302a;
  --loop-bg: #13241d;
  --glow: rgba(47, 208, 139, .25);
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 12px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6f3;
  --bg2: #eceee9;
  --card: #ffffff;
  --line: #dcdfd8;
  --ink: #0e1011;
  --mute: #59606a;
  --dim: #858b93;
  --ok: #0c9a5f;
  --ok-soft: rgba(12, 154, 95, .1);
  --bad: #dc1f2b;
  --warn: #d9700b;
  --on-ok: #ffffff;
  --ok-hi: #0a8551;
  --lead: #3d434b;
  --nav-bg: rgba(245, 246, 243, .82);
  --field: #f7f8f6;
  --tab-bg: #eef0ec;
  --tab-on: #ffffff;
  --integ-ink: #2a2f35;
  --tax-ink: #8f2a31;
  --n: #f4f5f2;
  --n-tax: #fdeced;
  --n-tax-ink: #a3222c;
  --n-ok: #e3f5ec;
  --n-final: #d4f0e2;
  --loop-bg: #e5f6ed;
  --glow: rgba(12, 154, 95, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, [role="tab"] { touch-action: manipulation; }
button, .tabs button, .chips li { user-select: none; -webkit-user-select: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
sup { font-size: .62em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* type */
.eyebrow { font: 500 13px/1.45 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 0 0 20px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: .98; letter-spacing: -.04em; }
h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.04; max-width: 20ch; }
h3 { font-size: 22px; line-height: 1.2; }
.hl { color: var(--ok); }
.hl-red { color: var(--bad); }
.mute { color: var(--mute); }
.ink { color: var(--ink); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--lead); max-width: 46ch; margin: 22px 0 0; }
.narrow { max-width: 56ch; }
.fine { font-size: 14px; color: var(--dim); margin-top: 24px; max-width: 70ch; }
.fine a { color: var(--mute); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { text-decoration: none; }
.logo-mark { font: 700 22px/1 var(--sans); letter-spacing: -.04em; }
.logo-mark::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: 3px; box-shadow: 0 0 12px var(--ok); }
.nav-tag { color: var(--mute); font-size: 14px; padding-left: 20px; border-left: 1px solid var(--line); display: none; }
.nav-links { margin-left: auto; display: none; gap: 26px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--mute); transition: color .15s; }
.nav .theme-btn { margin-left: auto; }
.nav .btn-sm { margin-left: -8px; }
@media (min-width: 900px) { .nav-tag { display: block; } .nav-links { display: flex; } .nav .theme-btn { margin-left: 8px; } }

/* buttons */
.btn { appearance: none; border: 0; cursor: pointer; font: 600 16px/1 var(--sans); background: var(--ok); color: var(--on-ok); padding: 15px 22px; border-radius: 10px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: transform .15s ease, background .15s; }
.btn:active, .theme-btn:active, .tabs button:active { transform: scale(.97); }
.btn-sm { padding: 10px 14px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cta-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 36px; }
.cta-card { appearance: none; border: 0; cursor: pointer; text-align: left; font-family: var(--sans); background: var(--ok); color: var(--on-ok); width: 280px; max-width: 100%; height: 118px; padding: 18px 22px; display: flex; flex-direction: column; justify-content: flex-end; clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%); transition: transform .2s ease, background .2s; }
.cta-card:active { transform: scale(.98); }
.cta-small { font-size: 14px; opacity: .75; }
.cta-big { font-size: 24px; font-weight: 600; display: flex; justify-content: space-between; margin-top: 4px; }
.arrow { transition: transform .2s ease; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 0; }
.chips li { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--mute); border: 1px solid var(--line); border-radius: 99px; padding: 8px 12px; }

/* hero */
.hero { position: relative; padding: 56px 0 80px; overflow: hidden; }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; opacity: .35; mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%); pointer-events: none; }
.hero-in { position: relative; display: grid; gap: 40px; align-items: center; }
.h1-sub { font-size: clamp(22px, 3vw, 36px); line-height: 1.12; letter-spacing: -.03em; color: var(--dim); margin: 18px 0 0; font-weight: 500; max-width: 22ch; }
@media (min-width: 980px) { .hero { padding: 80px 0 110px; } .hero-in { grid-template-columns: 1.05fr 1fr; gap: 56px; } }

.hero-fig { margin: 0; }
.viewport { position: relative; background: #111; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 40px 120px -40px var(--glow); }
.viewport img { width: 100%; height: 100%; object-fit: cover; animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: scale(1.04) translateY(0); } 50% { transform: scale(1.04) translateY(-10px); } }
.scan { position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, var(--ok), transparent); box-shadow: 0 0 18px var(--ok); opacity: .7; animation: scan 4.5s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { 0% { transform: translateY(40px); opacity: 0; } 10% { opacity: .7; } 90% { opacity: .7; } 100% { transform: translateY(var(--scan-h, 360px)); opacity: 0; } }
.corner { position: absolute; width: 16px; height: 16px; border-color: var(--mute); border-style: solid; border-width: 0; opacity: .6; }
.corner.tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }
.hud { position: absolute; left: 16px; right: 16px; display: flex; gap: 10px; font-family: var(--mono); font-size: 12px; }
.hud-top { top: 16px; justify-content: space-between; color: var(--mute); padding: 0 12px; }
.hud-bot { bottom: 16px; flex-wrap: wrap; }
.hud-bot > div { background: rgba(11, 12, 13, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.hud small { display: block; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.hud b { font-weight: 500; color: var(--ink); }
.ok { color: var(--ok) !important; }
.bad { color: var(--bad) !important; }
.ok-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.hero-fig figcaption { font-size: 14px; color: var(--dim); margin-top: 12px; }

/* sections */
.sec { padding: 72px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .sec { padding: 96px 0; } }
.sec-alt { background: var(--bg2); }
@media (min-width: 980px) { .sec { padding: 130px 0; } }
.statement { font-size: clamp(30px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -.035em; font-weight: 500; color: var(--dim); max-width: 22ch; margin: 0; }

/* flows */
.flow { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 56px; max-width: 980px; }
.node { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; font-weight: 500; text-align: center; position: relative; }
.link { width: 2px; height: 28px; margin: 0 auto; background: var(--line); position: relative; overflow: hidden; }
.link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--mute), transparent); animation: flowv 1.4s linear infinite; }
.link-ok::after { background: linear-gradient(var(--ok), transparent); }
@keyframes flowv { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
.node-tax { border-color: rgba(255, 59, 69, .45); background: rgba(255, 59, 69, .06); }
.tax-label { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--bad); }
.node-tax ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.node-tax li { font-size: 14px; color: var(--tax-ink); border: 1px dashed rgba(255, 59, 69, .4); border-radius: 6px; padding: 4px 8px; }
.node-loop { border-color: rgba(47, 208, 139, .5); background: var(--loop-bg); padding: 22px; }
.node-loop b { display: block; font-size: 19px; }
.node-loop small { color: var(--ok); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.loop-ring { position: absolute; inset: 0; border-radius: 10px; box-shadow: 0 0 0 0 rgba(47, 208, 139, .45); animation: ring 2.4s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(47, 208, 139, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(47, 208, 139, 0); } }
.node-loop b::before { content: "↻"; display: inline-block; margin-right: 8px; color: var(--ok); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.node-final { border-color: var(--ok); color: var(--ok); }
@media (min-width: 820px) {
  .flow { flex-direction: row; align-items: center; }
  .flow .node { flex: 0 0 auto; }
  .flow .node-tax, .flow .node-loop { flex: 1 1 auto; }
  .link { width: auto; flex: 1 1 40px; min-width: 32px; height: 2px; margin: 0; }
  .link::after { background: linear-gradient(90deg, transparent, var(--mute)); animation-name: flowh; }
  .link-ok::after { background: linear-gradient(90deg, transparent, var(--ok)); }
}
@keyframes flowh { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.quote { margin: 64px 0 0; padding: 0 0 0 24px; border-left: 2px solid var(--bad); max-width: 720px; }
.quote p { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0; font-weight: 500; }
.quote cite { display: block; margin-top: 14px; font-style: normal; color: var(--mute); font-size: 15px; }

/* specs */
.specs { display: grid; grid-template-columns: 1fr; margin-top: 64px; border-top: 1px solid var(--line); }
.spec { padding: 28px 0; border-bottom: 1px solid var(--line); }
.spec svg { width: 30px; height: 30px; fill: none; stroke: var(--ok); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spec h3 { margin: 22px 0 6px; }
.spec p { margin: 0; color: var(--mute); font-size: 16px; }
@media (max-width: 719px) {
  .spec { display: grid; grid-template-columns: 30px 1fr; column-gap: 14px; padding: 20px 0; }
  .spec svg { grid-row: span 2; width: 26px; height: 26px; margin-top: 2px; }
  .spec h3 { margin: 0 0 4px; font-size: 19px; }
}
@media (min-width: 720px) { .specs { grid-template-columns: 1fr 1fr; } .spec { padding: 28px 28px 28px 0; } }
@media (min-width: 1080px) { .specs { grid-template-columns: repeat(4, 1fr); } .spec + .spec { padding-left: 28px; border-left: 1px solid var(--line); } }

.catch { display: grid; gap: 32px; align-items: center; margin-top: 80px; }
.catch-fig { position: relative; margin: 0; border: 1px solid rgba(255, 59, 69, .35); border-radius: var(--r); overflow: hidden; background: #111; aspect-ratio: 4 / 3; }
.catch-fig img { width: 100%; height: 100%; object-fit: cover; }
.catch-copy h3 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }
.catch-copy p { color: var(--lead); max-width: 44ch; }
.legend { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--mute); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
@media (min-width: 900px) { .catch { grid-template-columns: 1.1fr 1fr; gap: 56px; } }

/* race diagram */
.race { margin-top: 56px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.race-v { display: none; }
@media (max-width: 700px) {
  .race { padding: 16px 8px; }
  .race-h { display: none !important; }
  .race-v { display: block; max-width: 400px; margin: 0 auto; }
  .race-v .st text { font-size: 14px; }
  .race-v .st-tax text { font-size: 12.5px; }
  .race-v .lane-t { font-size: 12px; }
  .race-v .clock { font-size: 12px; }
}
.lane-c { text-anchor: middle; }
.lane-split { stroke: var(--line); stroke-dasharray: 3 5; }
.race .clock-ok { fill: var(--ok); }
.race svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.track { fill: none; stroke: var(--line); stroke-width: 2; }
.track-flow { fill: none; stroke: var(--mute); stroke-width: 2; stroke-dasharray: 6 10; animation: dash 1.2s linear infinite; opacity: .5; }
.track-ok { stroke: var(--ok); opacity: .8; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.st rect { fill: var(--n); stroke: var(--line); }
.st text { fill: var(--ink); font-size: 17px; font-weight: 500; text-anchor: middle; }
.st-tax rect { fill: var(--n-tax); stroke: rgba(255, 59, 69, .5); stroke-dasharray: 4 4; }
.st-tax text { fill: var(--n-tax-ink); font-size: 15px; }
.st-ok rect { fill: var(--n-ok); stroke: rgba(47, 208, 139, .6); }
.st-ok text { fill: var(--ok); font-size: 16px; }
.st-final rect { fill: var(--n-final); stroke: var(--ok); }
.st-final text { fill: var(--ok); }
.lane-t { fill: var(--mute); font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.lane-t-ok { fill: var(--ok); }
.clock { fill: var(--bad); font-family: var(--mono); font-size: 13px; text-anchor: middle; }
.dot-a { fill: var(--warn); filter: drop-shadow(0 0 6px var(--warn)); }
.dot-b { fill: var(--ok); filter: drop-shadow(0 0 8px var(--ok)); }

/* integrations */
.integ { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.integ li { background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 26px 20px 20px; display: flex; flex-direction: column; gap: 18px; min-height: 130px; justify-content: space-between; }
.integ span { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--integ-ink); }
.integ em { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; font-style: normal; color: var(--warn); border: 1px solid rgba(255, 154, 60, .4); border-radius: 99px; padding: 6px 10px; align-self: flex-start; }

/* team */
.team-copy { max-width: 760px; }

/* demo */
.demo-grid { display: grid; gap: 20px; margin-top: 56px; }
@media (min-width: 760px) { .demo-grid { grid-template-columns: repeat(3, 1fr); } }
.part { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; }
.tabs { display: flex; gap: 4px; background: var(--tab-bg); border-radius: 8px; padding: 4px; }
.tabs button { flex: 1; appearance: none; border: 0; background: transparent; color: var(--mute); font: 500 13px/1 var(--sans); padding: 9px 4px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; }
.tabs button[aria-selected="true"] { background: var(--tab-on); color: var(--ink); }
.part-img { margin-top: 10px; border-radius: 8px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; }
.part-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.part h3 { font-size: 19px; margin: 18px 6px 10px; }
.part dl { margin: 0 6px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.part dt { font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.part dd { margin: 4px 0 0; font-family: var(--mono); font-size: 14px; }

/* contact */
.contact { display: grid; gap: 48px; }
@media (min-width: 980px) { .contact { grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: start; } }
.form { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--mute); }
.form input, .form textarea { font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; outline: none; transition: border-color .15s; width: 100%; }
.form input:focus, .form textarea:focus { border-color: var(--ok); }
.form .btn { justify-content: center; margin-top: 4px; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form .fine { margin: 0; font-size: 13px; }
.form-msg { margin: 0; font-size: 15px; min-height: 1em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* modal */
.modal { border: 0; padding: 0; background: transparent; width: min(440px, calc(100% - 32px)); color: var(--ink); }
.modal::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.modal .form { position: relative; }
.modal h3 { font-size: 26px; }
.modal .mute { margin: 0; }
.modal[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.x { position: absolute; top: 10px; right: 12px; appearance: none; border: 0; background: none; color: var(--mute); font-size: 26px; cursor: pointer; line-height: 1; padding: 6px; }

.mail { margin: 18px 0 0; color: var(--mute); }
.mail a, .foot a { color: var(--ok); text-decoration: none; border-bottom: 1px solid currentColor; }

/* theme toggle */
.theme-btn { appearance: none; border: 1px solid var(--line); background: transparent; color: var(--mute); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; transition: color .15s, background .15s; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-sun { display: none; }
[data-theme="light"] .theme-btn .i-sun { display: block; }
[data-theme="light"] .theme-btn .i-moon { display: none; }
[data-theme="light"] .grid-bg { opacity: .6; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; color: var(--mute); font-size: 15px; }

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
  .btn:hover { background: var(--ok-hi); }
  .btn-ghost:hover { background: var(--card); }
  .cta-card:hover { background: var(--ok-hi); transform: translateY(-2px); }
  .cta-card:hover .arrow { transform: translate(3px, -3px); }
  .theme-btn:hover { color: var(--ink); background: var(--card); }
}

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
