/* Mad Cow — design tokens. Single source of truth for both sites.
   Read docs/design-brief.md before changing anything here.
   No hex value or pixel size belongs anywhere outside this file. */

/* ---- Typefaces ----
   Self-hosted, so no request leaves for fonts.googleapis.com or
   fonts.gstatic.com. Files are Google's own latin-subset woff2, committed
   under shared/fonts/ with each family's OFL licence beside them; the
   variable axes are kept only where the design uses them (Bricolage needs
   wdth and wght for --display-stretch / --display-weight below, the others
   wght alone). DM Mono ships as two static weights upstream, not variable.

   font-display: swap is required by the quality floor in CLAUDE.md.
   Paths are relative to this file, so the Pages copy step into
   assets/shared/ resolves them unchanged on both sites. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Colour ----
     --blue is sampled from the transom decal. Fixed. Do not adjust it,
     do not shift it toward navy or teal. Everything else defers to it. */
  --hull:      #EDF0F0; /* page base — gelcoat grey, cooled and lifted */
  --chalk:     #FAFBFB; /* raised surfaces, cards */
  --blue:      #0067A1; /* sampled. fixed. */
  --blue-deep: #004E7C; /* hover / pressed */
  --mark-blue: #0067A3; /* the 2026-10 sailboat mark's Sail Blue, from its logo
                           pack. The header mark on sailing and photos only; the
                           traced wordmark beside it stays --blue. */
  --deep:      #05273C; /* body text, inverted fields — night water */
  --spray:     #9BC3D6; /* dividers, muted secondary. Never text on light: 1.8:1 */

  /* One accent at two values. --ensign on light surfaces, --ensign-lt on
     --deep fields. Never cross them — each fails contrast on the other's
     background. One accent element per viewport; see the budget note in
     the brief before adding a second. */
  --ensign:    #B3123C;
  --ensign-lt: #FF7D99;

  /* ---- Type ----
     Families are self-hosted; the @font-face block above is the only place
     they load from. No page links a Google host.
     The wordmark is artwork, not type — never re-set MAD COW in a font. */
  --font-display: "Bricolage Grotesque", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font-body:    "Instrument Sans", system-ui, "Segoe UI", sans-serif;
  /* No ui-monospace: on Windows/Chrome it can never be selected — measured
     2026-09-04, it resolves to a proportional face ONLY as a sole family
     ("iiiiiiiiii" 277.8px vs "MMMMMMMMMM" 889.2px at 100px); behind any
     fallback Chrome falls straight through it to the next family, so this
     stack rendered identically with and without it. Dropped as dead weight,
     not as a fix — it changed no rendering anywhere. See #52. */
  --font-mono:    "DM Mono", "Cascadia Mono", Consolas, monospace;

  /* Display headings sit slightly condensed and heavy: wdth 88–92, wght 620–700 */
  --display-stretch: 90%;
  --display-weight:  650;

  /* Type scale — minor-third-ish, rem-based */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.1875rem;
  --text-xl:   1.4375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --leading-tight: 1.15;
  --leading-body:  1.55;

  /* ---- Space — 8px rhythm with a half step ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6rem;

  /* ---- Structure ----
     No border radius anywhere. The decal is cut vinyl with hard edges,
     so there is deliberately no --radius token to reach for. */
  --measure:      65ch;                      /* body text line length cap */
  --page-max:     72rem;
  --shadow-card:  0.5rem 0.5rem 0 var(--blue); /* hard offset, no blur */
  --ease-quick:   90ms ease;                 /* eye tracking, hovers */
  --border-hair:  1px solid var(--spray);

  /* The lightbox's own motion, held apart from --ease-quick because it is the
     one duration a story measures directly: #12 AC 5 reads the computed
     transition-duration under prefers-reduced-motion and requires 0. The
     blanket reduced-motion rule in base.css shortens everything to 0.01ms,
     which is imperceptible but is not zero (it reads back as 1e-05s), so this
     token is re-pointed at a true 0s there. Any lightbox transition must be
     written against this token rather than a literal duration, or it escapes
     that override - and note the token alone is not sufficient either; see the
     matching !important rule in base.css for why. */
  --lightbox-motion: 90ms ease;
}
