/* ============================================================================
   AGMS storefront preset THEMES. Each yard picks one in the console (Settings →
   Storefront theme); the layout stamps <html data-theme="id"> and these rules
   re-skin the tenant storefront by overriding storefront.css design tokens.
   Palettes are grounded in real automotive / salvage / motorsport references
   rather than generic SaaS colours, and each preset also carries a heading
   personality (--font-display + --display-transform/--display-tracking):
     Light — industrial steel+orange, vintage heritage, British racing green,
             Gulf race livery, warm sandstone+teal, concours oxblood+brass,
             breaker-yard recycler (red+hi-vis), navy merchant marketplace.
     Dark  — motorsport red, midnight gold, carbon+acid-lime, cyanotype
             blueprint, rat-rod rust, synthwave neon.
   Marketing pages carry no data-theme, so they always keep the default AGMS look.
   ============================================================================ */

/* ── Industrial — steel & safety orange (light, sharper corners) ───────── */
[data-theme="industrial"]{
  --bg:#F3F4F7; --surface:#ffffff; --surface-2:#EDEFF3; --surface-3:#E3E6EC;
  --ink:#111418; --ink-2:#2B313B; --muted:#5A616E; --faint:#8A909C; --line:#DDE1E8; --line-2:#E8EBF0;
  --accent:#C2410C; --accent-2:#EA580C; --accent-3:#9A3412;   /* darkened for WCAG AA link + button text */
  --accent-soft:#FCE1CF; --accent-softer:#FEF2E9; --accent-line:#F6C7A1;
  --grad:linear-gradient(118deg,#CA4C0A,#C2410C 60%,#9A3412);   /* light stop darkened so white button text hits WCAG AA (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#C2410C,#EA580C);
  --hero-glow:rgba(234,88,12,.14);
  --display-transform:uppercase; --display-tracking:.01em;   /* stencilled, utility headings */
  --radius:12px; --radius-sm:8px; --radius-lg:16px;
  --footer-bg:#14181E;
}

/* ── Heritage — vintage garage, cream + rust, serif display (light) ────── */
[data-theme="heritage"]{
  --bg:#FAF5EB; --surface:#FFFDF8; --surface-2:#F3EBDB; --surface-3:#EBE0CB;
  --ink:#2A2118; --ink-2:#4A3D2E; --muted:#7A6A54; --faint:#A8977C; --line:#E7DCC7; --line-2:#F0E8D8;
  --accent:#B45309; --accent-2:#C2691A; --accent-3:#8A3F07;
  --accent-soft:#F1E0C8; --accent-softer:#F8EFDD; --accent-line:#E4CDA5;
  --grad:linear-gradient(118deg,#B26018,#B45309 60%,#8A3F07);   /* light stop darkened for WCAG AA white button text (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#B45309,#C2691A);
  --hero-glow:rgba(180,83,9,.16);
  --font-display:Georgia,'Times New Roman',serif;
  --footer-bg:#2A2118; --footer-ink:rgba(255,247,235,.66);
  --radius:14px; --radius-lg:20px;
}

/* ── British Racing — deep racing green on warm cream (light) ───────────── */
[data-theme="racing"]{
  --bg:#F5F4EE; --surface:#FFFFFF; --surface-2:#EFEEE5; --surface-3:#E6E4D7;
  --ink:#16231B; --ink-2:#33453A; --muted:#5E6E63; --faint:#82907F; --line:#DFDDCF; --line-2:#EAE8DD;
  --accent:#15653F; --accent-2:#1E7A4E; --accent-3:#0E4A2E;
  --accent-soft:#D3E7DC; --accent-softer:#E9F3ED; --accent-line:#B6D6C3;
  --grad:linear-gradient(118deg,#1E7A4E,#15653F 60%,#0E4A2E);
  --grad-text:linear-gradient(100deg,#15653F,#1E7A4E);
  --hero-glow:rgba(21,101,63,.15);
  --footer-bg:#12271C;
}

/* ── Gulf — powder blue + marigold orange, the classic race livery (light) ─ */
[data-theme="gulf"]{
  --bg:#F7FBFE; --surface:#FFFFFF; --surface-2:#EDF5FB; --surface-3:#E1EEF7;
  --ink:#10233A; --ink-2:#2C4257; --muted:#5C7186; --faint:#8199AC; --line:#D8E6F1; --line-2:#E7F1F8;
  --accent:#17608C; --accent-2:#2E9BD6; --accent-3:#F58220;   /* darkened for WCAG AA link + button text */
  --accent-soft:#D2E8F5; --accent-softer:#E8F3FB; --accent-line:#AFD5EC;
  --grad:linear-gradient(118deg,#1E7CB4,#17608C 62%,#124E70);   /* light stop darkened for WCAG AA white button text (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#17608C,#1F7FB8);
  --hero-glow:rgba(245,130,32,.16);
  --footer-bg:#0F2135;
}

/* ── Sandstone — warm sand + deep teal (light) ─────────────────────────── */
[data-theme="sandstone"]{
  --bg:#F8F2E7; --surface:#FFFDF9; --surface-2:#F1E9D8; --surface-3:#E9DEC7;
  --ink:#221E17; --ink-2:#453D2E; --muted:#766A54; --faint:#9C8E73; --line:#E7DBC4; --line-2:#F0E8D6;
  --accent:#0F766E; --accent-2:#12897F; --accent-3:#0B5C55;
  --accent-soft:#CFE7E3; --accent-softer:#E6F3F1; --accent-line:#A9D6D0;
  --grad:linear-gradient(118deg,#11847B,#0F766E 60%,#0B5C55);   /* light stop darkened for WCAG AA white button text (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#0F766E,#12897F);
  --hero-glow:rgba(15,118,110,.16);
  --footer-bg:#221E17;
}

/* ── Concours — oxblood + brass on cream, serif display (light) ────────── */
[data-theme="concours"]{
  --bg:#F6F1E7; --surface:#FFFDF8; --surface-2:#EFE7D7; --surface-3:#E6DAC5;
  --ink:#2A1416; --ink-2:#4A2A2C; --muted:#7A5A56; --faint:#A08A80; --line:#E4D8C4; --line-2:#EFE7D7;
  --accent:#822029; --accent-2:#9E2B35; --accent-3:#A87B32;
  --accent-soft:#EBD4CE; --accent-softer:#F4E7E1; --accent-line:#DCC0B4;
  --grad:linear-gradient(118deg,#9E2B35,#822029 60%,#5E141B);
  --grad-text:linear-gradient(100deg,#822029,#9E2B35);
  --hero-glow:rgba(168,123,50,.16);
  --font-display:Georgia,'Times New Roman',serif;
  --footer-bg:#2A1416; --footer-ink:rgba(255,244,236,.66);
  --radius:14px; --radius-lg:20px;
}

/* ── Recycler — bold breaker-yard red + hi-vis yellow (light) ──────────── */
/* Inspired by UK breakers (ASM Auto Recycling, Charles Trent): a loud red masthead with hi-vis
   yellow/black hazard accents. Red is the solid accent (deepened for AA link/button contrast); the
   hi-vis yellow is the warm dual-tone pop behind the hero and on key numbers. */
[data-theme="recycler"]{
  --bg:#F5F5F4; --surface:#FFFFFF; --surface-2:#EFEEEC; --surface-3:#E5E4E1;
  --ink:#171513; --ink-2:#3A3733; --muted:#6B6762; --faint:#8B867F; --line:#E2E0DC; --line-2:#EDEBE7;
  --accent:#C81E1E; --accent-2:#E11D1D; --accent-3:#F5B301;
  --accent-soft:#F7D7D5; --accent-softer:#FCEBEA; --accent-line:#F0B3AF;
  --grad:linear-gradient(118deg,#E11D1D,#C81E1E 60%,#9E1414);
  --grad-text:linear-gradient(100deg,#C81E1E,#E11D1D);
  --hero-glow:rgba(245,179,1,.18);
  --display-transform:uppercase; --display-tracking:-.005em;   /* bold poster / breaker-yard headings */
  --radius:12px; --radius-sm:8px; --radius-lg:16px;
  --footer-bg:#171513;
}

/* ── Merchant — clean deep-navy marketplace + red accent (light) ───────── */
/* Inspired by modern parts marketplaces (GlobalParts): a trustworthy deep navy on a cool white ground,
   with red reserved for promos/secondary CTAs. Rounded, professional, high-contrast. */
[data-theme="merchant"]{
  --bg:#F4F6FB; --surface:#FFFFFF; --surface-2:#EDF1F8; --surface-3:#E2E8F3;
  --ink:#0F1B33; --ink-2:#2A3A57; --muted:#5A6A85; --faint:#8592A8; --line:#DCE3EF; --line-2:#E8EDF5;
  --accent:#1B3A8F; --accent-2:#2E4FA6; --accent-3:#E11D2A;
  --accent-soft:#D6E0F5; --accent-softer:#EAF0FB; --accent-line:#B4C6EC;
  --grad:linear-gradient(118deg,#2E4FA6,#1B3A8F 60%,#12295F);
  --grad-text:linear-gradient(100deg,#1B3A8F,#2E4FA6);
  --hero-glow:rgba(225,29,42,.12);
  --footer-bg:#0F1B33;
}

/* ── Performance — motorsport red on black (dark) ──────────────────────── */
[data-theme="performance"]{
  --bg:#0E0F13; --surface:#171A20; --surface-2:#1E222A; --surface-3:#272C36;
  --ink:#F5F6F8; --ink-2:#C9CDD6; --muted:#9AA1AE; --faint:#6C7480; --line:#2A2F3A; --line-2:#222732;
  --accent:#D63D3D; --accent-2:#F87171; --accent-3:#DC2626; --accent-ink:#ffffff;   /* accent darkened so white text on it (buttons/active) hits AA (MEDIUM-05) */
  --link:#F87171;   /* the darkened --accent is a button bg — too low-contrast as link text on this dark theme's surfaces; the bright accent-2 is AA on all of them (MEDIUM-05) */
  --accent-soft:#3A1E22; --accent-softer:#241417; --accent-line:#5A2A2E;
  --grad:linear-gradient(118deg,#BC5656,#D63D3D 60%,#B91C1C);   /* stops darkened so white button text hits AA across the whole gradient (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#F87171,#EF4444);
  --hero-glow:rgba(239,68,68,.24);
  --display-transform:uppercase; --display-tracking:.015em;   /* motorsport race-livery headings */
  --nav-bg:rgba(14,15,19,.82); --footer-bg:#08090C; --footer-ink:rgba(255,255,255,.55);
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow-md:0 12px 30px -10px rgba(0,0,0,.6);
}

/* ── Midnight — charcoal + premium gold (dark) ─────────────────────────── */
[data-theme="midnight"]{
  --bg:#121319; --surface:#1A1C24; --surface-2:#22242E; --surface-3:#2B2E3A;
  --ink:#F6F5F2; --ink-2:#CFCDC6; --muted:#9C9A93; --faint:#6E6C66; --line:#2C2F3A; --line-2:#24262F;
  --accent:#D4AF37; --accent-2:#E5C55A; --accent-3:#B8952B; --accent-ink:#1A1508;
  --accent-soft:#332B18; --accent-softer:#221E12; --accent-line:#4A3F22;
  --grad:linear-gradient(118deg,#E5C55A,#D4AF37 60%,#B8952B);
  --grad-text:linear-gradient(100deg,#D4AF37,#E5C55A);
  --hero-glow:rgba(212,175,55,.18);
  --font-display:Georgia,'Times New Roman',serif;   /* premium serif for the gold-on-charcoal luxury look */
  --nav-bg:rgba(18,19,25,.82); --footer-bg:#0C0D12; --footer-ink:rgba(255,255,255,.55);
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow-md:0 12px 30px -10px rgba(0,0,0,.6);
}

/* ── Carbon Lime — carbon black with an acid-lime edge (dark) ──────────── */
[data-theme="carbonlime"]{
  --bg:#0C0F0C; --surface:#141A14; --surface-2:#1B231B; --surface-3:#253025;
  --ink:#EAF2E8; --ink-2:#BFCBBB; --muted:#8E9A8A; --faint:#66705F; --line:#253025; --line-2:#1C241C;
  --accent:#84CC16; --accent-2:#A3E635; --accent-3:#4D7C0F; --accent-ink:#0A1400;
  --accent-soft:rgba(132,204,22,.16); --accent-softer:rgba(132,204,22,.09); --accent-line:rgba(132,204,22,.30);
  --grad:linear-gradient(118deg,#A3E635,#84CC16 60%,#5F8927);   /* dark stop lightened so the dark ink hits AA across the gradient (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#A3E635,#84CC16);
  --hero-glow:rgba(132,204,22,.22);
  --display-transform:uppercase; --display-tracking:.02em;   /* aggressive tuner headings */
  --nav-bg:rgba(12,15,12,.82); --footer-bg:#080B08; --footer-ink:rgba(255,255,255,.55);
  --shadow-sm:0 1px 2px rgba(0,0,0,.45); --shadow-md:0 12px 30px -10px rgba(0,0,0,.65);
}

/* ── Blueprint — cyanotype navy with technical cyan lines (dark) ───────── */
[data-theme="blueprint"]{
  --bg:#0E2038; --surface:#14304F; --surface-2:#1A3A5E; --surface-3:#22476E;
  --ink:#E6F0FB; --ink-2:#AEC8E4; --muted:#7E9DC0; --faint:#5E7EA3; --line:#244A6E; --line-2:#1C3A59;
  --accent:#38BDF8; --accent-2:#7DD3FC; --accent-3:#0EA5E9; --accent-ink:#062038;
  --accent-soft:rgba(56,189,248,.16); --accent-softer:rgba(56,189,248,.09); --accent-line:rgba(56,189,248,.30);
  --grad:linear-gradient(118deg,#7DD3FC,#38BDF8 55%,#0EA5E9);
  --grad-text:linear-gradient(100deg,#38BDF8,#7DD3FC);
  --hero-glow:rgba(56,189,248,.22);
  --font-display:ui-monospace,'SFMono-Regular',Menlo,Consolas,'Liberation Mono',monospace;   /* technical / drafting */
  --display-tracking:-.01em;
  --nav-bg:rgba(14,32,56,.82); --footer-bg:#0A1A30; --footer-ink:rgba(255,255,255,.6);
  --shadow-sm:0 1px 2px rgba(0,0,0,.45); --shadow-md:0 12px 30px -10px rgba(0,0,0,.6);
}

/* ── Rat Rod — matte charcoal, rust-oxide + bare steel (dark) ──────────── */
[data-theme="ratrod"]{
  --bg:#16130F; --surface:#211C15; --surface-2:#2A241B; --surface-3:#352D22;
  --ink:#EDE6D8; --ink-2:#C3B7A2; --muted:#948872; --faint:#6E6555; --line:#33291D; --line-2:#241E15;
  --accent:#B04A27; --accent-2:#C2582F; --accent-3:#8A6A3E; --accent-ink:#ffffff;   /* darkened for AA button text */
  --link:#DE824F;   /* --accent is a dark button bg — too low-contrast as link text on this dark theme's surfaces; brighter rust is AA (MEDIUM-05) */
  --accent-soft:rgba(194,88,47,.18); --accent-softer:rgba(194,88,47,.10); --accent-line:rgba(194,88,47,.32);
  --grad:linear-gradient(118deg,#BE562E,#B04A27 58%,#7A3316);   /* light stop darkened so white button text hits AA (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#C2582F,#D2703F);
  --hero-glow:rgba(194,88,47,.20);
  --display-transform:uppercase; --display-tracking:-.005em;   /* garage-stencil headings */
  --nav-bg:rgba(22,19,15,.85); --footer-bg:#100D0A; --footer-ink:rgba(255,255,255,.55);
  --shadow-sm:0 1px 2px rgba(0,0,0,.5); --shadow-md:0 12px 30px -10px rgba(0,0,0,.66);
}

/* ── Neon — synthwave graphite, cyan into magenta (dark) ───────────────── */
[data-theme="neon"]{
  --bg:#0A0A12; --surface:#12121E; --surface-2:#181826; --surface-3:#222234;
  --ink:#EAF2FF; --ink-2:#B9C2DC; --muted:#8891AE; --faint:#646C88; --line:#242438; --line-2:#1C1C2C;
  --accent:#22D3EE; --accent-2:#5EE7F5; --accent-3:#E838C0; --accent-ink:#08131A;
  --accent-soft:rgba(34,211,238,.16); --accent-softer:rgba(34,211,238,.09); --accent-line:rgba(34,211,238,.30);
  --grad:linear-gradient(118deg,#22D3EE,#8D5FF6 50%,#E838C0);   /* mid stop nudged lighter so the dark ink hits AA across the gradient (MEDIUM-05) */
  --grad-text:linear-gradient(100deg,#22D3EE,#E838C0);
  --hero-glow:rgba(232,56,192,.24);
  --display-transform:uppercase; --display-tracking:.06em;   /* wide synthwave caps */
  --nav-bg:rgba(10,10,18,.82); --footer-bg:#07070E; --footer-ink:rgba(255,255,255,.55);
  --shadow-sm:0 1px 2px rgba(0,0,0,.45); --shadow-md:0 12px 30px -10px rgba(0,0,0,.65);
}

/* ── DARK-theme status tokens ──────────────────────────────────────────────
   The six dark presets above inherit --ok/--warn/--bad (+ their -bg solids) from storefront.css's LIGHT :root,
   whose dark-on-light hues (e.g. --ok #15803D ~3.9:1, --ok-bg near-white) fail contrast on a dark ground. Re-tune
   them ONCE for all dark presets to a brightened, WCAG-AA set with translucent backgrounds (mirrors how admin.css
   re-tunes status colours in its dark block). Placed AFTER the theme blocks so it wins; light themes are excluded,
   so they keep the light :root set. (cross-cutting audit — storefront dark status contrast) */
[data-theme="performance"], [data-theme="midnight"], [data-theme="carbonlime"],
[data-theme="blueprint"], [data-theme="ratrod"], [data-theme="neon"] {
  --ok:#4ADE80; --ok-bg:rgba(74,222,128,.14);
  --warn:#FBBF24; --warn-bg:rgba(251,191,36,.14);
  --bad:#F87171; --bad-bg:rgba(248,113,113,.14);
}
