/* ==========================================================================
   SONIFIT — Editorial landing page
   Implemented from Figma: Free-class / Home Page (48:1092)

   Scaling model
   -------------
   The Figma frame is 1440 wide with a 1400 content column and 20px gutters.
   `--u` is one "Figma pixel": the content column divided by 1400. It is NOT
   capped, so the layout is full-bleed — every Figma dimension written as
   `calc(<figma value> * var(--u))` grows and shrinks with the viewport, and
   the composition stays in exact Figma proportion at any width.

   Two classes of type behave differently:
     * display type (wordmark, statement, section titles) scales with `--u`,
       so it always spans its full column;
     * body copy, labels and product text are FIXED px — they reflow but
       never change size.
   Tracking is in `em` and line-heights are unitless, so both classes keep
   their Figma letterspacing at any scale.
   ========================================================================== */

/* ------------------------------ tokens ---------------------------------- */

:root {
  color-scheme: light;

  /* colour */
  --red: #ff2d2d;
  --bg: #fff5f5;      /* page ground */
  --white: #ffffff;
  --ink: #060605;     /* the dark ground behind hero video and CTA photo */

  /* layout */
  --frame: 1440;
  --content: 1400;
  --gutter: 20px;
  --col: 335;   /* 4 columns of 335 + 3 gaps of 20 = 1400 */
  --col-gap: 20;

  /* scrollbar width, measured in script.js so --u matches the real
     content box rather than the viewport including the scrollbar */
  --sbw: 0px;

  /* the scaling unit — uncapped, so the layout is full-bleed at any width */
  --u: calc((100vw - var(--sbw) - (2 * var(--gutter))) / 1400);

  /* body copy, labels and product text: fixed, never scale */
  --fs-label: 13px;
  --fs-body: 15px;
  --fs-product: 20px;

  --lh-label: 1.3846;   /* 18/13  */
  --lh-body: 1.2;       /* 18/15  */
  --lh-product: 1.125;  /* 22.5/20 */

  --track-tight: -0.0267em;  /* -0.4 @ 15 */
  --track-display: -0.06em;

  --font: "Neue Haas Grotesk Text Pro", "Neue Haas Grotesk Display Pro",
          "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;

  --w-roman: 400;
  --w-medium: 500;
  --w-bold: 700;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------ reset ----------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* No scrollbar. The page still scrolls by every means — wheel, trackpad,
   keyboard, touch, and programmatically — the gutter is simply not drawn.
   Both vendor syntaxes are needed: `scrollbar-width` covers Firefox and
   recent Chromium, the pseudo-element covers WebKit and older Chromium.
   Declared on html *and* body because body carries `overflow-x: hidden`, so
   in some engines it is the element that owns the scrollport.

   Side effect worth knowing: `--sbw` now measures 0, so `--u` is derived from
   the full viewport width. That is correct — there is no longer a gutter to
   subtract. */
html { scrollbar-width: none; }

html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Native smooth scrolling is the anchor behaviour only when Lenis is not
   running. Lenis adds `.lenis` to <html> and drives its own scrollTo, and the
   two fight each other: the browser animates the position while Lenis is also
   animating it, and anchor jumps stutter or land short. */
html:not(.lenis) { scroll-behavior: smooth; }

/* Lenis' own stylesheet, inlined rather than a second request. */
html.lenis,
html.lenis body { height: auto; }

.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] { overscroll-behavior: contain; }

.lenis.lenis-smooth iframe { pointer-events: none; }

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--red);
  font-family: var(--font);
  font-weight: var(--w-medium);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul, address {
  margin: 0;
  padding: 0;
  font-style: normal;
}

/* the browser default selection is a blue that has no business here */
::selection {
  background: var(--red);
  color: var(--bg);
}

ul { list-style: none; }

img, video { display: block; max-width: 100%; }

/* The Figma exports carry preserveAspectRatio="none", so they have no
   reliable intrinsic ratio — every SVG gets its ratio declared in CSS. */
.footer__wordmark img { aspect-ratio: 1387.1 / 309.054; height: auto; }
.footer__talk img { aspect-ratio: 33.5822 / 32.7156; }
.nav__mark img,
.footer__mark { aspect-ratio: 1; }

a { color: inherit; text-decoration: none; }

hr { border: 0; margin: 0; color: inherit; }   /* UA sets hr colour to gray */

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--red);
  color: var(--white);
  font-size: var(--fs-label);
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* ------------------------------ primitives ------------------------------ */

.shell {
  width: calc(100% - (2 * var(--gutter)));
  margin-inline: auto;
}

/* the 4 x 335 editorial column grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--col-gap) * var(--u));
}

.label {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  letter-spacing: 0;
  text-transform: uppercase;
}

.body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
}

.rule {
  height: 0;
  border-top: max(1px, calc(2 * var(--u))) solid currentColor;
}

.rule--thin { border-top-width: 1px; }

.scatter { position: relative; width: 100%; }

.scatter > [style*="--l"] {
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--t) * var(--u));
  width: calc(var(--w) * var(--u));
}

/* ============================== LOADER ================================== */

/* Shown only while `.is-loading` is on the root, which an inline script in
   <head> sets before first paint and script.js clears. If the scripts never
   run, the class is never added and the loader is simply not there — the page
   can never be left stuck behind it. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: var(--bg);
  color: var(--red);
  align-items: center;
  justify-content: center;
  gap: calc(60 * var(--u));
  padding: var(--gutter);
  overflow: hidden;
}

.is-loading .loader { display: flex; }

/* lock the page behind it */
.is-loading,
.is-loading body { overflow: hidden; }

/* A square box, the same size whichever image is showing. It starts small and
   low and travels to the middle of the screen, growing as it arrives. */
.loader__box {
  position: relative;
  flex: 0 0 auto;
  width: min(38vh, 42vw, 340px);
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 45, 45, 0.06);
}

.loader__box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.loader__box img.is-on { opacity: 1; }

.loader__side {
  flex: 0 0 auto;
  width: calc(200 * var(--u));
  min-width: 120px;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  letter-spacing: 0;
  text-transform: uppercase;
}

.loader__side--right { text-align: right; }

.loader__count {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--gutter) - 0.18em);
  font-weight: var(--w-bold);
  font-size: max(64px, calc(200 * var(--u)));
  line-height: 0.9;
  letter-spacing: var(--track-display);
}

.loader__count::after { content: ""; }

@media (max-width: 700px) {
  .loader {
    flex-direction: column;
    justify-content: center;
    gap: 24px;
  }

  .loader__side {
    width: min(100%, 320px);
    text-align: center;
  }

  .loader__side--right { text-align: center; }

  .loader__box { width: min(52vw, 300px); }

  .loader__count { font-size: clamp(56px, 22vw, 140px); }
}

/* ============================== HERO ==================================== */

/* Always exactly the viewport, never the Figma height.

   The frame height in Figma is 1044, but `--u` is derived from the viewport
   *width*, so `1044 * --u` is really 0.746 x the content width. Capping the
   two against each other meant that on any window taller than it is wide the
   width-derived term won and the hero came up short — 940px inside a 1150px
   viewport, a 210px band of the next section showing under a hero that is
   supposed to be the whole screen.

   `svh` rather than `vh` or `dvh`: on a phone `vh` is the *large* viewport, so
   the bottom of the composition sits behind the browser chrome on load, and
   `dvh` re-runs the layout every time that chrome slides away. `svh` is the
   one that is stable and always visible. On desktop all three are identical. */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--red);
}

.hero__video,
.hero__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__video { object-fit: cover; }

.hero__scrim {
  background: linear-gradient(180deg, rgba(6, 6, 5, 0.45) 0%, rgba(6, 6, 5, 0) 28%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  width: calc(100% - (2 * var(--gutter)));
  margin-inline: auto;
  /* 23, not the home frame's 28, so the nav sits at the same height as the
     athlete page header */
  padding-block: calc(23 * var(--u)) calc(16 * var(--u));
  display: flex;
  flex-direction: column;
  /* the nav is fixed now, so only the foot is in here and it anchors bottom */
  justify-content: flex-end;
  gap: calc(40 * var(--u));
}

/* --- nav --- */

/* Lifted out of the hero and fixed, so it rides along the whole page. The bar
   itself ignores the pointer; only the nav row inside it takes clicks, so it
   never blocks the content behind. */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding-top: calc(23 * var(--u));
  pointer-events: none;
  color: var(--red);
  transition: color 0.45s var(--ease);
}

.nav-bar .nav { pointer-events: auto; }

/* The bar is red at every scroll position — no blend mode, no second colour
   on the element. Where it crosses a red block, this white copy is stacked
   exactly on top and clipped to that block, so only the overlapping pixels
   read white while the rest of the row stays red. */
.nav-bar .shell { position: relative; }

.nav--over-red {
  position: absolute;
  inset: 0;
  color: var(--white);
  pointer-events: none;
  clip-path: url(#nav-red-clip);
}

/* the clip source is geometry only, never painted */
.nav-clip {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* The centre mark drops away the moment the page moves; the links stay at
   full strength. */
.nav-bar .nav__mark { transition: opacity 0.4s var(--ease); }
.nav-bar.is-scrolled .nav__mark { opacity: 0; pointer-events: none; }

/* The row is exactly the height of the mark. It used to be `29 * --u`, which
   kept scaling after the mark was pinned to 29px — the leftover slack then
   pushed the whole nav down as the viewport grew. */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 29px;
}

.nav__brand {
  font-weight: var(--w-bold);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  letter-spacing: 0;
  text-transform: uppercase;
}

/* The mark is a brand asset, not layout — it holds its Figma size at every
   width rather than scaling with --u like the rest of the composition. */
.nav__mark {
  display: block;
  width: 29px;
  aspect-ratio: 1;
}
.nav__mark img { width: 100%; height: 100%; }

.nav__links {
  display: flex;
  justify-content: flex-end;
  gap: calc(57 * var(--u));
}

.nav__links a {
  font-weight: var(--w-bold);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  letter-spacing: 0;
  text-transform: uppercase;
  transition: opacity 0.25s var(--ease);
}
.nav__links a:hover { opacity: 0.6; }

/* --- hero foot --- */

.hero__foot { display: block; }

/* Fixed 335px — the Figma column width. The text is a fixed size, so the
   measure must be fixed too or the line count changes with the viewport.
   Only its column position scales. */
.hero__blurb {
  width: 335px;
  margin-left: calc((335 + 20) * var(--u));   /* column 2 */
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--col-gap) * var(--u));
  margin-top: calc(10 * var(--u));
}

/* all four sit on one line; the last column holds two, pushed to its edges */
.hero__meta > * { grid-row: 1; }
.hero__meta--a { grid-column: 1; }
.hero__meta--b { grid-column: 2; }
.hero__meta--c { grid-column: 4; justify-self: start; }
.hero__meta--d { grid-column: 4; justify-self: end; }

.hero__meta--c { transition: opacity 0.25s var(--ease); }
.hero__meta--c:hover { opacity: 0.6; }

.hero .rule { margin-top: calc(10 * var(--u)); }

.hero__wordmark {
  margin-top: calc(15 * var(--u));
  line-height: 0;
  overflow: hidden;          /* letters rise out of this edge */
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 265;
  fill: currentColor;
  overflow: visible;
}

/* pre-animation state — only applied when JS is running, so the page is
   never left blank if the scripts fail to load */
.js-anim .wordmark__letter { opacity: 0; }
.js-anim [data-anim] { opacity: 0; }

/* The outline copy is static while the solid copy animates in, which would
   show the two offset from each other. Hold it until the intro finishes —
   removing .js-anim reveals it, no JS involved. */
.js-anim .ath__title--outline { opacity: 0; }

/* The collage photographs wait, whole, until the intro brings them up. The
   pre-state is on the *figure*, so the frame and everything in it is hidden
   together — hiding only the picture inside left the frame's own ground
   showing as a red rectangle where the photograph was about to be.

   `opacity`, never `transform`: a CSS transform is read by GSAP as the
   element's start value and composed with its own, so the tween ends a full
   frame off target. GSAP owns the transform end to end and releases the
   opacity on its first frame.

   Set here rather than by the script so there is no frame of the finished
   collage before GSAP takes over; if the script never runs, `js-anim` is never
   added and the pictures are simply in place. */
.js-anim .ath__img { opacity: 0; }
.js-anim .hero .rule { transform: scaleX(0); transform-origin: 0 50%; }

/* ============================== ABOUT =================================== */

/* the 65px uppercase statement voice, shared with the athlete page */
.statement {
  font-size: max(28px, calc(65 * var(--u)));
  line-height: 0.923;              /* 60/65 */
  letter-spacing: -0.0369em;       /* -2.4 @ 65 */
  text-transform: uppercase;
}

.about {
  padding-block: calc(157 * var(--u)) calc(156 * var(--u));
}

.about__text { text-indent: calc(210 * var(--u)); }

/* ============================== ATHLETES ================================ */

.athletes { padding-block: 0; }

.scatter--athletes { height: calc(1028 * var(--u)); }

.athletes__title {
  position: absolute;
  left: calc(449 * var(--u));
  top: calc(381 * var(--u));
  margin: 0;
  font-weight: var(--w-medium);
  font-size: max(48px, calc(145 * var(--u)));
  line-height: 1;
  letter-spacing: -0.0715em;       /* -10.3604 @ 145 */
  white-space: nowrap;
}

.athlete { display: flex; }

.athlete__link {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  width: 100%;
}

.athlete__img {
  position: relative;
  width: 100%;
  height: calc(var(--h) * var(--u));
  overflow: hidden;
  background: rgba(255, 45, 45, 0.06);
}

.athlete__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.athlete:hover .athlete__img img { transform: scale(1.04); }

.athlete figcaption {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
}

/* ============================== CTA ===================================== */

.cta {
  position: relative;
  margin-top: calc(111 * var(--u));
  min-height: calc(804 * var(--u));
  overflow: hidden;
  background: var(--ink);
}

.cta__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta__inner {
  position: relative;
  z-index: 1;
  width: calc(100% - (2 * var(--gutter)));
  margin-inline: auto;
  min-height: calc(804 * var(--u));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--col-gap) * var(--u));
  align-content: start;
  padding-top: calc(377 * var(--u));
}

.cta__title {
  grid-column: 1 / 4;
  width: calc(952 * var(--u));
  font-weight: var(--w-bold);
  font-size: max(44px, calc(169.722 * var(--u)));
  line-height: 0.8013;             /* 136/169.722 */
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

/* same rule as the hero blurb: fixed type gets a fixed measure */
.cta__side {
  grid-column: 4;
  width: 335px;
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--u));
}

.cta__block {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}

.cta__figures li { line-height: var(--lh-body); }

.btn {
  align-self: flex-start;
  background: var(--red);
  color: var(--white);
  padding: calc(10 * var(--u)) calc(10 * var(--u));
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
  text-transform: uppercase;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--white); color: var(--red); }

/* ============================== COLLECTION ============================== */

.collection { margin-top: calc(122 * var(--u)); }

/* Title scales, details block does not — so the details are anchored to the
   right instead of gapped off the title, keeping the Figma composition
   (details finish 159 short of the right edge) at any width. */
.collection__head {
  display: flex;
  align-items: center;
  margin-bottom: calc(122 * var(--u));
}

.collection__title {
  flex: 0 0 auto;
  width: calc(511 * var(--u));
  font-weight: var(--w-bold);
  font-size: max(40px, calc(100 * var(--u)));
  line-height: 0.9;
  letter-spacing: var(--track-display);
}


.collection__details {
  flex: 0 0 auto;
  width: 547px;
  margin-left: auto;
  margin-right: calc(159 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
}

.collection__lede,
.collection__details .body {
  font-size: var(--fs-product);
  line-height: 1.1;                /* 22/20 */
  letter-spacing: var(--track-tight);
}

.collection__lede { text-transform: uppercase; }

/* the two paragraphs run on as continuous lines in the design */
.collection__details .body p + p { margin-top: 0; }

.scatter--products { height: calc(2694 * var(--u)); }

.product {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}

.product__media {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--h) * var(--u));
  overflow: hidden;
  background: rgba(255, 45, 45, 0.06);
}

/* The photographs are pre-cut to the frame ratio by tools/crop-products.sh, so
   `cover` never actually has anything to crop — it is here for the odd
   sub-pixel of rounding. */
.product__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s var(--ease);
}

.product__img--hover { opacity: 0; }

.product:hover .product__img--hover,
.product__media:focus-visible .product__img--hover { opacity: 1; }

/* --- the WebGL crossing -------------------------------------------------
   assets/js/slitscan.js sets [data-fx-mode="gl"] on the grid only once a live
   context exists and its program has linked. Until then — and forever, for
   touch, reduced-motion and no-WebGL visitors — the rules above are the whole
   interaction and the second photograph still arrives.

   Under gl the shader owns the crossing, so hover stops revealing the second
   <img>. Keyboard focus is left alone: there is no pointer to drive the
   effect, so :focus-visible keeps the plain crossfade. */

.product__fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

[data-fx-mode="gl"] .product:hover .product__img--hover { opacity: 0; }

[data-fx-mode="gl"] .product__media:focus-visible .product__img--hover { opacity: 1; }

.product__info {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}

.product__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-product);
  line-height: var(--lh-product);
  letter-spacing: var(--track-tight);
}

.product__row--stats { font-weight: var(--w-roman); }

.product__price { text-align: right; }

/* ============================== FOOTER ================================== */

.footer {
  margin-top: calc(122 * var(--u));
  overflow: hidden;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(40 * var(--u));
  margin-top: calc(21 * var(--u));
}

.footer__claim {
  width: calc(725 * var(--u));
  font-size: max(40px, calc(100 * var(--u)));
  line-height: 0.9;
  letter-spacing: var(--track-display);
}

.footer__year {
  font-size: max(64px, calc(200 * var(--u)));
  line-height: 0.9;
  letter-spacing: var(--track-display);
  white-space: nowrap;
}

.footer__detail {
  width: 335px;
  margin-top: calc(188 * var(--u));
}

.footer .rule--thin { margin-top: calc(20 * var(--u)); }

/* The Figma gaps between these four are equal and the last one is flush right,
   so space-between reproduces the row at any width even though the columns
   themselves are fixed-size text. */
.footer__info {
  display: flex;
  justify-content: space-between;
  gap: calc(40 * var(--u));
  margin-top: calc(20 * var(--u));
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
  font-style: normal;
}

.footer__col--brand { gap: calc(13 * var(--u)); }

.footer__mark {
  width: calc(29 * var(--u));
  min-width: 22px;
  aspect-ratio: 1;
}

.footer__social a { transition: opacity 0.25s var(--ease); }
.footer__social a:hover { opacity: 0.6; }

.footer__talk {
  display: inline-flex;
  align-items: center;
  gap: calc(21 * var(--u));
  font-size: max(28px, calc(62.5 * var(--u)));
  line-height: 0.784;              /* 49/62.5 */
  letter-spacing: -0.0267em;
  white-space: nowrap;
}

.footer__talk img {
  width: calc(29 * var(--u));
  min-width: 18px;
  height: auto;
  transition: transform 0.35s var(--ease);
}
.footer__talk:hover img { transform: translate(4px, -4px); }

.footer__wordmark {
  margin-top: calc(72 * var(--u));
  margin-bottom: calc(-40 * var(--u));
  line-height: 0;
}
.footer__wordmark img { width: 100%; height: auto; }

/* ==========================================================================
   CUSTOM CURSOR
   One element does both states. It is built at full size (110px) and scaled
   down to a dot, so following and resizing are pure transforms — no layout,
   no repaint. Created by script.js only on fine-pointer devices.
   ========================================================================== */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.cursor__label {
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
}

/* the custom circle replaces the pointer over a collection card */
.has-cursor [data-cursor],
.has-cursor [data-cursor] * { cursor: none; }

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ==========================================================================
   ATHLETE DETAIL PAGE  (Figma 42:280)
   Same scaling model; the hero is another Figma canvas driven by
   --l / --t / --w / --h.
   ========================================================================== */

/* 23 above the nav + 46 below it, plus the nav's own fixed 29px */
.ath-hero { margin-top: calc(69 * var(--u) + 29px); }

.scatter--athlete { height: calc(998 * var(--u)); }

/* the collage children take part in the scatter directly */
.ath__collage { display: contents; }

.ath__img {
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--t) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  margin: 0;
  overflow: hidden;
  z-index: 2;
}

.ath__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.ath__img:hover img { transform: scale(1.03); }

/* The name holds in the middle of the screen while the photography scrolls
   past it, then goes behind the section below.

   This is `position: sticky`, not a scroll-driven tween, and that is the whole
   point: there is nothing to measure, nothing to re-measure on refresh, and no
   frame in which one copy has been updated and the other has not. Four
   JavaScript versions of this hold each fixed one symptom and introduced
   another — a 52px drop the moment the first refresh landed, an outline
   slipping off its own fill, a shake from repeated re-measurement. A sticky
   element cannot do any of those things.

   The track is how far the name is allowed to hold. It runs from the name's
   own position to the bottom of the collage plus the clearance under it, so
   the name stays put until the statement below arrives over the top of it. */
.ath__track {
  position: absolute;
  left: calc(234 * var(--u));
  top: calc(314 * var(--u));
  height: calc(100% - (314 * var(--u)) + (82 * var(--u)) + 100px);
  pointer-events: none;
}

/* Opposite sides of the photography, which sits at z-index 2. */
.ath__track--under { z-index: 1; }
.ath__track--over { z-index: 3; }

.ath__title {
  position: sticky;
  /* Centred in the viewport. 0.63em is half a line at this line-height, so the
     name holds on the middle of the screen rather than hanging from it. */
  top: calc(50svh - 0.63em);
  margin: 0;
  font-weight: var(--w-bold);
  font-size: max(40px, calc(135 * var(--u)));
  line-height: 1.26;
  letter-spacing: -0.0296em;       /* -4 @ 135 */
  white-space: nowrap;
}

.ath__title--outline {
  color: transparent;
  -webkit-text-stroke: max(1px, calc(2 * var(--u))) var(--red);
  pointer-events: none;
}

/* both descriptions are fixed-size justified body copy, so their measures
   are fixed too — same rule as the home page blurb */
.ath__lede,
.ath__note {
  position: absolute;
  z-index: 2;
  font-weight: var(--w-bold);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track-tight);
  text-align: justify;
}

.ath__lede {
  left: calc(987 * var(--u));
  top: calc(44 * var(--u));
  width: 336px;
}

.ath__note {
  left: calc(355 * var(--u));
  top: calc(762 * var(--u));
  width: 279px;
}

.ath-statement { margin-top: calc(107 * var(--u)); }

/* The section the name disappears behind.

   It carries the page's own ground rather than inheriting it, so it is opaque
   — the name holds at the middle of the screen, this arrives over the top of
   it, and from here down the name is gone. Without a painted ground the name
   would keep showing through every section below it.

   The clearance under the collage is padding, not margin: margin leaves the
   gap transparent and the name would be visible crossing it. Same distance,
   painted. */
.ath-statement--first {
  position: relative;
  z-index: 4;                     /* over the stroked copy, which sits at 3 */
  margin-top: 0;
  padding-top: calc(82 * var(--u) + 100px);
  background: var(--bg);
}

.ath-statement__quote {
  margin: 0;
  margin-top: calc(60 * var(--u));   /* the blank line in the design */
}

.ath-plate {
  margin: calc(107 * var(--u)) 0 0;
  height: calc(994 * var(--u));
  overflow: hidden;
}

.ath-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-athlete .footer { margin-top: calc(119 * var(--u)); }

/* ==========================================================================
   RESPONSIVE — below 1280px the scattered canvases stop scaling and reflow
   into readable flows; type goes back to real sizes and viewport clamps.
   ========================================================================== */

@media (max-width: 1279px) {

  :root {
    --gutter: 20px;
    --u: 1px;                       /* stop canvas scaling, use real layout */
    --fs-label: 13px;
    --fs-body: 15px;
    --fs-product: 20px;
  }

  /* --- hero --- */

  .hero__inner { padding-block: 24px 24px; gap: 32px; }

  .nav__links { gap: 24px; }

  .hero__blurb {
    width: min(100%, 335px);
    margin-left: 0;
  }

  .hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 20px;
  }
  .hero__meta--a,
  .hero__meta--b,
  .hero__meta--c,
  .hero__meta--d { grid-column: auto; justify-self: auto; }
  .hero__meta--b { display: none; }
  .hero__meta--d { margin-left: auto; }

  .hero .rule { margin-top: 12px; }
  .hero__wordmark { margin-top: 14px; }

  /* --- about --- */

  .about { padding-block: 72px 72px; }

  .statement { font-size: clamp(26px, 6.4vw, 52px); }

  .about__text { text-indent: 0; }

  /* --- scatters reflow ---
     The Figma canvases are deliberately uneven, so a row-based grid would
     leave big holes wherever two neighbours differ in height. CSS multi-column
     packs them tightly and keeps the staggered editorial rhythm. DOM order is
     preserved, so reading order stays correct. */

  .scatter {
    display: block;
    height: auto !important;
    column-gap: 20px;
  }

  .scatter > [style*="--l"] {
    position: static;
    width: auto;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }

  .scatter--athletes { columns: 2; }

  .scatter--athletes > .athlete { margin-bottom: 40px; }

  .athletes__title {
    position: static;
    column-span: all;
    font-size: clamp(56px, 15vw, 120px);
    margin-bottom: 32px;
  }

  .athlete__img {
    height: auto;
    aspect-ratio: var(--w) / var(--h);
  }

  /* --- cta --- */

  /* the desktop crop puts the copy over dark ground; the reflowed crop
     does not, so a scrim keeps the red type legible */
  .cta { margin-top: 72px; min-height: 0; }

  .cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 6, 5, 0.45) 0%, rgba(6, 6, 5, 0.72) 100%);
    pointer-events: none;
  }

  .cta__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-height: 0;
    padding-block: 96px 72px;
  }

  .cta__title { width: 100%; font-size: clamp(44px, 13vw, 110px); }
  .cta__side { gap: 28px; width: min(100%, 335px); }

  .btn { padding: 12px 16px; }

  /* --- collection --- */

  .collection { margin-top: 72px; }

  .collection__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 56px;
  }

  .collection__title { width: 100%; }
  .collection__details { width: min(100%, 547px); }

  .collection__title { font-size: clamp(44px, 12vw, 92px); }

  .collection__details .body p + p { margin-top: 0; }

  .scatter--products { columns: 2; }

  .scatter--products > .product { margin-bottom: 48px; }

  .product__media {
    height: auto;
    aspect-ratio: var(--w) / var(--h);
  }

  /* --- athlete detail page --- */

  .ath-hero { margin-top: 93px; }

  .scatter--athlete {
    display: flex;
    flex-direction: column;
    gap: 32px;
    height: auto !important;
  }

  .ath__title {
    position: static;
    order: 1;
    white-space: normal;
    font-size: clamp(40px, 10vw, 110px);
    line-height: 1.05;
  }

  .ath__title--outline { display: none; }

  .ath__lede,
  .ath__note { position: static; }

  .ath__lede { order: 2; width: min(100%, 336px); }
  .ath__note { order: 4; width: min(100%, 279px); }

  .ath__collage {
    display: grid;
    order: 3;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
  }

  .ath__img {
    position: static;
    width: auto;
    height: auto;
    aspect-ratio: var(--w) / var(--h);
  }

  .ath-statement { margin-top: 72px; }
  /* Below the breakpoint the collage stacks, nothing overlaps and the name
     does not hold, so this is spacing again rather than cover. */
  .ath-statement--first { margin-top: 64px; padding-top: 0; }
  .ath-statement__quote { margin-top: 32px; }

  .ath-plate {
    margin-top: 72px;
    height: auto;
    aspect-ratio: 1440 / 994;
  }

  .page-athlete .footer { margin-top: 72px; }

  /* --- footer --- */

  .footer { margin-top: 72px; }

  .footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 20px;
  }

  .footer__claim {
    width: 100%;
    font-size: clamp(40px, 11vw, 84px);
  }

  .footer__year { font-size: clamp(64px, 22vw, 160px); }

  .footer__detail {
    width: min(100%, 335px);
    margin-top: 48px;
  }

  .footer__info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
    margin-top: 24px;
  }

  .footer__col--brand { gap: 12px; }
  .footer__mark { width: 26px; }

  .footer__talk {
    grid-column: 1 / -1;
    margin-left: 0;
    font-size: clamp(32px, 9vw, 56px);
    gap: 14px;
  }
  .footer__talk img { width: 24px; }

  .footer__wordmark {
    margin-top: 48px;
    margin-bottom: -3vw;
  }
}

/* ------------------------------ phone ----------------------------------- */

@media (max-width: 560px) {

  :root {
    --fs-label: 12px;
    --fs-product: 17px;
  }

  /* The nav fits on one line at 12px even at 320px wide, so it stays a single
     row rather than wrapping and eating 36px of the hero. */
  .nav { column-gap: 16px; }
  .nav__brand { white-space: nowrap; }
  .nav__links { gap: 16px; }

  /* Portrait rebalance. The wordmark is a fixed 5.28:1 lockup, so the only
     way to give it presence on a narrow screen is to run it edge to edge —
     that is its maximum. Everything above it tightens so the type block
     reads as a deliberate base rather than a strip stranded under a void. */
  .hero__inner { padding-block: 20px 12px; gap: 24px; }

  .hero__wordmark {
    width: calc(100% + (2 * var(--gutter)));
    margin-left: calc(-1 * var(--gutter));
    margin-top: 10px;
  }

  .hero__blurb { margin-bottom: 0; }

  .hero__meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    margin-top: 16px;
  }

  .hero__meta > * { grid-row: auto; }
  .hero__meta--a { grid-column: 1 / -1; }
  .hero__meta--c { grid-column: 1; justify-self: start; }
  .hero__meta--d { grid-column: 2; justify-self: end; margin-left: 0; }

  .hero .rule { margin-top: 10px; }

  .scatter--athletes { columns: 1; }
  .scatter--athletes > .athlete { margin-bottom: 36px; }

  .scatter--products { columns: 1; }
  .scatter--products > .product { margin-bottom: 44px; }

  .footer__info { grid-template-columns: 1fr; gap: 28px; }

  .ath__collage { grid-template-columns: 1fr; }
}

/* ---------------------------- scroll reveal ------------------------------ */

/* Strictly additive. The base state is the finished state — visible, no
   transform, no transition — so a visitor with no JS, no IntersectionObserver
   or reduced motion set reads a plain static page. Everything that hides an
   element lives inside the no-preference query below, which is the only place
   `opacity: 0` is ever written.

   The state is a data attribute rather than a class so the markup says what it
   is at a glance, and so all the motion can be keyed off it here: no inline
   transitions, nothing for the script to do but flip one attribute. */
.reveal { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .reveal[data-shown='false'] {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  .reveal {
    /* The transform outlasts the fade by 180ms on purpose. The block is fully
       readable while it is still settling its last pixels, so it arrives
       rather than slides. 18px of lift and no more — travel any longer than
       this turns a page into a slideshow and fights the layout. */
    transition:
      opacity 720ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--reveal-delay, 0ms),
      transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  /* Released once it has arrived: a permanent will-change on dozens of blocks
     is a layer each, for a transition that runs once. */
  .reveal[data-shown='true'] {
    transform: none;
    will-change: auto;
  }
}

/* ============================ PAGE TRANSITION =========================== */

/* A fade, and nothing else.

   It fades one fixed, full-screen sheet of the page's own ground — never the
   `body`. Fading the body means compositing the whole 5,000px document every
   frame, which is exactly the sort of thing that turns a 280ms fade into a
   stutter; and `opacity` below 1 on the body makes it the containing block for
   `position: fixed`, so the nav and the cursor would come unstuck from the
   viewport for the duration. One small layer costs nothing and moves nothing.

   The two halves are completely independent — no flag, no shared state, no
   handoff between documents. The leaving page fades the sheet in over its own
   content; the arriving page fades the same sheet back out, with a CSS
   animation that needs no script and always completes. Nothing can be left
   half-done, and a direct visit gets the same arrival as a click-through.

   Because both pages share `--bg`, the ground never changes across the
   navigation: content dissolves out, the ground holds, content dissolves in. */
.fade {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* Every load starts with the sheet over the page and clears it. `both` holds
     opacity at 1 through the fill phase, so there is no frame of bare page
     before it starts. */
  .fade { animation: page-in 320ms var(--ease) both; }

  @keyframes page-in {
    from { opacity: 1; }
    to   { opacity: 0; }
  }

  /* `animation: none` is load-bearing. A CSS animation beats an inline style
     in the cascade, so with `page-in` still filling at opacity 0 the script's
     fade was written and then ignored — the page simply never faded. */
  .is-leaving .fade { animation: none; }

  .is-leaving,
  .is-leaving body { overflow: hidden; }
}

/* ------------------------------ motion ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .athlete:hover .athlete__img img { transform: none; }
}
