/*
 * Fortman family theme, warm earth palette (brown, terracotta, mustard, cream):
 * every colour, font, size and spacing value the app uses.
 * public/css/*.css use these tokens only (a test greps for literals).
 *
 * Three independent token sets, so they compose:
 *   1. palette  - light (default) and dark (prefers-color-scheme: dark)
 *   2. density  - Larger (default) and Standard ([data-mode="standard"])
 *   3. fixed    - things that do not vary with either
 * Colour tokens are plain hex values so test/theme-contrast.test.js can check them.
 * Font URLs are relative to this file (served at /theme/).
 */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
}

:root {
  /* palette: light */
  --bg: #f8f1e5;
  --surface: #fffaf2;
  --ink: #2e1f14;
  --muted: #6b4f3a;
  --line: #e0d0b8;
  --control-border: #8c6d52;
  --accent: #9c4220;
  --accent-hover: #7e3318;
  --on-accent: #ffffff;
  --accent-soft: #f6e1d4;
  --focus: #9c4220;
  --error: #a51d2d;
  --error-soft: #fbe9e8;
  --success: #4d6a1e;
  --success-soft: #eaf0d8;
  --chip: #efe3cf;
  color-scheme: light;

  /* density: Larger (default) */
  --font-family: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --font-weight-strong: 700;
  --fs-body: 1.1875rem;
  --fs-small: 1.0625rem;
  --fs-h1: 1.5rem;
  --fs-h2: 1.25rem;
  --fs-h3: 1.1875rem;
  --lh-body: 1.5;
  --lh-heading: 1.15;
  --control-h: 3.5rem;
  --tap: 3rem;
  --border-w: 2px;
  --radius: 0.75rem;
  --space-1: 0.5rem;
  --space-2: 0.875rem;
  --space-3: 1.25rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --gutter: 1.125rem;
  --icon: 1.25rem;
  --logo: 2.5rem;
  --check: 1.625rem;
  --card-pad: 1.25rem;
  --list-gap: 0.875rem;

  /* fixed */
  --max-width: 40rem;
  --max-width-wide: 64rem;
  --measure: 34em;
  --radius-pill: 999px;
  --focus-w: 3px;
  --font-weight-heading: 700;
  --duration-fade: 300ms;
  --opacity-busy: 0.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* palette: dark */
    --bg: #1c1612;
    --surface: #251d17;
    --ink: #f3e9dc;
    --muted: #c9b49a;
    --line: #41342a;
    --control-border: #9a8268;
    --accent: #f0a27a;
    --accent-hover: #f5b895;
    --on-accent: #2a1308;
    --accent-soft: #3b251a;
    --focus: #f0a27a;
    --error: #f5a3a8;
    --error-soft: #40201f;
    --success: #b5d07a;
    --success-soft: #2a3318;
    --chip: #30261e;
    color-scheme: dark;
  }
}

[data-mode="standard"] {
  /* density: Standard */
  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-weight-strong: 600;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-h1: 1.375rem;
  --fs-h2: 1.125rem;
  --fs-h3: 1rem;
  --lh-body: 1.45;
  --control-h: 2.75rem;
  --tap: 2.5rem;
  --border-w: 1px;
  --radius: 0.5rem;
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.25rem;
  --space-5: 1.75rem;
  --gutter: 1rem;
  --icon: 1.125rem;
  --logo: 2rem;
  --check: 1.25rem;
  --card-pad: 0.875rem;
  --list-gap: 0.625rem;
}
