/* =============================================================================
   Routeless design tokens — the single source of truth for color and type
   -----------------------------------------------------------------------------
   Loaded by every surface: the main site (base.html) and the standalone
   conversion landings, which previously each declared their own near-copy of
   this palette and drifted apart on violet, rule, and muted values.

   Concept: Routeless = many possible routes, one clear path (see logo).
   Dark ink chrome, porcelain body, a single flat violet used like a
   highlighted route on a map. No gradients. No glows.

   Load order on the main site is styles.css -> tokens.css, because the legacy
   bridge at the bottom has to outrank the original dark-theme :root.
   ============================================================================= */

:root {
    --v2-ink: #17131f;
    --v2-ink-2: #211b2e;
    --v2-ink-line: #2e2740;
    --v2-ink-text: #f0edf5;
    --v2-ink-soft: #a89fbc;
    /* Muted body copy on ink. One step down from --v2-ink-soft, still above
       4.5:1 against --v2-ink. */
    --v2-ink-muted: #8e86a3;

    --v2-paper: #f2f1f4;
    --v2-card: #ffffff;
    --v2-wash: #e9e4f4;
    --v2-line: #dbd7e2;
    --v2-line-strong: #c9c4d6;
    --v2-text: #1c1726;
    --v2-muted: #5d5768;

    --v2-violet: #6d28d9;
    --v2-violet-deep: #581cad;
    --v2-violet-bright: #8b5cf6;
    --v2-violet-soft: #c9b8f0;

    /* semantic colors tuned for light surfaces */
    --v2-good: #15803d;
    --v2-warn: #b45309;
    --v2-bad: #dc2626;

    /* The same three readings on ink. Light-surface semantics are too dark to
       register there, so each one gets a soft text tone and a solid indicator
       fill rather than being reused at the wrong contrast. */
    --v2-good-soft: #86efac;
    --v2-good-bright: #22c55e;
    --v2-warn-soft: #fcd34d;
    --v2-warn-bright: #f59e0b;
    --v2-bad-soft: #fca5a5;
    --v2-bad-bright: #ef4444;

    /* Tints for inline notices, which need a wash of the semantic color rather
       than the color itself. */
    --v2-good-tint: #eaf6ee;
    --v2-bad-tint: #fdf1f1;
    --v2-bad-line: #f2c4c4;
    --v2-bad-text: #9f2d2d;

    --v2-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --v2-body: 'Instrument Sans', system-ui, sans-serif;
    --v2-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

    /* ---- Type scale ----------------------------------------------------
       Every display size resolves to one of these so heroes, section heads,
       and figures stay in step across marketing, research, tool, and landing
       pages instead of each block inventing its own clamp. */
    --v2-text-hero: clamp(2.75rem, 6vw, 4.75rem);
    --v2-text-hero-sm: clamp(2.75rem, 5vw, 4.25rem);
    --v2-text-page: clamp(2.25rem, 4.5vw, 3.5rem);
    --v2-text-title: clamp(2rem, 4vw, 3rem);
    --v2-text-figure: clamp(2.25rem, 4.5vw, 3.25rem);
    --v2-text-figure-sm: clamp(2rem, 3.5vw, 2.75rem);
    --v2-text-lede: 1.1875rem;
    --v2-text-ui: 1rem;
    --v2-text-meta: 0.8125rem;

    /* Three weights only: prose, headings, and display emphasis. */
    --v2-weight-body: 500;
    --v2-weight-heading: 600;
    --v2-weight-display: 650;

    --v2-container: 1200px;
    --v2-rail: 72px;
    --v2-gutter: clamp(1.125rem, 4vw, 4rem);
    --v2-section-y: clamp(5.5rem, 9vw, 8.5rem);
    --v2-radius: 10px;
    --v2-radius-lg: 16px;

    /* ---- Legacy token bridge -------------------------------------------
       styles.css still computes the apply, review, report, and thanks flows
       from the original dark-theme names. This file loads after it, so
       remapping them here makes the v2 palette authoritative for those pages
       without editing 4,000 lines of working functional CSS. */
    --font-display: var(--v2-display);
    --font-mono: var(--v2-mono);

    --bg-primary: var(--v2-paper);
    --bg-secondary: var(--v2-wash);
    --bg-tertiary: var(--v2-paper);
    --bg-card: var(--v2-card);
    --bg-card-hover: var(--v2-wash);

    --border-primary: var(--v2-line);
    --border-secondary: var(--v2-line);
    --border-accent: var(--v2-muted);
    /* Referenced by the apply consent blocks but never defined before v2. */
    --border-subtle: var(--v2-line);

    --text-primary: var(--v2-text);
    --text-secondary: var(--v2-muted);
    --text-muted: var(--v2-muted);
    --text-accent: var(--v2-violet);

    --accent-primary: var(--v2-violet);
    --accent-secondary: var(--v2-violet-deep);
    --accent-tertiary: var(--v2-violet-bright);
    --accent-glow: var(--v2-wash);

    --success: var(--v2-good);
    --warning: var(--v2-warn);
    --error: var(--v2-bad);

    /* v2 has no gradients or glows; the legacy names resolve to flat values
       so any rule still reading them lands on the route violet. */
    --gradient-primary: var(--v2-violet);
    --gradient-subtle: var(--v2-wash);
    --gradient-radial: none;
    --shadow-glow: none;

    --container-max: var(--v2-container);
    --radius-md: var(--v2-radius);
    --radius-lg: var(--v2-radius-lg);
}
