/*
  ============================================================================
  ATELIER: the homepage art direction (linked last from index.html; the case-study pages never
  load it, so VOID303, VU, LUCIEN, THE ALCHEMIST and Mother Tracker keep their own design)
  ============================================================================

  THE IDEA
  The listening room, then a record played through, chapter by chapter. Colour does the
  editing: the chapters alternate between dark and light, so each one reads as its own scene.

      hero         the listening room (untouched)
      prologue     deep burgundy, straight out of the room's dark          DARK
      side A       paper, the record and its five tracks                   LIGHT
      work         a wine title band, then the strips on warm white        WINE → LIGHT
      interlude    near black with a wine glow: the dramatic moment       DARK
      about        ivory, the liner notes; then their footnotes            LIGHT
      footer       umber and wine, the telephone                           DARK

  TYPE: two voices. The serif is for headlines and short expressive moments only; every running
  text, of any length, is the sans, in one size and one weight.
    Display   Instrument Serif (roman + italic). Sentence case; the emphasis in italic (gold leaf
              on the dark chapters, wine on the light ones). Project names alone in capitals.
    Text      Neue Montreal 400. Body, the introduction, navigation, labels, controls.
    Logo      Fraunces, THE logo only; not touched here.

      role        face                 size (clamp)            lh     tracking   used for
      headline    Instrument Serif     2.6 → 7.25 rem          1.04   -0.012em   prologue, Side A, Selected work,
                                                                                 interlude, About
      display     Instrument Serif     1.9 → 3.75 rem          1.08   -0.01em    project names, the pull quote,
                                                                                 the footer line
      title       Instrument Serif     1.5 → 2.4 rem           1.15    0         the tracks, the name in the intro
      intro       Neue Montreal 400    1.2 → 1.5 rem           1.5     0         the prologue's one sentence
      body        Neue Montreal 400    1.0625 rem              1.7     0         all running text
      label       Neue Montreal caps   0.72 rem                1.4    +0.14em    kickers, numbers, captions

  GOLD: a material, used sparingly: gold leaf on the italic words of the dark chapters, and
  metal hairlines (the pull quote's rule, the record's ring). Never a flat fill on type.

  TEXTURE: a fine, still film grain is part of each chapter's background (so it never sits on
  top of a picture or a letter): light specks on the dark chapters, dark specks on the paper.

  MOTION: entrances in motion.js (statements rise and sharpen with the scroll; lines, fades,
  curtains); depth in atelier.js (chapters recede as the next arrives; pictures drift).
*/

/* ============================================================================
   TOKENS
   ============================================================================ */
body[data-page='home'] {
  --oxblood: #22060b;
  --cherry: #3a0a12;
  --wine: #5a1822;
  --wine-deep: #431019;
  --wine-bright: #86202f;
  --ivory: #f3ecdf;
  --paper: #ece3d3;
  --warm-white: #f8f4ed;
  --umber: #140b09;
  /* gold is a material here, not a colour: a muted, worn brass. Flat, it is kept for hairline
     details only; on letters it is the leaf below. */
  --gilt: #a58a62;
  --gilt-light: #c9b38f;
  /* gold leaf, for the few italic words on the dark chapters: a soft, uneven metallic sweep
     (darker brass, a dull highlight, back to brass), worn by a fine dark grain. Clipped to the
     letters with .gilt-leaf / the selectors in GOLD below. */
  --gold-sweep: linear-gradient(
    104deg,
    #8a6f4b 0%,
    #b49a70 18%,
    #d2bf9b 31%,
    #a98e64 46%,
    #c7b18b 60%,
    #e0d2b3 69%,
    #a3875d 84%,
    #8d7350 100%
  );
  --gold-wear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.16 0 0 0 0 0.09 0 0 0 1.9 -1.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  /* the hairline version: a thin bar of the same metal */
  --gold-line: linear-gradient(90deg, #8a6f4b, #cdb995 45%, #a3875d 70%, #8a6f4b);

  /* the shared names, in this key */
  --cream: var(--ivory);
  --ink: #1f1311;
  --burgundy: var(--wine);
  --surface: var(--ivory);
  --on-surface: var(--ink);
  --muted: rgba(31, 19, 17, 0.6);
  --line: rgba(31, 19, 17, 0.16);
  --cream-muted: rgba(243, 236, 223, 0.62);
  --cream-line: rgba(243, 236, 223, 0.16);
  --color-paper: var(--paper);

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-serif: var(--font-display);

  /* THE TYPE SCALE (see the table above). Three serif sizes, one text size, one label size. */
  --fs-headline: clamp(2.6rem, 1rem + 5.3vw, 7.25rem); /* every section opener: the prologue's line is the measure */
  --fs-display: clamp(1.9rem, 1.1rem + 2.3vw, 3.75rem); /* project names, the pull quote, the footer line */
  --fs-title: clamp(1.5rem, 1.1rem + 1.1vw, 2.4rem); /* the tracks, the name in the introduction */
  --fs-intro: clamp(1.125rem, 1rem + 0.3vw, 1.3rem); /* the one introductory sentence, under the prologue */
  --fs-body: 1.0625rem; /* all running text */
  --fs-label: 0.72rem;
  --lh-body: 1.7;
  /* the older names, kept pointing into the scale */
  --fs-statement: var(--fs-headline);
  --fs-display-xl: var(--fs-headline);
  --fs-display-l: var(--fs-headline);
  --fs-display-m: var(--fs-title);
  --fs-serif-m: var(--fs-title);
  --fs-lead: var(--fs-body);
  --ls-label: 0.14em;
  --measure: 34em;

  /* the chapter rhythm */
  --chapter: clamp(7rem, 13vw, 12rem);

  /* film grain (SVG, generated in the browser): specks with their own transparency, laid in a
     section's background; light specks for the dark chapters, dark specks for the paper */
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.88 0.42 0 0 0 -0.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.12 0 0 0 0 0.08 0.5 0 0 0 -0.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

  background: transparent;
}

/* No CSS smooth scrolling on the homepage: ScrollTrigger measures the page by jumping the scroll
   position, and a smooth scroll turns those jumps into animations (the pinned record then lands
   in the wrong place). Same-page links scroll smoothly from js/main.js instead. */
html:has(body[data-page='home']) {
  scroll-behavior: auto;
}

/* the dark chapters: one switch for text, labels and hairlines */
body[data-page='home'] :is(.statement, .work__head, .interlude) {
  --on-surface: var(--ivory);
  --muted: rgba(243, 236, 223, 0.6);
  --line: rgba(243, 236, 223, 0.16);
  color: var(--ivory);
}

body[data-page='home'] main {
  background: var(--umber);
}

/* ============================================================================
   THE TWO VOICES
   ============================================================================ */
body[data-page='home'] :is(.statement__text, .tracks__title, .track__name, .work__title, .strip__title, .interlude__line, .about__intro, .about__quote, .footer__line, .nav-overlay__link) {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  text-transform: none;
  font-feature-settings: 'kern', 'liga';
}

body[data-page='home'] .strip__title {
  text-transform: uppercase;
}

body[data-page='home'] :is(.statement__text, .tracks__title, .interlude__line, .about__intro, .about__quote, .footer__line) em,
body[data-page='home'] .nav-overlay__link {
  font-style: italic;
}

/* labels: tracked capitals in the grotesk; numbers between quiet brackets */
body[data-page='home'] .t-label {
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  line-height: 1.4;
}

body[data-page='home'] .br {
  color: inherit;
  opacity: 0.5;
  padding-inline: 0.12em;
}

/* the three serif sizes */
body[data-page='home'] :is(.statement__text, .tracks__title, .work__title, .interlude__line) {
  font-size: var(--fs-headline);
  line-height: 1.04;
  letter-spacing: -0.012em;
}

/* the About introduction is a long sentence: it opens its chapter one step below the headlines,
   so the person, not the type, comes first */
body[data-page='home'] .about__intro {
  font-size: clamp(2rem, 1.15rem + 2.3vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

body[data-page='home'] :is(.strip__title, .about__quote, .footer__line) {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

body[data-page='home'] :is(.track__name, .statement__name) {
  font-size: var(--fs-title);
  line-height: 1.15;
  letter-spacing: 0;
}

/* the one text size: everything that is read, in the sans, at the same size and weight */
body[data-page='home'] :is(.track__text, .about__body, .about__body p, .about__coda, .about__fact-value, .footnote__text) {
  font-family: var(--font-sans, 'Neue Montreal', sans-serif);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
}

/* GOLD: leaf on the italic words of the dark chapters. The padding lets the italic overhang
   carry the metal too (the negative margin keeps the spacing). Once the headline is split into
   words (motion.js), the leaf moves onto each word, which can then catch the light where the
   cursor is (cursorType.js sets --gx/--gy, the cursor in the word's box, and --gl, 0–1): a pale,
   warm sheen on the metal, small and soft, the way gilding brightens under a passing lamp. */
body[data-page='home'] :is(.statement__text, .interlude__line, .work__title) em:not(:has(.type-word)),
body[data-page='home'] :is(.statement__text, .interlude__line, .work__title) em .type-word {
  padding-inline: 0.06em 0.12em;
  margin-inline: -0.06em -0.12em;
  color: var(--gilt-light); /* without background-clip: text */
  background-image:
    radial-gradient(
      circle 0.95em at var(--gx, -9em) var(--gy, -9em),
      rgba(255, 247, 228, calc(var(--gl, 0) * 0.78)) 0%,
      rgba(244, 228, 192, calc(var(--gl, 0) * 0.32)) 42%,
      rgba(244, 228, 192, 0) 75%
    ),
    var(--gold-wear),
    var(--gold-sweep);
  background-size: 100% 100%, 140px 140px, 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body[data-page='home'] :is(.statement__text, .interlude__line, .work__title) em:not(:has(.type-word)),
  body[data-page='home'] :is(.statement__text, .interlude__line, .work__title) em .type-word {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
/* the line masks of the scroll reveals: room for ascenders, italic overhangs and descenders,
   so nothing is ever clipped (the negative margin keeps the layout) */
body[data-page='home'] :is(.reveal-line-mask, .reveal-mask-line-mask) {
  padding: 0.2em 0.14em 0.24em 0.04em;
  margin: -0.2em -0.14em -0.24em -0.04em;
}

/* the old full-page grain overlay is retired: the grain now lives in each chapter */
.grain {
  display: none;
}

/* ============================================================================
   HERO: the listening room stays as it is; only its words take the new voices
   ============================================================================ */
body[data-page='home'] .sticky-name .sticky-name__hello {
  padding-left: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  opacity: calc(var(--hello, 1) * 0.92);
}

/* the role under the logo: the same serif italic as "Hi, I'm" */
body[data-page='home'] .sticky-name .sticky-name__aside {
  /* opened up, airy; the tracking also adds space after the last letter, so the same space before
     the first keeps the line optically centred under the logo */
  padding-left: 0.11em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: none;
  opacity: calc(var(--hello, 1) * 0.9);
}

@media (max-width: 700px) {
  body[data-page='home'] .sticky-name .sticky-name__aside {
    padding: 0.35em 0.9em 0.35em calc(0.9em + 0.11em);
  }
}

body[data-page='home'] .room__album {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2em;
  letter-spacing: 0.01em;
}

body[data-page='home'] .room__artist {
  letter-spacing: 0.12em;
}

/* the caption's separator: space, not a dash (the italic album title does the separating) */
body[data-page='home'] .room__dash {
  display: inline-block;
  width: 0.7em;
  overflow: hidden;
  color: transparent;
}

/* the hero ends in the dark the prologue begins in */
body[data-page='home'] .room {
  background: #1c0609;
}

/* ============================================================================
   THE GROUND (js/modules/pageTone.js, html.has-tone): one colour fills the screen and eases to
   the next chapter's as that chapter reaches the middle of the screen, so dark and light meet
   without a seam. The chapters are see-through; texture is kept for the dark chapters only (the
   prologue and the interlude: fine grain and a low wine glow), faded out at their top and bottom
   so it never ends in a line. The light chapters are plain paper. Without JS, each chapter keeps
   its own background (below).
   ============================================================================ */
html.has-tone body[data-page='home'] main {
  transition: background-color 0.95s cubic-bezier(0.45, 0, 0.25, 1);
}

html.has-tone body[data-page='home'] :is(.statement, .tracks, .work, .work__head, .work__body, .interlude, .about, .facts) {
  background-color: transparent;
  background-image: none;
}

html.has-tone body[data-page='home'] :is(.statement, .interlude, .work__head) {
  position: relative;
  isolation: isolate;
}

html.has-tone body[data-page='home'] :is(.statement, .interlude, .work__head)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask: linear-gradient(transparent, #000 24%, #000 76%, transparent);
  mask: linear-gradient(transparent, #000 24%, #000 76%, transparent);
}

html.has-tone body[data-page='home'] .statement::before {
  background-image: var(--grain-light), radial-gradient(ellipse 70% 60% at 24% 50%, rgba(110, 22, 36, 0.5), transparent 70%);
  background-size: 180px 180px, 100% 100%;
}

html.has-tone body[data-page='home'] .interlude::before {
  background-image: var(--grain-light), radial-gradient(ellipse 60% 55% at 50% 52%, rgba(90, 24, 34, 0.6), transparent 72%);
  background-size: 180px 180px, 100% 100%;
}

/* the wine band: no grain, only a deeper wine pooling low on the left */
html.has-tone body[data-page='home'] .work__head::before {
  background-image: radial-gradient(ellipse 70% 90% at 20% 90%, rgba(134, 32, 47, 0.5), transparent 70%);
}

/* At the meeting of two chapters, the part of the page past the line is briefly on the other
   ground. The texts that sit there follow the ground in step with it: the wine band's title and
   labels turn ink on paper, the first project names turn ivory on wine; the dark chapters'
   texture fades out on the paper ground. */
html.has-tone body[data-page='home'] :is(.statement, .interlude, .work__head)::before {
  transition: opacity 0.95s cubic-bezier(0.45, 0, 0.25, 1);
}

html.has-tone[data-ground='light'] body[data-page='home'] :is(.statement, .interlude, .work__head)::before {
  opacity: 0;
}

html.has-tone body[data-page='home'] :is(.work__title, .work__label, .work__count, .strip__no, .strip__title, .strip__tag) {
  transition: color 0.95s cubic-bezier(0.45, 0, 0.25, 1), opacity 0.5s var(--ease-out);
}

html.has-tone[data-ground='light'] body[data-page='home'] .work__title {
  color: var(--ink);
}

html.has-tone[data-ground='light'] body[data-page='home'] :is(.work__label, .work__count) {
  color: var(--muted);
}

html.has-tone[data-ground='dark'] body[data-page='home'] .strip:not(.is-open) :is(.strip__no, .strip__title, .strip__tag) {
  color: var(--ivory);
}

/* the project names in burgundy on the warm white (over an open strip's picture they stay ivory) */
html:not([data-ground='dark']) body[data-page='home'] .strip:not(.is-open):not(:hover) .strip__link:not(:focus-visible) .strip__title {
  color: var(--wine);
}

/* the nav: no colour inversion (it turned the letters turquoise over the wine): wine on the
   light ground, ivory on the dark one and over the room, easing with the ground */
body[data-page='home'] .nav {
  mix-blend-mode: normal;
  color: var(--wine);
  transition: transform var(--dur-med) var(--ease-out), color 0.7s var(--ease-out);
}

body[data-page='home'] .nav:is(.is-over-dark, .is-over-hero) {
  color: var(--ivory);
}

body[data-page='home'] .sticky-name {
  transition: color 0.7s var(--ease-out);
}

/* ============================================================================
   PROLOGUE: the statement, in the dark of the room
   ============================================================================ */
body[data-page='home'] .statement {
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-block: var(--chapter);
  background-color: var(--oxblood);
  background-image:
    var(--grain-light),
    radial-gradient(ellipse 70% 60% at 24% 50%, rgba(110, 22, 36, 0.45), transparent 70%),
    linear-gradient(#1c0609, var(--oxblood) 32%);
  background-size: 180px 180px, 100% 100%, 100% 100%;
}

body[data-page='home'] .statement__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: clamp(2.75rem, 5.5vw, 4.5rem);
}

body[data-page='home'] .statement__text {
  grid-column: 2 / span 10;
  max-width: 12.5em;
  text-wrap: balance;
}

/* the one sentence of what I do: an answer to the headline, set off to the right under its
   second half, so the two read as a single, stepped composition */
body[data-page='home'] .statement__desc {
  grid-column: 7 / span 5;
  max-width: 26em;
  font-size: var(--fs-intro);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(243, 236, 223, 0.84);
}

/* ============================================================================
   SIDE A: what I do, on paper
   ============================================================================ */
body[data-page='home'] .tracks {
  position: relative;
  z-index: 1;
  padding-block: var(--chapter) clamp(3rem, 6vw, 5rem);
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--grain-dark);
  background-size: 180px 180px;
}

body[data-page='home'] .tracks__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: clamp(1.75rem, 3vw, 2.5rem);
}

body[data-page='home'] .tracks__label {
  grid-column: 1 / span 6;
  margin: 0;
}

body[data-page='home'] .tracks__side {
  grid-column: 7 / -1;
  justify-self: end;
}

body[data-page='home'] .tracks__title {
  grid-column: 1 / span 9;
  max-width: 11em;
  text-wrap: balance;
}

/* the playful way in (2026-12-06): a small aside in the display italic, wine, just above the
   headline, as if said in passing; never a label, never headline sized */
body[data-page='home'] .tracks__ask {
  grid-column: 1 / span 9;
  margin: 0 0 calc(-1 * clamp(0.6rem, 1.4vw, 1.25rem));
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 0.5vw + 1rem, 1.5rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--wine);
}

body[data-page='home'] .tracks__title em {
  color: var(--wine);
}

body[data-page='home'] .tracks__stage {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

body[data-page='home'] .tracks--pinned .tracks__stage {
  margin-top: 0;
}

body[data-page='home'] .track__rule {
  background: rgba(31, 19, 17, 0.14);
}

body[data-page='home'] .track__row {
  padding-block: 0.85rem 0.9rem;
}

body[data-page='home'] .track__name {
  transition: color 0.6s var(--ease-out);
}

body[data-page='home'] .track__no {
  align-self: center;
}

/* the tracks waiting their turn stay legible (they used to fade almost away) */
body[data-page='home'] .tracks--pinned .track__name {
  color: rgba(31, 19, 17, 0.42);
}

body[data-page='home'] .tracks--pinned .track.is-active .track__name {
  font-style: italic;
  color: var(--wine);
}

/* the track descriptions: Neue Montreal sets its word spaces tight at this size, so they are
   opened a little; a calmer line height and a measure that breaks into even lines */
body[data-page='home'] .track__text {
  max-width: 36ch;
  letter-spacing: 0.006em;
  word-spacing: 0.06em;
  text-wrap: pretty;
  color: rgba(31, 19, 17, 0.8);
}

/* one cohesive paragraph: a close line height (the shared reading rule above is more specific,
   hence the doubled class), and the reveal's line masks laid out in a flex column, so their
   negative margins cannot collapse into one another and open extra space between the lines */
body[data-page='home'] .track__text.track__text {
  line-height: 1.45;
}

body[data-page='home'] .track__text:has(.reveal-mask-line-mask, .reveal-line-mask) {
  display: flex;
  flex-direction: column;
}

/* the record: a gilt ring around the wine label */
body[data-page='home'] .deck__record {
  background:
    radial-gradient(circle closest-side, var(--paper) 0 3%, transparent 3.3%),
    radial-gradient(circle closest-side at 50% 30%, rgba(242, 232, 214, 0.55) 0 1.4%, transparent 1.7%),
    radial-gradient(circle closest-side, var(--wine) 0 32%, var(--gilt) 32.3% 33.2%, #2a1418 33.5% 34.4%, transparent 34.6%),
    radial-gradient(circle closest-side, transparent 0 38%, #191210 38.2% 41%, transparent 41.2% 96%, #191210 96.2%),
    repeating-radial-gradient(circle closest-side, #1a1311 0 0.55%, #2b221e 0.75%, #1a1311 1.1%);
}

body[data-page='home'] .deck__label-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2em;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
}

/* ============================================================================
   SELECTED WORK: the strips on warm white (layout in css/work-archive.css)
   ============================================================================ */
body[data-page='home'] .work__body {
  background-image: var(--grain-dark);
  background-size: 180px 180px;
  max-width: none;
  padding-inline: max(var(--edge), calc((100% - var(--container-max)) / 2 + var(--edge)));
}

/* ============================================================================
   INTERLUDE: the dark, dramatic moment
   ============================================================================ */
body[data-page='home'] .interlude {
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-block: var(--chapter);
  background-color: var(--umber);
  background-image:
    var(--grain-light),
    radial-gradient(ellipse 60% 55% at 50% 52%, rgba(90, 24, 34, 0.55), transparent 72%);
  background-size: 180px 180px, 100% 100%;
}

body[data-page='home'] .interlude__inner {
  display: grid;
  justify-items: center;
  gap: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

/* one thought over two lines: "…always a story," / "and usually a soundtrack." A step smaller
   than the other headlines so the long first line holds together */
body[data-page='home'] .interlude__line {
  font-size: calc(var(--fs-headline) * 0.8);
  max-width: 19em;
  text-wrap: balance;
}

@media (max-width: 700px) {
  /* on a phone the first line wraps once; the break keeps "and usually a soundtrack." together */
  body[data-page='home'] .interlude__line {
    max-width: none;
  }
}

/* ============================================================================
   ABOUT: the liner notes, on ivory. An asymmetric page on twelve columns:
     head      label left, "Liner notes" right
     intro     the sentence, across ten columns
     portrait  columns 1–5, a black-and-white print off the left edge, in view while the text runs on
     body      columns 6–11, a lead paragraph then two in the reading size
     quote     columns 6–12, the question as a pull line
     coda      columns 6–11, the last paragraph and the disciplines
   ============================================================================ */
body[data-page='home'] .about {
  padding-block: var(--chapter) clamp(4rem, 7vw, 6rem);
  color: var(--ink);
  background-color: var(--ivory);
  background-image: var(--grain-dark);
  background-size: 180px 180px;
}

body[data-page='home'] .about__grid {
  --col: calc((100% + var(--gutter)) / 12);
}

body[data-page='home'] .about__head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

body[data-page='home'] .about__intro {
  grid-column: 1 / span 11;
  max-width: 17em;
  text-wrap: balance;
}

body[data-page='home'] .about__intro em {
  color: var(--wine);
}

/* the portrait: a plain black-and-white print, set like a magazine portrait: it runs off the
   left edge of the page, no frame, no border; it stays in view while the text runs beside it */
body[data-page='home'] .about__portrait {
  grid-column: 1 / span 5;
  grid-row: 2 / span 3;
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 3vh);
  /* to the page's left edge: the container's padding, plus its margin on wide screens */
  --bleed-l: calc(var(--edge) + max(0px, (100vw - var(--container-max)) / 2));
  margin: clamp(4rem, 8vw, 7rem) 0 0 calc(-1 * var(--bleed-l));
}

body[data-page='home'] .about__frame {
  aspect-ratio: 4 / 5;
  max-height: calc(100svh - var(--nav-h) - 6rem); /* the whole print stays in view while sticky */
  background: #d9d4cb;
}

body[data-page='home'] .about__drift img {
  object-position: 50% 24%;
}

/* the darkroom on hover (cursorType.js): the print draws a little closer, the room around it
   dims a touch, and a soft pool of light follows the cursor, lifting the greys under it, as a
   printer dodges a print by hand. Still black and white throughout. */
body[data-page='home'] .about__drift {
  scale: 1;
  transition: scale 1.6s cubic-bezier(0.22, 1, 0.36, 1), filter 1.2s var(--ease-out);
}

body[data-page='home'] .about__light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle 9rem at var(--px, 50%) var(--py, 40%), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1) 55%, transparent 75%),
    radial-gradient(ellipse 120% 90% at var(--px, 50%) var(--py, 40%), transparent 45%, rgba(10, 8, 8, 0.22));
  mix-blend-mode: soft-light;
  transition: opacity 0.9s var(--ease-out);
}

body[data-page='home'] .about__frame.is-lit .about__drift {
  scale: 1.035;
  filter: contrast(1.04);
}

body[data-page='home'] .about__frame.is-lit .about__light {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page='home'] .about__drift {
    transition: filter 0.6s var(--ease-out);
  }
  body[data-page='home'] .about__frame.is-lit .about__drift {
    scale: 1;
  }
}

body[data-page='home'] .about__body {
  grid-column: 6 / span 6;
  grid-row: 2;
  display: grid;
  gap: 1.3em;
  max-width: var(--measure);
  margin-top: clamp(8rem, 15vw, 13rem);
  color: rgba(31, 19, 17, 0.82);
}

/* the first paragraph leads by colour only: every paragraph has the same size and weight */
body[data-page='home'] .about__lead {
  color: var(--ink);
}

/* footnote markers, linking to the fun facts */
body[data-page='home'] .fn {
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.66em;
  line-height: 0;
  vertical-align: 0.6em;
  color: var(--wine);
  transition: color 0.3s var(--ease-out);
}

body[data-page='home'] .fn:hover {
  color: var(--wine-bright);
}

body[data-page='home'] .about__quote {
  grid-column: 6 / -1;
  grid-row: 3;
  max-width: 15em;
  margin: clamp(4rem, 8vw, 6.5rem) 0;
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
  text-wrap: balance;
  color: var(--ink);
  /* (no bar above the question: the About section has no lines; the space alone sets it apart) */
}

body[data-page='home'] .about__quote em {
  color: var(--wine);
}

body[data-page='home'] .about__coda {
  grid-column: 6 / span 6;
  grid-row: 4;
  max-width: var(--measure);
  color: rgba(31, 19, 17, 0.82);
}

body[data-page='home'] .about__fact {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) 2.4fr;
  column-gap: var(--gutter);
  align-items: baseline;
  /* no rules above or below: a little more air instead */
  margin-top: clamp(3.5rem, 7vw, 5.25rem);
  padding-block: 0;
}

body[data-page='home'] .about__fact-value {
  color: var(--ink);
}

/* ---------- the fun facts: five collectible cards ----------
   Small cards of aged paper, laid loosely on the desk of the listening room: each slightly turned
   (--turn) and set at its own height (--lift), with a coloured band across the top and a small
   drawn motif. js/modules/funFacts.js adds the motion:
     pointer   the set drifts a few pixels with the cursor, each card at its own depth (--depth),
               and the card under the cursor lifts, straightens and tilts towards it (--rx/--ry);
     touch     a tap picks a card up (.is-picked) and puts the previous one down;
     idle      a very slow float, out of step from card to card.
   The text never moves while it is being read: lifting a card only makes it larger and straighter. */
body[data-page='home'] .facts {
  padding-block: 0 var(--chapter);
  color: var(--ink);
  background-color: var(--ivory);
  background-image: var(--grain-dark);
  background-size: 180px 180px;
  overflow: hidden; /* the drifting cards never widen the page */
}

body[data-page='home'] .facts__inner {
  position: relative;
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
}

body[data-page='home'] .facts__rule {
  position: absolute;
  top: 0;
  left: var(--edge);
  width: calc((100% - 2 * var(--edge)) / 12 * 3);
}

body[data-page='home'] .facts__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

body[data-page='home'] .facts__spark {
  font-size: 0.7em;
  vertical-align: 0.12em;
}

body[data-page='home'] .facts__list {
  --px: 0;
  --py: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* the gaps leave room for a lifted card to grow (--grow: how much, by layout) without ever
     reaching its neighbours */
  --grow: 0.15;
  gap: clamp(1.5rem, 3.6vw, 3.6rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: 2.5rem;
}

/* ---------- one card (rewritten 2026-12-06, round 4: always sharp, a bigger lift) ----------
   Sharp text, before and during hover: nothing that carries text is ever scaled, rotated or
   moved by a transform, so the browser always draws the letters as type at their real size.
     - the PAPER is the card's ::before: it is the part that is turned (--turn) and shadowed;
       the words sit straight on it;
     - the parallax and the slow float move the card with left/top, never translate;
     - the LIFT on hover re-sets the card larger (--g: 1 -> 1.15): its width, padding and type
       all grow together, so the lines wrap the same way, only larger, and stay crisp.
   No effect on the layout: funFacts.js gives each cell the card's resting height (--h0) and the
   card grows over its cell, centred, within the gaps (so it never covers its neighbours).
   Without the script the card simply sits in its cell, unlifted. */
@property --g {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

@property --fy {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

body[data-page='home'] .fact {
  --tx: 0; /* where the cursor is over the lifted card, -1..1 (funFacts.js): the light follows it */
  --ty: 0;
  --up: 0;
  position: relative;
  left: calc(var(--px) * var(--depth) * 10px);
  top: calc(var(--lift) + var(--py) * var(--depth) * 8px);
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1), top 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  scroll-margin-top: 30vh;
}

body[data-page='home'] .fact__card {
  --g: calc(1 + var(--up) * var(--grow, 0.15));
  position: relative;
  isolation: isolate;
  min-height: 100%;
  padding: calc(1.5rem * var(--g)) calc(1.2rem * var(--g)) calc(1.35rem * var(--g));
  transition: --g 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* measured (funFacts.js): the cell keeps the resting height, the card grows over it, centred */
body[data-page='home'] .facts__list.is-measured .fact {
  height: var(--h0);
}

body[data-page='home'] .facts__list.is-measured .fact__card {
  position: absolute;
  left: calc(50% * (1 - var(--g)));
  top: calc(var(--h0) * (1 - var(--g)) / 2 + var(--fy));
  width: calc(100% * var(--g));
  min-height: calc(var(--h0) * var(--g));
}

/* the paper: turned, lit and shadowed; the text above it stays straight */
body[data-page='home'] .fact__card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 7px;
  background:
    radial-gradient(120% 80% at calc(20% + var(--tx) * 30%) calc(var(--ty) * 30%), rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(172deg, #fbf5e8, #f2e7d2);
  box-shadow:
    inset 0 0 0 1px rgba(31, 19, 17, 0.08),
    inset 0 0 0 5px rgba(251, 245, 232, 0.9),
    inset 0 0 0 6px rgba(31, 19, 17, 0.07),
    0 1px 1px rgba(31, 19, 17, 0.06),
    calc(var(--tx) * -7px) calc(10px + var(--up) * 16px + var(--ty) * -4px) calc(18px + var(--up) * 26px) calc(-10px - var(--up) * 4px) rgba(31, 19, 17, calc(0.26 + var(--up) * 0.1)),
    0 24px 34px -24px rgba(31, 19, 17, 0.2);
  transform: rotate(calc(var(--turn) * (1 - var(--up))));
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page='home'] .fact.is-tilting .fact__card::before {
  /* while the cursor steers the light, the shadow follows it quickly */
  transition-duration: 0.55s, 0.3s;
}

body[data-page='home'] .fact:is(.is-up, .is-picked, :target) {
  --up: 1;
  z-index: 2;
}

body[data-page='home'] .fact__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: calc(var(--g) * clamp(1.3rem, 1rem + 0.55vw, 1.6rem));
  line-height: 1.15;
  /* cleaner, steadier headings (2026-12-06): a little more air between the letters, and a hairline
     stroke for a touch more weight (the display serif comes in one weight only) */
  letter-spacing: 0.022em;
  -webkit-text-stroke: 0.3px currentColor;
  color: var(--wine);
  text-wrap: balance;
}

body[data-page='home'] .fact__text {
  margin-top: calc(0.7rem * var(--g));
  font-family: var(--font-sans, 'Neue Montreal', sans-serif);
  font-size: calc(0.95rem * var(--g));
  line-height: 1.5;
  color: rgba(31, 19, 17, 0.8);
}

/* idle: a very slow float, each card out of step (pointer devices only, motion allowed); it moves
   the card's top (--fy), never a transform */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body[data-page='home'] .fact__card {
    animation: fact-float 7s ease-in-out infinite;
  }
  body[data-page='home'] .fact:nth-child(2) .fact__card { animation-delay: -1.6s; animation-duration: 8s; }
  body[data-page='home'] .fact:nth-child(3) .fact__card { animation-delay: -3.1s; animation-duration: 7.5s; }
  body[data-page='home'] .fact:nth-child(4) .fact__card { animation-delay: -4.4s; animation-duration: 8.5s; }
  body[data-page='home'] .fact:is(.is-up, :hover) .fact__card {
    animation-play-state: paused;
  }
}

@keyframes fact-float {
  0%, 100% { --fy: 0px; }
  50% { --fy: -5px; }
}

/* narrower: two to a row */
@media (max-width: 1179px) {
  body[data-page='home'] .facts__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
    --grow: 0.08; /* wider cards: a smaller step keeps them clear of each other */
  }
}

/* phones: one column, the cards alternating a little left and right, as if dealt */
@media (max-width: 700px) {
  body[data-page='home'] .facts__rule {
    width: 30%;
  }
  body[data-page='home'] .facts__list {
    grid-template-columns: 1fr;
    row-gap: 1.6rem;
    margin-top: 2rem;
  }
  body[data-page='home'] .facts__list {
    --grow: 0.06;
  }
  body[data-page='home'] .fact {
    width: 88%;
    left: 0;
    top: 0;
  }
  body[data-page='home'] .fact:nth-child(even) {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page='home'] .fact,
  body[data-page='home'] .fact__card,
  body[data-page='home'] .fact__card::before {
    transition: none;
    animation: none;
  }
}

/* ---------- About, narrower screens ---------- */
@media (max-width: 1079px) {
  body[data-page='home'] .statement__desc {
    grid-column: 6 / -1;
  }
  body[data-page='home'] .about__intro {
    grid-column: 1 / -1;
  }
  body[data-page='home'] .about__portrait {
    position: relative;
    top: auto;
    grid-column: 1 / span 5;
    grid-row: 2;
  }
  body[data-page='home'] .about__body {
    grid-column: 7 / -1;
    margin-top: clamp(4rem, 8vw, 7rem);
  }
  body[data-page='home'] .about__quote {
    grid-column: 1 / -1;
  }
  body[data-page='home'] .about__coda {
    grid-column: 4 / -1;
  }
}

@media (max-width: 700px) {
  body[data-page='home'] .statement__inner > * {
    grid-column: 1 / -1;
  }
  body[data-page='home'] .statement__desc {
    padding-left: 18%;
  }
  body[data-page='home'] :is(.tracks__title, .tracks__ask) {
    grid-column: 1 / -1;
  }
  body[data-page='home'] .about__grid {
    display: block;
  }
  body[data-page='home'] .about__portrait {
    width: min(86vw, 24rem);
    margin: clamp(3rem, 12vw, 4rem) 0 0 calc(-1 * var(--edge));
  }
  body[data-page='home'] .about__body,
  body[data-page='home'] .about__coda {
    margin-top: clamp(3rem, 12vw, 4rem);
  }
  body[data-page='home'] .about__quote {
    margin-block: clamp(3rem, 12vw, 4rem);
  }
  body[data-page='home'] .about__fact {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
  }
}

/* ============================================================================
   FINALE: the footer, on warm paper, where the telephone photograph hangs (its white ground is
   multiplied into the paper; layout: css/footer.css). The page above lifts away from it with a
   soft shadow along its lower edge.
   ============================================================================ */
body[data-page='home'] main {
  box-shadow: 0 30px 60px -30px rgba(31, 19, 17, 0.35);
}

/* Warm vintage ivory (2026-12-06, round 2). The old #f4eadb read grey on screen because the
   shared dark grain (cool brown at up to 32 %) settled over it. Now: a warmer ivory base (hue ~37°,
   low chroma, so it never turns yellow or muddy), its own paper grain in a warm sepia at about half
   the strength, and a faint lift of light from the top so it reads like paper, not a flat fill.
   Ink on it stays ~16:1. */
body[data-page='home'] .footer {
  --footer-paper: #f8eedd;
  --footer-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.26 0 0 0 0 0.14 0.3 0 0 0 -0.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color: var(--ink);
  background-color: var(--footer-paper);
  background-image:
    var(--footer-grain),
    radial-gradient(120% 80% at 70% 0%, rgba(255, 250, 240, 0.55), rgba(255, 250, 240, 0) 70%);
  background-size: 180px 180px, 100% 100%;
}

body[data-page='home'] .footer__line em {
  color: var(--wine);
}

/* the footer's words: the headline leads (the display serif, one step under the chapter
   headlines so it sits beside the telephone), "Let's start one." answers it in the wine italic,
   then the invitation in the reading sans, small and quiet */
body[data-page='home'] .footer__line {
  max-width: 13.5em;
  margin-top: 0;
  font-size: clamp(2.1rem, 0.9rem + 2.6vw, 3.9rem);
  line-height: 1.06;
  text-wrap: balance;
}

/* the line reveal's masks: a flex column, so their negative margins cannot collapse and open the
   headline's lines apart */
body[data-page='home'] .footer__line:has(.reveal-mask-line-mask, .reveal-line-mask) {
  display: flex;
  flex-direction: column;
}

body[data-page='home'] .footer__answer {
  margin-top: clamp(0.8rem, 2svh, 1.3rem);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 0.85rem + 1.25vw, 2.3rem);
  line-height: 1.1;
  color: var(--wine);
}

body[data-page='home'] .footer__text {
  max-width: 34ch;
  margin-top: clamp(1.25rem, 3svh, 2rem);
  font-family: var(--font-sans, 'Neue Montreal', sans-serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  text-wrap: pretty;
  color: rgba(31, 19, 17, 0.78);
}

body[data-page='home'] :is(.footer__kicker, .footer__contact-label, .footer__phone-caption, .footer__bar .t-label, .footer__social .t-label) {
  color: rgba(31, 19, 17, 0.62);
}

body[data-page='home'] .footer__phone-live {
  color: var(--wine);
}

body[data-page='home'] :is(.footer__link:hover, .footer__link:focus-visible) {
  color: var(--ink);
}

body[data-page='home'] .footer__rule {
  background: rgba(31, 19, 17, 0.16);
}

/* ============================================================================
   NAVIGATION: the phone overlay takes the display italic
   ============================================================================ */
body[data-page='home'] .nav-overlay {
  background: var(--umber);
}

body[data-page='home'] .nav-overlay__link {
  font-size: clamp(2.8rem, 13vw, 4.4rem);
  line-height: 1.08;
}
