/* ==========================================================================
   Bendigo Heritage Tender Portal — design tokens
   Drop-in replacement for the app's existing :root variable sheet.
   The app's current names (--primary, --accent, --bg …) are preserved at the
   bottom as aliases, so nothing needs renaming to adopt this sheet.

   Derived from the Bendigo Heritage brand system:
   Navy #112539 (PMS 539) · Gold #A98239 (PMS 7557)
   ========================================================================== */

:root {
  /* ---------- Brand ---------- */
  --brand:            #112539;  /* Bendigo Heritage Navy */
  --brand-hover:      #1c3450;
  --brand-active:     #0b1826;
  --brand-ink:        #fbf8f1;  /* text on brand */

  --accent:           #a98239;  /* Bendigo Heritage Gold */
  --accent-hover:     #8a6a2e;
  --accent-active:    #6f5423;
  --accent-solid:     #8a6a2e;  /* filled accent surfaces — #fff on it is 5.02:1 AA */
  --accent-ink:       #ffffff;  /* text on --accent-solid (never on --accent, 3.54:1) */
  --accent-soft:      #f7f0e3;
  --accent-line:      #e5d3b3;

  /* Navy ramp */
  --navy-900: #0b1826;
  --navy-800: #112539;
  --navy-700: #1c3450;
  --navy-600: #294567;
  --navy-500: #3a577c;
  --navy-400: #5c749a;
  --navy-300: #90a1bb;
  --navy-200: #c2ccda;
  --navy-100: #e4e9f0;
  --navy-50:  #f2f5f9;

  /* Gold ramp */
  --gold-900: #6f5423;
  --gold-800: #8a6a2e;
  --gold-700: #a98239;
  --gold-600: #ba9550;
  --gold-500: #c8a86c;
  --gold-400: #d7bd8d;
  --gold-300: #e5d3b3;
  --gold-200: #f0e4cf;
  --gold-100: #f7f0e3;
  --gold-50:  #fbf7ef;

  /* ---------- Ink / neutral ramp ---------- */
  --ink-900: #0f1a24;   /* headings — 15.8:1 on --surface */
  --ink-800: #1f2b36;   /* body      — 12.1:1 */
  --ink-700: #3d4b58;
  --ink-600: #5a6672;   /* muted     — 5.1:1  AA at all sizes */
  --ink-500: #7d8894;
  --ink-400: #a6afb9;
  --ink-300: #c9d0d7;
  --ink-200: #e2e7ec;
  --ink-100: #f0f3f6;

  /* ---------- Surfaces & lines ---------- */
  --surface-page:     #fbf8f1;  /* parchment — the app background */
  --surface:          #ffffff;  /* cards, tables */
  --surface-raised:   #f6f1e7;  /* table headers, inset panels */
  --surface-sunken:   #f2efe8;
  --surface-brand:    var(--brand);
  --surface-vault:    #0e1f31;  /* sealed-submissions panel */

  --line:             #ece3d2;  /* hairline sand — default card border */
  --line-strong:      #d8ccb4;
  --line-cool:        #e2e7ec;  /* inside data tables */
  --rule-accent:      2px solid var(--accent);

  /* ---------- Semantic status ---------- */
  --success:      #2f6b45;
  --success-ink:  #1e4b2f;
  --success-bg:   #e6f0ea;
  --success-line: #bcd7c6;

  --warning:      #8a6a2e;
  --warning-ink:  #6f5423;
  --warning-bg:   #f7ecd7;
  --warning-line: #e0c797;

  --error:        #a5372f;
  --error-ink:    #7e2721;
  --error-bg:     #f9e8e6;
  --error-line:   #e6bab5;

  --info:         #294567;
  --info-ink:     #1c3450;
  --info-bg:      #e9eef4;
  --info-line:    #c2ccda;

  /* ---------- Type ---------- */
  /* One self-hosted webfont (Libre Caslon Text, standing in for licensed
     ITC Caslon 224 Std) for headings; system sans for all UI chrome. */
  --font-display: "Libre Caslon Text", "ITC Caslon 224 Std", Georgia, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-display: 40px;
  --fs-h1: 30px;
  --fs-h2: 22px;
  --fs-h3: 17px;
  --fs-lg: 16px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 11.5px;
  --fs-countdown: 44px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-snug: 1.4;
  --lh-body: 1.55;

  --ls-tight: -0.01em;
  --ls-wide: 0.08em;
  --ls-wider: 0.16em;   /* letter-spaced small-caps labels (brand device) */

  /* ---------- Spacing ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ---------- Radius ---------- */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  /* ---------- Elevation ---------- */
  --shadow-sm: 0 1px 2px rgba(17,37,57,.08);
  --shadow-md: 0 2px 10px rgba(17,37,57,.09);
  --shadow-lg: 0 12px 34px rgba(17,37,57,.16);
  --shadow-focus: 0 0 0 3px rgba(169,130,57,.45);

  /* ---------- Layout ---------- */
  --container: 1120px;
  --container-wide: 1320px;
  --header-h: 64px;
  --hit-min: 44px;      /* minimum touch target, contractor screens */

  /* ---------- Motion ---------- */
  --dur-fast: 120ms;
  --dur-med: 180ms;
  --dur-slow: 200ms;
  --ease-out: cubic-bezier(0, 0, .2, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
}

/* Legacy aliases — the names the app already themes off today. */
:root {
  --primary: var(--brand);
  --primary-dark: var(--brand-active);
  --bg: var(--surface-page);
  --card: var(--surface);
  --border: var(--line);
  --text: var(--ink-800);
  --text-muted: var(--ink-600);
  --radius: var(--radius-md);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-med: 0ms; --dur-slow: 0ms; }
}
