/* MF-92: the Xcribe waitlist site. Paper for the record, ink for the object, one red that means "in writing".
   Tokens match the web app (web/src/styles.css) and the brand book; designed at 390 px first. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --paper: #f7f5ef;
  --surface: #fffefb;
  --subtle: #efede6;
  --ink: #1f1f1c;
  --ink-strong: #121110;
  --muted: #5f5e59;
  --pencil: #6b6a64;
  --line: #d4d2ca;
  --red: #b42617;
  --brand: #d6311f;
  --soft-red: #fbe8e3;
  --on-ink: #f7f5ef;
  --radius: 14px;
  --gutter: 20px;
  --mono: "Courier Prime", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191a18;
    --surface: #22231f;
    --subtle: #2a2b26;
    --ink: #f3f0e8;
    --ink-strong: #f7f5ef;
    --muted: #b8b7ae;
    --pencil: #a9a8a0;
    --line: #45463e;
    --red: #ff8a76;
    --brand: #ed604b;
    --soft-red: #38241f;
    --on-ink: #f7f5ef;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  font-synthesis: none;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 680; letter-spacing: -0.035em; line-height: 1.05; color: var(--ink-strong); }
h1 { font-size: clamp(2.65rem, 9.5vw, 5.1rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.85rem, 5.6vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.25; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.label { font: 700 0.78rem/1.3 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
.muted { color: var(--muted); }
.fine { font-size: 0.875rem; color: var(--muted); }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.32rem); line-height: 1.45; font-weight: 520; color: var(--ink); max-width: 38rem; }

/* ---- Header and footer ---- */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; }
.wordmark img { height: 26px; width: auto; }
.nav { display: flex; gap: 4px 18px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav a:hover { color: var(--red); }
.nav a.button { color: var(--paper); text-decoration: none; padding: 10px 16px; }
.nav a.button:hover { color: var(--paper); }
@media (max-width: 759px) {
  .site-header { padding: 10px 0 4px; }
  .nav { margin-left: 0; width: 100%; gap: 0 18px; }
  .nav a.button { display: none; }
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 0;
  background: var(--ink-strong); color: var(--paper); font: 650 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--paper); background: var(--red); }
.button.small { min-height: 44px; padding: 10px 16px; font-size: 0.95rem; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.ghost:hover { color: var(--red); border-color: var(--red); background: transparent; }
.site-footer { background: #121110; color: #f7f5ef; margin-top: 72px; padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.site-footer a { color: #f7f5ef; }
.site-footer a:hover { color: #ff8a76; }
.footer-grid { display: grid; gap: 24px; }
.footer-grid img { height: 28px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; margin: 0; list-style: none; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.footer-meta { color: #c9c7bd; font-size: 0.875rem; margin: 0; }
.sign-off { margin: 14px 0 0; font: 700 0.78rem/1.3 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: #c9c7bd; }

/* ---- Hero ---- */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; gap: 40px; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 26px; }

/* ---- The waitlist form ---- */
.join { max-width: 34rem; }
.join label.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.join-row input { flex: 1 1 220px; }
input[type="email"], input[type="text"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
}
textarea { min-height: 120px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.join .fine { margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--red); font-weight: 600; margin: 10px 0 0; }
.form-error:empty { display: none; }
.joined { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 36rem; }
.joined h2, .joined h3 { font-size: 1.5rem; margin-bottom: 10px; }
.joined h2:focus, .done:focus { outline: none; }
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 18px; }
.share input { flex: 1 1 220px; font-family: var(--mono); font-size: 0.9rem; }
.step-two { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.step-two .grid { display: grid; gap: 14px; margin: 14px 0 18px; }
.step-two label, .form-grid label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form-grid { display: grid; gap: 16px; max-width: 40rem; }
.done { font-size: 1.15rem; font-weight: 600; }

/* ---- The record card ---- */
.record { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.record-head .label { margin: 0; }
.record-head .meta { font: 400 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 0; }
.tag { font: 700 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.line { margin: 0 0 16px; }
.speaker { display: flex; align-items: center; gap: 6px; font: 700 0.78rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.colon { display: inline-grid; gap: 2px; }
.colon i { display: block; width: 6px; height: 6px; box-shadow: inset 0 0 0 1px var(--brand); }
.colon i.on { background: var(--brand); }
.said { font-size: 1.12rem; line-height: 1.45; margin: 0; color: var(--ink-strong); }
.box { border: 1.5px solid var(--brand); padding: 0 3px; border-radius: 2px; background: none; color: inherit; }
.pencil { color: var(--pencil); text-decoration: underline dotted; text-underline-offset: 5px; }
.note { border-left: 2px solid var(--brand); padding: 2px 0 2px 10px; color: var(--red); font-weight: 550; font-size: 0.98rem; margin: -6px 0 16px; }
.record-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; font: 700 0.74rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.writeup dl { margin: 0; display: grid; gap: 10px; }
.writeup dt { font: 700 0.78rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.writeup dd { margin: 2px 0 0; font-size: 1.02rem; }

/* ---- Sections ---- */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 14px; }
.two { display: grid; gap: 32px; align-items: start; }
.cards { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 8px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.ticks li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; background: var(--brand); }
.changes { background: var(--subtle); border-radius: var(--radius); padding: 18px 20px; }
.changes h3 { font-size: 1rem; margin-bottom: 8px; }
.changes ul { margin: 0; padding-left: 1.1rem; }
.figure { margin: 0; background: #f7f7f3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.figure figcaption { background: var(--surface); color: var(--muted); font-size: 0.85rem; padding: 10px 14px; border-top: 1px solid var(--line); }

/* Role chips: radio buttons, so they work with no script at all. */
.roles fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.roles legend { font-weight: 600; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 0.95rem; }
.chips input:checked + label { background: var(--ink-strong); color: var(--paper); border-color: var(--ink-strong); }
.chips input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.role-panel { display: none; }
#role-sales:checked ~ .role-panels .role-sales,
#role-estate:checked ~ .role-panels .role-estate,
#role-broker:checked ~ .role-panels .role-broker,
#role-solicitor:checked ~ .role-panels .role-solicitor,
#role-trades:checked ~ .role-panels .role-trades,
#role-recruiter:checked ~ .role-panels .role-recruiter,
#role-founder:checked ~ .role-panels .role-founder { display: block; }

/* The bench table and the facts table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 0.75rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--subtle); }
tr:last-child td { border-bottom: 0; }
.status { display: inline-block; font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line); white-space: nowrap; }
.status.proven, .status.on-the-bench, .status.passed { color: var(--paper); background: var(--ink-strong); border-color: var(--ink-strong); }
.status.target, .status.next, .status.in-progress { color: var(--red); border-color: var(--brand); }
.status.planned, .status.not-tested-yet, .status.being-designed, .status.later { color: var(--muted); }

@media (max-width: 759px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th { display: block; width: 100%; }
  table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td, table.stack th { border: 0; padding: 2px 0; background: none; }
  table.stack td:first-child, table.stack th[scope="row"] { font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
}

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 620; font-size: 1.1rem; padding: 14px 0; min-height: 44px; list-style-position: outside; }
.faq details p { color: var(--ink); max-width: 46rem; }

.mt-s { margin-top: 8px; }
.mt-m { margin-top: 16px; }
.mt-l { margin-top: 28px; }
.mb-l { margin-bottom: 24px; }
.m0 { margin: 0; }
.flush { border: 0; }
.role-panels { flex-basis: 100%; margin-top: 14px; }

/* Prose pages */
.page-head { padding: 32px 0 24px; }
.page-head h1 { font-size: clamp(2.3rem, 7vw, 4rem); margin-bottom: 14px; }
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 44px 0 14px; }
.prose h3 { margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 8px; }
.entry-meta { font: 700 0.8rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.margin-note { border-left: 2px solid var(--brand); padding: 4px 0 4px 12px; color: var(--red); font-weight: 550; margin: 18px 0; }

/* Phone: the join button sits under the thumb. */
.sticky-join { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.sticky-join[hidden] { display: none; }
body.has-sticky { padding-bottom: 84px; }

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .wordmark img { height: 30px; }
  .hero { padding: 40px 0 80px; }
  .hero .wrap { grid-template-columns: 1.08fr 0.92fr; align-items: center; gap: 56px; }
  .two { grid-template-columns: 1fr 1fr; gap: 48px; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .cards.two-up { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 2fr; align-items: start; }
  .step-two .grid { grid-template-columns: 1fr 1fr; }
  .form-grid.cols { grid-template-columns: 1fr 1fr; }
  .form-grid .wide { grid-column: 1 / -1; }
  .sticky-join { display: none; }
  body.has-sticky { padding-bottom: 0; }
  .section { padding: 80px 0; }
}

/* Only the ink moves: the boxes close once, on load. Reduced motion shows them complete. */
@media (prefers-reduced-motion: no-preference) {
  .record .box { animation: box-close 280ms ease-out 400ms both; }
  .record .note { animation: rule-draw 200ms ease-out 700ms both; }
  @keyframes box-close { from { border-color: transparent; } to { border-color: var(--brand); } }
  @keyframes rule-draw { from { border-left-color: transparent; } to { border-left-color: var(--brand); } }
}
