/* Fonts: self-hosted, SIL Open Font License (see /fonts/LICENSE-*.txt) */
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #0E1113;
  --surface: #131719;
  --surface-2: #161B1E;
  --border: #283035;
  --border-input: #3A454A;
  --text: #E8ECEA;
  --text-2: #B4BFBA;
  --text-3: #9AA6A1;
  --text-4: #8B9792;
  --accent: #7CE38B;
  --on-accent: #0E1113;
  --error: #FFB4A8;

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--font-head); color: var(--text); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-input); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--font-mono); }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand svg { flex: none; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a:not(.btn) { color: var(--text-2); text-decoration: none; padding: 10px 12px; font-size: 0.95rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
}

/* Buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 22px; border-radius: 8px; border: 0;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter 0.15s ease;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.08); }
.btn:disabled { cursor: progress; filter: saturate(0.6) brightness(0.9); }
.btn-sm { height: 44px; padding: 0 16px; font-size: 0.95rem; }

/* Sections */
.section { border-top: 1px solid var(--border); padding: 88px 0; }
@media (max-width: 640px) { .section { padding: 56px 0; } }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head p { margin-top: 12px; color: var(--text-3); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.card h3 { margin-bottom: 8px; }
.step-no { display: block; font-family: var(--font-mono); font-weight: 500; color: var(--accent); margin-bottom: 18px; font-size: 0.95rem; }
.tag { display: block; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 14px; }

.plain h3 { margin-bottom: 8px; }

/* Hero */
.hero { padding: 72px 0 88px; }
@media (max-width: 640px) { .hero { padding: 48px 0 56px; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 899px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.eyebrow { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 20px; }
.hero h1 { margin-bottom: 22px; }
.lede { font-size: 1.1rem; margin-bottom: 32px; max-width: 34em; }
.fine-print { margin-top: 14px; font-size: 0.9rem; color: var(--text-4); }

/* Waitlist form */
.waitlist { max-width: 520px; }
.waitlist label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row input { flex: 1 1 220px; min-width: 0; }
.field-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .field-row .btn { flex: 1 1 100%; } }
.waitlist input[type="email"] {
  height: 52px; padding: 0 16px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border-input); color: var(--text);
  font: 400 1rem var(--font-body);
}
.waitlist input[type="email"]::placeholder { color: var(--text-4); opacity: 1; }
.waitlist input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.waitlist input[aria-invalid="true"] { border-color: var(--error); }
.form-error { color: var(--error); font-size: 0.9rem; margin-top: 8px; }
.form-error:empty { display: none; }
.consent { margin-top: 12px; font-size: 0.85rem; color: var(--text-4); }
.consent a { color: var(--text-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status-box { max-width: 520px; background: var(--surface-2); border: 1px solid var(--accent); border-radius: 8px; padding: 16px 18px; color: var(--text); }
.notice { max-width: 520px; background: var(--surface-2); border: 1px solid var(--error); border-radius: 8px; padding: 14px 16px; color: var(--text); margin-bottom: 24px; }

/* Lab preview (decorative) */
.preview { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; font-size: 0.92rem; }
.preview-top { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); }
.preview-top span:first-child { color: var(--text); }
.steps { list-style: none; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); }
.steps li { display: flex; align-items: center; gap: 12px; padding: 9px 18px; color: var(--text-2); }
.steps .ico { flex: none; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.steps .title { flex: 1 1 auto; min-width: 0; }
.steps .chip { flex: none; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.steps .current { color: var(--text); font-weight: 600; background: var(--surface-2); }
.steps .current .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.steps .locked, .steps .locked .ico { color: var(--text-4); }
.term { margin: 0; padding: 16px 18px; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.7; color: var(--text-4); white-space: pre; overflow: hidden; }
.term .p { color: var(--accent); }
.term .cmd { color: var(--text); }
.preview-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--border); color: var(--text-2); font-size: 0.85rem; }
.preview-foot .ok { display: inline-flex; align-items: center; gap: 8px; }
.preview-foot .ok svg { color: var(--accent); flex: none; }
.preview-foot .unlock { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }

/* Final CTA */
.cta { background: var(--surface); text-align: center; }
.cta h2 { margin-bottom: 14px; }
.cta p.sub { margin: 0 auto 32px; max-width: 32em; }
.cta .waitlist, .cta .status-box { margin: 0 auto; text-align: left; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 0.9rem; color: var(--text-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.site-footer li:not(:last-child)::after { content: "\00B7"; margin: 0 10px; }
.site-footer a { color: var(--text-3); display: inline-block; padding: 10px 0; }

/* Prose pages */
.prose { max-width: 720px; padding: 64px 0 88px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 1.2em; }
.prose .meta { color: var(--text-4); font-size: 0.9rem; }
.center-page { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.center-page .btn { margin-top: 28px; align-self: flex-start; }

/* Status page: :target shows the matching message without JavaScript */
.msg { display: none; }
.msg-default { display: block; }
.msgs:has(.msg:target) .msg-default { display: none; }
.msg:target { display: block; }
.msgs .msg h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }

/* Very narrow phones: keep logo, wordmark and header button on one line */
.brand span { white-space: nowrap; }
@media (max-width: 380px) {
  .site-header .container { gap: 8px; }
  .brand { font-size: 1rem; gap: 8px; }
  .site-header .btn-sm { padding: 0 12px; font-size: 0.85rem; }
}
@media (max-width: 360px) {
  .container { padding: 0 16px; }
}
.preview-top span:last-child { white-space: nowrap; }
@media (max-width: 400px) {
  .term { font-size: 0.66rem; padding: 14px; }
  .steps li, .preview-top, .preview-foot { padding-left: 14px; padding-right: 14px; }
}
