/* ─────────────────────────────────────────────────────────────────────────
   AUDAX BRAND — app-owned tokens.

   Source: specs/audax-style.zip (Audax OS brand package, style/tokens.css).
   That file is the brand's source of truth; this one re-expresses it as METIS
   tokens so it composes with the platform instead of fighting it. Same shape
   as coherence/css/tokens/brand.css — read that one first if this is new.

   Two things are deliberately NOT done here:

   1. The package's own token NAMES are not introduced globally. It ships
      --accent, --danger, --font-display, --space-4, --radius-2, --shadow-1 …
      which collide with platform tokens of the same name and different
      values. Brand values arrive under an --au-* prefix and are mapped onto
      platform tokens at exactly the points the theme allowlist permits.
   2. The type scale and the spacing scale are not touched. The brand's scale
      is 16px-rooted and generous (--t-h1 52px, sections at 128px); the
      platform's is 14px-rooted and dense. They are different instruments. A
      page that wants brand metrics asks for them by name, under --au-*.

      --font-ui IS mapped — see theme.css. That is a recorded exception, the
      second one the project has granted, and it is written down in
      specs/design-system.md §11 rather than left as folklore.

   Brand rules encoded here (style.md §2, §3, §5, §6):
     · Parchment #FBFAF3 is the page. White is for cards floating on it.
     · forest-700 is a spend, not a default — it carries every bit of
       interactive weight, and earns that weight by being rare.
     · Lichen appears once per page or not at all. Never on body copy.
     · Neutrals are warm: ink is green-black. No cool greys anywhere.
     · Shadows warm-tinted, vertical offset only; --au-shadow-forest is the
       one coloured shadow, primary CTA hover only.
     · Nothing bounces. ease-out / ease-soft, 120–720ms.
   ───────────────────────────────────────────────────────────────────────── */

@layer tokens {
  :root {
    /* ── Forest / emerald — the one committed hue ────────────────────
       Drawn from the deep watercolour washes in the brand imagery.
       forest-700 is canonical: buttons, links, the accent italic. */
    --au-forest-900: #0E2419;
    --au-forest-800: #163322;
    --au-forest-700: #1F4D2E;
    --au-forest-600: #2D6B41;
    --au-forest-500: #3F8657;
    --au-forest-400: #6BA37C;
    --au-forest-300: #9CBFA3;
    --au-forest-200: #C8DBC9;
    --au-forest-100: #E2EBDD;
    --au-forest-050: #F0F4EC;

    /* ── Lichen — the secondary accent ───────────────────────────────
       The yellow-green at the edges of the brand imagery. Once per page
       or not at all; never a large fill, never on body copy. */
    --au-lichen-500: #B8C766;
    --au-lichen-400: #C7D27B;
    --au-lichen-300: #D6DD96;
    --au-lichen-200: #E3E8B5;
    --au-lichen-100: #EEF0D2;
    --au-lichen-050: #F6F7E6;

    /* ── Ink & parchment — warm neutrals ─────────────────────────────
       Ink is warm-black with a faint green tint. The brand reads earthy,
       not clinical, and a cool grey anywhere breaks that immediately. */
    --au-ink-900: #14130E;
    --au-ink-800: #1F1E18;
    --au-ink-700: #3A3830;
    --au-ink-600: #5C5A50;
    --au-ink-500: #807D72;
    --au-ink-400: #A8A59B;
    --au-ink-300: #C9C6BD;
    --au-ink-200: #E3E0D6;
    --au-ink-100: #EFEDE4;
    --au-ink-050: #F7F5EC;

    --au-surface-parchment: #FBFAF3;
    --au-surface-paper:     #F7F5EC;

    /* ── Semantic, warm ──────────────────────────────────────────────
       The brand's own semantic trio. Honey rather than gold, iron-oxide
       rather than pure red — a signal colour still has to be earthy. */
    --au-success: #2D6B41;
    --au-warning: #B8884A;
    --au-danger:  #9E3B2E;

    /* ── Washes ──────────────────────────────────────────────────────
       Always full-bleed, never a short decorative strip: the gradient
       needs room to fade or it reads as a coloured band (style.md §5). */
    --au-grad-hero: linear-gradient(180deg,
      var(--au-forest-800) 0%, var(--au-forest-600) 18%, var(--au-forest-400) 38%,
      var(--au-forest-200) 58%, var(--au-forest-100) 74%,
      var(--au-surface-parchment) 92%);
    --au-grad-soft: linear-gradient(180deg,
      var(--au-forest-100) 0%, var(--au-surface-parchment) 100%);
    --au-grad-lichen: linear-gradient(180deg,
      var(--au-lichen-100) 0%, var(--au-surface-parchment) 100%);
    --au-grad-deep: radial-gradient(120% 80% at 50% 0%,
      var(--au-forest-700) 0%, var(--au-forest-900) 60%, #060D09 100%);
    --au-grad-edge: linear-gradient(180deg,
      var(--au-forest-700) 0%, var(--au-forest-400) 100%);

    /* ── Typefaces ───────────────────────────────────────────────────
       Loaded per-route from shell/_fonts_css.html via the app's registered
       font_href, so they cost nothing off Audax's own pages. */
    --au-font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
    --au-font-body:    "Hanken Grotesk", var(--font-ui);

    /* ── Brand type scale ────────────────────────────────────────────
       Kept under --au-* rather than mapped onto --text-*. See the header. */
    --au-t-display:  84px;
    --au-t-h1:       52px;
    --au-t-h2:       38px;
    --au-t-h3:       28px;
    --au-t-h4:       22px;
    --au-t-h5:       18px;
    --au-t-body-lg:  18px;
    --au-t-body:     16px;
    --au-t-body-sm:  14px;
    --au-t-caption:  12px;
    --au-t-overline: 11px;

    --au-lh-tight:   1.05;
    --au-lh-snug:    1.25;
    --au-lh-normal:  1.5;
    --au-lh-relaxed: 1.65;

    --au-tracking-tight:    -0.025em;
    --au-tracking-body:     -0.005em;
    --au-tracking-overline: 0.22em;

    --au-w-light:    300;
    --au-w-regular:  400;
    --au-w-medium:   500;

    /* Whitespace over rules: sections breathe at 128px, and if a border can
       be replaced by spacing it should be (style.md §2 rule 7). */
    --au-space-section:       128px;
    --au-space-section-tight: 88px;
    --au-space-card:          32px;

    /* Chips 4px, inputs 8px, controls 12px, cards 16px, feature cards 24px. */
    --au-radius-chip:    4px;
    --au-radius-input:   8px;
    --au-radius-control: 12px;
    --au-radius-card:    16px;
    --au-radius-feature: 24px;

    /* Warm-tinted off the ink-900 base, vertical offset only. Cards are flat
       at rest; shadow is a hover affordance (style.md §2 rule 8). */
    --au-shadow-1: 0 1px 2px rgba(20, 19, 14, 0.05), 0 1px 1px rgba(20, 19, 14, 0.03);
    --au-shadow-2: 0 2px 10px rgba(20, 19, 14, 0.05), 0 1px 2px rgba(20, 19, 14, 0.04);
    --au-shadow-3: 0 10px 28px rgba(20, 19, 14, 0.07), 0 2px 6px rgba(20, 19, 14, 0.04);
    --au-shadow-4: 0 20px 56px rgba(20, 19, 14, 0.10), 0 4px 14px rgba(20, 19, 14, 0.05);
    --au-shadow-forest: 0 10px 28px rgba(31, 77, 46, 0.30);

    --au-ease-out:  cubic-bezier(0.22, 0.61, 0.36, 1);
    --au-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --au-dur-1: 120ms;
    --au-dur-2: 200ms;
    --au-dur-3: 320ms;
    --au-dur-4: 480ms;
  }
}
