:root {
  --bg: #111318;
  --bg-2: #15181f;
  --panel: #1a1d26;
  --panel-2: #20242f;
  --line: #2a2f3c;
  --line-2: #363c4c;
  --text: #e9ebf1;
  --muted: #9097a8;
  --dim: #636a7c;

  --green: #3fcf8e;
  --amber: #f2a93b;
  --red: #e5484d;
  --blue: #7184d9;

  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

::selection { background: color-mix(in srgb, var(--green) 35%, transparent); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel); padding: 8px 12px; }

/* --- nav ------------------------------------------------------------------ */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color 0.15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { color: var(--bg); }

@media (max-width: 560px) {
  .nav-links .hide-sm { display: none; }
}

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px;
  border-radius: 8px; border: 1px solid transparent;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #0c1a13; }
.btn-primary:hover { background: #5adca0; }
.btn-ghost { background: var(--panel); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 12px; }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* --- sections --------------------------------------------------------------- */

section { padding: clamp(64px, 10vw, 120px) 0; }
section + section { border-top: 1px solid var(--line); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(30px, 4.4vw, 48px); }
h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 40ch; }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.section-head p { color: var(--muted); }

/* --- hero ------------------------------------------------------------------- */

.hero { padding-top: clamp(56px, 9vw, 112px); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 28px; position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.hero-wave {
  position: absolute; inset: auto 0 0 0; height: 60%;
  z-index: 0; opacity: 0.55; pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 70%, transparent);
}
.hero-wave canvas { width: 100%; height: 100%; display: block; }

/* --- screenshot frame ------------------------------------------------------- */

.shot {
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.shot img { width: 100%; }
.shot-caption { margin-top: 14px; color: var(--dim); font-size: 14px; }

/* --- product card (landing) ------------------------------------------------ */

.product {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .product { grid-template-columns: 5fr 7fr; } }
.product .copy { display: grid; gap: 20px; }
.product .copy p { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted);
}
.chip.on { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }

/* --- grids ------------------------------------------------------------------ */

.grid-3 { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.cell { background: var(--bg-2); padding: clamp(24px, 3vw, 36px); display: grid; gap: 12px; align-content: start; }
.cell p { color: var(--muted); font-size: 16px; }
.cell .label { color: var(--dim); }

.features { display: grid; gap: 16px; }
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; gap: 10px; align-content: start;
}
.feature p { color: var(--muted); font-size: 16px; }
.feature .tag { justify-self: start; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* --- stats ------------------------------------------------------------------ */

.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--bg-2); padding: 28px; display: grid; gap: 8px; }
.stat .num { font-family: var(--mono); font-size: clamp(32px, 4vw, 44px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.stat p { color: var(--muted); font-size: 15px; }

/* --- timing diagram --------------------------------------------------------- */

.timing { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
@media (min-width: 900px) { .timing { grid-template-columns: 1fr 1fr; } }
.timing .prose { display: grid; gap: 18px; color: var(--muted); }
.timing .prose strong { color: var(--text); font-weight: 500; }

.diagram { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram .row-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }

/* --- lane demo -------------------------------------------------------------- */

.lane-demo { display: grid; gap: clamp(28px, 4vw, 48px); align-items: center; }
@media (min-width: 900px) { .lane-demo { grid-template-columns: 1fr 1fr; } }

.lane {
  background: #14161c; border: 1px solid var(--line-2); border-radius: 14px;
  padding: 22px; display: grid; gap: 18px;
}
.lane-top { display: flex; align-items: center; gap: 16px; }
.lane-id { display: grid; justify-items: center; gap: 6px; width: 56px; flex: none; }
.lane-num {
  width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 500; font-size: 18px; color: #111;
  background: var(--state, #2a2e39); transition: background 0.2s;
}
.lane-chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--state, var(--dim)); transition: color 0.2s; }
.lane[data-state="empty"] .lane-num { color: var(--muted); }

.lane-wave {
  flex: 1; height: 88px; border-radius: 8px; background: #0e0f13; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.lane-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.lane-button {
  width: 100%; height: 56px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s;
  color: var(--btn, var(--text));
  background: color-mix(in srgb, var(--btn, #8a90a0) 14%, #16181e);
  border: 1.5px solid color-mix(in srgb, var(--btn, #8a90a0) 55%, transparent);
}
.lane-button .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.lane-button:hover { background: color-mix(in srgb, var(--btn, #8a90a0) 22%, #16181e); }
.lane-hint { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: 0.06em; }

.state-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.state-table th, .state-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.state-table th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.state-table td { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; }
.state-table td:first-child { font-family: var(--sans); font-size: 15px; letter-spacing: 0; color: var(--muted); }
.state-table tr.active td { background: var(--panel); }
.state-table tr.active td:first-child { color: var(--text); }

/* --- gallery ---------------------------------------------------------------- */

.gallery { display: grid; gap: 20px; }
@media (min-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 12px; color: var(--dim); font-size: 14px; }

/* --- specs ------------------------------------------------------------------ */

.specs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec { display: grid; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 680px) { .spec { grid-template-columns: 220px 1fr; } }
.spec dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.spec dd { margin: 0; }
.spec dd span { color: var(--muted); }

/* --- beta form -------------------------------------------------------------- */

.beta { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 940px) { .beta { grid-template-columns: 5fr 6fr; } }
.beta .copy { display: grid; gap: 20px; }
.beta .copy p { color: var(--muted); }
.beta .copy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); }
.beta .copy li { display: flex; gap: 12px; }
.beta .copy li::before { content: ""; width: 6px; height: 6px; margin-top: 10px; border-radius: 2px; background: var(--green); flex: none; }

.card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: clamp(22px, 3vw, 32px); }

form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field .opt { color: var(--dim); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 13px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

input[type="email"], input[type="text"], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: #13151b; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 11px 14px; transition: border-color 0.15s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239097a8' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #13151b; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  transition: all 0.15s;
}
.segmented input:checked + label { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); background: color-mix(in srgb, var(--green) 9%, #13151b); }
.segmented input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--green); flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { color: var(--red); font-size: 15px; min-height: 0; }
.form-error:empty { display: none; }
.fine { font-size: 13px; color: var(--dim); }
.fine a { color: var(--muted); }

.success { display: grid; gap: 18px; }
.success[hidden] { display: none; }
.success h3 { display: flex; align-items: center; gap: 10px; }
.success ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
.success ol strong { color: var(--text); font-weight: 500; }
.success .meta { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: 0.04em; }
.notice { border-left: 2px solid var(--amber); padding: 4px 0 4px 14px; color: var(--muted); font-size: 15px; }

/* --- faq -------------------------------------------------------------------- */

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 500; font-size: 18px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--dim); font-size: 20px; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 68ch; }

/* --- footer ----------------------------------------------------------------- */

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--text); }

/* --- prose pages ------------------------------------------------------------ */

.prose-page { max-width: 720px; display: grid; gap: 18px; }
.prose-page h2 { font-size: 24px; margin-top: 22px; letter-spacing: -0.01em; }
.prose-page p, .prose-page li { color: var(--muted); }
.prose-page ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* --- Kit subscribe form ----------------------------------------------------- */

.subscribe { display: grid; gap: 10px; }
.subscribe-row { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-row input { flex: 1 1 220px; height: 46px; }
.subscribe-row .btn { flex: none; }

/* --- slideshow -------------------------------------------------------------- */

.slides-frame { position: relative; }
.slides { position: relative; overflow: hidden; aspect-ratio: 1600 / 1250; background: #0d0f13; }
.slides:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.slide.active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: contain; }

.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 85%, transparent);
  color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding-bottom: 3px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.15s, opacity 0.15s;
}
.slide-nav:hover { border-color: var(--muted); }
.slide-nav:disabled { opacity: 0; pointer-events: none; }
.slide-nav.prev { left: 14px; }
.slide-nav.next { right: 14px; }

.slide-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.slide-tabs button {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line-2);
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.slide-tabs button:hover { color: var(--text); }
.slide-tabs button[aria-current="true"] {
  color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

@media (max-width: 560px) { .slide-nav { display: none; } }

/* --- release stage badges --------------------------------------------------- */

.badge {
  justify-self: start; align-self: start;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-beta { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge-alpha { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }

/* --- personal note ---------------------------------------------------------- */

.note {
  max-width: 760px; display: grid; gap: 18px;
  padding-left: clamp(18px, 3vw, 32px); border-left: 2px solid var(--green);
}
.note p { font-size: clamp(18px, 1.8vw, 20px); color: var(--muted); }

/* --- logo ------------------------------------------------------------------- */

.brand svg.logo { width: auto; height: 22px; }

@media (max-width: 480px) {
  .brand { gap: 8px; font-size: 17px; }
  .brand svg.logo { height: 17px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
}
