/* ═══════════════════════════════════════════════════════════════
   Color Parameters — System-wide + per-family configuration

   Using @property for typed, animatable custom properties.
   syntax: "<number>" enables CSS transitions/animations on hue,
   chroma, and lightness parameters. inherits: true allows
   theme-ui and [theme] to override per-subtree.
   ═══════════════════════════════════════════════════════════════ */

/* ── System bounds ── */
@property --a-color-l-min              { syntax: "<number>"; inherits: true; initial-value: 0.150; }
@property --a-color-l-max              { syntax: "<number>"; inherits: true; initial-value: 0.975; }
@property --a-color-surface-increment  { syntax: "<number>"; inherits: true; initial-value: 0.035; }
@property --a-color-alpha-min          { syntax: "<number>"; inherits: true; initial-value: 0.05; }
@property --a-color-alpha-max          { syntax: "<number>"; inherits: true; initial-value: 0.85; }
@property --a-color-tint-scrim-l       { syntax: "<number>"; inherits: true; initial-value: 0.99; }
@property --a-color-shade-scrim-l      { syntax: "<number>"; inherits: true; initial-value: 0.05; }

/* ── Neutral ── */
@property --a-neutral-hue              { syntax: "<number>"; inherits: true; initial-value: 225; }
@property --a-neutral-c-min            { syntax: "<number>"; inherits: true; initial-value: 0.010; }
@property --a-neutral-c-max            { syntax: "<number>"; inherits: true; initial-value: 0.025; }

/* ── Brand ── */
@property --a-brand-hue                { syntax: "<number>"; inherits: true; initial-value: 225; }
@property --a-brand-c-min              { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-brand-c-max              { syntax: "<number>"; inherits: true; initial-value: 0.18; }

/* ── Primary (interactive brand color — renamed from `accent`, 2026-07-14,
   to consolidate with the `--a-primary-*` name already public for CTA
   buttons and match Material's single `primary` family; see
   .claude/docs/specs/material-color-bridge-contract.md) ── */
@property --a-primary-hue              { syntax: "<number>"; inherits: true; initial-value: 225; }
@property --a-primary-c-min            { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-primary-c-max            { syntax: "<number>"; inherits: true; initial-value: 0.18; }

/* ── Info ── */
@property --a-info-hue                 { syntax: "<number>"; inherits: true; initial-value: 250; }
@property --a-info-c-min               { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-info-c-max               { syntax: "<number>"; inherits: true; initial-value: 0.16; }

/* ── Success ── */
@property --a-success-hue              { syntax: "<number>"; inherits: true; initial-value: 145; }
@property --a-success-c-min            { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-success-c-max            { syntax: "<number>"; inherits: true; initial-value: 0.14; }

/* ── Warning ── (yellow) ── */
/* Hue rotated 65→88 toward true yellow/gold, enabled by the lightness lift below:
   at L0.56 hue-88 reads olive, but once -50 rides up to yellow's cusp it reads gold. */
@property --a-warning-hue              { syntax: "<number>"; inherits: true; initial-value: 70; }
@property --a-warning-c-min            { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-warning-c-max            { syntax: "<number>"; inherits: true; initial-value: 0.18; }
/* Per-hue lightness lift. Yellow's OKLCH gamut cusp is ~L0.86, not the ramp's mid
   L0.56, so the most-saturated step (-50) is a muddy amber. primitives-warning.css
   adds `+ _sf·_cf·l-lift` to L, tenting lightness up where chroma peaks (mid steps)
   while leaving the light tints + dark shades anchored. Warning-only; 0 = off. */
@property --a-warning-l-lift           { syntax: "<number>"; inherits: true; initial-value: 0.6; }

/* ── Danger ── */
@property --a-danger-hue               { syntax: "<number>"; inherits: true; initial-value: 26; }
@property --a-danger-c-min             { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-danger-c-max             { syntax: "<number>"; inherits: true; initial-value: 0.16; }

/* ── Secondary (Material adoption, 2026-07-14 — see
   .claude/docs/specs/material-color-bridge-contract.md Gap §1).
   SAME hue as `primary` (225), deliberately — not a new hue position.
   Empirically swept the entire open hue range (255-385°, the only gap
   left by the 5 existing families) through a deuteranopia/protanopia
   simulation against the 4 intent colors: EVERY candidate collapses
   toward a near-identical simulated position (~280-290°), regardless of
   chroma — the "cool" hue space left available all converges under CVD
   simulation. There is exactly one genuinely clear slot (see `tertiary`
   below), not two. Rather than force a second, marginal hue and risk a
   real CVD collision, `secondary` reuses `primary`'s already-verified-
   safe hue and differentiates purely by intensity (c-max 0.08 vs
   primary's 0.18) — a muted/supporting variant, which is also a
   legitimate, common real-world Material pattern (many M3 theme
   generators derive secondary as a lower-chroma variant near primary's
   own hue, not an unrelated color). Introduces zero new CVD risk. */
@property --a-secondary-hue            { syntax: "<number>"; inherits: true; initial-value: 225; }
@property --a-secondary-c-min          { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-secondary-c-max          { syntax: "<number>"; inherits: true; initial-value: 0.08; }

/* ── Tertiary (Material adoption, 2026-07-14) ── */
/* Hue 335 (rose/magenta) — the one hue in the entire open 255-385° range
   that clears a real, computed minimum separation (~14-16°, deuteranopia
   + protanopia simulated, checked against all 4 intent colors, culori's
   inGamut-based cusp search) from every existing family. No l-lift
   needed: real gamut-cusp computation (culori, sampled 0.05 L steps)
   puts 335's cusp at L≈0.685 (Δ+0.12 from the ramp's mid-assumption
   0.5625) — much smaller than warning's Δ+0.228 that actually required
   one; 335 doesn't read muddy at peak chroma. */
@property --a-tertiary-hue             { syntax: "<number>"; inherits: true; initial-value: 335; }
@property --a-tertiary-c-min           { syntax: "<number>"; inherits: true; initial-value: 0.02; }
@property --a-tertiary-c-max           { syntax: "<number>"; inherits: true; initial-value: 0.18; }
