/* Pilot & Proof — lab-notebook system: cool paper, quad grid, blue-black ink, one margin red. */

:root {
  --paper: #f6f7f3;
  --paper-2: #eceee8;
  --card: #fbfbf8;
  --ink: #16202e;
  --ink-2: #4e5865;
  --grid: rgba(64, 110, 150, 0.12);
  --rule: rgba(22, 32, 46, 0.18);
  --red: #b5372b;
  --red-ink: #8f2a20;
  --mark: #f0da72;
  --margin-x: clamp(14px, 3.4vw, 52px);
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1240px;
  --sans: "Inclusive Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::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(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

/* The notebook's margin rule runs the full height of every page. */
body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 var(--margin-x);
  width: 2px;
  background: var(--red);
  opacity: 0.8;
  z-index: 3;
  pointer-events: none;
}

a { color: var(--red); text-underline-offset: 0.2em; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; }
.skip:focus { left: calc(var(--margin-x) + 12px); }

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

.mono, .label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label { color: var(--red); }
.muted { color: var(--ink-2); }

.grid-paper {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.proof-mark { display: inline-block; width: 0.28em; height: 0.28em; background: var(--red); margin-left: 0.1em; vertical-align: 0.02em; }
.amp { font-style: italic; font-weight: 300; color: var(--red); }

/* Header */
.site-head { position: relative; z-index: 4; border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 20px; }
.wordmark { color: var(--ink); text-decoration: none; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-size: 16px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--red); color: #fff; border: 0; border-radius: 0;
  font: 500 17px/1 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--red-ink); color: #fff; }
.button[disabled] { opacity: 0.6; cursor: progress; }
.nav .button { min-height: 42px; color: #fff; }
.nav .button:hover { text-decoration: none; }

/* Hero: text on the left, a living stipple specimen on the right. */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); min-height: min(88vh, 880px); display: flex; align-items: center; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(56px, 9vh, 120px) clamp(120px, 14vh, 160px); pointer-events: none; }
.hero .wrap a, .hero .wrap button { pointer-events: auto; }
.hero-copy { max-width: 620px; display: flex; flex-direction: column; gap: 26px; }
.hero h1 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(50px, 7.2vw, 108px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 300; background: linear-gradient(transparent 60%, var(--mark) 60%, var(--mark) 92%, transparent 92%); padding: 0 0.04em; }
.lede { margin: 0; font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; max-width: 33em; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.actions .text-link { color: var(--ink); font-weight: 500; }
.founder-note { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 36em; }

.specimen-caption {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 28px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right;
}
.specimen-caption .fig { color: var(--red); }
.specimen-caption .title { font-size: 15px; }
.specimen-caption .credit { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.specimen-caption .credit a { color: var(--ink-2); }
.ticks { display: flex; gap: 6px; }
.ticks button {
  width: 44px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative;
}
.ticks button::after { content: ""; position: absolute; left: 6px; right: 6px; top: 11px; height: 2px; background: var(--ink); opacity: 0.25; }
.ticks button[aria-pressed="true"]::after { background: var(--red); opacity: 1; height: 3px; top: 10px; }

@media (max-width: 899px) {
  .hero { align-items: flex-start; }
  .hero .wrap { padding-bottom: 46vh; }
  .specimen-caption { left: calc(var(--margin-x) + var(--gutter)); right: var(--gutter); align-items: flex-start; text-align: left; }
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); border-bottom: 1px solid var(--rule); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 780px; margin-bottom: clamp(36px, 5vw, 56px); }
.section h2 { margin: 0; font-weight: 300; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.section h3 { margin: 0; font-weight: 500; font-size: 28px; letter-spacing: -0.02em; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 2px solid var(--ink); }
.pillar { padding: 28px 28px 32px 0; display: flex; flex-direction: column; gap: 14px; }
.pillar + .pillar { padding-left: 28px; border-left: 1px solid var(--rule); }
.pillar .promise { margin: 0; font-size: 20px; line-height: 1.35; font-style: italic; font-weight: 300; }
.pillar ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16.5px; }
.pillar li { padding-left: 20px; position: relative; }
.pillar li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border: 1.5px solid var(--ink); }
@media (max-width: 760px) {
  .pillar, .pillar + .pillar { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 28px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.step:last-child { border-top-color: var(--red); }
.step b { font-weight: 500; font-size: 26px; letter-spacing: -0.02em; }
.step p { margin: 0; font-size: 16px; }

/* The protocol: a flat notebook entry, ruled like the page it's written on. */
.protocol { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px 56px; align-items: start; }
.protocol .entry { border-top: 2px solid var(--red); }
.protocol .row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.protocol .row .mono { color: var(--ink-2); padding-top: 3px; }
.protocol .question { font-size: clamp(26px, 2.6vw, 34px); font-weight: 300; line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 0; }

.case { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); background: var(--card); border: 1px solid var(--ink); }
.case > div { padding: clamp(24px, 3vw, 40px); }
.case > div + div { border-left: 1px solid var(--rule); }
@media (max-width: 960px) { .case > div + div { border-left: 0; border-top: 1px solid var(--rule); } }
.case h3 { font-weight: 400; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; margin: 12px 0 14px; }
.figure-row { display: flex; align-items: stretch; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.figure-row .box { flex: 1 1 110px; min-height: 74px; border: 1px solid var(--ink); background: #fff; padding: 8px 10px; font-size: 14px; line-height: 1.3; display: flex; flex-direction: column; justify-content: center; }
.figure-row .box.check { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.figure-row .box b { font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 22px; align-content: center; height: 100%; }
.fact b { display: block; font-weight: 300; font-size: 58px; line-height: 1; letter-spacing: -0.04em; }
.fact span { font-size: 14.5px; color: var(--ink-2); }

.rules { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); counter-reset: rule; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
.rules li::before { content: counter(rule); font-family: var(--mono); color: var(--red); padding-top: 2px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 40px 72px; align-items: start; }

.about { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.about figure { margin: 0; }
.about img { display: block; width: 100%; height: auto; filter: grayscale(0.15) contrast(1.02); border: 1px solid var(--ink); }
.about figcaption { margin-top: 10px; }
.about p { margin: 0 0 16px; max-width: 36em; }

/* Intake form */
.intake { background: var(--ink); color: var(--paper); border-bottom: 0; }
.intake h2 { color: var(--paper); }
.intake .label { color: #f0a49b; }
.intake .muted { color: #c3cad3; }
.intake a { color: #f0a49b; }
form.notebook { background: var(--paper); color: var(--ink); padding: clamp(22px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
@media (max-width: 760px) { form.notebook { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 500; font-size: 16px; }
.field .hint { font-size: 14px; color: var(--ink-2); margin-top: -4px; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  font: 400 17px/1.4 var(--sans); color: var(--ink); background: #fff;
  border: 1px solid rgba(22, 32, 46, 0.45); border-radius: 0; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { min-height: 132px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.field-error { color: var(--red-ink); font-size: 14.5px; min-height: 0; }
.field-error:empty { display: none; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--rule); padding-top: 20px; }
.privacy-note { font-size: 14.5px; color: var(--ink-2); max-width: 34em; margin: 0; }
#intake-status { grid-column: 1 / -1; color: var(--red-ink); margin: 0; }
#intake-status:empty { display: none; }
.done { background: var(--paper); color: var(--ink); padding: clamp(24px, 3vw, 40px); }
.done h3 { font-weight: 300; font-size: clamp(30px, 3vw, 40px); }

.site-foot { padding-block: 40px 56px; font-size: 15px; color: var(--ink-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.site-foot a { color: var(--ink-2); }
