/* Sir Kodington — Color tokens
   Core brand: Kodington Navy, Service Teal, Warm Ivory, Muted Brass, Slate.
   Base palette + semantic aliases.

   WCAG 2.2 AA is enforced here, not aspired to. Every value that can carry text
   has a measured ratio beside it, against the three backgrounds this system
   actually paints: --canvas #F6F2E8, --surface #FFFEFB, --surface-subtle #EFEADF.

   Two brand colors cannot carry body text at any size and have text-safe
   siblings instead: Service Teal (--teal-text) and Muted Brass (--brass-text).
   Reach for the sibling whenever the color is a glyph someone must read; keep
   the base value for fills, borders, and focus rings. */
:root {
  /* ---- Base brand ramps ---- */
  --navy: #16324F;
  --navy-hover: #102740;
  --navy-active: #0B1D30;
  --navy-soft: #E8EEF3;

  --teal: #2F7D74;          /* fills, borders, focus ring — NOT text on light */
  --teal-hover: #25665F;
  --teal-active: #1D514B;
  --teal-soft: #E4F1EF;
  --teal-text: #25665F;     /* 5.97 canvas · 6.62 surface · 5.57 subtle */

  --brass: #C58B3A;         /* ceremony borders + icon fills — NEVER text */
  --brass-soft: #F5E8D6;
  --brass-text: #7A531E;    /* 6.09 canvas · 5.64 surface · 6.75 brass-soft */

  --ivory: #F6F2E8;
  --white: #FFFFFF;

  /* ---- Neutrals / text ---- */
  --ink: #16324F;           /* 11.72 canvas · 12.99 surface */
  --body: #334755;          /*  8.64 canvas ·  9.58 surface */
  --slate: #5E6B73;         /*  4.91 canvas ·  5.44 surface · 4.57 subtle */
  --muted: #636B71;         /*  4.85 canvas ·  5.38 surface · 4.52 subtle */

  /* Separation. --border is a divider; --border-strong bounds a control the
     user has to be able to find, so it clears the 3:1 non-text threshold. */
  --border: #C2BEB2;        /* 1.84 surface — divider weight */
  --border-strong: #8B877D; /* 3.55 surface · 3.21 canvas — control boundary */

  /* ---- Surfaces ---- */
  --canvas: #F6F2E8;
  --surface: #FFFEFB;
  --surface-subtle: #EFEADF;
  --surface-raised: #FFFFFF;
  --code-surface: #0E2438;
  /* The container behind a real capture of the running product. The screenshots
     are dark Odoo UI on a warm-ivory page and must never be recoloured, so they
     get a neutral dark bed rather than an ivory one that would fringe them. */
  --surface-capture: #0E1A26;

  /* ---- Semantic status ---- */
  --success: #1E7448;       /* 5.06 on --success-soft */
  --success-soft: #E5F4EB;
  --warning: #8A5700;       /* 5.45 on --warning-soft */
  --warning-soft: #FFF1D2;
  --error: #AD293C;         /* 5.70 on --error-soft */
  --error-soft: #FCE9EC;
  --info: #16324F;
  --info-soft: #E8EEF3;

  /* ---- On-color text ---- */
  --on-primary: #FFFFFF;    /* 13.10 on --navy */
  --on-dark: #FFFFFF;
  --on-dark-muted: #C3D2DC; /* 7.98 on --navy — secondary text on navy fields,
                               tinted from the navy hue rather than grayed */

  /* ---- Semantic aliases (prefer these in product code) ---- */
  --color-primary: var(--navy);
  --color-primary-hover: var(--navy-hover);
  --color-primary-active: var(--navy-active);
  --color-primary-soft: var(--navy-soft);

  --color-secondary: var(--teal);
  --color-secondary-hover: var(--teal-hover);
  --color-secondary-active: var(--teal-active);
  --color-secondary-soft: var(--teal-soft);

  --color-accent: var(--brass);
  --color-accent-soft: var(--brass-soft);

  --text-heading: var(--ink);
  --text-body: var(--body);
  --text-muted: var(--slate);
  --text-disabled: var(--muted);
  --text-link: var(--teal-text);

  --surface-page: var(--canvas);
  --surface-card: var(--surface);
  --surface-quiet: var(--surface-subtle);

  --focus-ring: var(--teal);

  /* ---- Provenance states ----
     The product's own vocabulary. A statutory table sits in exactly one of
     these at any effective date, and the color is always paired with the word. */
  --state-approved: var(--success);
  --state-approved-soft: var(--success-soft);
  --state-attention: var(--warning);
  --state-attention-soft: var(--warning-soft);
  --state-blocked: var(--error);
  --state-blocked-soft: var(--error-soft);
  --state-draft: var(--slate);
  --state-draft-soft: var(--surface-subtle);
  --state-superseded: var(--muted);
}
