/* Field Notes site styles. Copied from docs/design/components.html (Phase 6), the source of truth for tokens. */
:root {
  --paper: #faf9f5; --surface: #fffef9; --board: #eeeee7; --ink: #303b34; --muted: #596654; --line: #d5dacf;
  --field-line: #7d8878; /* form field borders: 3:1 against surface and paper (WCAG 1.4.11) */
  --accent: #345843; --accent-hover: #264834; --on-accent: #fffef9; --focus: #426b59;
  --error: #9b2c1f;
  --shadow-frame: 0 1px 2px rgb(48 59 52 / 0.08), 0 12px 32px rgb(48 59 52 / 0.12);
  --shadow-raise: 0 1px 2px rgb(48 59 52 / 0.08), 0 4px 12px rgb(48 59 52 / 0.08);
  --font-display: Georgia, "Iowan Old Style", Charter, "Noto Serif", "DejaVu Serif", serif;
  --font-text: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, "SF Mono", Menlo, "Cascadia Mono", "Roboto Mono", monospace;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.4vw, 2.25rem);
  --step-4: clamp(1.875rem, 1.5rem + 2.2vw, 3rem);
  /* Spacing scale: 4 8 16 24 32 48 64 96. Nothing else is used for margin, padding or gap. */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 1rem; --space-4: 1.5rem; --space-5: 2rem; --space-6: 3rem; --space-7: 4rem; --space-8: 6rem;
  --radius: 8px; /* the app's card radius; one value for buttons, fields, cards and the video frame */
  --gutter: var(--space-3);
  --page: 72rem;
}
@media (min-width: 48rem) { :root { --gutter: var(--space-5); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #1c211e; --surface: #232924; --board: #2a312c; --ink: #e8ece6; --muted: #b3bdb0; --line: #3c463f; --field-line: #7f8b80; --accent: #7ba98b; --accent-hover: #93bba0; --on-accent: #141815; --focus: #8fbf9f; --error: #f0a494; --shadow-frame: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.35); --shadow-raise: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3); } }
:root[data-theme="dark"] { --paper: #1c211e; --surface: #232924; --board: #2a312c; --ink: #e8ece6; --muted: #b3bdb0; --line: #3c463f; --field-line: #7f8b80; --accent: #7ba98b; --accent-hover: #93bba0; --on-accent: #141815; --focus: #8fbf9f; --error: #f0a494; --shadow-frame: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.35); --shadow-raise: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.3); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--font-text); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
kbd { font: 0.9em var(--font-mono); }

.bleed { overflow-x: clip; } /* full-width band around the hero: 100vw counts the scrollbar, so the bleed is clipped here instead of scrolling the page */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-7) 0; }
.section + .section { border-top: 1px solid var(--line); }

/* Site header: wordmark left, one text link right. No nav bar: four pages, two of them reached from cards. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; }
.wordmark { font: 400 var(--step-1)/1 var(--font-display); color: var(--ink); text-decoration: none; padding: var(--space-1) 0; }
.site-header a, .site-footer a { display: inline-block; padding: var(--space-1) 0; } /* 24px+ targets (WCAG 2.5.8) */

/* Type roles from Phase 5 */
.hook { font: 400 var(--step-1)/1.4 var(--font-display); margin: 0 0 var(--space-3); max-width: 36ch; text-wrap: balance; }
h1 { font: 400 var(--step-4)/1.12 var(--font-display); letter-spacing: -0.01em; margin: 0 0 var(--space-3); max-width: 24ch; text-wrap: balance; }
h2 { font: 400 var(--step-3)/1.18 var(--font-display); margin: 0 0 var(--space-4); max-width: 28ch; text-wrap: balance; }
h3 { font: 600 var(--step-1)/1.3 var(--font-text); margin: 0 0 var(--space-2); }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 52ch; margin: 0 0 var(--space-5); }
p { margin: 0 0 var(--space-3); max-width: 65ch; }
.label { font: 600 var(--step--1)/1.3 var(--font-text); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--space-2); }

/* Buttons: one primary per screen (Join the beta list). Secondary is a text link with an arrow, never a second filled button. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; font: 600 var(--step-0)/1 var(--font-text); background: var(--accent); color: var(--on-accent); padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius); text-decoration: none; cursor: pointer; transition: background-color 120ms ease-out; }
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.link-arrow { font-weight: 600; }
.link-arrow::after { content: " \2192"; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }

/* Hero: text left, the real recording right. The frame runs off the right edge from 64rem up; below that it stacks under the text. */
.hero { display: grid; gap: var(--space-6); padding: var(--space-6) 0 var(--space-7); }
.frame { position: relative; margin: 0; background: var(--board); border-radius: var(--radius); padding: var(--space-2); box-shadow: var(--shadow-frame); }
.frame video, .frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 4px); background: var(--surface); }
.frame-caption { font-size: var(--step--1); color: var(--muted); margin: var(--space-2) 0 0; }
@media (min-width: 64rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--space-6); }
  .hero .frame { margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--page)) / 2))); border-radius: var(--radius) 0 0 var(--radius); padding-right: 0; }
  .hero .frame img, .hero .frame video { border-radius: calc(var(--radius) - 4px) 0 0 calc(var(--radius) - 4px); }
}

/* Path cards (home): the whole card is the link. Flat at rest, raised on hover, so depth means "you can click this". */
.paths { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .paths { grid-template-columns: 1fr 1fr; } }
.path-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); color: var(--ink); text-decoration: none; transition: box-shadow 120ms ease-out, border-color 120ms ease-out; }
.path-card:hover { color: var(--ink); border-color: var(--field-line); box-shadow: var(--shadow-raise); }
.path-card h3 { font: 400 var(--step-2)/1.25 var(--font-display); margin: 0 0 var(--space-2); }
.path-card p { color: var(--muted); margin: 0 0 var(--space-4); }
.path-card .link-arrow { color: var(--accent); }

/* Fact strip: four short promises, separated by space, not icons or dividers. */
.facts { display: grid; gap: var(--space-3) var(--space-5); margin: var(--space-6) 0 0; padding: 0; list-style: none; font-size: var(--step--1); color: var(--muted); }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(4, auto); justify-content: start; } }
.facts li { margin: 0; }

/* Steps: numbered, the number in Georgia so the list reads as three moves, not a bulleted wall. */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 var(--space-6); display: grid; gap: var(--space-4); max-width: 65ch; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: var(--space-3); margin: 0; }
.steps li::before { content: counter(step); font: 400 var(--step-2)/1.1 var(--font-display); color: var(--muted); }

/* Example card: labelled as an example, never styled as a testimonial (no quote marks, no avatar). */
.example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4) var(--space-5); max-width: 65ch; }
.example p:last-child { margin-bottom: 0; }

/* Beta list form: one required field. Labels above fields, sentence case. Max 28rem wide. */
.beta { background: var(--board); border-radius: var(--radius); padding: var(--space-6) var(--space-4); }
@media (min-width: 48rem) { .beta { padding: var(--space-7); } }
.beta h2 { margin-bottom: var(--space-3); }
.beta > p { color: var(--muted); }
.form { display: grid; gap: var(--space-4); max-width: 28rem; margin-top: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label { font: 600 var(--step--1)/1.3 var(--font-text); }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select { font: 400 var(--step-0)/1.3 var(--font-text); color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius); min-height: 3rem; padding: var(--space-2) var(--space-3); width: 100%; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field .error { color: var(--error); font-size: var(--step--1); margin: 0; }
.form .button { justify-self: start; }
.fine { font-size: var(--step--1); color: var(--muted); margin: 0; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.site-nav [aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.hero-note { font-size: var(--step--1); color: var(--muted); margin: var(--space-3) 0 0; }
.frame-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-2) 0 0; }
.frame-bar .frame-caption { margin: 0; }
.frame-toggle { font: 600 var(--step--1)/1 var(--font-text); color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius); min-height: 2.75rem; padding: var(--space-2) var(--space-3); cursor: pointer; flex-shrink: 0; }
.frame-toggle:hover { border-color: var(--ink); }
@media (min-width: 64rem) { .hero .frame-bar { padding-right: var(--space-5); } }
.field input[aria-invalid="true"] { border-color: var(--error); }
.button[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.form-status { margin: 0; }
.form-status:empty { display: none; }
.form-status[data-kind="error"] { color: var(--error); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* honeypot: hidden from people and screen readers, filled only by bots */
.joined { margin-top: var(--space-5); max-width: 28rem; }
.joined h3 { font: 400 var(--step-2)/1.25 var(--font-display); margin: 0 0 var(--space-2); }
.joined:focus { outline: none; }
.site-footer { padding: var(--space-6) 0; font-size: var(--step--1); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Hero with no recording beside it (the interim home page): one column at every width. */
@media (min-width: 64rem) { .hero.hero--solo { grid-template-columns: minmax(0, 1fr); } }
.privacy h2 { font-size: var(--step-2); margin: var(--space-6) 0 var(--space-3); }
.privacy ul { max-width: 65ch; padding-left: var(--space-4); margin: 0 0 var(--space-3); }
.privacy li { margin: 0 0 var(--space-2); }
