/* AGSIX design tokens · master v1.0 · 2026-12-02
   Companion to brand/BRAND.md. Fonts are self-hosted (SIL OFL); no third-party requests. */

/* ---------- Fonts (self-hosted woff2, Latin subset) ---------- */
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Surfaces */
  --bg-canvas: #F9F9F8;          /* daylight sections */
  --bg-surface: #FFFFFF;         /* cards, panels */
  --bg-subtle: #F4F4F5;          /* wells, stripes */
  --bg-proof: #0F1419;           /* dark bands (hero, inside-your-walls, footer) + product window */
  --bg-proof-elevated: #161D24;  /* panels inside dark */

  /* Ink */
  --ink-primary: #09090B;
  --ink-secondary: #52525B;      /* 7.0:1 even on --bg-subtle */
  --ink-muted: #71717A;          /* canvas/white only (4.6–4.8:1); never on --bg-subtle */
  --ink-inverse: #F9FAFB;        /* on dark, 17.7:1 */
  --ink-muted-on-dark: #A1A1AA;  /* on dark, 7.2:1; never #71717A on dark */

  /* Borders */
  --border-subtle: #E4E4E7;
  --border-strong: #D4D4D8;
  --border-proof: #26303A;

  /* Signals: functional only, never decorative */
  --accent-verified: #059669;          /* logo square, icons, shapes; NOT text (3.8:1) */
  --accent-verified-text: #047857;     /* verified text + citation badges on light (5.5:1) */
  --accent-verified-bg: #ECFDF5;
  --accent-verified-on-dark: #10B981;  /* all verified signals on dark (7.3:1) */
  --accent-refusal: #B45309;           /* small marker beside "not in this data" */
  --accent-refusal-bg: #FFFBEB;
  --accent-error: #B91C1C;             /* real system failures only, never refusals */
  --accent-error-bg: #FEF2F2;

  /* Chart series (lightness-ordered; green only for the verified value) */
  --chart-1: #09090B;
  --chart-2: #52525B;
  --chart-3: #A1A1AA;
  --chart-4: #D4D4D8;
  --chart-highlight: var(--accent-verified);

  /* Font families */
  --font-wordmark: "Space Grotesk", sans-serif;   /* wordmark is outlined SVG; this is for fallback only */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale (desktop) */
  --text-display: 88px;  --lh-display: 1.0;
  --text-h1: 64px;       --lh-h1: 1.05;
  --text-h2: 40px;       --lh-h2: 1.1;
  --text-h3: 24px;       --lh-h3: 1.25;
  --text-lead: 20px;     --lh-lead: 1.6;
  --text-body: 17px;     --lh-body: 1.55;
  --text-small: 14px;    --lh-small: 1.5;
  --text-mono: 14px;     --lh-mono: 1.5;
  --text-eyebrow: 13px;  --tracking-eyebrow: 0.12em;
  --tracking-display: -0.025em;
  --tracking-wordmark: 0.04em;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px; --space-32: 128px;

  /* Shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --border-width: 1px;
  /* Elevation: none. Separation by border and surface color only. */

  /* Focus */
  --focus-ring: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--ink-primary);
  --focus-ring-on-dark: 0 0 0 2px var(--bg-proof), 0 0 0 4px var(--ink-inverse);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 150ms;
  --dur: 250ms;

  /* Layout */
  --max-width: 1120px;
  --gutter: 24px;
  --bp-sm: 640px;  /* reference only: CSS custom properties can't be used in media queries */
  --bp-md: 960px;
  --bp-lg: 1280px;
  --touch-min: 44px;

  /* Logo geometry (100-unit viewBox; stroke scales with the mark) */
  --logo-stroke: 10;        /* standard, 48px and up */
  --logo-stroke-small: 13;  /* small variant, 16–40px */
}

/* Mobile type scale */
@media (max-width: 640px) {
  :root {
    --text-display: 48px;
    --text-h1: 40px;
    --text-h2: 30px;
    --text-h3: 21px;
    --text-lead: 18px;
    --text-body: 16px;
    --text-mono: 13px;
    --text-eyebrow: 12px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Base */
html { background: var(--bg-canvas); color: var(--ink-primary); font-family: var(--font-body); font-size: var(--text-body); line-height: var(--lh-body); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-display); }
code, kbd, .mono, .trace { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.band-dark :focus-visible { box-shadow: var(--focus-ring-on-dark); }
.band-dark { background: var(--bg-proof); color: var(--ink-inverse); }
