/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.2; }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
.small { font-size: var(--step--1); color: var(--muted); }
.center { text-align: center; }
.center p { margin-inline: auto; }
.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; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--narrow); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--primary-bg); color: var(--primary-ink);
  padding: 12px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Wordmark ---------- */
.wm { font-family: var(--font-wordmark); display: inline-flex; align-items: baseline; line-height: 1; font-size: 1.25rem; }
.wm-b { font-weight: 700; letter-spacing: -0.01em; }
.wm-ai { font-weight: 400; font-style: italic; letter-spacing: 0.02em; }
.brand { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Header and tabs ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px 4px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: transparent; color: var(--text); border: 1px solid var(--border); cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle .icon-moon, [data-theme="linen"] .theme-toggle .icon-sun { display: none; }
[data-theme="linen"] .theme-toggle .icon-moon { display: block; }
.tabs { position: relative; }
.tabs-list {
  display: flex; gap: 4px; list-style: none; margin: 0 auto;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.tabs-list::-webkit-scrollbar { display: none; }
.tabs-list li { flex: none; scroll-snap-align: center; }
.tab {
  display: flex; align-items: center; min-height: 48px; min-width: 44px; padding: 0 14px;
  font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.is-current { color: var(--text); border-bottom-color: var(--spark); }
.tab:focus-visible { outline-offset: -3px; }
@media (max-width: 640px) {
  .tabs::before, .tabs::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 20px; pointer-events: none; z-index: 1;
  }
  .tabs::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
  .tabs::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
  .tab { padding: 0 12px; font-size: 0.85rem; }
}

/* ---------- Buttons and labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  font: 400 0.8rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.72rem; }
.btn-spark { background: var(--spark); color: var(--spark-ink); }
.btn-spark:hover { background: color-mix(in srgb, var(--spark) 88%, #fff); }
.btn-primary { background: var(--primary-bg); color: var(--primary-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions.center { justify-content: center; }

.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.badge {
  display: inline-block; padding: 5px 10px;
  background: var(--spark); color: var(--spark-ink);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
}
.h-label { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 400; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 9vw, 120px) clamp(40px, 7vw, 96px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr 1fr; } }
.lede { font-size: var(--step-1); color: var(--text); }
.hero p:not(.lede):not(.eyebrow) { color: var(--muted); }
.spark-word { color: var(--spark-text); display: inline-block; }
.hero-page h1 { max-width: 20ch; }
.manifesto { font-family: var(--font-body); font-style: italic; font-size: var(--step-2); line-height: 1.35; }

.constellation { width: min(100%, 380px); margin-inline: auto; }
.constellation .links { stroke: var(--border); }
.constellation .nodes circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.constellation .core { fill: var(--spark); }
.constellation .core-mark { stroke: var(--spark-ink); stroke-width: 2.5; stroke-linecap: round; }
@media (max-width: 899px) { .hero-art { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .constellation .core { animation: glow 4s ease-in-out infinite; transform-origin: 200px 205px; }
  @keyframes glow { 50% { transform: scale(1.08); } }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.band { padding-block: clamp(40px, 6vw, 72px); }
.band-problem { background: var(--surface); border-block: 1px solid var(--border); }
.statement { font-family: var(--font-body); font-size: var(--step-2); line-height: 1.35; margin: 0; }
.band-consulting { background: var(--surface-2); border-block: 1px solid var(--border); }
.consulting-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.consulting-band > div { flex: 1 1 420px; }
.consulting-band h2 { font-size: var(--step-2); }
.consulting-band p:last-child { margin-bottom: 0; color: var(--muted); }

/* ---------- Cards ---------- */
.cards { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .cards-2, .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px;
}
.section-alt .card { background: var(--bg); }
.card h3 { font-size: var(--step-1); font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.card p { color: var(--muted); margin-bottom: 0.75em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { color: var(--spark-text); margin-bottom: 18px; }
.card-n { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; letter-spacing: 0.1em; }
.card .for { color: var(--text); font-size: var(--step--1); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }

/* ---------- You bring / Spark brings ---------- */
.split { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } }
.split-col { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.split-spark { border-color: var(--spark); }
.split-col h3 { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.split-spark h3 { color: var(--spark-text); }
.split-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.split-col li { color: var(--muted); }
.split-col strong { color: var(--text); }
.proof { margin-top: 32px; padding: 24px 0 0; border-top: 1px solid var(--spark); display: grid; gap: 4px 32px; }
@media (min-width: 800px) { .proof { grid-template-columns: auto 1fr; align-items: baseline; } }
.proof-figure { font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); color: var(--spark-text); margin: 0; white-space: nowrap; }
.proof p:last-child { margin: 0; color: var(--muted); }
.flow-intro { margin: 40px 0 0; color: var(--muted); }
.flow-intro + .flow { margin-top: 16px; }

/* ---------- Flow ---------- */
.flow { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 700px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .flow { grid-template-columns: repeat(3, 1fr); } .flow-4 { grid-template-columns: repeat(4, 1fr); } }
.flow li { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.section-alt .flow li { background: var(--bg); }
.flow h3 { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; letter-spacing: 0; }
.flow p { color: var(--muted); margin: 0; }
.flow-n {
  display: block; margin-bottom: 12px; color: var(--spark-text);
  font-family: var(--font-mono); font-size: 0.88rem; letter-spacing: 0.14em;
}
.note { margin-top: 28px; color: var(--muted); }

/* ---------- Benefits, principles, FAQ ---------- */
.benefits { display: grid; gap: 0; margin: 32px 0 0; }
@media (min-width: 800px) { .benefits { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.benefits div { padding: 18px 0; border-top: 1px solid var(--border); }
.benefits dt { font-weight: 700; margin-bottom: 4px; }
.benefits dd { margin: 0; color: var(--muted); }

.principles { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 28px; }
@media (min-width: 800px) { .principles { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.principles li { border-left: 2px solid var(--spark); padding-left: 20px; }
.principle { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.25; margin-bottom: 6px; font-weight: 700; }
.principles li p:last-child { color: var(--muted); margin: 0; }

.faq { margin-top: 24px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--spark-text); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq summary h3 { margin: 0; font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; letter-spacing: 0; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

/* ---------- Clients ---------- */
.clients { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.clients li {
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 700;
  padding: 14px 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}

/* ---------- Founders ---------- */
.founders { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }

.founders li { border-top: 1px solid var(--accent); padding-top: 16px; }
.founder-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin: 0; }
.founder-role { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 4px 0 12px; }

/* ---------- Prose and placeholders ---------- */
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.placeholder { border: 1px dashed var(--accent); padding: 12px 16px; color: var(--muted); font-style: italic; }

/* ---------- Closing CTA ---------- */
.cta-close .icon { color: var(--spark-text); width: 40px; height: 40px; margin: 0 auto 16px; }
.cta-close h2 { margin-inline: auto; }

/* ---------- Forms ---------- */
.register-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .register-grid { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
label, legend { font-weight: 600; padding: 0; }
input, textarea, button { font-family: inherit; }
.req, .opt { font-weight: 400; color: var(--muted); font-size: var(--step--1); }
input[type="text"], input[type="email"], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--muted);
}
textarea { resize: vertical; min-height: 120px; }
input:focus-visible, textarea:focus-visible { outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error); }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 12px; }
.field-check label { font-weight: 400; }
.field-check .field-error { grid-column: 1 / -1; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--spark-text); }
.choices { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.choice { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
.choice input { margin: 0; }
.field-error { color: var(--error); font-size: var(--step--1); margin: 0; font-weight: 600; }
.form-errors { border: 1px solid var(--error); padding: 12px 16px; }
.form-errors p { margin: 0 0 6px; font-weight: 700; color: var(--error); }
.form-errors ul { margin: 0; padding-left: 20px; }
.form-status:empty { display: none; }
.form-status { margin: 0; font-weight: 600; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-meta { margin-top: 20px; }
.turnstile { min-height: 65px; }
.turnstile:empty { min-height: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 48px 24px; background: var(--surface); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-sign { font-family: var(--font-body); font-style: italic; font-size: var(--step-0); color: var(--muted); margin: 8px 0; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
.footer-contact a:not(.btn) { overflow-wrap: anywhere; }
.footer-legal { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; }
.footer-legal p { max-width: none; margin: 0; }
