:root {
  --bg: #060b16; --bg2: #0a1224; --surface: #0e1830; --line: rgba(148, 163, 184, .16);
  --text: #eaf0fb; --muted: #93a3bd; --accent: #2563eb; --accent2: #60a5fa; --violet: #a78bfa; --ok: #34d399;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Hanken Grotesk", system-ui, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, h5, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: "JetBrains Mono", monospace; font-size: .86em; background: rgba(96, 165, 250, .12); color: var(--accent2); padding: 1px 6px; border-radius: 6px; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.grad, .grad .w { background: linear-gradient(95deg, var(--accent2), var(--violet) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad .w { background-size: 100% 100%; padding-right: .06em; }
.eyebrow { font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); margin-bottom: 18px; }
h2 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -.025em; font-weight: 800; }
.sub { color: var(--muted); font-size: 18px; max-width: 56ch; margin-top: 18px; }
.sub.center { margin-inline: auto; text-align: center; }

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--violet)); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 40px); transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(6, 11, 22, .72); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); position: relative; }
.mark::after { content: ""; position: absolute; inset: 6px; border: 2.5px solid #fff; border-radius: 50%; }
.nav nav { display: flex; gap: 4px; }
.nav nav button { background: none; border: 0; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color .2s, background .2s; }
.nav nav button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.btn { height: 50px; padding: 0 24px; border-radius: 14px; border: 1px solid var(--line); background: transparent; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 30px -8px rgba(37, 99, 235, .7); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding: 120px clamp(20px, 5vw, 72px) 80px; overflow: hidden; }
.grid-bg { position: absolute; inset: -10%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%); opacity: .55; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.orb-a { width: 520px; height: 520px; background: rgba(37, 99, 235, .45); top: -140px; left: -120px; }
.orb-b { width: 460px; height: 460px; background: rgba(167, 139, 250, .3); bottom: -160px; right: -80px; }
.orb-c { width: 640px; height: 640px; background: rgba(37, 99, 235, .3); top: 50%; left: 50%; translate: -50% -50%; }
.hero-inner { position: relative; z-index: 2; }
.hero-title { font-size: clamp(40px, 6vw, 92px); white-space: nowrap; line-height: .98; letter-spacing: -.04em; font-weight: 800; }
.line { display: block; overflow: hidden; padding-bottom: .08em; }
.w { display: inline-block; will-change: transform; }
.hero-lede { color: var(--muted); font-size: clamp(16px, 1.5vw, 20px); max-width: 52ch; margin-top: 28px; }
.hero-cta { display: flex; align-items: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; }
.hero .eyebrow { margin-bottom: 26px; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; width: 22px; height: 36px; border: 2px solid var(--line); border-radius: 12px; translate: -50% 0; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; background: var(--accent2); border-radius: 2px; animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.hero-visual { position: relative; z-index: 2; perspective: 1400px; }

/* mock app */
.app { position: relative; background: #0b1428; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset; transform-style: preserve-3d; }
.app-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3857; }
.app-bar span { margin-left: 12px; font: 500 12px "JetBrains Mono", monospace; color: var(--muted); }
.app-body { display: grid; grid-template-columns: 56px 1fr; min-height: 440px; }
.side { border-right: 1px solid var(--line); padding: 16px 12px; display: grid; gap: 12px; align-content: start; }
.side b { height: 28px; border-radius: 8px; background: #16223e; }
.side b.on { background: rgba(37, 99, 235, .5); }
.main { padding: 20px; display: grid; gap: 14px; align-content: start; position: relative; }
.main .h { height: 18px; width: 38%; background: #1c2a4b; border-radius: 6px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cards u { height: 70px; border-radius: 12px; background: #121f3b; border: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.row span { height: 14px; border-radius: 5px; background: #14213f; }
.fake-btn { justify-self: start; height: 38px; padding: 0 16px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); font-weight: 700; font-size: 13px; position: relative; z-index: 3; }
.ring { position: absolute; border-radius: 14px; box-shadow: 0 0 0 3px var(--accent2), 0 0 0 9999px rgba(3, 6, 14, .6); pointer-events: none; opacity: 0; }
.pop { position: absolute; width: 232px; padding: 14px 16px; background: #fff; color: #0d1a2d; border-radius: 14px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); z-index: 6; }
.pop small { color: #64748b; font-weight: 600; font-size: 11px; }
.pop strong { display: block; margin: 2px 0 4px; font-size: 15px; }
.pop p { font-size: 12.5px; color: #475569; line-height: 1.4; }
.pop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12px; color: #64748b; font-weight: 600; }
.pop-foot em { font-style: normal; background: var(--accent); color: #fff; padding: 6px 14px; border-radius: 8px; }
#heroPop { opacity: 0; }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg2); overflow: hidden; padding: 22px 0; }
.track { display: flex; width: max-content; will-change: transform; }
.set { display: flex; gap: 14px; padding-right: 14px; }
.set span { white-space: nowrap; padding: 10px 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 15px; }

/* ---------- statement ---------- */
.statement { min-height: 100vh; display: grid; place-items: center; padding: 120px clamp(20px, 6vw, 96px); }
.big { font-size: clamp(26px, 4.2vw, 56px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; max-width: 24ch; max-width: 26em; }
.big .c { color: rgba(234, 240, 251, .16); }

/* ---------- flow ---------- */
.flow { min-height: 100vh; background: var(--bg2); border-block: 1px solid var(--line); }
.flow-inner { min-height: 100vh; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 80px); align-items: center; padding: 90px clamp(20px, 5vw, 72px) 50px; }
.flow-copy h2 { font-size: clamp(28px, 3.6vw, 46px); }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 4px; }
.steps li { display: flex; gap: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; opacity: .4; transition: opacity .35s, background .35s, border-color .35s; }
.steps li.on { opacity: 1; background: rgba(37, 99, 235, .1); border-color: rgba(96, 165, 250, .3); }
.steps .n { font: 500 13px "JetBrains Mono", monospace; color: var(--accent2); padding-top: 4px; }
.steps h3 { font-size: 18px; }
.steps p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.bar { height: 3px; background: var(--line); border-radius: 3px; margin-top: 26px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--violet)); transform: scaleX(0); transform-origin: 0 50%; }

.stage { position: relative; }
.big-app .app-body { min-height: clamp(340px, 52vh, 480px); }
.big-app { box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8); }
.layer { position: absolute; inset: 0; }
.scrim { background: rgba(3, 6, 14, .66); opacity: 0; }
.modal { position: absolute; inset: 0; margin: auto; height: fit-content; width: min(360px, 82%); padding: 26px; background: #fff; color: #0d1a2d; border-radius: 20px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7); opacity: 0; z-index: 7; text-align: center; }
.modal small { font-weight: 700; color: #64748b; font-size: 12px; letter-spacing: .04em; }
.modal h4 { font-size: 25px; line-height: 1.1; margin: 8px 0; letter-spacing: -.02em; font-weight: 800; }
.modal .grad { background: linear-gradient(95deg, #2563eb, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.modal p { color: #475569; font-size: 14px; }
.sync { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.sync b { width: 40px; height: 40px; border-radius: 12px; background: #eef2ff; border: 2px solid #c7d2fe; position: relative; }
.sync b::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #2563eb; opacity: .25; animation: blip 1.8s infinite; }
.sync b:nth-child(2)::after { animation-delay: .3s; } .sync b:nth-child(3)::after { animation-delay: .6s; }
@keyframes blip { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
.mbtn { background: var(--accent); color: #fff; font-weight: 700; padding: 12px; border-radius: 12px; font-size: 14px; }
.chips { display: grid; gap: 8px; margin-top: 14px; text-align: left; }
.chips span { padding: 11px 14px; border: 1.5px solid #e2e8f0; border-radius: 12px; font-weight: 600; font-size: 14px; transition: background .25s, border-color .25s, color .25s; }
.chips span.pick { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
.prep { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: #64748b; opacity: 0; }
.prep i { width: 14px; height: 14px; border: 2px solid #cbd5e1; border-top-color: #2563eb; border-radius: 50%; animation: spin .8s linear infinite; }
.prep em { font-style: normal; }
@keyframes spin { to { rotate: 360deg; } }

.spot { position: absolute; border-radius: 14px; box-shadow: 0 0 0 3px var(--accent2), 0 0 0 9999px rgba(3, 6, 14, .66); opacity: 0; pointer-events: none; z-index: 4; }
.stage-pop { opacity: 0; z-index: 8; }
.cursor { position: absolute; width: 22px; height: 22px; z-index: 9; opacity: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3l14 8-6 2-2 6z' fill='white' stroke='%230d1a2d' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 50%; width: 9px; height: 14px; border-radius: 2px; opacity: 0; }
.toast { position: absolute; left: 0; right: 0; margin: 0 auto; width: fit-content; top: 22px; display: flex; gap: 12px; align-items: center; background: #fff; color: #0d1a2d; padding: 12px 18px; border-radius: 14px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); z-index: 11; opacity: 0; }
.toast strong { display: block; font-size: 14px; } .toast small { color: #64748b; font-size: 12px; }
.tick { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; rotate: 45deg; }
.check { position: absolute; right: 16px; bottom: 16px; width: 230px; background: #fff; color: #0d1a2d; border-radius: 16px; padding: 14px 16px; box-shadow: 0 30px 60px -15px rgba(0, 0, 0, .7); z-index: 12; opacity: 0; }
.check h5 { font-size: 14px; display: flex; justify-content: space-between; margin-bottom: 8px; }
.check h5 em { font-style: normal; color: #2563eb; font-size: 12px; }
.check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.check li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; font-weight: 600; }
.check li span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; position: relative; flex: none; transition: .3s; }
.check li.done { color: #94a3b8; text-decoration: line-through; }
.check li.done span { background: var(--ok); border-color: var(--ok); }
.check li.done span::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }

/* ---------- code ---------- */
.code-sec { padding: clamp(80px, 12vw, 160px) 0; }
.two { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(52, 211, 153, .18); }
.ticks li::after { content: ""; position: absolute; left: 6.5px; top: 8px; width: 4px; height: 8px; border: solid var(--ok); border-width: 0 2px 2px 0; rotate: 45deg; }
.code { margin: 0; padding: 26px 28px; background: #070d1c; border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; font: 400 13.5px/1.75 "JetBrains Mono", monospace; color: #cbd5e1; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8); }
.code code { white-space: normal; background: none; padding: 0; color: inherit; font-size: inherit; display: block; }
.code .l { display: block; white-space: pre; }
.code i { font-style: normal; }
.code .k { color: #c4b5fd; } .code .f { color: #60a5fa; } .code .t { color: #5eead4; } .code .s { color: #fcd34d; } .code .p { color: #64748b; } .code .c { color: #64748b; }

/* ---------- engine (horizontal) ---------- */
.engine { padding-top: clamp(60px, 8vw, 110px); background: var(--bg2); border-top: 1px solid var(--line); }
.engine-head h2 { max-width: 20ch; }
.h-pin { height: 100vh; display: flex; align-items: center; overflow: hidden; }
.h-track { display: flex; gap: 22px; padding: 0 clamp(20px, 5vw, 72px); will-change: transform; }
.card { flex: none; width: min(380px, 80vw); min-height: 340px; padding: 30px; border-radius: 24px; background: linear-gradient(160deg, #101c38, #0b1428); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s, translate .3s var(--ease); }
.card:hover { border-color: rgba(96, 165, 250, .5); translate: 0 -6px; }
.ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(37, 99, 235, .16); display: grid; place-items: center; margin-bottom: 28px; }
.ico svg { width: 26px; height: 26px; fill: none; stroke: var(--accent2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 24px; letter-spacing: -.01em; }
.card p { color: var(--muted); margin-top: 10px; font-size: 15.5px; flex: 1; }
.tag { align-self: flex-start; margin-top: 22px; font: 500 12px "JetBrains Mono", monospace; color: var(--accent2); border: 1px solid rgba(96, 165, 250, .3); padding: 5px 12px; border-radius: 999px; }

/* ---------- stack ---------- */
.stack { padding: clamp(80px, 12vw, 160px) 0; }
.arch { margin-top: 56px; }
.arch svg { width: 100%; height: auto; overflow: visible; }
.pipe { fill: none; stroke: url(#lg); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; }
.node rect { fill: #0e1830; stroke: var(--line); stroke-width: 1.5; transition: stroke .4s, fill .4s; }
.node.lit rect { stroke: var(--accent2); fill: #12214a; }
.node text { fill: var(--text); font: 700 20px "Hanken Grotesk", sans-serif; text-anchor: middle; }
.node text.sm { fill: var(--muted); font: 500 12px "JetBrains Mono", monospace; }
#packet { fill: #fff; filter: drop-shadow(0 0 8px var(--accent2)); opacity: 0; }
.endpoints { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.endpoints li { font: 500 14px "JetBrains Mono", monospace; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: #cbd5e1; }
.endpoints b { color: var(--ok); margin-right: 10px; } .endpoints b.po { color: #fbbf24; }

/* ---------- numbers ---------- */
.numbers { padding: clamp(70px, 10vw, 130px) 0; background: var(--bg2); border-block: 1px solid var(--line); }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.num { padding: 26px 4px; border-top: 1px solid var(--line); }
.num strong { display: block; font-size: clamp(54px, 7vw, 96px); font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(180deg, #fff, #7da7ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 18ch; }
.funnel { margin-top: clamp(60px, 8vw, 100px); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.f-head h3 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.02em; }
.f-head p { color: var(--muted); margin-top: 12px; }
.f-bars { display: grid; gap: 12px; }
.f-bars div { display: grid; grid-template-columns: 130px 1fr 44px; gap: 14px; align-items: center; font-size: 14px; }
.f-bars span { color: var(--muted); }
.f-bars i { height: 14px; width: var(--w); border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--violet)); transform-origin: 0 50%; display: block; }
.f-bars em { font-style: normal; font: 500 13px "JetBrains Mono", monospace; text-align: right; }
.fine { grid-column: 1 / -1; color: #5b6b86; font-size: 12px; }

/* ---------- closer ---------- */
.closer { position: relative; min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 120px 20px 60px; text-align: center; overflow: hidden; }
.huge { font-size: clamp(48px, 9.5vw, 148px); line-height: .96; letter-spacing: -.045em; font-weight: 800; position: relative; }
.closer .sub, .closer .btn { position: relative; }
.closer footer { position: absolute; bottom: 24px; color: #5b6b86; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .flow-inner, .two, .funnel { grid-template-columns: 1fr; }
  .nums { grid-template-columns: repeat(2, 1fr); }
  .endpoints { grid-template-columns: 1fr; }
  .f-bars div { grid-template-columns: 100px 1fr 40px; }
  .flow-copy h2 { font-size: 28px; }
  .steps li { padding: 8px 12px; }
  .steps p { display: none; }
  .steps li.on p { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span, .sync b::after, .prep i { animation: none; }
}
.reduce .steps li { opacity: 1; }
@media (max-width: 960px) { .big-app .app-body { min-height: 300px; } .stage-pop, .pop { width: 200px; } }
@media (max-width: 600px) { .hero-title { white-space: normal; font-size: 44px; } }
