/* ============ type — one voice, everywhere ============
   Loaded after the section stylesheets. One family (Mona Sans) at one heading weight and
   one width: a heading differs from text only by its size. The italic serif accents are
   retired — an emphasised word now stays in the same voice as its sentence. Mono stays
   for the small technical labels (kickers, readouts, captions). */

:root {
  --fw-head: 600;
  --fw-text: 420;
  --wd-head: 104%;
}

/* the old accent class: same family, same weight, same width as whatever it sits in */
.serif {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  font-stretch: inherit;
  letter-spacing: inherit;
}

/* every heading, every big statement, every big number */
.display,
.h2,
.hero__name,
.hero__role,
.about__text,
.about__stat-num,
.process__list,
.lab__title,
.learn__acc,
.learn__vword,
.work__title,
.index__title,
.case__title,
.stack__title,
.tk__title,
.road__title,
.open__title,
.contact__title,
.ask-empty__title {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: var(--fw-head);
}
.display,
.h2,
.hero__name,
.hero__role,
.about__text,
.about__stat-num,
.process__list,
.learn__acc,
.index__title,
.stack__title,
.tk__title,
.contact__title {
  font-stretch: var(--wd-head);
}

/* running text: one weight */
.lead,
.hero__statement,
.work__intro,
.lab__intro,
.open__intro,
.stack__intro,
.case__desc {
  font-weight: var(--fw-text);
}

/* the few small places that used the serif for a word or a number */
.contact__ask {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav__chap-name,
.menu__links a[aria-current] .menu__name,
.deck__num {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: var(--fw-head);
  letter-spacing: -0.02em;
}
.nav__chap-name { font-size: 18px; }

/* ---------- chapter titles: one size, one line-height, one tracking ----------
   Lab, Work, Stack, Experience and In the open all open on a title of --fs-chapter. Contact keeps
   its own, larger size: it is the finale. The Experience rule names the track state too, because
   that stylesheet sizes its title there with a heavier selector. */
.lab__title,
.work__title,
.stack__title,
.xp__title,
.experience.is-track .xp__title,
.open__title {
  font-size: var(--fs-chapter);
  line-height: 0.95;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

/* the case titles breathe in width as each case crosses the centre of the reel (work.js writes
   --wdth, 84 → 112). Re-centred so a case in focus reads at the site's one heading width, 104%,
   and narrows from there as it leaves; with no reel (phones, reduced motion) it rests at 104%. */
.case__title {
  --wdth: 112;
  font-stretch: calc((104 + (var(--wdth) - 112) * 0.75) * 1%);
}

/* ---------- section rhythm ----------
   Every chapter that opens on its own starts its kicker the same distance below its edge
   (--section-pad-top; the Lab sets it in css/lab.css). The exceptions are deliberate: About and
   In the open are entered through a transition (the portal, the opening) and keep their short
   lead-ins; Stack and Experience are pinned stages that frame their own heads. */
.work { padding-top: var(--section-pad-top); }
