/* ==========================================================================
   Kool & The Gang — type tokens v1
   Companion to kg-tokens.css. Decided 21 Aug 2026.

   Anton        display   free, OFL          headings + hero     self-hosted
   Cheee Var    accent    Adobe Fonts        accents, site-wide  ADOBE CDN
   Hanken       body      free, OFL          everything read     self-hosted
   Plex Mono    data      free, OFL          years, dates, ids   self-hosted

   Note the split in the last column. Adobe's terms do not permit self-hosting
   their web font files, so Cheee alone loads from use.typekit.net. Everything
   else is served from our own origin. See TYPE.md.

   The one structural consequence of choosing Anton: it has a SINGLE WEIGHT.
   There is no light cut, no italic, no width axis. So the hierarchy below the
   hero cannot come from the display face — it comes from Hanken Grotesk at
   600 and 800. That is a real constraint and this file encodes it rather than
   pretending otherwise.
   ========================================================================== */

:root {

  /* ---- families ------------------------------------------------------- */

  /* Anton is tall and narrow. Arial Narrow is the closest ubiquitous
     fallback; without it the swap reflows badly. */
  --kg-font-display: Anton, "Arial Narrow", "Helvetica Neue Condensed",
                     system-ui, sans-serif;

  /* Cheee Variable (OH no Type Co) via Adobe Fonts kit nft8bij.
     ACCENT FACE, used sparingly across the whole site - revised 21 Aug 2026;
     it was previously restricted to the takeover layer. Anton remains the
     heading voice. Loads from use.typekit.net - no files to commit, none may
     be self-hosted.

     WHERE IT BELONGS: lyric phrases, pull quotes, big numerals, era markers,
     album titles at scale, empty and error states, the wordmark. Moments.

     WHERE IT DOES NOT: navigation, buttons, labels, form controls, tabular
     data, tour rows, body text. Anything a visitor must read to OPERATE the
     site stays in Anton or Hanken. Delight is not a substitute for wayfinding.

     MINIMUM SIZE 1.5rem, and it wants 2rem+. Below that the swell closes the
     counters and it goes muddy. See .kg-accent below for the enforced floor.

     ONE 64 KB FILE replaces all 25 retail styles, with continuous
     interpolation between them. The eight static families that were in this
     kit earlier have been removed; do not reference cheee-boogy et al.

     Two custom axes, read from the font's fvar table (v1.201):
       YEST  Yeast    0 - 1000   default 0    swell / bulge of the strokes
       GRVT  Gravity  0 - 1000   default 0    sag / droop of the baseline

     Always set both axes explicitly. The file's default is 0/0 (Stinkhead),
     which is the leanest, most upright instance and not what we want. */
  --kg-font-poster: "cheee-variable", "Titan One", Georgia, serif;

  /* Named instances, as axis pairs. The full 6x4 grid is documented in
     TYPE.md; these are the four worth having as tokens.

     Reading of the axes: YEST swells the letterforms (the Cooper Black
     quality we want), GRVT makes them sag. So "swollen but upright" is high
     YEST with low GRVT - and the drooping wavy-baseline look the poster mock
     shows is high GRVT. Confirm by eye in cheee-flavours.html. */
  --kg-poster-jimbo:  "YEST" 700, "GRVT" 0;      /* swollen, upright  */
  --kg-poster-oyen:   "YEST" 1000, "GRVT" 0;     /* maximum swell     */
  --kg-poster-boogy:  "YEST" 700, "GRVT" 1000;   /* swollen + drooping */
  --kg-poster-gnat:   "YEST" 1000, "GRVT" 1000;  /* both extremes     */

  --kg-font-body:    "Hanken Grotesk", system-ui, -apple-system,
                     "Segoe UI", sans-serif;

  --kg-font-data:    "IBM Plex Mono", ui-monospace, "SFMono-Regular",
                     "Courier New", monospace;

  /* ---- scale ----------------------------------------------------------
     Fluid, six steps. Ratio is roughly 1.28 at the small end opening to
     1.5 at the top, so the hero can be genuinely large without the middle
     of the scale becoming shouty. */

  --kg-step--1: clamp(0.80rem, 0.78rem + 0.10vw, 0.88rem);  /* eyebrows, meta   */
  --kg-step-0:  clamp(1.00rem, 0.97rem + 0.15vw, 1.09rem);  /* body             */
  --kg-step-1:  clamp(1.20rem, 1.10rem + 0.40vw, 1.45rem);  /* lede, standfirst */
  --kg-step-2:  clamp(1.55rem, 1.32rem + 0.95vw, 2.20rem);  /* subhead          */
  --kg-step-3:  clamp(2.20rem, 1.60rem + 2.60vw, 4.00rem);  /* section display  */
  --kg-step-4:  clamp(2.75rem, 1.40rem + 8.00vw, 7.00rem);  /* hero             */

  /* ---- tracking -------------------------------------------------------
     Anton is set tight by design. It needs a touch of positive tracking at
     hero size to stop the counters closing up, and rather more when it is
     used small. Negative tracking on Anton is always wrong. */

  --kg-track-hero:    0.005em;
  --kg-track-display: 0.010em;
  --kg-track-eyebrow: 0.120em;   /* letterspaced caps */
  --kg-track-body:    0em;

  /* ---- leading -------------------------------------------------------- */

  --kg-lead-hero:    0.88;
  --kg-lead-display: 0.96;
  --kg-lead-subhead: 1.15;
  --kg-lead-body:    1.62;
  --kg-lead-tight:   1.35;       /* captions, table cells */

  /* ---- measure -------------------------------------------------------- */

  --kg-measure:       66ch;      /* running text            */
  --kg-measure-lede:  52ch;      /* standfirst              */
  --kg-measure-note:  46ch;      /* captions, annotations   */
}


/* ==========================================================================
   Roles
   ========================================================================== */

/* Hero — the one place Anton goes really large. Caps only: the mock's
   proportions depend on it, and the uppercase subset is what makes the
   file small enough to preload. */
.kg-hero {
  font-family: var(--kg-font-display);
  font-weight: 400;                    /* Anton has one weight. This is it. */
  font-size: var(--kg-step-4);
  line-height: var(--kg-lead-hero);
  letter-spacing: var(--kg-track-hero);
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}

/* Section display — same face, smaller. */
.kg-display {
  font-family: var(--kg-font-display);
  font-weight: 400;
  font-size: var(--kg-step-3);
  line-height: var(--kg-lead-display);
  letter-spacing: var(--kg-track-display);
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}

/* Subhead — deliberately NOT the display face. Anton has no lighter cut, so
   stepping down from .kg-display to a heavy Hanken is what gives the
   hierarchy a third level. */
.kg-subhead {
  font-family: var(--kg-font-body);
  font-weight: 700;
  font-size: var(--kg-step-2);
  line-height: var(--kg-lead-subhead);
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

/* Eyebrow / label. Body face, not mono — mono is reserved for data. */
.kg-eyebrow {
  font-family: var(--kg-font-body);
  font-weight: 600;
  font-size: var(--kg-step--1);
  line-height: 1.2;
  letter-spacing: var(--kg-track-eyebrow);
  text-transform: uppercase;
  margin: 0;
}

.kg-lede {
  font-family: var(--kg-font-body);
  font-weight: 400;
  font-size: var(--kg-step-1);
  line-height: 1.45;
  max-width: var(--kg-measure-lede);
  margin: 0;
}

/* Running text. Zeroed like every other role here: layout containers own their own
   spacing, and a stray 1em ADDS to a flex or grid gap rather than collapsing into it,
   which is exactly how the homepage's release sleeves ended up 10 / 21 / 34 / 36px
   apart instead of an even 12. Where .kg-body genuinely is a run of paragraphs, the
   adjacent-sibling rule below puts the rhythm back without any help from the page. */
.kg-body {
  font-family: var(--kg-font-body);
  font-weight: 400;
  font-size: var(--kg-step-0);
  line-height: var(--kg-lead-body);
  max-width: var(--kg-measure);
  margin: 0;
}

/* Consecutive body paragraphs, and only those. A single .kg-body inside a card gets
   nothing; three of them in a row read as prose. */
.kg-body + .kg-body {
  margin-top: 1em;
}

/* Data. Years, dates, catalog numbers, identifiers. NOT eyebrows, NOT
   labels, NOT nav — once mono spreads the site reads like a dashboard,
   which is the wrong register for this band. */
.kg-data {
  font-family: var(--kg-font-data);
  font-weight: 400;
  font-size: var(--kg-step--1);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* Any column of figures. The fact base is full of chart peaks and dates;
   without this they will not line up. */
.kg-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}


/* ==========================================================================
   Cheee - the accent face
   --------------------------------------------------------------------------
   Revised 21 Aug 2026. Previously takeover-only; now used sparingly across the
   site for accents and moments of delight. Anton is still the heading face.

   THE BUDGET, so "sparingly" does not erode one component at a time:

     - At most ONE Cheee element per viewport.
     - Never in navigation, buttons, labels or data.
     - Never below 1.5rem.
     - If a page has no moment worth marking, it gets no Cheee. That is fine.

   Axes: YEST (Yeast, 0-1000, swells the strokes)
         GRVT (Gravity, 0-1000, sags the letterforms)

   Kit nft8bij holds the variable family; the eight statics were removed. The
   axis motion treatments live in kg-motion.css.

   CONSEQUENCE OF GOING SITE-WIDE, worth being deliberate about: the Adobe kit
   now has to load on any page carrying an accent, so a third-party font
   connection is no longer confined to campaign pages. Adobe sets
   font-display: auto and it cannot be overridden, so a flash of invisible text
   is possible. Because Cheee is accent-only, every page MUST remain complete
   and legible if it never arrives - which is a far easier bar than it would be
   for a heading face, but it has to be checked rather than assumed.
   ========================================================================== */

.kg-poster,
.kg-accent {
  font-family: var(--kg-font-poster);
  font-weight: 400;                    /* the kit declares 400; do not change */
  font-variation-settings: var(--kg-poster-jimbo);
  font-size: var(--kg-step-4);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}

/* Instance modifiers. Any of the 24 named instances, or anything between
   them, is reachable by overriding font-variation-settings alone. */
.kg-poster--oyen  { font-variation-settings: var(--kg-poster-oyen); }
.kg-poster--boogy { font-variation-settings: var(--kg-poster-boogy); }
.kg-poster--gnat  { font-variation-settings: var(--kg-poster-gnat); }

/* The wordmark. GRVT is what produces the sag, so the wavy baseline the
   poster mock shows is a Gravity move rather than a drawn asset.
   Keep the amplitude modest - the mock's wobble is nowhere near GRVT 1000. */
.kg-poster--wordmark {
  font-variation-settings: "YEST" 700, "GRVT" 240;
  transition: font-variation-settings 640ms var(--kg-ease-glide, ease);
}
.kg-poster--wordmark:hover,
.kg-poster--wordmark:focus-visible {
  font-variation-settings: "YEST" 700, "GRVT" 520;
}

/* Ambient version, for a takeover hero. Slow on purpose: the accent pack caps
   ambient motion at one loop per viewport, and this is that loop. */
@keyframes kg-poster-sag {
  0%, 100% { font-variation-settings: "YEST" 700, "GRVT" 180; }
  50%      { font-variation-settings: "YEST" 700, "GRVT" 420; }
}
.kg-poster--sagging {
  animation: kg-poster-sag 9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .kg-poster,
  .kg-poster--wordmark,
  .kg-poster--sagging {
    animation: none !important;
    transition: none !important;
  }
}


/* ==========================================================================
   Loading
   --------------------------------------------------------------------------
   Self-host Anton, Hanken Grotesk and IBM Plex Mono. Google's CDN adds a
   third-party connection and no longer provides a shared cache, so hotlinking
   costs a handshake and buys nothing.

   Cheee is the exception and not by choice: Adobe's terms forbid self-hosting,
   so it loads from use.typekit.net. Consequences worth designing around —

     - it is a third-party connection, so preconnect to use.typekit.net on
       pages that use it and nowhere else;
     - load it ONLY on the takeover layer, never in the global stylesheet;
     - the takeover has to survive the font failing to arrive, because we do
       not control that origin. Give .kg-poster a real fallback and check the
       layout in it.

   Preload the DISPLAY face only — Anton is in the hero and it is the one that
   causes visible reflow. Preloading the whole system defeats the purpose, and
   an Adobe-served face cannot be preloaded usefully anyway.

   The size-adjust and metric values below need MEASURING against the real
   fallbacks; the numbers here are deliberately absent rather than invented.
   Use a fallback-matching tool once the subsets are built.
   ========================================================================== */

/*
@font-face {
  font-family: "Anton Fallback";
  src: local("Arial Narrow");
  size-adjust: __MEASURE_ME__%;
  ascent-override: __MEASURE_ME__%;
  descent-override: __MEASURE_ME__%;
}
*/

/* Budget: the whole type system should land under 120 KB compressed.
   Anton subset to uppercase + punctuation is the single biggest saving —
   the hero and section display are both caps, so the lowercase glyphs are
   dead weight in that file. */


/* --------------------------------------------------------------------------
   The size floor, enforced rather than documented.
   Cheee below 1.5rem closes its own counters. If a component needs an accent
   smaller than this, it does not need an accent.
   -------------------------------------------------------------------------- */
.kg-accent,
.kg-poster {
  font-size: max(1.5rem, var(--kg-step-2));
}

/* Escape hatch for the wordmark and other deliberate exceptions, where the
   size is set by the lockup rather than the type scale. Use knowingly. */
.kg-accent--free,
.kg-poster--free {
  font-size: inherit;
}
