/*
  Brand layer: colours and fonts shared by the marketing website and every app
  (portals, client apps). Website mode and app mode both build on this file.

  Light is the default. Dark is chosen with <html data-theme="dark">.
  Fonts are served from fonts/ (no request to Google).
*/
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dm-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/dm-mono-500.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/playfair-display.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Brand: the same in both themes */
  --navy: #102b49;
  --navy-2: #173b60;
  --gold: #d3ad5d;
  --gold-soft: #e8c879;

  /* Surfaces and text */
  --bg: #f4f7fb;            /* page behind cards */
  --surface: #ffffff;       /* cards, sidebar, dialogs */
  --surface-2: #eef2f7;     /* table header band, hover, inputs at rest */
  --line: #dfe7f0;
  --ink: #142e4b;
  --muted: #5b6f86;

  /* Interactive */
  --accent: #102b49;        /* primary buttons, links */
  --on-accent: #ffffff;
  --gold-ink: #806027;      /* gold that is readable as text on a light surface */
  --active-bg: rgb(211 173 93 / 16%);
  --focus: #806027;

  /* The bar across the top of every app: navy in both themes */
  --bar: #102b49;
  --bar-ink: #ffffff;
  --bar-muted: #b5c4d6;
  --bar-line: #24405e;

  /* States. Green live or done well, amber waiting on someone, red failed,
     blue neutral information only (never a state). */
  --ok: #1f7a4d;
  --ok-bg: #e4f3ea;
  --wait: #9a5700;
  --wait-bg: #fbf0dc;
  --fail: #b42318;
  --fail-bg: #fbe9e7;
  --info: #1d5f8f;
  --info-bg: #e5eff8;

  --sans: "DM Sans", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;

  --radius: 6px;
  --shadow: 0 1px 2px rgb(16 43 73 / 6%), 0 8px 24px rgb(16 43 73 / 8%);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1a2b;
  --surface: #10243a;
  --surface-2: #16304b;
  --line: #24405e;
  --ink: #e6edf5;
  --muted: #93a7bd;

  --accent: #d3ad5d;
  --on-accent: #102b49;
  --gold-ink: #e3c37e;
  --active-bg: rgb(211 173 93 / 14%);
  --focus: #e8c879;

  --bar: #0d2238;
  --bar-line: #24405e;

  --ok: #5fce95;
  --ok-bg: rgb(95 206 149 / 14%);
  --wait: #f0b354;
  --wait-bg: rgb(240 179 84 / 14%);
  --fail: #f58a80;
  --fail-bg: rgb(245 138 128 / 14%);
  --info: #7cbce8;
  --info-bg: rgb(124 188 232 / 14%);

  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
}
