/* landing.css: the landing page (site/index.html) on the v4 design language
   (docs/notes/dashboard-redesign-v4.md, round L1). Loaded after site.css,
   which carries the shared header and the faces; everything below is this
   page only.

   The language in one paragraph: warm off white paper, hairlines, one ink,
   lots of air. A medium weight headline in two tones (the ink line, the soft
   line). Colour lives only on the bricks, and yellow only on the one glowing
   brick, the underline of the headline and the focus ring. No stud plates on
   buttons, no bands of colour, no outlines, nothing rotated. Light and dark
   follow the reader's system.

   The page is an instruction booklet: each section is a step (a small step
   number, a two tone title, one sentence) beside a brick scene one step
   further along. A scene is an inline SVG that is FINISHED as sent
   (scripts/build-landing-bricks.mjs draws it with the dashboard's engine);
   the page's one small script only plays its build. */
:root {
  --paper:#F7F6F2; --surface:#FFFFFF; --sunken:#F1EFE9; --line:#E6E3DA; --line-2:#D6D2C6;
  --ink:#1B1A17; --ink-2:#5F5B52; --ink-3:#6F6A5E;
  --yellow:#F5B800; --focus:#A67C00;
  --sans:"Archivo",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  /* the shared header (site.css) reads these */
  --page:var(--paper); --grid:var(--line); --muted:var(--ink-3);
  color-scheme:light;
}
/* Dark: the system's by default, or the header toggle's choice (theme.js
   sets data-theme on <html>), so the values are written for both. */
@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --paper:#131312; --surface:#1B1B19; --sunken:#171716; --line:#2B2A27; --line-2:#3A3935;
    --ink:#F2F0EA; --ink-2:#ABA69B; --ink-3:#958F84; --focus:#F5B800;
    color-scheme:dark;
  }
}
:root[data-theme="dark"] {
  --paper:#131312; --surface:#1B1B19; --sunken:#171716; --line:#2B2A27; --line-2:#3A3935;
  --ink:#F2F0EA; --ink-2:#ABA69B; --ink-3:#958F84; --focus:#F5B800;
  color-scheme:dark;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--paper); color:var(--ink); font:400 17px/1.55 var(--sans); -webkit-font-smoothing:antialiased; }
main { max-width:none; margin:0; padding:0; }
section { margin:0; scroll-margin-top:58px; }
a { color:inherit; }
p, ul, figure { margin:0; }
ul { padding:0; list-style:none; }
:focus-visible { outline:2px solid var(--focus); outline-offset:3px; border-radius:6px; }
.wrap, .topbar .wrap { max-width:1160px; margin:0 auto; padding-inline:clamp(20px,4vw,44px); }
h1, h2, h3 { margin:0; font-weight:500; text-wrap:balance; }
/* two tones: the claim in ink, the rest of the sentence soft, on its own line where the measure allows */
.soft { display:block; color:var(--ink-2); font-weight:400; }
.soft .ul { display:inline; }

/* the header's pill says the whole call to action where it fits and its two
   last words on a phone, so the brand, the pill and the gutter hold inside 320 */
.topbar nav .plate .short { display:none; }
@media (max-width:480px) { .topbar nav .plate .long { display:none; } .topbar nav .plate .short { display:inline; } }

/* the one button: an ink pill */
.btn { display:inline-flex; align-items:center; justify-content:center; height:46px; padding:0 24px; border-radius:999px; background:var(--ink); color:var(--paper); font:500 15px/1 var(--sans); text-decoration:none; white-space:nowrap; transition:opacity .12s; }
.btn:hover { opacity:.86; }
.cta { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }

/* a status line: a present fact, small and quiet, beside what it qualifies */
.status { font-size:13px; line-height:1.45; color:var(--ink-3); }

/* 01: the hero. On a desk it fills the first screen, so the fold holds the claim, one sentence, the one
   button and the status line, and the next step starts below it (the first fold stays under 65 words). */
.hero .wrap { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:24px; align-items:center; padding-block:clamp(28px,5vw,56px) clamp(40px,6vw,72px); }
h1 { font-size:clamp(34px,3.9vw,56px); line-height:1.04; letter-spacing:-.035em; }
.ul { background:linear-gradient(var(--yellow),var(--yellow)) 0 92%/100% .14em no-repeat; padding-bottom:.02em; }
.sub { margin-top:22px; font-size:19px; line-height:1.5; color:var(--ink-2); max-width:30ch; }
.hero .cta { margin-top:30px; }
.facts { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:28px; font-size:13px; color:var(--ink-2); }
.facts li { display:inline-flex; align-items:center; gap:8px; }
.facts li::before { content:""; width:6px; height:6px; border-radius:2px; background:var(--yellow); flex:none; }

/* a step */
.band { padding-block:clamp(56px,8vw,88px); border-top:1px solid var(--line); }
.stepno { font-size:12px; font-weight:500; line-height:1; letter-spacing:.08em; font-variant-numeric:tabular-nums; color:var(--ink-3); margin-bottom:14px; }
h2 { font-size:clamp(28px,3.4vw,44px); line-height:1.08; letter-spacing:-.03em; }
.intro { margin-top:14px; font-size:18px; color:var(--ink-2); max-width:46ch; }
.split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(24px,4vw,48px); align-items:center; }
.split.flip .scene { order:-1; }

/* 02: the four decisions */
.dec { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin-top:44px; }
.dec .d { min-width:0; padding:0 4px 8px; }
.dec .scene { max-width:220px; }
.lab { display:flex; align-items:center; gap:8px; font-size:11px; font-weight:500; line-height:1.3; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-2); }
.lab i { width:8px; height:8px; border-radius:2px; flex:none; }
/* the four decision colours, here only as the key to the brick above */
.c1 { background:#2F78D0; } .c2 { background:#1F9462; } .c3 { background:#DE4B43; } .c4 { background:#5A4BBE; }
h3 { font-size:21px; line-height:1.15; letter-spacing:-.02em; margin-top:8px; }
.dec .d > p:last-child { margin-top:8px; font-size:14px; color:var(--ink-2); }

/* 03: the chat as the person sees it, redrawn in the page's own hairlines */
.chat { margin-top:28px; max-width:420px; }
.thread { display:grid; gap:12px; padding:16px; font-size:14px; background:var(--surface); border-radius:16px; box-shadow:0 1px 2px rgba(27,26,23,.05), 0 0 0 1px var(--line); }
.thread .me { justify-self:end; background:var(--sunken); border-radius:14px; padding:7px 12px; }
.thread .it { color:var(--ink-2); }
.offer { display:grid; gap:8px; padding:14px; border-radius:12px; box-shadow:0 0 0 1px var(--line); }
.offer .via { font-size:11px; color:var(--ink-3); }
.offer .name { font-size:16px; font-weight:600; }
.offer .row { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-radius:10px; box-shadow:0 0 0 1.5px var(--ink); }
.offer .row small { display:block; font-size:12px; color:var(--ink-2); }
.offer .row b { font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; }
.chat .status { margin-top:10px; padding:0; text-align:left; }

/* 04: the bounds */
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.chips li { font-size:13px; padding:6px 12px; border-radius:999px; background:var(--surface); box-shadow:0 0 0 1px var(--line); }

/* 05: what is kept behind a fold is never deleted, only folded */
.folds { margin-top:24px; max-width:46ch; border-top:1px solid var(--line); }
.folds details { border-bottom:1px solid var(--line); }
.folds summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; font-size:15px; font-weight:500; cursor:pointer; list-style:none; }
.folds summary::-webkit-details-marker { display:none; }
.folds summary::after { content:"+"; font-size:18px; font-weight:400; line-height:1; color:var(--ink-3); }
.folds details[open] summary::after { content:"\2212"; }
.folds details p { font-size:14px; color:var(--ink-2); padding-bottom:12px; }

/* 06: the finished model, and the one call to action again */
.end .wrap { display:grid; justify-items:center; gap:18px; text-align:center; }
.end .stepno { margin:0; }
.end .scene { width:min(440px,100%); }
.end h2 { max-width:none; }
.end .intro { margin:0; max-width:40ch; }
.end .cta { justify-content:center; margin-top:6px; }
.end .status { max-width:none; }
.end .status + .status { margin-top:-12px; }

footer { margin:0; padding-block:26px 38px; border-top:1px solid var(--line); background:var(--paper); color:var(--ink-3); font-size:13px; text-align:left; }
footer .wrap { display:flex; flex-wrap:wrap; gap:8px 26px; justify-content:space-between; }
footer a { color:inherit; margin:0; }

/* ---------- the brick scenes ----------
   The class names inside a scene are the engine's (bks a seam, bkh a
   highlight, br a part that drops, halo the glow) and the build script's
   (f0, f1 … a face colour, written with the scenes). */
.bk-defs { position:absolute; }
.scene { min-width:0; }
.scene svg { display:block; width:100%; height:auto; overflow:visible; }
.bk [class^="f"] { stroke-width:.8; stroke-linejoin:round; }
.bks, .bkh { fill:none; stroke-width:1px; vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; }
.bks { stroke:#1B1A17; stroke-opacity:.2; } .bks.dk { stroke:#000; stroke-opacity:.5; }
.bkh { stroke:#fff; stroke-opacity:.3; } .bkh.dk { stroke-opacity:.14; } .bkh.bv { stroke-opacity:.34; } .bkh.bv.dk { stroke-opacity:.1; }
/* The build (landing rule 6): a part drops straight down and seats in 480 ms
   with a strong ease out, no bounce; parts of one layer follow 80 ms apart
   and layers 180 ms apart (each part's --d, written by the engine); the glow
   comes on 240 ms after the last part (--g) and then never moves. A scene
   builds once, when 35 percent of it is in view, and stays built. Only
   transform and opacity move, so nothing on the page shifts.
   `.js` is set before the first paint, and only where the build will run:
   without it (no script, reduced motion) every scene is the finished
   picture it was sent as. */
.js .scene:not(.play) .br, .js .scene:not(.play) .halo { opacity:0; }
.scene.play .br { animation:drop 480ms cubic-bezier(.22,1,.36,1) both; animation-delay:calc(var(--d) + var(--o, 0ms)); }
.scene.play .halo { animation:glow 700ms ease-out both; animation-delay:calc(var(--g) + var(--o, 0ms)); }
@keyframes drop { 0% { transform:translateY(-40px); opacity:0; } 33% { opacity:1; } 100% { transform:none; opacity:1; } }
@keyframes glow { from { opacity:0; } to { opacity:1; } }

@media (min-width:861px) { .hero .wrap { min-height:min(calc(100svh - 59px), 860px); } }
@media (max-width:860px) {
  .hero .wrap, .split { grid-template-columns:minmax(0,1fr); }
  .split.flip .scene { order:0; }
  .hero .scene, .split .scene { width:min(520px,100%); margin-inline:auto; }
  .dec { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 18px; }
  .sub { max-width:34ch; }
}
@media (max-width:480px) {
  body { font-size:16px; }
  h3 { font-size:19px; }
  .sub { font-size:18px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .btn { transition:none; }
  .scene .br, .scene .halo { animation:none !important; opacity:1 !important; }
}

/* ---------- the request form (round L2): a sheet, opened in place ----------
   A <dialog> docked to the end edge, full height: the browser keeps focus
   inside it, Escape closes it, and the page behind is inert. Surface,
   hairlines, one ink pill. Without a script it never opens and the links
   stay mailto. */
.sheet { width:min(440px,100vw); max-width:100vw; height:100dvh; max-height:100dvh; margin:0 0 0 auto; padding:0; border:0; overflow:auto;
  background:var(--surface); color:var(--ink); box-shadow:0 0 0 1px var(--line), -24px 0 60px -20px rgba(27,26,23,.25); }
.sheet::backdrop { background:rgba(27,26,23,.32); }
.sheet[open] { animation:sheet-in 220ms cubic-bezier(.22,1,.36,1); }
@keyframes sheet-in { from { transform:translateX(24px); opacity:0; } to { transform:none; opacity:1; } }
.sheet form, .sheet-done { display:grid; gap:18px; padding:26px clamp(20px,5vw,30px) 30px; }
.sheet form[hidden], .sheet-done[hidden] { display:none; }
.sheet-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.sheet h2 { font-size:24px; line-height:1.15; letter-spacing:-.02em; max-width:none; }
.sheet .x { display:grid; place-items:center; width:32px; height:32px; margin:-4px -6px 0 0; padding:0; border:0; border-radius:50%; background:transparent; color:var(--ink-2); cursor:pointer; flex:none; }
.sheet .x:hover { background:var(--sunken); color:var(--ink); }
.sheet .x svg { width:16px; height:16px; }
.sheet .lead { font-size:16px; color:var(--ink-2); margin-top:-8px; }
.field { display:grid; gap:6px; min-width:0; margin:0; padding:0; border:0; }
.field label, .field legend { font-size:13px; font-weight:500; color:var(--ink-2); padding:0; }
.field .opt { font-weight:400; color:var(--ink-3); }
.field input[type=email], .field input[type=text], .field textarea { width:100%; min-height:42px; padding:9px 12px; border:0; border-radius:10px; background:var(--paper); color:var(--ink);
  box-shadow:inset 0 0 0 1px var(--line-2); font:400 16px/1.4 var(--sans); }
.field textarea { resize:vertical; min-height:84px; }
.field input:focus-visible, .field textarea:focus-visible { outline:2px solid var(--focus); outline-offset:1px; border-radius:10px; }
.field [aria-invalid=true] { box-shadow:inset 0 0 0 1.5px var(--bad); }
.checks { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.checks label { display:inline-flex; align-items:center; gap:8px; padding:8px 14px 8px 10px; border-radius:999px; background:var(--paper); box-shadow:inset 0 0 0 1px var(--line-2); font-size:14px; font-weight:400; color:var(--ink); cursor:pointer; }
.checks input { width:16px; height:16px; margin:0; accent-color:var(--ink); }
.checks label:has(input:checked) { box-shadow:inset 0 0 0 1.5px var(--ink); }
.checks label:has(input:focus-visible) { outline:2px solid var(--focus); outline-offset:2px; }
.err { font-size:13px; line-height:1.4; color:var(--bad); }
.err a { color:inherit; }
.fine { font-size:13px; line-height:1.45; color:var(--ink-3); }
/* the field no person sees */
.hp { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.btn { border:0; cursor:pointer; }
.btn[disabled] { opacity:.45; cursor:default; }
.btn.quiet { background:transparent; color:var(--ink); box-shadow:inset 0 0 0 1px var(--line-2); }
:root { --bad:#B3261E; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) { --bad:#FF8A80; } }
:root[data-theme="dark"] { --bad:#FF8A80; }

/* ---------- the page a confirmation link opens (round L2) ----------
   The same page, showing only this: the finished model, one line, what
   happens next. html.confirming is set in the head before the first paint,
   so the landing itself never flashes behind it. */
.confirm { display:none; }
.confirming .confirm { display:block; border-top:0; }
.confirming main > section:not(.confirm), .confirming footer { display:none; }
/* Every line keeps its room and its width from the first paint (two lines for the title and the sentence,
   three for the small print, the button's height), so the answer arriving moves nothing. */
.confirm .wrap { display:grid; justify-items:center; gap:16px; text-align:center; align-content:start; padding-block:clamp(24px,6vh,72px) 72px; }
.confirm-scene { width:min(400px,100%); aspect-ratio:399.7 / 314.2; }
.confirm h1 { font-size:clamp(30px,3.6vw,46px); line-height:1.08; min-height:2.16em; width:min(16em,100%); max-width:none; display:grid; align-items:end; justify-items:center; }
.confirm h1:focus { outline:none; }
.confirm .intro { margin:0; width:min(40ch,100%); max-width:none; min-height:3.1em; }
.confirm .status { width:min(46ch,100%); max-width:none; min-height:4.35em; }
.confirm .status[hidden], .confirm .cta[hidden] { display:block; visibility:hidden; }
.confirm .cta { justify-content:center; margin-top:8px; min-height:46px; }
.confirm .cta:not([hidden]) { display:flex; }

@media (prefers-reduced-motion:reduce) { .sheet[open] { animation:none; } }
