/* Throughline design-token manifest v1
 * Source of truth: agents/kristoff/deliverables/throughline-brandbook-token-manifest-v1.md
 * Traces to spine v1.2 RATIFIED (#7496). House style: zero em dashes (holds here too).
 * Owner of values: Kristoff (brand/identity lane). Owner of wiring: Zara (build lane).
 * Posture: a craft studio that keeps receipts, not a startup that raised a round.
 * Warm-paper base, one decisive accent, editorial type, tight corners, real imagery or none.
 *
 * GATE: internal Wave 1 identity. Clears BRG, then Teej per-wave, before any public surface uses it.
 * Contrast notes are AA targets; the build pass must confirm with a checker before any surface goes live.
 */

:root {
  /* 1 - Color (light is the primary surface) */
  --tl-color-ink: #1A1714;            /* primary text, warm near-black, ~15:1 on surface */
  --tl-color-surface: #FAF8F2;        /* page background, warm paper white */
  --tl-color-surface-raised: #FFFFFF; /* cards/receipts, pair with hairline border not heavy shadow */
  --tl-color-primary: #16302B;        /* deep evergreen ink, structural, ~14:1 as text on surface */
  --tl-color-primary-tint: #2C4D45;   /* hover/active step up from primary */
  --tl-color-accent: #BD5B2E;         /* burnt clay, the one accent, CTAs/inspect affordance, reserve from body */
  --tl-color-muted: #6E685E;          /* secondary text, captions, metadata, ~4.9:1 (AA normal) */
  --tl-color-border: #E4DFD3;         /* hairline rules, card edges, dividers */
  --tl-color-link: #16302B;           /* = primary, underlined; hover shifts to accent */
  --tl-color-success: #2E6F4E;        /* form/widget success, gate-pass states */
  --tl-color-warning: #B8841F;        /* caution, develop-then-approve unpriced notes */
  --tl-color-error: #A8341F;          /* form/widget error */

  /* 2 - Type (editorial pairing, all open-licensed and self-hostable) */
  --tl-type-display: "Fraunces", Georgia, "Times New Roman", serif;   /* headlines, hero, agent + founder names */
  --tl-type-body: "Hanken Grotesk", system-ui, sans-serif;            /* body, UI, sub-heads (humanist, NOT geometric) */
  --tl-type-mono: "IBM Plex Mono", ui-monospace, monospace;           /* the receipt/proof face, use tabular-nums */

  /* Scale (16px root). size / line-height / family per token. */
  --tl-text-display-size: 3.815rem;  --tl-text-display-lh: 1.02;  /* hero, tracking -0.02em, clamp down on mobile */
  --tl-text-h1-size: 3.052rem;       --tl-text-h1-lh: 1.06;       /* tracking -0.015em */
  --tl-text-h2-size: 2.441rem;       --tl-text-h2-lh: 1.12;
  --tl-text-h3-size: 1.563rem;       --tl-text-h3-lh: 1.25;       /* body family, weight 600 */
  --tl-text-lead-size: 1.25rem;      --tl-text-lead-lh: 1.55;
  --tl-text-body-size: 1rem;         --tl-text-body-lh: 1.65;     /* generous leading = editorial calm */
  --tl-text-small-size: 0.8rem;      --tl-text-small-lh: 1.5;
  --tl-text-receipt-size: 0.9rem;    --tl-text-receipt-lh: 1.5;   /* mono, tabular nums, gate-log aesthetic */

  /* 4 - Spacing (8px-based, tight low end) */
  --tl-space-1: 0.25rem;  /* 4px */
  --tl-space-2: 0.5rem;   /* 8px */
  --tl-space-3: 0.75rem;  /* 12px */
  --tl-space-4: 1rem;     /* 16px */
  --tl-space-5: 1.5rem;   /* 24px */
  --tl-space-6: 2rem;     /* 32px */
  --tl-space-7: 3rem;     /* 48px */
  --tl-space-8: 4rem;     /* 64px */
  --tl-space-9: 6rem;     /* 96px */
  --tl-space-10: 8rem;    /* 128px */

  /* Radius (tight and editorial, anti-pill, anti-SaaS) */
  --tl-radius-sm: 2px;    /* inputs, tags, receipt chips */
  --tl-radius-md: 5px;    /* cards, buttons, media (the default) */
  --tl-radius-lg: 10px;   /* large panels only */
  --tl-radius-pill: 999px;/* reserved, a single nav CTA at most */

  /* Breakpoints + container */
  --tl-bp-sm: 480px;
  --tl-bp-md: 768px;
  --tl-bp-lg: 1024px;
  --tl-bp-xl: 1280px;
  --tl-container-max: 1140px;
  --tl-measure: 68ch;     /* max reading width for prose, editorial brands protect the measure */

  /* Elevation (restraint over lift). One soft shadow at most. */
  --tl-shadow-soft: 0 1px 2px rgba(26, 23, 20, 0.06);

  /* Logo (see agents/kristoff/deliverables/brand/*.svg, currentColor only, no baked fill) */
  --tl-logo-clearspace: 1em;  /* = cap-height of the T, scale with font-size of the lockup context */
  --tl-logo-wordmark-min: 120px;
  --tl-logo-glyph-min: 24px;
}

/* Dark mode (provisional, AA-target, confirm contrast in build) */
@media (prefers-color-scheme: dark) {
  :root {
    --tl-color-surface: #14130F;
    --tl-color-surface-raised: #1F1D18;
    --tl-color-ink: #F2EEE4;
    --tl-color-primary: #7FBFA6;   /* lifted evergreen for contrast on dark */
    --tl-color-accent: #D9774A;
    --tl-color-muted: #A7A095;
    --tl-color-border: #34312A;
    --tl-color-link: #7FBFA6;
  }
}

/* Anti-brief, binding (not tokens, but the law the tokens serve):
 * no gradients as brand surface, no glow, no neon. One accent, used sparingly.
 * Zero stock photography, zero AI-generated imagery (credibility gate, item 5).
 * If it looks like a SaaS landing page, it is wrong.
 */
