/* Spanfold design tokens, version 2.0.0 (v5 site, November 2026).
   This file is the single source for every colour, font and timing value on the site.
   tools/build_package.py copies it into brand/tokens/ and generates tokens.json from it,
   so the website and the design system cannot drift apart.

   Naming: --sf-*    raw palette (what the colour is)
           --color-* roles (what the colour is for). Components use roles where one exists.
   Contrast figures are measured against --sf-paper (#F4F1EA) unless stated. */

:root{
  /* ---------- raw palette: paper and ink ---------- */
  --sf-paper:#F4F1EA;          /* page ground */
  --sf-paper-raised:#FBFAF6;   /* cards, tip card, evidence lines */
  --sf-card:#F1EEE6;           /* window cards, row hover */
  --sf-white:#FFFFFF;
  --sf-ink:#161614;            /* 16.1:1, headings and body */
  --sf-body:#3B3A35;           /* 10.1:1, running text */
  --sf-muted:#6B6A63;          /* 4.8:1, captions and labels */
  --sf-faint:#9A988F;          /* 2.6:1, decoration only, never text */
  --sf-grey:#888888;           /* hero figure plus marks, decoration only */

  /* ---------- raw palette: accent (brand) ---------- */
  --sf-accent:#D9431E;         /* 3.9:1. Brand mark, pulse, rules, borders, large display only */
  --sf-accent-ink:#B8381B;     /* 5.1:1, white on it 5.8:1. Links, small accent text, filled buttons */
  --sf-accent-soft:#E98466;    /* accent on dark panels */
  --sf-accent-wash:#F6DCD3;    /* "breach" pill ground */
  --sf-accent-deep:#A33117;    /* text on the accent wash, 5.4:1 */

  /* ---------- raw palette: demo window ---------- */
  --sf-w-ink:#1D211C;
  --sf-w-text:#3D423B;
  --sf-w-text-soft:#4B5049;
  --sf-w-muted:#626A60;      /* 4.6:1 or better on every window ground (was #7C8378 at 3.4:1) */
  --sf-w-faint:#A2A69E;        /* window icons only, decoration; never text */
  --sf-w-faint-on-dark:#9AA196;
  --sf-w-bg:rgba(248,246,240,.97);
  --sf-w-line:rgba(29,33,28,.1);
  --sf-w-line-strong:rgba(29,33,28,.16);
  --sf-window-assistant:#E2D8D3; /* fallback ground behind the hills photograph */

  /* ---------- raw palette: dark panels (code, phone sheet) ---------- */
  --sf-night:#1F241F;
  --sf-night-deep:#191B18;
  --sf-night-raised:#24271F;
  --sf-night-text:#E6E3D8;
  --sf-night-strip:#E9E5D8;
  --sf-night-mark:#F6DFB2;

  /* ---------- raw palette: greens ---------- */
  --sf-green:#335C45;
  --sf-green-wash:#E3EBE3;
  --sf-sage-wash:#E4ECE4;
  --sf-ok:#2F6B45;
  --sf-ok-wash:#E1EBE0;

  /* ---------- raw palette: ochre (a person decides) ---------- */
  --sf-warn:#A8741A;           /* 3.6:1, borders and dots only */
  --sf-ochre-ink:#7A5410;      /* 6.0:1, review-gate and known-limit text */
  --sf-ochre-ink-2:#7A5A1E;    /* scoreboard figures and tab fill */
  --sf-ochre-wash:#F1E2C4;
  --sf-ochre-wash-light:#FAF3E4;
  --sf-ochre-wash-mid:#F6EAD2;
  --sf-ochre-sheet:#EFE4CF;    /* phone screen 4 ground */

  /* ---------- raw palette: code pane syntax and window chrome ---------- */
  --sf-night-black:#0E100E;    /* phone code sheet */
  --sf-code-comment:#8C9A88;
  --sf-code-string:#D9B779;
  --sf-code-number:#9CC4A9;
  --sf-w-urlbar:#EEEBE3;
  --sf-w-rail-line:#B8C3B5;    /* trace row left edge */
  --sf-stage:#CFD6CC;          /* fallback ground behind the window photographs */
  --sf-window-policy:#D9CFD8;
  --sf-auto-wash:#DFEADF;      /* "auto" route pill */

  /* ---------- raw palette: small charts in the tip card ---------- */
  --sf-chart-sweep:#E8DCC4;
  --sf-chart-human:#C98AA0;
  --sf-chart-auto:#8FB59A;
  --sf-chart-before:#C9B48A;

  /* ---------- raw palette: issue ---------- */
  --sf-plum:#9B2C4F;           /* "issue" tag and bad figures in the tip card */
  --sf-whatsapp:#25D366;       /* third-party: WhatsApp brand green, used only for its logo link */

  /* ---------- roles ---------- */
  --color-page:var(--sf-paper);
  --color-surface:var(--sf-paper-raised);
  --color-text:var(--sf-ink);
  --color-text-body:var(--sf-body);
  --color-text-muted:var(--sf-muted);
  --color-decor:var(--sf-faint);
  --color-line:rgba(22,22,20,.16);
  --color-brand:var(--sf-accent);
  --color-action:var(--sf-accent-ink);
  --color-on-action:var(--sf-white);
  --color-focus:var(--sf-accent);      /* 3.9:1, meets 3:1 for non-text */
  --color-caution:var(--sf-ochre-ink);
  --color-caution-wash:var(--sf-ochre-wash);
  --color-caution-line:var(--sf-warn);
  --color-ok:var(--sf-ok);
  --color-ok-wash:var(--sf-ok-wash);
  --color-stop:var(--sf-accent-ink);
  --color-stop-wash:var(--sf-accent-wash);
  --color-stop-on-wash:var(--sf-accent-deep);
  --color-issue:var(--sf-plum);

  /* ---------- type ---------- */
  --font-sans:"Archivo",system-ui,sans-serif;
  --font-ui:"Geist",system-ui,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,monospace;
  --font-ui-mono:"Geist Mono",ui-monospace,monospace;

  /* ---------- motion ---------- */
  --ease:cubic-bezier(.2,.7,.2,1);
}
