/* The public site's one stylesheet: the landing page, Our story, the privacy notice, the terms and the 404 page.
   Vault: Website Consistency System (one style per role, tokens first) and the Landing Page and Marketing Playbook.
   Rules for changing it:
   - No font size, colour, gap or radius as a literal in a component: use a token, or add a token with a named role.
   - Fix the shared rule, never one page. A rule like ".section p { font-size }" overrides shared components; do not.
   - Check with tools/site-checks/consistency.mjs at 1440, 820 and 390 px and fit.mjs at 13 widths.
   Colours match the app's tokens, so the site and the product look like one thing. */

:root {
  /* colour */
  --bg: #ffffff; --surface: #f6f7f9; --border: #e3e6ea; --hair: #eceef1;
  --fg: #15181d; --fg-muted: #5a606a; --fg-faint: #80868f;
  --accent: #24479a; --accent-strong: #1b3a82; --accent-fg: #ffffff; --accent-soft: #e8eefa;
  --panel: #24479a; --panel-fg: #ffffff; --panel-muted: #c9d6f3; --panel-deep: #1b3a82;
  --error: #b42318;                                 /* a form field's error, and its border */
  --shadow: 0 1px 2px rgba(16,20,28,.06), 0 20px 50px rgba(16,20,28,.16);
  color-scheme: light;

  /* type: one size per role */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --fs-label: 13px;                                 /* the label above a heading, in mono */
  --fs-display: min(68px, calc((100vw - 48px) / 11.8)); /* the landing headline only: one line at every width */
  --fs-page-title: clamp(34px, 2rem + 2.4vw, 56px); /* the h1 of every other page */
  --fs-section: clamp(28px, 1.2rem + 1.8vw, 40px);  /* every section h2, including the closing band */
  --fs-feature: clamp(22px, 1.1rem + 0.9vw, 28px);  /* an h3 beside a big picture */
  --fs-card: 20px;                                  /* an h3 in a card or step; an h2 on a document page */
  --fs-lead: clamp(17.5px, 1rem + 0.35vw, 19px);    /* the sentence under a heading; the story's first paragraph */
  --fs-body: 17px;                                  /* all running text */
  --fs-small: 14px;                                 /* captions, notes and fine print, in --fg-faint */
  --fs-button: 15.5px; --fs-button-lg: 16.5px;
  --fs-brand: 18px;                                 /* the name beside the logo */
  --fs-nav: 15.5px;                                 /* header links and phone tabs */
  --fs-ui: 16px;                                    /* table cells, short card text and figure labels */
  --fs-slogan: clamp(18px, 2.4vw, 23px);            /* the line under the landing headline */
  --fs-quote: clamp(1.35rem, 1.05rem + 1.2vw, 2rem); /* the founder's pull quote: one step below the page title */
  --fs-mark-plus: 24px;                             /* the FAQ open and close sign */
  --lh-body: 1.6; --lh-head: 1.12;

  /* space: one rhythm */
  --wrap: 1120px; --gutter: 20px;
  --space-section: clamp(56px, 3rem + 2.5vw, 80px); /* padding above and below every section */
  --gap-label: 14px;                                /* label to heading */
  --gap-sub: 12px;                                  /* heading to the sentence under it */
  --gap-head: clamp(32px, 1.5rem + 1.6vw, 48px);    /* heading block to the section's content */
  --gap-media: 20px;                                /* words to the picture under them */
  --gap-grid: 28px;                                 /* between cards in a row */
  --radius: 12px; --radius-btn: 10px;
  --btn-h: 42px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161b; --surface: #1a1d23; --border: #2a2e37; --hair: #22262d;
    --fg: #e6e8ec; --fg-muted: #a2a8b2; --fg-faint: #7e848e;
    --accent: #92adf2; --accent-strong: #b3c6f6; --accent-fg: #0f1a33; --accent-soft: #1f2a44;
    --panel: #1c2c57; --panel-fg: #ffffff; --panel-muted: #b8c8ee; --panel-deep: #15224a;
    --error: #f2a097;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161b; --surface: #1a1d23; --border: #2a2e37; --hair: #22262d;
  --fg: #e6e8ec; --fg-muted: #a2a8b2; --fg-faint: #7e848e;
  --accent: #92adf2; --accent-strong: #b3c6f6; --accent-fg: #0f1a33; --accent-soft: #1f2a44;
  --panel: #1c2c57; --panel-fg: #ffffff; --panel-muted: #b8c8ee; --panel-deep: #15224a;
  --error: #f2a097;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* --- base -------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: none; }
a:focus-visible, summary:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; color: var(--accent-strong); }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.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; }

/* Headings: one size per level, set here and nowhere else. */
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: var(--lh-head); text-wrap: balance; }
h2 { font-size: var(--fs-section); font-weight: 750; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-card); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0 0 1em; }

/* The one label above a heading. */
.eyebrow { display: block; margin: 0 0 var(--gap-label); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .06em; color: var(--fg-muted); }
.on-panel .eyebrow { color: var(--panel-muted); }
/* The one sentence under a heading. */
.lead { font-size: var(--fs-lead); line-height: 1.55; }
.small { font-size: var(--fs-small); color: var(--fg-faint); }

/* --- header ------------------------------------------------------------ */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--hair); }
.top-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; flex: none; }
/* The logo is exactly the main button's height (Omar's rule, measured). */
.mark { width: var(--btn-h); height: var(--btn-h); flex: none; }
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: var(--fs-brand); white-space: nowrap; }
.links { display: flex; gap: 26px; margin-left: 8px; }
.links a, .tabs a { color: var(--fg-muted); text-decoration: none; font-size: var(--fs-nav); font-weight: 500; white-space: nowrap; }
.links a[aria-current], .tabs a[aria-current] { color: var(--fg); }
.top .spacer { flex: 1; }
.btn .short { display: none; }
@media (hover: hover) and (pointer: fine) { .links a:hover { color: var(--fg); } }
@media (max-width: 439px) {
  /* A phone keeps the logo, the name and the button on one row: the button's words shorten instead. */
  .top-row { gap: 12px; }
  .btn .long { display: none; }
  .btn .short { display: inline; }
}
.tabs { display: none; }
@media (max-width: 899px) {
  .top-row .links { display: none; }
  /* Below this width the links become a row of tabs under the header that scrolls sideways on its own. */
  .tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter) 12px; margin-top: -4px; }
  .tabs::-webkit-scrollbar { display: none; }
}

/* --- buttons: one per role (header, large, plain) --------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 18px; border-radius: var(--radius-btn); border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 650; font-size: var(--fs-button);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.lg { --btn-h: 50px; font-size: var(--fs-button-lg); padding: 0 24px; }
.on-panel .btn.primary { background: var(--panel-fg); border-color: var(--panel-fg); color: var(--panel-deep); }
.on-panel .btn.ghost, .on-panel .btn:not(.primary) { background: transparent; border-color: rgba(255,255,255,.45); color: var(--panel-fg); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--fg-faint); }
  .btn.primary:hover { filter: brightness(1.08); border-color: var(--accent); }
  .on-panel .btn:not(.primary):hover { border-color: var(--panel-fg); }
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- panels: the landing hero, every inner page's header, the closing band ---- */
.hero { background: var(--panel); color: var(--panel-fg); }
.hero h1, .band h2 { color: var(--panel-fg); }
/* The landing hero: the screenshot hangs 140 px below the panel onto the page (Lessonspace's shape, playbook). */
.hero.home { padding: 64px 0 0; margin-bottom: 140px; display: flow-root; text-align: center; }
.hero.home h1 { margin: 0 0 14px; font-weight: 750; letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap; font-size: var(--fs-display); }
.slogan { text-wrap: balance; margin: 0 auto 10px; font-size: var(--fs-slogan); font-weight: 600; color: var(--panel-fg); }
.hero .lead { text-wrap: balance; margin: 0 auto 28px; max-width: 40rem; color: var(--panel-muted); }
.hero.home .actions { justify-content: center; }
.cta-note, .founder-note { margin: 16px 0 0; font-size: var(--fs-small); color: var(--panel-muted); }
.founder-note { margin-top: 6px; }
.founder-note a { color: var(--panel-fg); }
.shot-hero { position: relative; margin: 44px auto -140px; max-width: 1040px; }
.shot-hero .frame img { aspect-ratio: 1440 / 880; }
@media (max-width: 699px) { .shot-hero .frame img { aspect-ratio: 1200 / 1146; } .shot-hero { margin-bottom: -100px; } .hero.home { margin-bottom: 100px; } }
/* Every other page opens with the same panel: label, title, one sentence, and on the 404 page its two actions. */
.page-head { padding: 56px 0 52px; }
.page-head h1 { font-size: var(--fs-page-title); font-weight: 750; max-width: 16ch; }
.page-head .lead { margin: 16px 0 0; max-width: 38rem; text-align: left; }
.page-head .actions { margin-top: 28px; }
/* Closing band: the hero's colour again, so the page ends where it started. */
.band { background: var(--panel); color: var(--panel-fg); text-align: center; padding: var(--space-section) 0; }
.band p { margin: var(--gap-sub) auto 28px; color: var(--panel-muted); font-size: var(--fs-lead); max-width: 36rem; }

/* --- the one picture frame -------------------------------------------- */
.frame { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.frame-bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.frame img, .frame video { width: 100%; height: auto; }
.frame video { aspect-ratio: 16 / 9; background: var(--surface); }
.frame.player { max-width: 960px; }
.caption { margin: 12px 0 0; font-size: var(--fs-small); color: var(--fg-faint); }

/* --- sections ---------------------------------------------------------- */
section { padding: var(--space-section) 0; }
.alt { background: var(--surface); border-block: 1px solid var(--hair); }
/* Every section starts with this head: the heading, then one sentence; the content follows after --gap-head. */
.section-head { margin: 0 0 var(--gap-head); max-width: 46rem; }
.section-head .lead { margin: var(--gap-sub) 0 0; }

/* Cards in a row read top-down: number and title, then words, then picture; a subgrid keeps the pictures level. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-grid); }
.caption + .steps { margin-top: var(--gap-head); }
.steps li { counter-increment: step; display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; }
.steps .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-weight: 700; font-size: var(--fs-small); margin-bottom: 12px; }
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0 0 var(--gap-media); }
.steps .frame img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; }
@media (max-width: 899px) { .steps { grid-template-columns: minmax(0, 1fr); row-gap: 40px; } .steps li { grid-row: auto; display: block; } }

.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 28px 0; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature h3 { margin: 0 0 10px; font-size: var(--fs-feature); font-weight: 720; letter-spacing: -0.022em; line-height: 1.2; }
.feature p { margin: 0 0 12px; }
.feature ul { margin: 0; padding-left: 20px; }
.feature li { margin: 4px 0; }
.feature .frame img { aspect-ratio: 6 / 5; object-fit: cover; object-position: top left; }
@media (max-width: 899px) {
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: var(--gap-media); }
  .feature.flip .feature-text { order: 0; }
}

/* Comparison: a table on wide screens, one card per row on phones so nothing scrolls sideways. */
.compare { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { font-size: var(--fs-small); color: var(--fg-muted); font-weight: 650; }
.compare thead th.us { color: var(--accent); }
.compare tbody th { font-weight: 650; width: 24%; }
.compare td.us { background: var(--accent-soft); color: var(--fg); }
.compare td { color: var(--fg-muted); }
@media (max-width: 719px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
  .compare tbody th { width: auto; background: var(--surface); border-bottom: 1px solid var(--border); }
  .compare td { border-bottom: 1px solid var(--border); }
  .compare td:last-child { border-bottom: 0; }
  .compare td::before { content: attr(data-label); display: block; font-size: var(--fs-small); font-weight: 650; color: var(--fg-faint); margin-bottom: 2px; }
  .compare td.us::before { color: var(--accent); }
}

.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-grid); }
.track { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--bg); }
.track h3 { margin: 0 0 14px; }
.figs { margin: 0; display: grid; gap: 8px; }
.fig { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--hair); padding-bottom: 8px; }
.fig:last-child { border-bottom: 0; padding-bottom: 0; }
.fig dt { color: var(--fg-muted); font-size: var(--fs-ui); }
.fig dd { margin: 0; font-family: var(--mono); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 719px) { .tracks { grid-template-columns: minmax(0, 1fr); } }

.honest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.honest li { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; font-size: var(--fs-ui); background: var(--bg); }
.honest strong { display: block; font-size: var(--fs-body); margin-bottom: 4px; }
@media (max-width: 719px) { .honest { grid-template-columns: minmax(0, 1fr); } }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 650; font-size: var(--fs-body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: var(--fs-mark-plus); font-weight: 400; color: var(--fg-faint); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; }

/* --- reading pages: Our story, the privacy notice and the terms --------- */
/* Left-aligned at every width (WCAG 1.4.8), one text colour, about 65 characters a line. */
/* The column shares the page head's left edge (one alignment rule); its lines stay about 65 characters. */
.reading { max-width: var(--wrap); padding: var(--space-section) var(--gutter); margin: 0 auto; }
.reading > * { max-width: 40rem; }
.reading > .lead:first-child { margin-top: 0; }
.reading h2 { font-size: var(--fs-card); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; margin: 2em 0 .5em; }
.reading ul { padding-left: 22px; }

/* The contact form (contact.html). Inputs are 16px so a phone does not zoom in on them. */
.contact-form { display: grid; gap: 22px; margin: 32px 0; }
.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-ui); font-weight: 650; }
.field .optional { margin-left: 6px; font-size: var(--fs-small); font-weight: 400; color: var(--fg-faint); }
.field input, .field select, .field textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  font: inherit; font-size: var(--fs-ui); line-height: 1.4; color: var(--fg);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-btn);
}
.field input, .field select { height: 44px; }        /* one field height, and a 44px touch target */
.field textarea { resize: vertical; min-height: 9em; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-note, .field-error { margin: 0; font-size: var(--fs-small); color: var(--fg-faint); }
.field-error { color: var(--error); font-weight: 650; }
.contact-form > .btn { justify-self: start; }
.form-status { display: grid; gap: 10px; justify-items: start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.form-status[hidden] { display: none; }
.form-status p { margin: 0; }
a.email { white-space: nowrap; }                  /* an address never splits at its hyphen */
.reading li { margin: 6px 0; }
/* The founder's own sentence, centred, one step below the heading, with matching rules above and below (guide). */
.quote { margin: 2.4em 0; padding: 1.4em 0; border-block: 2px solid var(--accent); text-align: center; }
.quote blockquote { margin: 0; }
/* 28ch measured in the quote's own size, so the lines stay balanced at every width. */
.quote blockquote p { margin: 0 auto; max-width: 28ch; font-style: italic; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3;
  font-size: var(--fs-quote); text-wrap: balance; }
.quote figcaption { margin-top: .9em; font-size: var(--fs-small); font-weight: 600; }
.quote .role { color: var(--accent); }

/* --- footer ------------------------------------------------------------ */
/* footer.wrap, not footer: .wrap's padding would otherwise win and the footer would touch the band above it. */
footer.wrap { padding-top: 36px; padding-bottom: 48px; color: var(--fg-faint); font-size: var(--fs-small); }
footer p { margin: 6px 0; }
footer a { color: var(--fg-muted); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot-row strong { color: var(--fg); }
