/* Ghost Detail Autos design tokens.
   The single source of truth for colour, type, spacing and motion.
   Native apps (SwiftUI) should mirror these values; names map 1:1. */
:root{
  color-scheme:light dark;
  /* Colour: light (default) */
  --c-bg:#F5F2EC;          /* Bone - page background */
  --c-surface:#EAE5DC;     /* Stone - cards, alternate bands */
  --c-surface-2:#FFFFFF;   /* Raised inputs/cards */
  --c-text:#141516;        /* Ink - 16.4:1 on Bone */
  --c-muted:#5C6066;       /* Slate - 5.7:1 on Bone, 5.0:1 on Stone */
  --c-line:#D6D0C4;        /* Hairlines */
  --c-accent:#1E3B30;      /* Brooklands Green - 10.9:1 on Bone */
  --c-on-accent:#F5F2EC;
  --c-dark:#141516;        /* Always-dark bands (hero, footer) */
  --c-on-dark:#F5F2EC;     /* 16.4:1 on Ink */
  --c-on-dark-muted:#A7ABB0; /* 7.9:1 on Ink */
  --c-dark-line:#2E3033;
  --c-dark-accent:#9FB8A9; /* Sage - 8.6:1 on Ink */
  --c-nano:#D8C46A;        /* Nano Banana mark, dark bands only - 10.5:1 on Ink */
  --c-ok:#1E6B47;
  --c-warn:#8A5A00;
  --c-err:#A3271F;
  --c-plate:#F2D64B;       /* UK rear-plate yellow (functional, not brand) */

  /* Type */
  --f-display:'Instrument Serif',Georgia,'Times New Roman',serif;
  --f-sans:'Archivo',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --f-plate:'Archivo',system-ui,sans-serif;
  --fs-xs:.75rem; --fs-sm:.875rem; --fs-md:1rem; --fs-lg:1.125rem;
  --fs-h3:clamp(1.5rem,1.2rem + .8vw,2rem);
  --fs-h2:clamp(2.5rem,1.6rem + 3vw,4.75rem);
  --fs-h1:clamp(3.25rem,1.8rem + 6vw,9rem);
  --tracking-label:.16em;

  /* Space: one 8px scale. Use only these. */
  --s-1:8px; --s-2:16px; --s-3:24px; --s-4:32px; --s-5:40px; --s-6:48px; --s-8:64px; --s-10:80px; --s-12:96px; --s-16:128px; --s-20:160px;

  /* Grid: 12 columns, fixed max width, responsive margin + gutter */
  --grid-cols:12;
  --grid-max:1600px;       /* content box; wider screens get more margin, not longer lines */
  --grid-margin:20px;      /* outer page margin  (>=768: 40px, >=1280: 64px) */
  --grid-gutter:16px;      /* column gap         (>=768: 24px, >=1280: 32px) */
  --measure:68ch;          /* max line length for running text */
  --section:var(--s-10);   /* vertical section padding (>=768: 96px, >=1280: 128px) */
  --block:var(--s-6);      /* gap between heading block and content (>=1280: 64px) */
  --control-h:48px;        /* every button and input */
  --radius:0px;
  --nav-h:72px;

  /* Motion */
  --ease:cubic-bezier(.2,.7,.2,1);
  --dur:.35s;

  /* Legacy aliases (inline styles and admin JS reference these) */
  --gold:var(--c-accent); --gold-b:var(--c-accent); --text:var(--c-text); --muted:var(--c-muted);
  --vault:var(--c-surface); --surface:var(--c-surface); --charcoal:var(--c-bg); --obsidian:var(--c-bg);
  --bd:var(--c-line); --green:var(--c-ok); --amber:var(--c-warn); --red:var(--c-err);
  --blue:#2B5A8C; --cyan:#1F6E78;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --c-bg:#141516; --c-surface:#1C1D1F; --c-surface-2:#232528; --c-text:#F5F2EC; --c-muted:#A7ABB0;
    --c-line:#2E3033; --c-accent:#9FB8A9; --c-on-accent:#141516; --c-dark:#0E0F10;
    --c-ok:#6FC79A; --c-warn:#E2B04A; --c-err:#F08A80; --blue:#8AB4E0; --cyan:#7CC6CF;
  }
}
:root[data-theme="dark"]{
  --c-bg:#141516; --c-surface:#1C1D1F; --c-surface-2:#232528; --c-text:#F5F2EC; --c-muted:#A7ABB0;
  --c-line:#2E3033; --c-accent:#9FB8A9; --c-on-accent:#141516; --c-dark:#0E0F10;
  --c-ok:#6FC79A; --c-warn:#E2B04A; --c-err:#F08A80; --blue:#8AB4E0; --cyan:#7CC6CF;
}
@media (min-width:768px){:root{--grid-margin:40px;--grid-gutter:24px;--section:var(--s-12)}}
@media (min-width:1280px){:root{--grid-margin:64px;--grid-gutter:32px;--section:var(--s-16);--block:var(--s-8)}}
