/* Verso coming-soon page. Tokens follow the Verso design system. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-variable-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --paper: #F3F4EF;
  --band: #ECF0E7;
  --surface: #FFFFFF;
  --surface-sunk: #E8EAE1;
  --line: #DDDFD5;
  --line-strong: #858C7A;
  --ink: #161C12;
  --ink-body: #3A4232;
  --ink-muted: #5D6555;
  --recto: #2F5B2A;
  --recto-soft: #E3EDDC;
  --verso: #E9A23B;
  --verso-ink: #8F5A00;
  --verso-soft: #FBEFD8;
  --positive: #0A6C8C;
  --critical: #B3124E;
  --field: #FFFFFF;
  --button: #161C12;
  --on-button: #F3F4EF;
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11150E;
    --band: #151A11;
    --surface: #1A2016;
    --surface-sunk: #0B0E09;
    --line: #2B3324;
    --line-strong: #646E58;
    --ink: #F0F2EA;
    --ink-body: #C9CFBE;
    --ink-muted: #A0A893;
    --recto: #9CCB7E;
    --recto-soft: #232F1C;
    --verso: #F2B950;
    --verso-ink: #F2B950;
    --verso-soft: #3A2D12;
    --positive: #5CC6E8;
    --critical: #FF5C8A;
    --field: #0B0E09;
    --button: #F0F2EA;
    --on-button: #11150E;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  /* Green-bar ledger paper: three 24px rows of band, three of paper. */
  background-image: repeating-linear-gradient(180deg, var(--band) 0 72px, var(--paper) 72px 144px);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--recto); }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--recto); outline-offset: 2px; }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 56px;
  min-height: 100vh;
}

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; }
.wm-recto { fill: var(--recto); }
.wm-verso { fill: var(--verso); }
.wm-ink { fill: var(--ink); }
.pilot {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 20px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 28px; }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: -.02em;
  text-wrap: balance;
  max-width: 14em;
}

/* The fork: one purchase, two books */
.fork { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fork-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  grid-template-areas: "plot ends" "years .";
  column-gap: 20px;
  row-gap: 8px;
}
.plot { grid-area: plot; position: relative; height: clamp(200px, 30vw, 380px); }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lines .grid { stroke: var(--line); stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.lines .axis { stroke: var(--line-strong); vector-effect: non-scaling-stroke; }
.lines .gap { fill: var(--verso); fill-opacity: .14; }
.lines polyline { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lines .value { stroke: var(--verso); }
.lines .basis { stroke: var(--recto); }

.pt { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--paper); }
.pt.start { background: var(--ink); }
.pt.v { background: var(--verso); }
.pt.b { background: var(--recto); }

.note, .gap-label { position: absolute; font-size: 13px; line-height: 18px; white-space: nowrap; }
.note { color: var(--ink-muted); }
.note.start { transform: translate(-6px, 20px); }
.note .short { display: none; }
.note.reno { transform: translate(8px, 22px); }
.gap-label { transform: translate(-100%, -50%); color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.ends { grid-area: ends; position: relative; }
.end { position: absolute; left: 0; transform: translateY(-50%); display: flex; flex-direction: column; }
.end span { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.end strong { font-family: var(--font-display); font-stretch: 125%; font-weight: 500; font-size: 20px; line-height: 24px; font-variant-numeric: tabular-nums; }
.end.v strong { color: var(--verso-ink); }
.end.b strong { color: var(--recto); }

.years { grid-area: years; position: relative; height: 18px; font-size: 12px; line-height: 18px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.years span { position: absolute; transform: translateX(-50%); }
.years span:first-child { transform: none; }

.fork figcaption { font-size: 13px; line-height: 20px; color: var(--ink-muted); }

/* Draw-on: both lines leave the purchase point together, then split. */
.lines { clip-path: inset(0 100% 0 0); animation: draw 1.6s cubic-bezier(.45, 0, .2, 1) .25s forwards; }
.pt.v, .pt.b, .ends, .gap-label, .note.reno { opacity: 0; animation: fade .45s ease-out 1.75s forwards; }
@keyframes draw { to { clip-path: inset(0 0 0 0); } }
@keyframes fade { to { opacity: 1; } }

.below { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; }
.lede { flex: 1 1 380px; margin: 0; font-size: 18px; line-height: 29px; color: var(--ink-body); max-width: 32em; }

@media (max-width: 640px) {
  .fork-grid { grid-template-columns: minmax(0, 1fr) 112px; column-gap: 12px; }
  .end strong { font-size: 16px; line-height: 20px; }
  .note.reno, .years span:nth-child(even), .note .long { display: none; }
  .note .short { display: inline; }
  .gap-label { font-size: 12px; }
}

/* Waitlist */
.waitlist { flex: 1 1 380px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.waitlist label { font-size: 13px; font-weight: 500; }
.field-row { display: flex; flex-wrap: wrap; gap: 8px; }
.waitlist input[type="email"] {
  flex: 1 1 240px; min-width: 0; height: 48px;
  padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--field);
  font: 400 16px/24px var(--font-sans); color: var(--ink);
}
.waitlist input[type="email"]::placeholder { color: var(--ink-muted); }
.waitlist input[aria-invalid="true"] { border-color: var(--critical); }
.waitlist button {
  appearance: none; flex: 0 0 auto; height: 48px;
  padding: 0 20px; border-radius: 8px; border: 0;
  background: var(--button); color: var(--on-button);
  font: 500 15px/24px var(--font-sans); cursor: pointer;
}
.waitlist button[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.form-status.error { color: var(--critical); }
.form-status.ok { color: var(--ink); font-weight: 500; }

/* Features */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px;
  padding-top: 32px; border-top: 1px solid var(--line);
}
.features h2 { margin: 0 0 6px; font-size: 16px; line-height: 24px; font-weight: 600; }
.features p { margin: 0; color: var(--ink-body); }

/* Footer */
.foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.email { user-select: all; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .lines { clip-path: none; }
  .pt.v, .pt.b, .ends, .gap-label, .note.reno { opacity: 1; }
}

/* Lucide icons (ISC license), inlined */
.feat-icon { display: block; color: var(--ink); margin-bottom: 12px; }
.email-wrap { display: inline-flex; align-items: center; gap: 6px; }
.mail-icon { flex: none; }

/* Feature sections with product mockups */
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; padding-top: 24px; }
.feature.flip { flex-direction: row-reverse; }
.feature-copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; max-width: 30em; }
.feature-title { margin: 0; font-family: var(--font-display); font-stretch: 125%; font-weight: 600; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.feature-copy p { margin: 0; font-size: 17px; line-height: 28px; color: var(--ink-body); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 24px; }
.ticks .tick { flex: none; margin-top: 4px; color: var(--recto); }

.mock {
  flex: 1 1 440px; min-width: 0; max-width: 600px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; display: flex; flex-direction: column; gap: 20px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(22,28,18,.05), 0 18px 40px -18px rgba(22,28,18,.18);
}
@media (prefers-color-scheme: dark) { .mock { box-shadow: 0 0 0 1px rgba(240,242,234,.04), 0 24px 48px -20px rgba(0,0,0,.6); } }
.tree-wrap { display: flex; flex-direction: column; gap: 20px; }

.mock-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mock-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inline-icon { color: var(--ink-muted); }
.mock-sub { margin: 2px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; font-weight: 500; padding: 3px 10px 3px 8px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
.chip-icon { color: var(--positive); }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.track { position: relative; height: 6px; border-radius: 3px; background: var(--surface-sunk); margin: 0 6px; }
.track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ink); }
.tick-mark { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.tick-mark.done { background: var(--ink); border-color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.steps span { display: flex; flex-direction: column; }
.steps strong { color: var(--ink); font-weight: 600; }
.steps span:nth-child(2) { text-align: center; }
.steps span:last-child { text-align: right; }

.mock-rows { margin: 0; display: flex; flex-direction: column; }
.mock-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.mock-rows dt { color: var(--ink-body); }
.mock-rows dd { margin: 0; font-weight: 500; }

.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.book { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 10px; }
.book span { font-size: 13px; line-height: 18px; font-weight: 500; }
.book strong { font-family: var(--font-display); font-stretch: 125%; font-weight: 500; font-size: 24px; line-height: 30px; }
.book em { font-style: normal; font-size: 13px; line-height: 18px; color: var(--ink-body); }
.book.basis { background: var(--recto-soft); }
.book.basis span, .book.basis strong { color: var(--recto); }
.book.value { background: var(--verso-soft); }
.book.value span, .book.value strong { color: var(--verso-ink); }

/* Entity tree */
.node { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.node.top { background: var(--surface-sunk); }
.n-id { display: flex; flex-direction: column; min-width: 0; }
.n-name { font-size: 15px; line-height: 22px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.node-icon { color: var(--ink-muted); }
.n-meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.n-nums { display: flex; flex-direction: column; align-items: flex-end; font-size: 14px; line-height: 20px; font-weight: 500; }
.n-nums small { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.nv { color: var(--verso-ink); }
.nb { color: var(--recto); }
.tree-list { position: relative; margin: -8px 0 0 22px; padding: 18px 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.tree-list::before { content: ""; position: absolute; left: 0; top: 0; bottom: 30px; border-left: 1.5px solid var(--line-strong); }
.tree-list .node::before { content: ""; position: absolute; left: -23px; top: 50%; width: 22px; border-top: 1.5px solid var(--line-strong); }

.consol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; padding-top: 16px; border-top: 2px solid var(--ink); }
.c-label { flex: 1 1 100%; font-size: 13px; line-height: 18px; font-weight: 600; }
.c-fig { font-family: var(--font-display); font-stretch: 125%; font-weight: 500; font-size: 22px; line-height: 28px; }
.c-fig small { font-family: var(--font-sans); font-stretch: 100%; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.c-fig.v { color: var(--verso-ink); }
.c-fig.b { color: var(--recto); }
.c-note { flex: 1 1 100%; font-size: 13px; line-height: 18px; color: var(--ink-muted); }

@media (max-width: 640px) {
  .mock { padding: 18px; }
  .steps { font-size: 12px; }
  .n-nums { align-items: flex-start; flex-direction: row; gap: 12px; }
}
