/*
 * Design tokens for the C3 design. Every color, font and shape the site uses
 * is defined here and nowhere else.
 *
 * The --sev-* colors must match LEVELS in crates/cannoli/src/severity.rs;
 * the tokens_match_severity test fails if they drift.
 */
:root {
  /* Surfaces and text */
  --bg: #FFF6E9;
  --ink: #1A1A2E;
  --card: #FFFDF8;
  --tint: #FCEBD0;
  --muted: #5C5A70;
  --rule: #E5DCCB;
  --ladder-muted: #6B6980;
  --cobalt: #2340C8;
  --alert: #C23224;

  /* Map palette (mirrored in web/static/map/style.json) */
  --map-land: #FCEBD0;
  --water: #AFC3F2;
  --park: #C9DFA8;

  /* Cannoli-meter, 1 (mildest) to 5. White text passes 4.5:1 on each. */
  --sev-1: #4F7524;
  --sev-2: #776A0E;
  --sev-3: #B4610F;
  --sev-4: #C24A1E;
  --sev-5: #C23224;

  /* Type */
  --font-ui: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mono-tracking: 0.08em;

  /* Shape */
  --border-width: 2px;
  --border: var(--border-width) solid var(--ink);
  --radius-pill: 999px;
  --touch: 44px;

  /* Photo placeholder */
  --placeholder-bg: #E9DCC4;
  --stripes: repeating-linear-gradient(45deg, rgba(26, 26, 46, .08) 0 8px, transparent 8px 16px);

  /* Layout */
  --page-wide: 1360px;
  --page: 1200px;
  --gutter: 32px;
  /* Height of what sticks to the top while scrolling (the top bar). Anchors
     and the Hall of Fame's large box stop just below it. */
  --header-h: 74px;
  /* The sheet docked beside the map on wider screens: 572px on laptops and
     up (room for the headline on one line), down to 400px on narrower
     windows so the map keeps its share. */
  --sheet-w: clamp(400px, 45vw, 572px);
  /* How much of the sheet shows when it's lowered on phones (plus the home
     bar's inset). sheet.js reads it. */
  --sheet-peek: 168px;
}

@media (max-width: 900px) {
  :root {
    /* The top bar takes two rows. */
    --header-h: 134px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}
