/* Headless Dev, LLC */
:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --surface: #f2f2ef;
  --text: #0d0e10;
  --muted: #53575e;
  --faint: #6b6f77;
  --line: #e3e3de;
  --line-strong: #cfcfc8;
  --accent: #2348e0;
  --accent-hover: #1a3bc4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(35, 72, 224, 0.08);
  --danger: #b42318;
  --code-bg: #0f1114;
  --code-text: #e8eaee;
  --code-muted: #8d939c;
  --code-ok: #7ee2a8;
  --code-accent: #9db1ff;
  --shadow: 0 1px 2px rgba(13, 14, 16, 0.04), 0 8px 24px rgba(13, 14, 16, 0.06);
  --radius: 14px;
  --max: 1160px;
  --font: "Geist", ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0e;
    --bg-elev: #121417;
    --surface: #15171b;
    --text: #f1f2f4;
    --muted: #a3a8b1;
    --faint: #8b9099;
    --line: #23262c;
    --line-strong: #33373f;
    --accent: #8ea5ff;
    --accent-hover: #a9bbff;
    --accent-ink: #0b0c0e;
    --accent-soft: rgba(142, 165, 255, 0.1);
    --danger: #ff8a80;
    --code-bg: #121417;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
em, i, cite, dfn, address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { 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: 600; letter-spacing: -0.02em; font-size: 17px; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  font: 600 15px/1 var(--font); letter-spacing: -0.005em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* Type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -0.045em; line-height: 1.02; }
h1 .soft { color: var(--faint); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.3; }
.lead { font-size: clamp(1.075rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 40ch; margin: 24px 0 0; }
p { margin: 0; }

/* Sections */
section { padding: 112px 0; scroll-margin-top: 64px; }
@media (max-width: 720px) { section { padding: 80px 0; } }
.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: 56px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.section-head .eyebrow { margin-bottom: 4px; }
.divide { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding: 88px 0 112px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 28px; font-size: 14px; color: var(--faint); }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding: 56px 0 88px; }
}
@media (max-width: 420px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

.terminal {
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  font: 400 13.5px/1.75 var(--mono);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3e46; }
.terminal-bar .t-title { width: auto; height: auto; border-radius: 0; background: none; margin-left: 8px; color: var(--code-muted); font-size: 12px; }
.terminal pre { margin: 0; padding: 18px 20px 22px; white-space: pre-wrap; word-break: break-word; font: inherit; }
.t-muted { color: var(--code-muted); }
.t-ok { color: var(--code-ok); }
.t-acc { color: var(--code-accent); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--code-accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* Cards / grids */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.card p { color: var(--muted); font-size: 15.5px; }
.card .icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 8px;
}
.card .icon svg { width: 20px; height: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card h3 { letter-spacing: -0.02em; }
.card-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15.5px; display: grid; gap: 8px; }
.card .case-link { margin-top: auto; align-self: flex-start; }
.card-cta { background: transparent; border-style: dashed; justify-content: center; }
.card-cta a { color: var(--accent); font-weight: 600; text-decoration: none; }
.card-cta a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--text); padding-top: 24px; display: grid; gap: 12px; align-content: start; }
.step-num { font: 500 13px/1 var(--mono); color: var(--accent); }
.step p { color: var(--muted); }
.ownership {
  margin-top: 48px; display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.ownership svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.ownership p { color: var(--muted); }
.ownership strong { color: var(--text); font-weight: 600; }

/* Work */
.work { display: grid; gap: 16px; }
.case {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.case-body { padding: 36px; display: grid; gap: 14px; align-content: start; }
.case-body p { color: var(--muted); }
.case-kicker { font: 500 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.case h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 6px 0 0; padding: 0; }
.tags li { font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); }
.case-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 15px; justify-self: start; }
.case-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.case-visual { background: var(--surface); border-left: 1px solid var(--line); padding: 32px; display: grid; place-items: center; min-height: 260px; }
@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; }
  .case-visual { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .case-body { padding: 28px; }
}
@media (max-width: 420px) {
  .case-body, .case-visual { padding: 22px; }
}

/* Mini UI illustrations (pure CSS, no images) */
.mock { width: 100%; max-width: 380px; display: grid; gap: 10px; }
.mock-row { display: flex; gap: 10px; }
.mock-panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; padding: 12px; flex: 1; display: grid; gap: 8px; }
.bar { height: 8px; border-radius: 4px; background: var(--line-strong); }
.bar.acc { background: var(--accent); }
.bar.w30 { width: 30%; } .bar.w45 { width: 45%; } .bar.w60 { width: 60%; } .bar.w75 { width: 75%; } .bar.w90 { width: 90%; }
.slot { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.off { background: var(--line-strong); }
.phone { width: 92px; flex: none; border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px 9px; background: var(--bg-elev); display: grid; gap: 7px; align-content: start; }
.phone .notch { width: 30px; height: 4px; border-radius: 2px; background: var(--line-strong); justify-self: center; margin-bottom: 4px; }
.chip { height: 22px; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--line); }
.org { display: grid; gap: 14px; justify-items: center; width: 100%; max-width: 360px; }
.org-node { background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; width: 92px; }
.org-node.top { border-color: var(--accent); }
.org-level { display: flex; gap: 10px; justify-content: center; position: relative; }
.org-line { width: 1px; height: 14px; background: var(--line-strong); margin: -14px 0; }

/* Why */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.why-item { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.why-item:nth-child(even) { padding: 32px 0 32px 32px; border-left: 1px solid var(--line); }
.why-item svg { width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
.why-item p { color: var(--muted); margin-top: 8px; }
.why-item.wide { grid-column: 1 / -1; padding-right: 0; }
@media (max-width: 760px) {
  .why { grid-template-columns: 1fr; }
  .why-item, .why-item:nth-child(even) { padding: 28px 0; border-left: 0; }
}

/* Final CTA */
.final { text-align: center; }
.final-box {
  border: 1px solid var(--line); border-radius: 24px; padding: 88px 32px;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg-elev);
}
.final h2 { max-width: 18ch; margin: 0 auto; }
.final p:not(.eyebrow) { color: var(--muted); max-width: 46ch; margin: 20px auto 0; font-size: 1.1rem; }
.final .hero-actions { justify-content: center; }
.final .email { display: inline-block; margin-top: 20px; font: 500 14px/1.4 var(--mono); color: var(--faint); text-decoration: none; }
.final .email:hover { color: var(--text); }
@media (max-width: 520px) { .final-box { padding: 56px 20px; border-radius: 18px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--faint); }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Legal pages */
.legal { padding: 72px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.legal .updated { color: var(--faint); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 20px; margin: 12px 0 0; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--accent); text-underline-offset: 3px; }

/* Logo mark */
.mk-bg { fill: var(--text); }
.mk-fg { fill: var(--bg); }
.mk-acc { fill: var(--accent); }
.chip.tile { flex: 1; height: 44px; }

/* Intake form */
.intake { padding: 64px 0 96px; }
.intake-wrap { max-width: 760px; }
.intake-head { display: grid; gap: 4px; margin-bottom: 40px; }
.intake-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.intake-head .lead { max-width: 56ch; margin-top: 16px; }
@media (max-width: 720px) { .intake { padding: 40px 0 72px; } }

.progress { margin-bottom: 28px; }
.progress-label { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 12px; }
.progress-bar { height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width 0.25s ease; }
@media (prefers-reduced-motion: reduce) { .progress-bar span { transition: none; } }

.intake-form { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
@media (max-width: 520px) { .intake-form { padding: 22px 18px; } }
.istep { padding: 0; display: grid; gap: 24px; scroll-margin-top: 80px; }
.istep[hidden] { display: none; }
.istep h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.03em; }
.istep h2:focus { outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; padding: 0; }
.hint { font-weight: 400; font-size: 14px; color: var(--faint); }
.req { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); margin-left: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.intake input[type="text"], .intake input[type="email"], .intake input[type="url"], .intake input[type="date"], .intake textarea {
  width: 100%; font: 400 16px/1.5 var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.intake input[type="text"], .intake input[type="email"], .intake input[type="url"], .intake input[type="date"] { height: 48px; padding-top: 0; padding-bottom: 0; }
.intake textarea { resize: vertical; min-height: 96px; }
.intake input::placeholder, .intake textarea::placeholder { color: var(--faint); }
.intake input:focus-visible, .intake textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input[type="text"], .field.invalid input[type="email"], .field.invalid input[type="url"], .field.invalid textarea { border-color: var(--danger); }
.field-error, .form-error { color: var(--danger); font-size: 14px; font-weight: 500; }
.form-error { margin-top: 20px; }
.form-error[hidden] { display: none; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.stack { flex-direction: column; align-items: stretch; }
.choice { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); cursor: pointer; font-size: 15.5px; font-weight: 500; transition: border-color 0.15s ease, background-color 0.15s ease; }
.choice:hover { border-color: var(--text); }
.choice input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--line-strong); background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input[type="checkbox"] { border-radius: 5px; }
.choice input:checked { border-color: var(--accent); background: var(--accent); }
.choice input[type="radio"]:checked { box-shadow: inset 0 0 0 3px var(--bg-elev); }
.choice input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.field.invalid .choice { border-color: var(--danger); }
@media (max-width: 520px) { .choices:not(.stack) .choice { flex: 1 1 calc(50% - 4px); } }

.intake-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.intake-nav [hidden] { display: none; }
.intake-nav #btn-next, .intake-nav #btn-submit { margin-left: auto; }
.intake-nav .btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 420px) { .intake-nav .btn { flex: 1; } }

.review-note { color: var(--muted); margin-top: -8px; }
.review { display: grid; gap: 16px; }
.review-group { padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.review-head h3 { font-size: 1rem; }
.link-btn { background: none; border: 0; padding: 6px 4px; font: 600 14px/1 var(--font); color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.review dl { margin: 0; padding: 6px 18px 14px; display: grid; gap: 0; }
.review dt { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--faint); margin-top: 12px; }
.review dd { margin: 2px 0 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.review dd.empty { color: var(--faint); }

.intake-done { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 36px; display: grid; gap: 16px; justify-items: start; }
.intake-done[hidden] { display: none; }
.intake-done:focus { outline: none; }
.intake-done h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.intake-done p:not(.eyebrow) { color: var(--muted); max-width: 52ch; }
.intake-done a:not(.btn) { color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 520px) { .intake-done { padding: 32px 20px; } }

.cond { display: grid; gap: 24px; }
.cond[hidden] { display: none; }
.cond-note { font-size: 14.5px; color: var(--muted); padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
