/* MERIDIAN LINE RUN CLUB tokens: the single source of truth.
   Ground is pre-dawn asphalt; the chalk ground is the daylight flip.
   Components consume semantics only, never the primitives below. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-var.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- primitives (some steps sit unused on purpose: a re-skin needs room) ---- */
  --asphalt: #1d2126;      /* pre-dawn road */
  --asphalt-2: #171a1e;    /* the road in shade: banded legs and inset surfaces */
  --asphalt-3: #22262c;    /* the hover step, the only ground lighter than the road */
  --chalk: #f4f5f3;        /* course-marking chalk */
  --chalk-2: #e8eae7;
  --chalk-3: #dcdfdb;
  --reflect: #c8cdd3;      /* reflective silver, hairline stock */
  --reflect-dim: #8f979f;
  --hivis: #f04fa0;        /* bright: vest magenta on asphalt grounds */
  --hivis-deep: #b31e6f;   /* deep: the same magenta printed on chalk, AA at label sizes */

  /* ---- semantics: asphalt is the default ground ---- */
  --bg: var(--asphalt);
  --bg-2: var(--asphalt-2);
  --bg-3: var(--asphalt-3);
  --fg: #eef0ee;
  --muted: #a7aeb5;
  --line: rgba(200, 205, 211, 0.22);
  --line-strong: rgba(200, 205, 211, 0.62);
  --accent: var(--hivis);
  --accent-quiet: var(--hivis-deep);
  --on-accent: #17070f;
  --focus: #f4f5f3;        /* reflective tape ring */

  /* ---- type ---- */
  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --t-display: clamp(3rem, 12vw, 9.5rem);
  --t-h1: clamp(2.4rem, 6.6vw, 5.4rem);
  --t-h2: clamp(1.85rem, 4.2vw, 3.4rem);
  --t-h3: clamp(1.2rem, 2.1vw, 1.65rem);
  --t-lead: clamp(1.1rem, 1.7vw, 1.4rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-tick: 0.7rem;        /* distance ticks, bibs, table heads */
  --lh-tight: 0.94;
  --lh-heading: 1.06;
  --lh-body: 1.6;
  --track-tick: 0.15em;
  --track-display: -0.025em;
  --wght-display: 800;
  --wght-body: 400;

  /* ---- space ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 9rem;
  --section-pad: clamp(4.5rem, 11vh, 8.5rem);
  --gutter: clamp(1rem, 2.4vw, 1.5rem);
  --edge: clamp(1.15rem, 4vw, 3.5rem);
  --measure: 36rem;
  --max-w: 84rem;
  --trace-gutter: clamp(2.6rem, 7vw, 6.5rem); /* the lane the route occupies */

  /* ---- shape ---- */
  --r-1: 3px;
  --r-2: 9px;
  --r-3: 18px;
  --r-pill: 999px;
  --hair: 1px;
  --shadow-1: 0 1px 2px rgba(6, 8, 10, 0.35), 0 14px 34px rgba(6, 8, 10, 0.32);

  /* ---- motion ---- */
  --dur-1: 140ms;
  --dur-2: 300ms;
  --dur-3: 620ms;
  --dur-4: 980ms;
  --ease-out: cubic-bezier(0.22, 1, 0.28, 1);
  --ease-inout: cubic-bezier(0.76, 0, 0.24, 1);

  /* ---- layers ---- */
  --z-trace: 1;
  --z-marker: 2;
  --z-ruler: 40;
  --z-veil: 50;
  --z-skip: 60;
}

/* chalk ground: any wrapper carrying data-ground="chalk" flips the whole set */
[data-ground="chalk"] {
  --bg: var(--chalk);
  --bg-2: var(--chalk-2);
  --bg-3: var(--chalk-3);
  --fg: #16191d;
  --muted: #545c64;
  --line: rgba(29, 33, 38, 0.18);
  --line-strong: rgba(29, 33, 38, 0.55);
  --accent: var(--hivis-deep);
  --accent-quiet: var(--hivis-deep);
  --on-accent: #fff2f8;
  --focus: #1d2126;
}
