/* ==========================================================================
   Private Solutions, Night Desk briefing tokens.
   Homepage-scoped for now; interior pages migrate at their own redesign
   pass. Dark is the default reading (the night desk); html.theme-light is
   the daylight print of the same document.
   Contrast measured 2026-07-02, see docs/superpowers/plans/. Accent text
   sits on --color-bg only; on raised surfaces accent is marks, not text.
   ========================================================================== */

/* Source Serif 4: variable, latin subset, weights 400 and 600 used.
   The latin subset lacks U+2192 (arrows render in the fallback stack). */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* ---- Color: night desk (default) ---- */
  --color-bg: #0e1116;
  --color-bg-raised: #151a21;
  --color-text: #e8eaed;
  --color-text-muted: #9aa3ad;
  --color-accent: #c9612e;        /* 4.71:1 on ground; annotation only */
  --color-accent-hover: #d4703c;  /* 5.57:1 on ground */
  --color-on-accent: #0e1116;     /* button text on accent fill, 4.71:1 */
  --color-hairline: #262c35;
  --color-focus: var(--color-accent);

  /* ---- Type ---- */
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --weight-display: 600;
  --weight-display-regular: 400;
  --weight-body: 400;
  --weight-body-bold: 600;

  /* ---- Scale (briefings are quieter than marketing pages) ---- */
  --text-h1: 44px;      --leading-h1: 52px;
  --text-h2: 30px;      --leading-h2: 38px;
  --text-h3: 22px;      --leading-h3: 30px;
  --text-body: 16.5px;  --leading-body: 1.65;
  --text-meta: 12px;    --tracking-meta: 0.08em;
  --text-wire: 11px;    --tracking-wire: 0.14em;
  --text-figure: 34px;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --rail-width: 112px;  /* fits the direct-line margin note in mono 11px */
  --measure: 68ch;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;
  --radius: 0;
  --hairline: 1px solid var(--color-hairline);

  /* ---- Motion (transform/opacity only) ---- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-micro: 160ms;
  --duration-reveal: 600ms;
  --wire-duration: 55s;
}

/* ---- Daylight print ---- */
.theme-light {
  color-scheme: light;
  --color-bg: #f4f5f7;
  --color-bg-raised: #ffffff;
  --color-text: #14171c;
  --color-text-muted: #4c5560;
  --color-accent: #a84e20;        /* 5.10:1 on ground */
  --color-accent-hover: #8f4118;
  --color-on-accent: #ffffff;     /* 5.56:1 on accent fill */
  --color-hairline: #d3d8de;
}

/* ---- Hero map: Toronto street map tokens (Step 0.5) ----
   Dark values ride the night desk default; light values are the locked
   source palette of assets/maps/toronto_map_light_clean.min.svg. The
   spec table is byte-authoritative for both columns; do not tune. ---- */
:root {
  --map-bg: #16181d;
  --map-residential: #1b1e24;
  --map-land-alt: #20232a;
  --map-industrial: #1f2228;
  --map-poi: #242730;
  --map-park: #223028;
  --map-forest: #1f2b24;
  --map-grass: #25332b;
  --map-green-alt: #223028;
  --map-wetland: #1e2a2c;
  --map-water: #1d3a4d;
  --map-water-line: #2a4a5f;
  --map-fine-detail: #2e333c;
  --map-minor-road: #2a2f37;
  --map-major-road: #48505e;
  --map-major-border: #3a414d;
  --map-secondary: #414957;
  --map-secondary-border: #363d49;
  --map-motorway: #566076;
  --map-motorway-border: #454e61;
  --map-casing: #333944;
  --map-rail: #3b414c;
  --map-road-highlight: #525c6e;
}

.theme-light {
  --map-bg: #f1f0ec;
  --map-residential: #ecebe7;
  --map-land-alt: #e8e4da;
  --map-industrial: #e5e3de;
  --map-poi: #eae3d3;
  --map-park: #c4e5ba;
  --map-forest: #b9dfaf;
  --map-grass: #d4ebc8;
  --map-green-alt: #c9e7be;
  --map-wetland: #d8e8e4;
  --map-water: #a9d6ee;
  --map-water-line: #9ccbe6;
  --map-fine-detail: #d3d6db;
  --map-minor-road: #dddfe4;
  --map-major-road: #c9ced8;
  --map-major-border: #b4bac6;
  --map-secondary: #c4cad5;
  --map-secondary-border: #aeb5c3;
  --map-motorway: #afb7c5;
  --map-motorway-border: #98a0af;
  --map-casing: #c0c4cc;
  --map-rail: #b4b8c0;
  --map-road-highlight: #ffffff;
}

/* ---- Hero tracking overlay (Part D): subject in neutral ink, each
   investigator in its own signal colour, UAS in the accent step.
   Checkpoint (e) verdict 2026-07-04: distinct investigator colours. ---- */
:root {
  --track-subject: #e8eaed;
  --track-inv1: #d4703c;
  --track-inv2: #8fb4d9;
  --track-uas: #e08a5a;
  --track-label: #9aa3ad;
  --track-inv1-halo: rgba(212, 112, 60, 0.16);
  --track-inv2-halo: rgba(143, 180, 217, 0.16);
}
.theme-light {
  --track-subject: #14171c;
  --track-inv1: #a84e20;
  --track-inv2: #2e6091;
  --track-uas: #8f4118;
  --track-label: #4c5560;
  --track-inv1-halo: rgba(168, 78, 32, 0.14);
  --track-inv2-halo: rgba(46, 96, 145, 0.12);
}

/* ---- Hero globe (Raven 2026-07-04: the globe reads light in the light
   theme). Dark set = the shipped space look, byte-identical to the old
   hardcoded palette; light set mirrors it on the paper ground, occluder
   one step off the page background the way the dark one is. ---- */
:root {
  --globe-occluder: #11141a;
  --globe-land: #9aa3ad;
  --globe-network: #c9612e;
  --globe-toronto: #d4703c;
}
.theme-light {
  --globe-occluder: #eceef1;
  --globe-land: #4c5560;
  --globe-network: #a84e20;
  --globe-toronto: #8f4118;
}

/* ---- Mobile scale ---- */
@media (max-width: 720px) {
  :root {
    --text-h1: 30px;   --leading-h1: 38px;
    --text-h2: 26px;   --leading-h2: 34px;
    --text-h3: 20px;   --leading-h3: 28px;
    --text-body: 16px;
    --text-figure: 28px;
  }
}

/* ---- Reduced motion: static everywhere ---- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-micro: 0ms;
    --duration-reveal: 0ms;
  }
}
