/*
 * PEACE BAR design tokens: black and gold.
 *
 * Brand palette (from the owner's swatch):
 *   Deep Gold #100B00 · Deep Gold #1A1301 · Gold #A66C0E · Gold #EEAA04 · American Cheese #FFD567
 * Everything else (warm neutrals, darker gold for text, status colours) is derived to keep
 * text readable. No purple, no cool greys.
 *
 * Three layers:
 *   1. Palette   (--onyx-*, --gold-*, --sand-*)  raw colours, never used directly in components
 *   2. Semantic  (--color-*, --gradient-*, ...)   what components use
 *   3. Legacy    (--mw-*)                         aliases so older stylesheets keep working
 *
 * Contrast (WCAG 2.2): text on white 18.5:1, muted text on white 7.4:1, link gold #7A4F08
 * on white 7.1:1, button text #100B00 on #EEAA04 9.7:1 (4.5:1 even at the #A66C0E end),
 * #FFD567 on #100B00 14.0:1.
 */
:root {
    /* 1. Palette */
    --onyx-950:#100B00; --onyx-900:#1A1301; --onyx-800:#271D05; --onyx-700:#3A2C0A;
    --gold-900:#5C3B06; --gold-800:#7A4F08; --gold-700:#A66C0E; --gold-500:#EEAA04; --gold-300:#FFD567;
    --gold-200:#FFE7A6; --gold-100:#FFF4D6; --gold-50:#FFFAEC;
    --sand-900:#1A1301; --sand-600:#5E5444; --sand-400:#8F8573; --sand-300:#D9CFBD; --sand-200:#EBE3D3;
    --sand-100:#F4EEE2; --sand-50:#FBF8F1;
    --green-700:#2F6B2A; --green-100:#EAF3E4; --green-300:#BFD9B4;
    --amber-700:#8A5200; --amber-100:#FFF0D1; --amber-300:#F2D08A;
    --red-700:#A3261B; --red-100:#FBEAE6; --red-300:#EFC3BC;

    /* Gradients */
    --gradient-gold:linear-gradient(135deg,var(--gold-700) 0%,var(--gold-500) 48%,var(--gold-300) 100%);
    --gradient-gold-hover:linear-gradient(135deg,#8E5B0B 0%,#DB9C03 48%,#F7C94F 100%);
    --gradient-onyx:linear-gradient(180deg,var(--onyx-900) 0%,var(--onyx-950) 100%);
    --gradient-onyx-glow:radial-gradient(90% 70% at 0% 0%,rgb(238 170 4 / .16) 0%,transparent 60%),linear-gradient(160deg,var(--onyx-900) 0%,var(--onyx-950) 70%);
    --gradient-page:linear-gradient(180deg,var(--gold-50) 0%,var(--sand-50) 320px);

    /* 2. Semantic colour */
    --color-bg:var(--sand-50);
    --color-surface:#FFFFFF;
    --color-surface-muted:#FFFCF5;
    --color-surface-sunken:var(--sand-100);
    --color-text:var(--sand-900);
    --color-text-muted:var(--sand-600);
    --color-text-subtle:var(--sand-400);
    --color-border:var(--sand-200);
    --color-border-subtle:var(--sand-100);
    --color-border-strong:var(--sand-300);

    --color-primary:var(--gold-800);          /* links and gold text on light surfaces */
    --color-primary-hover:var(--gold-900);
    --color-primary-soft:var(--gold-50);
    --color-primary-soft-strong:var(--gold-100);
    --color-on-primary:var(--onyx-950);       /* text on gold buttons */

    --color-accent:var(--gold-500);
    --color-accent-strong:var(--gold-700);
    --color-accent-soft:var(--gold-100);
    --color-accent-text:var(--gold-800);

    --color-brand-deep:var(--onyx-950);
    --color-brand-deep-2:var(--onyx-900);
    --color-on-brand:#FFF8E6;
    --color-on-brand-muted:#CDBF9F;
    --color-on-brand-accent:var(--gold-300);

    --color-success:var(--green-700);  --color-success-soft:var(--green-100);  --color-success-border:var(--green-300);  --color-success-text:var(--green-700);
    --color-warning:var(--amber-700);  --color-warning-soft:var(--amber-100);  --color-warning-border:var(--amber-300);
    --color-danger:var(--red-700);     --color-danger-soft:var(--red-100);     --color-danger-border:var(--red-300);
    --color-info:var(--gold-800);      --color-info-soft:var(--gold-100);      --color-info-border:var(--gold-200);

    --color-focus:var(--gold-700);
    --color-focus-on-dark:var(--gold-300);
    --color-scrim:rgb(16 11 0 / .62);

    /* Typography */
    --font-sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    --font-display:Georgia,"Times New Roman",serif;
    --text-xs:11px; --text-sm:12px; --text-md:14px; --text-lg:16px; --text-xl:20px; --text-2xl:26px;

    /* Spacing: 4px base scale */
    --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;

    /* Shape and depth (warm shadows) */
    --radius-sm:6px; --radius-md:10px; --radius-lg:14px; --radius-pill:999px;
    --shadow-sm:0 1px 2px rgb(16 11 0 / .06);
    --shadow-md:0 4px 16px rgb(16 11 0 / .08);
    --shadow-lg:0 18px 60px rgb(16 11 0 / .24);
    --shadow-gold:0 6px 18px rgb(166 108 14 / .28);
    --focus-ring:0 0 0 3px var(--color-surface),0 0 0 5px var(--color-focus);

    /* Motion */
    --ease-out:cubic-bezier(.2,.8,.2,1);
    --duration-fast:120ms; --duration-base:200ms;

    /* Layout */
    --sidebar-wide:256px; --sidebar-rail:80px;

    /* 3. Legacy aliases (older stylesheets) */
    --mw-primary:var(--color-primary); --mw-primary-600:var(--color-primary-hover);
    --mw-accent:var(--color-accent); --mw-danger:var(--color-danger);
    --mw-bg:var(--color-bg); --mw-surface:var(--color-surface); --mw-text:var(--color-text);
    --mw-muted:var(--color-text-muted); --mw-border:var(--color-border);
}
@media (prefers-reduced-motion:reduce) { :root { --duration-fast:0ms; --duration-base:0ms; } }
