/*
 * Technical editorial MVP. Identity copy is configured in brand-config.js;
 * palette and typography tokens live once in :root below.
 */

:root {
  --paper: #f2f0e8;
  --surface: #fbfaf6;
  --ink: #171a17;
  --muted: #5e665f;
  --line: #c9c5b8;
  --moss: #36513f;
  --signal: #c7f36b;
  --focus: #2457ff;
  --danger: #b42318;
  --success: #246b3c;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --shell: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4.5rem, 10vw, 8rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--signal); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--focus);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.shell { width: min(calc(100% - (var(--gutter) * 2)), var(--shell)); margin-inline: auto; }
.section { padding-block: var(--section-space); }
.section-label,
.eyebrow,
.micro {
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.section-label { display: flex; align-items: center; gap: 0.75rem; }
.section-label::before { width: 2rem; height: 1px; background: currentColor; content: ""; }
.section-label.inverse { color: var(--signal); }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { margin-top: 0; }
h1, h2 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.055em;
}
h1 {
  margin-bottom: 2rem;
  font-size: clamp(3.35rem, 7.6vw, 6.9rem);
  line-height: 0.91;
}
h2 {
  margin-bottom: 2rem;
  max-width: 16ch;
  font-size: clamp(2.35rem, 5vw, 4.75rem);
  line-height: 0.98;
}
h1 em, h2 em {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.25; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: var(--signal);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.button:hover { background: #d5ff80; box-shadow: 3px 3px 0 var(--ink); transform: translate(-2px, -2px); }
.button:active { box-shadow: none; transform: translate(0, 0); }
.button-small { min-height: 42px; padding: 0.55rem 0.9rem; }
.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 700;
  text-underline-offset: 0.35em;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.wordmark-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  font-family: var(--font-mono);
}
.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.primary-nav > a:not(.button) { min-height: 44px; display: inline-flex; align-items: center; font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.primary-nav > a:not(.button):hover { text-decoration: underline; text-underline-offset: 0.4em; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; }
.menu-toggle span:not(.sr-only) { display: block; width: 1.4rem; height: 1px; margin: 0.35rem auto; background: var(--ink); transition: transform 180ms ease; }

.hero { min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(4rem, 8vw, 7rem) 0 1.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.hero-copy { max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: 0.65rem; }
.status-dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 30%, transparent); }
.hero-intro { max-width: 650px; margin: 0 0 2.25rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.55; }
.signup-form { max-width: 680px; }
.form-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.field-group { display: grid; gap: .45rem; }
.field-group label { display: block; font-size: 0.78rem; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; }
.form-row input {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}
.form-row input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.form-row button:disabled { cursor: wait; opacity: .65; }
.form-note, .form-status { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.form-note a { color: inherit; text-underline-offset: .2em; }
.form-status:not(:empty) { color: var(--ink); font-weight: 700; }

.route-visual {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 10px 10px 0 var(--moss);
}
.route-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.route-head .micro { margin: 0; }
.route-state { margin: 0; color: var(--muted); font-size: 0.7rem; }
.route-list { position: relative; padding: 0; margin: 0; list-style: none; }
.route-list::before { position: absolute; top: 0; bottom: 0; left: 3.3rem; width: 1px; background: var(--line); content: ""; transform-origin: top; }
.route-list li { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.25rem 1rem; border-bottom: 1px solid var(--line); }
.route-number { position: relative; z-index: 1; display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--surface); font-family: var(--font-mono); font-size: 0.68rem; }
.route-list strong, .route-list small { display: block; }
.route-list strong { margin-bottom: 0.2rem; font-size: 0.95rem; }
.route-list small { color: var(--muted); font-size: 0.75rem; }
.route-destination { background: var(--signal); }
.route-destination .route-number { background: var(--ink); color: var(--signal); }
.route-caption { margin: 0; padding: 0.8rem 1rem; font-family: var(--font-mono); font-size: 0.67rem; }
.hero-footer { display: flex; justify-content: space-between; margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; }

.editorial-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 8vw, 8rem); }
.problem { border-top: 1px solid var(--line); background: var(--surface); }
.problem-body { padding-top: 3.2rem; }
.lede { max-width: 22ch; margin: 0 0 3rem; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.75rem); font-weight: 600; line-height: 1.1; }
.tension-list { border-top: 1px solid var(--line); }
.tension-list article { display: grid; grid-template-columns: 2rem 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.tension-list article > span { font-family: var(--font-mono); font-size: 0.68rem; }
.tension-list h3 { margin-bottom: 0.35rem; }
.tension-list p { margin: 0; color: var(--muted); }

.transformation { color: #fff; background: var(--moss); }
.transformation .section-label { color: var(--signal); }
.transformation h2 { max-width: 18ch; }
.keep-change { display: grid; grid-template-columns: 1fr 1fr; margin-top: 4rem; border: 1px solid color-mix(in srgb, #fff 35%, transparent); }
.keep-change article { min-height: 360px; padding: clamp(1.5rem, 5vw, 4rem); }
.keep-change article + article { border-left: 1px solid color-mix(in srgb, #fff 35%, transparent); }
.keep-change .micro { color: var(--signal); }
.keep-change h3 { max-width: 15ch; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.keep-change ul { padding: 0; margin: 3rem 0 0; list-style: none; }
.keep-change li { padding: 0.75rem 0; border-bottom: 1px solid color-mix(in srgb, #fff 20%, transparent); }
.change-panel { color: var(--ink); background: var(--signal); }
.change-panel .micro { color: var(--ink); }
.change-panel li { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }

.section-heading-row { display: grid; grid-template-columns: minmax(0, 8fr) minmax(250px, 3fr); align-items: end; gap: 3rem; }
.section-heading-row h2 { max-width: 17ch; }
.section-heading-row > p { margin-bottom: 2.2rem; color: var(--muted); }
.role-rail { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0; margin: 4rem 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); list-style: none; }
.role-rail li { display: flex; min-height: 110px; align-items: flex-end; padding: 1rem; border-right: 1px solid var(--line); font-size: 0.82rem; font-weight: 700; }
.role-rail li:last-child { border-right: 0; }
.fit-note { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; color: var(--muted); }
.fit-note p { margin: 0; }
.fit-note strong { color: var(--ink); }

.path { background: var(--surface); }
.path-intro { display: grid; grid-template-columns: 2fr 3fr; gap: 2rem 5rem; margin-bottom: 4rem; }
.path-intro .section-label { grid-column: 1 / -1; }
.path-intro h2 { margin: 0; }
.path-intro > p:last-child { max-width: 520px; margin: 0; color: var(--muted); }
.process-list { padding: 0; margin: 0; border-top: 1px solid var(--ink); list-style: none; }
.process-list li { display: grid; grid-template-columns: 110px 1fr; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.process-number { font-family: var(--font-display); font-size: 3rem; line-height: 1; }
.process-list .micro { margin-bottom: 0.65rem; color: var(--moss); }
.process-list h3 { max-width: 20ch; margin-bottom: 0.5rem; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.process-list p:not(.micro) { max-width: 55ch; margin: 0 0 1.3rem; color: var(--muted); }
.process-list small { font-family: var(--font-mono); font-size: 0.65rem; }
.section-cta { margin-top: 2.5rem; text-align: right; }

.kit { color: #fff; background: var(--ink); }
.kit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 8vw, 8rem); }
.kit-copy { align-self: start; }
.kit-copy .section-label { color: var(--signal); }
.kit-copy p:not(.section-label) { max-width: 48ch; margin-bottom: 2rem; color: #b9c0ba; }
.artifact-index { border-top: 1px solid #6d736e; }
.artifact-head, .artifact-index > div { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #424742; }
.artifact-head { color: #a6ada7; font-family: var(--font-mono); font-size: 0.65rem; }
.artifact-index b { display: inline-block; min-width: 2.5rem; color: var(--signal); font-family: var(--font-mono); font-size: 0.65rem; }
.artifact-index small { color: var(--signal); font-family: var(--font-mono); font-size: 0.6rem; white-space: nowrap; }

.evidence-ledger { border-top: 1px solid var(--ink); }
.evidence-ledger article { display: grid; grid-template-columns: 150px 1fr; gap: 1rem 2rem; padding: 1.8rem 0; border-bottom: 1px solid var(--line); }
.evidence-ledger article h3, .evidence-ledger article p { margin: 0; }
.evidence-ledger article p { grid-column: 2; color: var(--muted); }
.evidence-state { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; }
.state-mark { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; color: var(--surface); background: var(--success); font-style: normal; }
.pending .state-mark { color: var(--ink); background: var(--signal); }
.evidence-note { margin: 1.5rem 0 0; font-weight: 700; }

.manifesto { background: var(--signal); }
.manifesto-inner { max-width: 920px; }
.manifesto h2 { max-width: 18ch; }
.manifesto p:not(.section-label) { max-width: 680px; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.manifesto blockquote { margin: 4rem 0 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 4rem); font-weight: 600; line-height: 1.05; }

.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(3rem, 8vw, 8rem); }
.faq-list { border-top: 1px solid var(--ink); }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; min-height: 64px; padding: 1.2rem 3rem 1.2rem 0; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { position: absolute; top: 1.1rem; right: 0.25rem; content: "+"; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { max-width: 60ch; margin: 0; padding: 0 3rem 1.5rem 0; color: var(--muted); }

.final-cta { padding-block: clamp(5rem, 10vw, 8rem); color: #fff; background: var(--moss); }
.final-cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); align-items: end; gap: clamp(3rem, 8vw, 8rem); }
.final-cta h2 { margin: 0; max-width: 15ch; }
.final-cta-grid > div:last-child > p { max-width: 48ch; margin: 0 0 2rem; color: #d4dbd5; }
.signup-form-dark label, .signup-form-dark .form-note, .signup-form-dark .form-status { color: #d4dbd5; }
.signup-form-dark .form-row input { border-color: #fff; color: var(--ink); }

.site-footer { padding: 2.5rem 0; color: #cbd6cd; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-wordmark { color: #fff; }
.footer-grid p { margin: .65rem 0 0; font-size: .78rem; }
.footer-meta { text-align: right; }
.footer-meta a { color: inherit; }

.legal-page { max-width: 900px; padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: clamp(5rem, 10vw, 9rem); }
.legal-page h1 { max-width: 11ch; }
.legal-intro { max-width: 720px; color: var(--muted); font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.55; }
.legal-page section { max-width: 720px; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid var(--line); }
.legal-page section h2 { margin-bottom: 1rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.legal-page section p { color: var(--muted); line-height: 1.75; }
.legal-page section a { color: var(--ink); }

.reveal { animation: reveal-in 600ms both; }
.hero .route-visual { animation-delay: 120ms; }
@keyframes reveal-in { from { transform: translateY(16px); } to { transform: translateY(0); } }

@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .primary-nav {
    position: fixed;
    inset: 76px 0 auto;
    display: none;
    min-height: calc(100vh - 76px);
    min-height: calc(100svh - 76px);
    align-items: stretch;
    padding: 2rem var(--gutter);
    background: var(--paper);
    flex-direction: column;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav > a:not(.button) { min-height: 56px; border-bottom: 1px solid var(--line); font-size: 1.2rem; }
  .primary-nav .button { margin-top: 1rem; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }
  .hero { min-height: auto; }
  .hero-grid, .editorial-grid, .kit-grid, .faq-grid, .final-cta-grid, .section-heading-row { grid-template-columns: 1fr; }
  .hero-grid { gap: 4rem; }
  .hero-footer { margin-top: 5rem; }
  .problem-body { padding-top: 0; }
  .role-rail { grid-template-columns: 1fr 1fr; }
  .role-rail li { min-height: 80px; border-bottom: 1px solid var(--line); }
  .path-intro { grid-template-columns: 1fr; }
  .path-intro .section-label { grid-column: auto; }
  .evidence-ledger article { grid-template-columns: 130px 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

@media (max-width: 600px) {
  :root { --gutter: 1.25rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.75rem); }
  .hero { padding-top: 3.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-row .button { width: 100%; }
  .route-head { display: block; }
  .route-state { margin-top: 0.35rem; }
  .hero-footer { display: block; }
  .hero-footer span { display: block; margin-top: 0.5rem; }
  .keep-change { grid-template-columns: 1fr; }
  .keep-change article { min-height: auto; }
  .keep-change article + article { border-top: 1px solid color-mix(in srgb, #fff 35%, transparent); border-left: 0; }
  .role-rail { grid-template-columns: 1fr; }
  .role-rail li { min-height: 64px; border-right: 0; }
  .fit-note { grid-template-columns: 1fr; gap: 1.25rem; }
  .process-list li { grid-template-columns: 64px 1fr; gap: 0.75rem; }
  .process-number { font-size: 2rem; }
  .artifact-index > div { align-items: start; }
  .artifact-index small { max-width: 90px; text-align: right; white-space: normal; }
  .evidence-ledger article { grid-template-columns: 1fr; }
  .evidence-ledger article p { grid-column: 1; }
  summary { padding-right: 2.5rem; }
  details p { padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
