/* Figtree (Open Font License, fonts/figtree-OFL.txt), served from this site: the security header
   allows fonts from nowhere else. One variable file covers every weight from 300 to 900. Chosen on the
   founder's instruction to read like Guesty, which uses it: a light, open face rather than the
   computer's own system font, which made every bold heading look heavy. */
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* Design tokens: every colour, size and timing the site uses, in one place.
 * Light is the default. Dark follows the visitor's system setting, or <html data-theme="dark">.
 * The dark block appears twice on purpose (system setting, and the explicit attribute). The test
 * test/contrast.test.mjs checks the two copies match and that every text pair passes WCAG AA. */

:root {
  color-scheme: light;

  /* Surfaces and text. The palette of a Georgian townhouse in the Scottish capital (13 Nov 2026):
     pale sandstone, ivory plaster, slate and ironwork, and the deep blue of a New Town front door. */
  --bg: #f3ede2;
  --surface: #fffdf8;
  --surface-2: #e9e0d0;
  --ink: #1b232d;
  --ink-2: #333e4a;
  --muted: #525c66;
  --line: #d9cebb;
  --line-strong: #b8ab93;

  /* Brand */
  --accent: #1c3f66;
  --accent-hover: #142f4e;
  --accent-ink: #ffffff;
  /* The brand mark: see .brand__tile in css/chrome.css. Its own pair rather than --accent used
     directly, so the mark can be changed without moving every blue on the site with it. */
  --mark-ground: #1c3f66;
  --mark-glass: #ffffff;
  --accent-soft: #e1e6ea;
  --focus: #1c3f66;

  /* Status chips: text, fill, outline */
  --live-fg: #0f5132;
  --live-bg: #dcf2e5;
  --live-line: #7fc29c;
  --built-fg: #6b4300;
  --built-bg: #fbecc8;
  --built-line: #dfb55a;
  --planned-fg: #38485f;
  --planned-bg: #e6eaf2;
  --planned-line: #9fadc4;

  /* Time-of-day colours for the walkthrough background (dawn at --t 0, night at --t 1) */
  --day-a: #f8ecd6;
  --day-b: #e6e3da;
  --day-c: #20305a;

  /* Type */
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Headings are set in a Georgian-era book face. Georgia ships with every computer, so no font file is added. */
  --font-serif: Georgia, "Times New Roman", "Liberation Serif", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* Set smaller on 2026-10-28: at 16px body and 18px subheads the pages read as a brochure with the
     volume up. A trade site is quieter than that - 15px body, headings a step down - and the same
     words then take less room, which is most of what made the pages feel long. 13px is the floor
     (typography-and-reveal.test.mjs holds it) and nothing but small print goes there. */
  --fs--1: 0.8125rem;
  --fs-0: 0.9375rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.0625rem;
  --fs-3: clamp(1.25rem, 3.6vw, 1.375rem);
  --fs-4: clamp(1.75rem, 4.8vw, 2.25rem);
  --lh-tight: 1.25;
  --lh-body: 1.6;

  /* Space and shape */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --gutter: 16px;
  --wrap: 1120px;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgb(60 45 20 / 10%);
  --shadow: 0 1px 2px rgb(60 45 20 / 7%), 0 10px 28px rgb(60 45 20 / 11%);
  --header-h: 60px;
  --target: 44px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 140ms;
  --t-base: 280ms;
  --t-slow: 560ms;

  /* Layers */
  --z-header: 50;
  --z-progress: 60;
  --z-skip: 100;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1080px) {
  :root { --header-h: 68px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1220;
    --surface: #111c2f;
    --surface-2: #16243b;
    --ink: #e8eefb;
    --ink-2: #cdd8ee;
    --muted: #a3b2cc;
    --line: #26354f;
    --line-strong: #3a4c6c;
    --accent: #7ea8ff;
    --accent-hover: #a2c0ff;
    --accent-ink: #06101f;
    --mark-ground: #7ea8ff;
    --mark-glass: #06101f;
    --accent-soft: #172846;
    --focus: #9dbcff;
    --live-fg: #8fe0b0;
    --live-bg: #0f3324;
    --live-line: #2f7a55;
    --built-fg: #f2c46d;
    --built-bg: #3a2b0d;
    --built-line: #8a6a20;
    --planned-fg: #b9c6de;
    --planned-bg: #1e2c45;
    --planned-line: #4a5d80;
    --day-a: #2a2230;
    --day-b: #14223d;
    --day-c: #070d1a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 45%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1220;
  --surface: #111c2f;
  --surface-2: #16243b;
  --ink: #e8eefb;
  --ink-2: #cdd8ee;
  --muted: #a3b2cc;
  --line: #26354f;
  --line-strong: #3a4c6c;
  --accent: #7ea8ff;
  --accent-hover: #a2c0ff;
  --accent-ink: #06101f;
  --mark-ground: #7ea8ff;
  --mark-glass: #06101f;
  --accent-soft: #172846;
  --focus: #9dbcff;
  --live-fg: #8fe0b0;
  --live-bg: #0f3324;
  --live-line: #2f7a55;
  --built-fg: #f2c46d;
  --built-bg: #3a2b0d;
  --built-line: #8a6a20;
  --planned-fg: #b9c6de;
  --planned-bg: #1e2c45;
  --planned-line: #4a5d80;
  --day-a: #2a2230;
  --day-b: #14223d;
  --day-c: #070d1a;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 45%);
}
