/* adia:primitive/type — Type primitives + intent families (L1/L2).
   Font families, weight scale, leading + tracking curves, and the
   families-by-intent semantic layer. Moved verbatim out of typography.css
   (v0.6.48 foundation reorg, ADR-0035). */

@import "../fonts.css";

:root {
  /* ═══════════════════════════════════════════════════════════
     L1 PRIMITIVES — raw values, no intent
     ═══════════════════════════════════════════════════════════ */

  /* ── Font families ── */

  --a-font-family-display: var(--a-font-family-sans);
  --a-font-family-text: var(--a-font-family-sans);
  --a-font-family-heading: var(--a-font-family-sans);
  --a-font-family-ui: var(--a-font-family-sans);
  --a-font-family-code: var(--a-font-family-mono);
  --a-font-family-control: var(--a-font-family-mono);
  --a-font-family: var(--a-font-family-sans);
  /* Back-compat alias for the pre-ADR-0035 token name. DEPRECATED — prefer
     --a-font-family. Kept so legacy `font-family: var(--a-font)` references
     (demo scaffolds, external consumers, embedded apps) resolve to the sans
     stack instead of going invalid-at-computed-value-time → inherit → UA
     serif. Retire once the host.css migration removes the boilerplate. */
  --a-font: var(--a-font-family);

  /* ── Type scale ──
      Ratio: ~1.25 (major third) with dramatic hero jump.
      Base: 0.875rem (14px).
      Spec ref: hero 72px (weight 300), stat values 28px, section labels 13px,
      overline 11px, body 14px, caption 12px. */
  /* UI type scale now defined as --a-ui-size-* in tokens.css */

  /* Content sizes live in role tokens below:
     --a-body-size, --a-heading-size, --a-display-size, etc.
     No flat --a-font-xs/sm/md/lg scale — use role tokens directly. */

  /* ── Font weight — single canonical scale ──
     Conventional weights: thin=100, light=300, normal=400, medium=500,
     semibold=600, bold=700. Fonts must provide these axes or fall back
     gracefully. Earlier --a-font-weight-* aliases were REMOVED in v0.5.0;
     use --a-weight-* directly. (v0.5.8 §230 closed 3 consumer references
     that still pointed at the removed family per FEEDBACK-20 §1.) */
  --a-weight-thin: 100;
  --a-weight-light: 300;
  --a-weight-normal: 400;
  --a-weight-medium: 500;
  --a-weight-semibold: 600;
  --a-weight-bold: 700;
  --a-weight: var(--a-weight-normal);

  /* ── Line height ── */
  --a-leading-none: 1; /* hero numbers — no extra space at display scale */
  --a-leading-tight: 1.2; /* headings, large text */
  --a-leading-snug: 1.3; /* labels, compact UI text */
  --a-leading-normal: 1.5; /* body text, readable paragraphs */

  /* ── Letter spacing ── */
  --a-tracking-tighter: -0.02em; /* hero/display numbers */
  --a-tracking-tight: -0.01em; /* stat values, large text */
  --a-tracking-normal: 0; /* body text */
  --a-tracking-wide: 0.04em; /* stat units, small uppercase */
  --a-tracking-wider: 0.06em; /* section labels, overlines */

  /* ── Leading curve (tightens as size grows) ── */
  --a-font-leading-tight: 1.05;
  --a-font-leading-snug: 1.2;
  --a-font-leading-normal: 1.35;
  --a-font-leading-relaxed: 1.5;
  --a-font-leading-loose: 1.6;

  /* ── Tracking curve (negative at display, positive at caption) ── */
  --a-font-tracking-tight: -0.03em;
  --a-font-tracking-snug: -0.015em;
  --a-font-tracking-normal: 0;
  --a-font-tracking-wide: 0.04em;
  --a-font-tracking-wider: 0.06em;

  /* ═══════════════════════════════════════════════════════════
     L2 SEMANTIC — intent tokens referencing primitives
     ═══════════════════════════════════════════════════════════ */

  /* ── Families by intent ── */
  --a-font-family-heading: var(--a-font-family-display);
  --a-font-family-body: var(--a-font-family-text);
  --a-font-family-ui: var(--a-font-family-text);
  --a-font-family-editorial: var(--a-font-family-sans);
}
