/* Physical Analytics: unified design tokens (28 Nov 2026 design, approved by Dan).
   One file for home.css, style.css, scan-plates.css and order/order.css. Load before the page stylesheet.
   Locked 28 Nov 2026, 09:51 Europe/London: bottle green #1F5A45 is the only primary.
   Emerald (#10b981, #047857) and the teal-to-sky gradients are retired and must not be reintroduced.
   Type, also 09:51: self-hosted Inter, 26 KB Latin variable file (400–800), with the metric-matched fallback below.
   Roots: the logo green (#1F5A45) and the plate green on /scan-plates, cream paper, one amber accent.
   Contrast (WCAG 2.2, computed): white on --brand 8.06:1 | ink on --amber 7.71:1 | muted on white 7.28:1
   | white on --fire 5.71:1 | --amber on --forest-900 7.10:1 | --mint on --forest-900 8.46:1 */

/* One variable font, Latin subset, ~26 KB (Inter, SIL OFL). Weights 400 to 800 in one file. */
@font-face{
  font-family:"Inter PA";
  src:url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight:400 800;font-style:normal;font-display:swap;
}
/* Metric-matched fallback so swapping fonts does not move the layout (CLS ~0) */
@font-face{
  font-family:"Inter PA Fallback";
  src:local("Arial");
  size-adjust:107.4%;ascent-override:90.2%;descent-override:22.5%;line-gap-override:0%;
}

:root{
  /* ---------- Colour: brand ---------- */
  --brand:#1F5A45;          /* primary: logo and plate green; links, headings accents, primary buttons on light */
  --brand-hover:#174636;    /* primary pressed / hover */
  --brand-tint:#E4EEE8;     /* tinted panels, badges, selected rows */
  --forest-900:#0E2A20;     /* darkest surface: header, footer, dark sections (replaces navy #0b1220/#0f172a) */
  --forest-800:#133A2C;     /* raised surface on dark: cards, plan panels */
  --forest-700:#1D4D3B;     /* hairlines on dark */

  /* ---------- Colour: action ---------- */
  --cta:#1F5A45;            /* primary button on light surfaces. White text 8.06:1 */
  --cta-hover:#174636;
  --cta-text:#FFFFFF;
  --cta-dark:#E8A33D;       /* primary button on dark surfaces (amber, from the logo underline). Ink text 7.71:1 */
  --cta-dark-hover:#F0B358;
  --cta-dark-text:#14211B;

  /* ---------- Colour: text ---------- */
  --ink:#14211B;            /* body and headings on light. 16.6:1 on white */
  --muted:#4B5A53;          /* secondary text on light. 7.28:1 on white, 6.47:1 on cream */
  --on-dark:#EEF3EF;        /* text on forest. 13.6:1 */
  --muted-on-dark:#C5D3CB;  /* secondary text on forest. 9.9:1 */
  --mint:#7FD1AA;           /* accent text and ticks on dark only. 8.46:1 on --forest-900 */

  /* ---------- Colour: surfaces ---------- */
  --surface:#FFFFFF;
  --surface-2:#F4F6F3;      /* page tint (cool, slightly green) */
  --cream:#F6F1E9;          /* paper: product photo backgrounds, plate cards, hero scene B. Already in the logo and plate photos */
  --line:#D9E0DB;           /* hairlines and card borders on light */
  --line-strong:#6B7B73;    /* input borders (3:1+ on white) */

  /* ---------- Colour: accent and status ---------- */
  --amber:#E8A33D;          /* accent: logo underline, highlights, badges on dark. Never body text on white (2.16:1) */
  --warn:#8A4A06;           /* warning text on light. 6.86:1 on white, 6.07:1 on --warn-bg */
  --warn-bg:#FCF0D9;
  --fire:#C0301C;           /* FIRE RED: fire register / roll call only. Icon, alert strip, one button. White on it 5.71:1 */
  --fire-bg:#FBE6E2;
  --ok:#1F7A4F;             /* success ticks on light */
  --focus:#14211B;          /* focus ring on light surfaces (16:1) */
  --focus-on-dark:#E8A33D;  /* focus ring on dark surfaces (7.1:1) */

  /* ---------- Type ---------- */
  --font-sans:"Inter PA","Inter PA Fallback",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --fs-100:.8125rem;  /* 13  eyebrow, captions, legal */
  --fs-200:.9375rem;  /* 15  nav, small buttons, table text */
  --fs-300:1.0625rem; /* 17  body */
  --fs-400:1.25rem;   /* 20  lead */
  --fs-500:1.5rem;    /* 24  h3 */
  --fs-600:clamp(1.75rem,1.35rem + 1.3vw,2.5rem);   /* 28 to 40  h2 */
  --fs-700:clamp(2.25rem,1.5rem + 2.7vw,3.75rem);   /* 36 to 60  h1 */
  --fw-body:400; --fw-ui:600; --fw-head:700; --fw-display:800;
  --lh-body:1.55; --lh-head:1.1;
  --ls-display:-.025em; --ls-head:-.015em; --ls-eyebrow:.08em;

  /* ---------- Space (4px base) ---------- */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px; --sp-8:64px;
  --section:clamp(56px,8vw,96px);
  --wrap:1160px; --gutter:clamp(20px,4vw,32px);

  /* ---------- Shape ---------- */
  --r-sm:8px;      /* inputs, small chips */
  --r-md:12px;     /* buttons */
  --r-lg:18px;     /* cards, product tiles */
  --r-xl:24px;     /* hero media */
  --r-pill:999px;  /* badges only */

  /* ---------- Shadow (green-black tint, three levels, never coloured glows) ---------- */
  --sh-1:0 1px 2px rgba(14,42,32,.08),0 1px 1px rgba(14,42,32,.04);
  --sh-2:0 8px 24px -8px rgba(14,42,32,.18),0 2px 4px rgba(14,42,32,.05);
  --sh-3:0 24px 48px -16px rgba(14,42,32,.30);

  /* ---------- Motion ---------- */
  --ease-out:cubic-bezier(.2,.7,.2,1);
  --t-fast:.12s; --t-base:.18s;
}

/* ---------- Base (shared) ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font-sans);font-size:var(--fs-300);line-height:var(--lh-body);color:var(--ink);background:var(--surface);font-weight:var(--fw-body)}
h1,h2,h3{line-height:var(--lh-head);color:inherit;margin:0}
h1{font-size:var(--fs-700);font-weight:var(--fw-display);letter-spacing:var(--ls-display)}
h2{font-size:var(--fs-600);font-weight:var(--fw-head);letter-spacing:var(--ls-head)}
h3{font-size:var(--fs-500);font-weight:var(--fw-head)}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:6px}
.on-dark :focus-visible,.dark :focus-visible{outline-color:var(--focus-on-dark)}
.num,.price,.kpi b{font-variant-numeric:tabular-nums}

/* ---------- Buttons (visual states only; motion lives in buttons.css/js) ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 24px;border:2px solid transparent;border-radius:var(--r-md);
  background:var(--cta);color:var(--cta-text)!important;font:var(--fw-ui) var(--fs-300)/1.2 var(--font-sans);text-decoration:none;cursor:pointer}
.btn:hover{background:var(--cta-hover)}
.btn-ghost,.ghost{background:transparent;color:var(--brand)!important;border-color:var(--brand)}
.btn-ghost:hover,.ghost:hover{background:var(--brand-tint)}
.on-dark .btn,.dark .btn{background:var(--cta-dark);color:var(--cta-dark-text)!important}
.on-dark .btn:hover,.dark .btn:hover{background:var(--cta-dark-hover)}
.on-dark .btn-ghost,.dark .btn-ghost{background:transparent;color:var(--on-dark)!important;border-color:var(--on-dark)}
.on-dark .btn-ghost:hover,.dark .btn-ghost:hover{background:rgba(238,243,239,.14)}   /* must follow .on-dark .btn:hover or ghost buttons turn amber */
.btn-fire{background:var(--fire);color:#fff!important}   /* only for fire register actions */
