/* ============================================================================
   Suddenly Sorted — canonical design tokens (SINGLE SOURCE OF TRUTH)
   Shared by chat-widget (product) and deploy-final (marketing).
   Keep the two copies byte-identical:  diff chat-widget/public/tokens.css deploy-final/tokens.css
   Edit tokens HERE, never in a page's own :root block.
   Layers:  PRIMITIVES (brand constants) -> SEMANTIC (canvas/ink/line, per surface mode)
            -> SCALES (radius / shadow / type / focus / motion) -> STATUS pairs.
   Adoption is incremental: ss-ui.css @imports this (product), marketing pages link it.
   ============================================================================ */

:root{
  /* ---------- PRIMITIVES · brand constants (identical in every mode) ---------- */
  --brand-forest:#2D4A35; --brand-forest-deep:#22392A; --brand-forest-tint:#E7EFE8; --brand-forest-line:#C4D6C6;
  --brand-terra:#C4603A;  --brand-terra-dk:#A04826;
  --brand-cream:#F5F0E5;  --brand-cream-dk:#E8E2D3;
  --brand-ink:#1C1612;
  --brand-gold:#E5A663;   /* THE single gold (reconciled; old product C0 used #B08A3E) */
  --brand-amber-deep:#B06E1E; --brand-amber-tint:#FAF1DF; --brand-amber-line:#E8D49B; /* dashboard amber family */
  --brand-sage:#4E6256;   /* the calm green on book.html — a named token, NOT terra */
  --on-forest:#F5F0E5;    /* text / CTA on a forest ground */

  /* aliases: the names existing code (ss-ui.css, dashboard, pages) already uses */
  --forest:var(--brand-forest); --forest-deep:var(--brand-forest-deep);
  --forest-tint:var(--brand-forest-tint); --forest-line:var(--brand-forest-line);
  --terra:var(--brand-terra); --terra-dk:var(--brand-terra-dk);
  --cream:var(--brand-cream); --cream-dk:var(--brand-cream-dk);
  --gold:var(--brand-gold);

  /* ---------- SEMANTIC · WARM  (default — marketing + booking) ---------- */
  --bg:#FAF9F6; --surface:#FFFFFF; --surface-2:#F2EFE9; --surface-3:#EAE6DE;
  --ink:#1C1612; --ink-soft:#4A3F36; --muted:#6B5E50; --faint:#A89A8C;
  --line:rgba(28,22,18,.12); --line-soft:rgba(28,22,18,.08); --line-strong:rgba(28,22,18,.20);

  /* ---------- SCALES ---------- */
  --radius-xs:4px; --radius-sm:6px; --radius-md:8px; --radius-lg:10px; --radius-xl:12px;
  --radius-2xl:14px; --radius-3xl:20px; --radius-pill:999px;
  --sh-1:0 1px 2px rgba(28,22,18,.05),0 1px 1px rgba(28,22,18,.04);
  --sh-2:0 1px 2px rgba(28,22,18,.05),0 8px 24px -16px rgba(28,22,18,.18);
  --sh-pop:0 12px 32px -12px rgba(28,22,18,.24);
  --focus:0 0 0 3px rgba(196,96,58,.28);        /* the ONE focus ring */
  --ease:cubic-bezier(.2,.8,.3,1); --dur:.15s;
  --display:'Geist',system-ui,-apple-system,"Segoe UI",sans-serif;   /* no Newsreader */
  --ui:'Hanken Grotesk',system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:'Spline Sans Mono',ui-monospace,Menlo,monospace;

  /* ---------- STATUS · bg + text pairs ---------- */
  --ok-bg:#E4F0E6;   --ok-tx:#2F6A3B;
  --warn-bg:#FBEBD2; --warn-tx:#8A5A12;
  --bad-bg:#F8E1DC;  --bad-tx:#A33A2A;
  --info-bg:#E7EEF1; --info-tx:#3F6272;
}

/* ---------- SEMANTIC · COOL  (owner dashboard — Rey-approved cool-neutral 2026-09) ----------
   Triggered by the dashboard's existing html[data-ios-app], or opt-in [data-surface="cool"]. */
:root[data-ios-app], [data-surface="cool"]{
  --bg:#F5F7F9; --surface:#FFFFFF; --surface-2:#EDF0F3; --surface-3:#E3E8EC;
  --cream:#EDF0F3;
  --ink:#1A1D22; --ink-soft:#3A4049; --muted:#59606B; --faint:#8A919C;
  --line:rgba(26,29,34,.12); --line-soft:rgba(26,29,34,.08); --line-strong:rgba(26,29,34,.20);
}

/* ---------- DARK  (OPT-IN only: set <html data-theme="dark"> on a product surface).
   Deliberately NOT prefers-color-scheme: marketing links this file and must stay light,
   so dark never applies unless a page asks for it. ---------- */
:root[data-theme="dark"]{
  --forest-tint:#1F2E24; --forest-line:rgba(127,185,140,.35);
  --cream:#2A2622; --cream-dk:#38322C;
  --bg:#14120F; --surface:#1A1817; --surface-2:#232120; --surface-3:#2C2925;
  --ink:#ECECE7; --ink-soft:#C8C6C0; --muted:#9A8D7C; --faint:#6B5E50;
  --line:rgba(255,255,255,.09); --line-soft:rgba(255,255,255,.06); --line-strong:rgba(255,255,255,.16);
  --ok-bg:#1E3324; --ok-tx:#8FD09B; --warn-bg:#3A2B12; --warn-tx:#F0C27A;
  --bad-bg:#3B1F1A; --bad-tx:#F0A08E; --info-bg:#1E2B31; --info-tx:#8FB5C4;
}

/* ---------- LEGACY COMPAT · names the hand-built marketing pages still reference ----------
   Additive aliases, each carrying the page's EXISTING value, so a page can link this file
   and drop its own copy of these with zero pixel change. This is NOT the canonical scale —
   new work uses the --radius-* / --ease / --display tokens above. Page-local scratch vars
   (--sw-*, --fdr-*, --pa-*, --paper, --lime, --news …) and genuinely drifted values stay
   in the page on purpose; they are not shared tokens. ---------- */
:root{
  /* motion — the marketing pages' own curves + duration scale */
  --ease-out:cubic-bezier(.2,.8,.2,1); --ease-glide:cubic-bezier(.4,0,.2,1); --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --dur-1:120ms; --dur-2:240ms; --dur-3:400ms;
  /* radius ladder — marketing scale 12/16/24/pill (distinct from --radius-* above) */
  --r-sm:12px; --r-md:16px; --r-lg:24px; --r-pill:100px;
  /* the tall marketing drop shadow */
  --shadow:0 1px 2px rgba(28,22,18,.06), 0 40px 80px -44px rgba(0,0,0,.55);
  /* forest "night" sections — brighter forest + cream hairlines on a dark ground */
  --forest-bright:#37593F;
  --nt-hair:rgba(245,240,229,.14); --nt-dim:rgba(245,240,229,.78); --nt-dimmer:rgba(245,240,229,.55);
  /* legacy font aliases — the shorter stacks the pages declared */
  --geist:'Geist',system-ui,sans-serif; --hanken:'Hanken Grotesk',system-ui,sans-serif;
}
