/* Flash site: electric blue, sharp edges, a circuit-board background. */
:root {
  color-scheme: dark;
  --bg: #04080f;
  --surface: #0a1526;
  --elevated: #0e1d33;
  --panel: #07101e;
  --border: #16304f;
  --border-hi: #24507f;
  --text: #e8f1ff;
  --muted: #9fb3cc;
  --dim: #5f7894;
  --flash: #3b82f6;
  --sky: #60a5fa;
  --cyan: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --edge: inset 0 1px 0 #ffffff14;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1160px;
  --r: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-inline: var(--gutter) var(--gutter-r);
  overflow-x: hidden;
}
a { color: var(--sky); }
svg { max-width: 100%; }

/* Circuit board: a fine blue grid that fades out from the top, under a blue glow. */
.circuit {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 70% -8%, #1d4ed855, transparent 70%),
    radial-gradient(700px 500px at 0% 70%, #0e749044, transparent 70%),
    var(--bg);
}
.circuit::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(#3b82f614 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, #3b82f614 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  margin-inline: calc(-1 * var(--gutter)) calc(-1 * var(--gutter-r));
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter-r) 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #04080fcc;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 19px var(--display); letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; }
.nav nav { display: flex; align-items: center; gap: 24px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav nav a:hover { color: var(--text); }
.nav nav .nav-cta { color: #fff; background: var(--flash); padding: 7px 14px; border-radius: 8px; box-shadow: 0 0 0 1px #60a5fa55, 0 6px 22px -8px #3b82f6; }
.nav nav .nav-cta:hover { color: #fff; background: #2f74e8; }

/* ---------- Shared ---------- */
main > section { max-width: var(--max); margin-inline: auto; padding-block: 96px; }
/* Section labels carry a small bolt. */
.eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.eyebrow::before { content: ""; width: 9px; height: 13px; background: var(--cyan); clip-path: polygon(62% 0, 8% 55%, 44% 55%, 30% 100%, 92% 42%, 56% 42%); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
h2 { font-weight: 800; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.08; letter-spacing: -.025em; margin: .35em 0 .45em; }
section p { color: var(--muted); margin: 0 0 1em; max-width: 62ch; }
.grad { background: linear-gradient(90deg, var(--sky), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 8px;
  border: 1px solid var(--border-hi); background: #0a1526;
  color: var(--text); font: 600 15px var(--body); text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--sky); }
.btn.primary { background: linear-gradient(180deg, #4b8ef7, var(--flash)); color: #fff; border-color: #60a5fa66; box-shadow: 0 10px 30px -10px #3b82f6; }
.btn.primary:hover { background: linear-gradient(180deg, #5a98f8, #3478ea); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cards: flat panels with a thin top highlight that lights up on hover. */
.glass {
  position: relative;
  background: linear-gradient(180deg, #0e1d33, #0a1526);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--edge);
  padding: 26px;
  overflow: hidden;
}
.glass::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--sky), var(--cyan), transparent); opacity: .35; transition: opacity .3s; }
.glass:hover::before { opacity: 1; }
.chip { display: inline-block; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sky); background: #3b82f61a; border: 1px solid #3b82f640; border-radius: 4px; padding: 3px 8px; }
.note { font-size: 14px; color: var(--dim); }
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { font: 500 12.5px var(--mono); padding: 5px 11px; border-radius: 6px; background: #3b82f60f; border: 1px solid var(--border); color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - 64px);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
  padding-block: 48px 72px !important;
}
.hero h1 { font-weight: 800; font-size: clamp(46px, 7.4vw, 88px); line-height: 1; letter-spacing: -.035em; margin: .35em 0 .35em; }
.lede { font-size: 18px; color: var(--muted); max-width: 52ch; }
.pill { display: inline-flex; align-items: center; gap: 9px; font: 500 12.5px var(--mono); color: var(--text); padding: 6px 12px; border: 1px solid var(--border-hi); border-radius: 6px; background: #3b82f612; margin: 6px 0 26px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 #34d39988; } 70%, 100% { box-shadow: 0 0 0 8px #34d39900; } }

/* Device board: a lightning beam sweeps across, and each column of devices flips
   from "update" (amber) to "current" (green) as it passes. One 8 s loop; the beam
   crosses column n at 0.4 s + n x 0.8 s, which the per-column delays match. */
.board { width: 100%; max-width: 560px; margin-inline: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 40px 100px -40px #000, 0 0 0 1px #3b82f61a, var(--edge); overflow: hidden; }
.board-bar, .board-foot { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font: 500 12px var(--mono); color: var(--muted); }
.board-bar { border-bottom: 1px solid var(--border); background: #0a1526; }
.board-bar .count { margin-left: auto; color: var(--dim); }
.board-foot { border-top: 1px solid var(--border); justify-content: space-between; color: var(--dim); flex-wrap: wrap; }
.bolt-ico { width: 14px; height: 14px; fill: var(--cyan); }
.devs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px; }
.dev {
  --d: 0s;
  display: grid; gap: 1px; padding: 9px 10px 8px; min-width: 0;
  background: #0b1729; border: 1px solid var(--border); border-radius: 7px;
  animation: devflash 8s linear infinite; animation-delay: var(--d);
}
.c1 { --d: .8s; } .c2 { --d: 1.6s; } .c3 { --d: 2.4s; }
.dev b { font: 600 12.5px var(--display); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev > span { font: 400 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { position: relative; display: block; height: 16px; margin-top: 3px; font-style: normal; }
.st em { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; font: 600 10.5px var(--mono); font-style: normal; animation-duration: 8s; animation-iteration-count: infinite; animation-timing-function: linear; animation-delay: var(--d); }
.st em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st .old { color: var(--warn); animation-name: oldst; }
.st .new { color: var(--ok); opacity: 0; animation-name: newst; }
@keyframes devflash {
  0%, 4% { border-color: var(--border); box-shadow: none; background: #0b1729; }
  5% { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 26px -2px #22d3eecc; background: #0f2a46; }
  14%, 86% { border-color: #1d5a4a; box-shadow: none; background: #0b1729; }
  95%, 100% { border-color: var(--border); }
}
@keyframes oldst { 0%, 5% { opacity: 1; } 6%, 88% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes newst { 0%, 5% { opacity: 0; } 7%, 87% { opacity: 1; } 94%, 100% { opacity: 0; } }
.beam {
  position: absolute; top: 6px; bottom: 6px; left: 2%; width: 2px;
  background: linear-gradient(var(--cyan), var(--flash));
  box-shadow: 0 0 16px 3px #22d3ee99, 0 0 40px 8px #3b82f644;
  animation: sweep 8s linear infinite; opacity: 0;
}
.beam svg { position: absolute; top: 50%; left: -11px; width: 24px; height: 24px; transform: translateY(-50%); fill: #fff; filter: drop-shadow(0 0 6px var(--cyan)); }
@keyframes sweep { 0% { left: 2%; opacity: 0; } 2% { opacity: 1; } 40% { left: 98%; opacity: 1; } 43%, 100% { left: 98%; opacity: 0; } }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 56px; }
.flip .split-copy { order: 2; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 10px; height: 14px; background: var(--cyan); clip-path: polygon(62% 0, 8% 55%, 44% 55%, 30% 100%, 92% 42%, 56% 42%); }

/* App window mock */
.window { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 40px 90px -40px #000, 0 0 0 1px #3b82f61a, var(--edge); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #0a1526; }
.window-bar span { width: 10px; height: 10px; border-radius: 3px; background: #ffffff1a; }
.window-bar b { margin-left: 10px; font: 500 12px var(--mono); color: var(--dim); }
.window-body { padding: 6px 16px 16px; font-size: 13.5px; }
.table-head, .table-row { display: grid; grid-template-columns: 20px 1.7fr 1fr 1fr 1.1fr; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid #ffffff0b; }
.table-head { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.table-row code { font: 500 12px var(--mono); color: var(--dim); }
.table-row code.new { color: var(--text); font-weight: 600; }
.table-row em { display: block; font-style: normal; font-size: 11px; color: var(--warn); }
.src { color: var(--muted); font-size: 12.5px; }
.box { width: 15px; height: 15px; border-radius: 3px; border: 1.5px solid var(--dim); position: relative; }
.box.on { background: var(--flash); border-color: var(--flash); }
.box.on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.window-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; font: 500 12px var(--mono); color: var(--dim); }
.mini-btn { background: var(--flash); color: #fff; font: 600 13px var(--body); padding: 7px 12px; border-radius: 6px; }

/* Safety */
.safety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 8px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.safety-grid > div { background: var(--surface); padding: 22px; }
.safety-grid b { display: block; font: 700 17px var(--display); margin-bottom: 8px; }
.safety-grid p { font-size: 14.5px; margin: 0; }

/* Terminal */
.term { margin: 0; background: #030710; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 40px 90px -40px #000, var(--edge); }
.term-bar { padding: 12px 18px; font: 500 12px var(--mono); color: var(--dim); border-bottom: 1px solid var(--border); background: #07101e; }
.term-lines { list-style: none; margin: 0; padding: 18px 20px 22px; font: 400 13.5px/1.75 var(--mono); }
/* Hanging indents so wrapped lines stay under their own text. */
.term-lines li { white-space: pre-wrap; padding-left: 2ch; text-indent: -2ch; }
.term-lines .dim, .term-lines .fix { padding-left: 4ch; }
.term-lines .bad { color: var(--err); }
.term-lines .dim { color: var(--dim); }
.term-lines .fix { color: var(--ok); }
.term-lines .warn { color: var(--warn); margin-top: 6px; }

/* Tools */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.tool-grid h3 { font-weight: 700; font-size: 20px; letter-spacing: -.01em; margin: 14px 0 8px; }
.tool-grid p { font-size: 15px; margin: 0; }
.tool-grid .glass { transition: transform .3s, border-color .3s; }
.tool-grid .glass:hover { transform: translateY(-3px); border-color: var(--border-hi); }

/* Benchmarks */
.bench { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.bars { list-style: none; margin: 0; padding: 26px; display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--edge); }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: baseline; }
.bars span { color: var(--muted); font-size: 14.5px; }
.bars b { font: 600 14px var(--mono); }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 2px; background: #3b82f61a; overflow: hidden; }
.bar::after { content: ""; display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--flash), var(--sky), var(--cyan)); box-shadow: 0 0 12px #22d3ee66; transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.bench.in .bar::after { width: var(--w, 0%); }

/* How it works: numbered steps joined by a line. */
.steps { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; box-shadow: var(--edge); }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: -13px; top: 30px; width: 14px; height: 2px; background: var(--cyan); opacity: .6; }
.steps span { font: 700 12px var(--mono); color: var(--cyan); }
.steps b { display: block; font: 700 18px var(--display); margin: 8px 0 6px; }
.steps p { font-size: 14px; margin: 0; }

/* Download */
.download { text-align: center; }
.download h2, .download .sub, .download .note { margin-inline: auto; }
.download .cta { justify-content: center; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 22px; text-align: left; }
.dl { display: grid; gap: 8px; align-content: start; color: var(--text); text-decoration: none; transition: transform .25s, border-color .25s; }
.dl:hover { transform: translateY(-3px); border-color: var(--sky); }
.dl b { font: 800 23px var(--display); letter-spacing: -.01em; margin-top: 6px; }
.dl p { margin: 0; font-size: 14.5px; }
.dl code { font: 500 12px var(--mono); color: var(--dim); margin-top: 8px; }
.dl:first-child { border-color: #3b82f699; }
.dl:first-child::before { opacity: 1; }

/* Open source */
.oss { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: end; border-top: 1px solid var(--border); }

/* Footer */
.foot {
  max-width: var(--max); margin-inline: auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); color: var(--dim); font-size: 14px;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------- Reveal on scroll (only when JS runs, so content is never hidden without it) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .term-lines li { opacity: 0; transform: translateX(-6px); transition: opacity .35s ease, transform .35s ease; }
.js .in .term-lines li { opacity: 1; transform: none; }
.in .term-lines li:nth-child(2) { transition-delay: .25s; }
.in .term-lines li:nth-child(3) { transition-delay: .5s; }
.in .term-lines li:nth-child(4) { transition-delay: .9s; }
.in .term-lines li:nth-child(5) { transition-delay: 1.15s; }
.in .term-lines li:nth-child(6) { transition-delay: 1.4s; }
.in .term-lines li:nth-child(7) { transition-delay: 1.65s; }
.in .term-lines li:nth-child(8) { transition-delay: 2.05s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 40px 56px !important; }
  .split, .bench { grid-template-columns: 1fr; gap: 36px; }
  .flip .split-copy { order: 0; }
  .safety-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
  .oss { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 820px) {
  .dl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  main > section { padding-block: 64px; }
}
@media (max-width: 560px) {
  .safety-grid, .steps { grid-template-columns: 1fr; }
  .table-head, .table-row { grid-template-columns: 18px 1.6fr 1fr 1fr; }
  .table-head span:last-child, .src { display: none; }
  .window-body { font-size: 12.5px; padding-inline: 12px; }
  .lede { font-size: 17px; }
  .devs { gap: 6px; padding: 10px; }
  .dev { padding: 7px; }
  .dev > span { display: none; }
  .dev b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js .term-lines li { opacity: 1; transform: none; }
  .bar::after { width: var(--w, 0%); }
  /* Show the finished state: every device current, no beam. */
  .st .old { opacity: 0; }
  .st .new { opacity: 1; }
  .beam { display: none; }
}
