/* ==========================================================================
   N.I.D CLUB — one line, two elements
   Monochrome system: ink + paper, one family (Inter) in four voices:
   - statements: light, sentence case, the key words in bold
   - big words and numbers: heavy italic capitals                  (var(--display) rules)
   - labels: small wide-spaced capitals, "(0N) —— Name"             (.eyebrow, .mono)
   - reading text: regular, calm grey
   ========================================================================== */

:root {
  --ink: #0b0b0b;
  --paper: #efeee9;
  --ink-60: rgba(11, 11, 11, .72);
  --ink-12: rgba(11, 11, 11, .12);
  --paper-60: rgba(239, 238, 233, .74);
  --paper-14: rgba(239, 238, 233, .14);

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --display: var(--sans);   /* used italic 800, in capitals */
  --mono: var(--sans);      /* labels are wide-spaced capitals, not monospace */

  --pad: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(.2, .7, 0, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  /* stays transparent so the fixed WebGL canvas (z-index:-1) shows through */
  background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }
.is-dark ::selection { background: var(--paper); color: var(--ink); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
/* section labels: "(0N) —— Name" */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(24px, 4vw, 48px);
  font: 500 13px/1.5 var(--sans); letter-spacing: .22em; text-transform: uppercase;
}
.eyebrow i { width: 28px; height: 1px; background: currentColor; flex: none; }

.row { display: block; overflow: hidden; padding-right: .08em; }
.row > span { display: inline-block; will-change: transform; }

:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

/* ----- Layers ------------------------------------------------------------ */
#webgl {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  display: block;
}
#trail {
  position: fixed; inset: 0; z-index: 60;
  width: 100%; height: 100%;
  pointer-events: none;
  mix-blend-mode: difference;
}
.grain {
  /* the noise is a 240 px tile, so the layer only needs to overhang the screen by the
     largest jitter offset (120 px): a third of the old 300 % × 300 % layer's area, which
     was compositing ~25 MP every frame on a 3× phone */
  position: fixed; inset: -120px; z-index: 70;
  pointer-events: none;
  opacity: .085;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-80px, 60px, 0); }
  40% { transform: translate3d(60px, -100px, 0); }
  60% { transform: translate3d(-120px, -40px, 0); }
  80% { transform: translate3d(100px, 80px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ----- Cursor ------------------------------------------------------------ */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 80;
  pointer-events: none;
  mix-blend-mode: difference;
  color: #fff;
  display: none;
}
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor input { cursor: none; }
.cursor__ring {
  position: absolute; left: 0; top: 0;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background .3s;
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor.is-label .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.cursor__label {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s;
}
.cursor.is-label .cursor__label { opacity: 1; }

/* ----- Loader ------------------------------------------------------------ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  clip-path: inset(0 0 0 0);
}
.loader__inner { display: grid; gap: 22px; justify-items: center; }
.loader__mark { width: clamp(120px, 16vw, 200px); overflow: visible; }
.loader__mark path { fill: none; stroke-width: 124; stroke-linecap: round; stroke-linejoin: round; }
.loader__ghost { stroke: rgba(239, 238, 233, .08); }
.loader__path { stroke: var(--paper); stroke-dasharray: 1 1.02; stroke-dashoffset: 1; }
.loader__meta { display: flex; gap: 28px; opacity: .8; }
.loader__count { font-variant-numeric: tabular-nums; }
.loader__quote { position: absolute; bottom: var(--pad); left: 50%; transform: translateX(-50%); opacity: .4; white-space: nowrap; }

/* ----- HUD --------------------------------------------------------------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--pad);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__logo { display: flex; align-items: center; gap: 12px; }
.hud__logo svg { width: 40px; height: 40px; }
.hud__wordmark { font: 600 13px/1.02 var(--sans); letter-spacing: .02em; text-transform: uppercase; }
.hud__nav { display: flex; gap: clamp(18px, 3vw, 44px); }
.hud__nav a { position: relative; padding: 6px 0; }
.hud__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.hud__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.hud__actions { display: flex; align-items: center; gap: 10px; }
.sound, .menu-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 40px;
}
.sound__bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.sound__bars i { width: 2px; height: 3px; background: currentColor; transition: height .3s; }
.sound[aria-pressed="true"] .sound__bars i { animation: bars 1s var(--ease-io) infinite alternate; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bars { from { height: 2px; } to { height: 12px; } }
.menu-btn__lines { display: grid; gap: 4px; width: 16px; }
.menu-btn__lines i { height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.menu-open .menu-btn__lines i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-open .menu-btn__lines i:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.hud-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hud-foot__left { display: grid; gap: 2px; }
.hud-foot__readout { opacity: .6; font-variant-numeric: tabular-nums; }
.hud-foot__progress { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.hud-foot__progress svg { width: 34px; height: 34px; overflow: visible; }
.hud-foot__progress path { fill: none; stroke-width: 124; stroke-linecap: round; }
.hud-foot__progress .track { stroke: rgba(255, 255, 255, .22); }
.hud-foot__progress .fill { stroke: #fff; stroke-dasharray: 1 1.02; stroke-dashoffset: 1; }

/* ----- Menu -------------------------------------------------------------- */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: grid; grid-template-rows: 1fr auto;
  padding: calc(var(--pad) + 90px) var(--pad) var(--pad);
  background: var(--ink); color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__nav { display: flex; flex-direction: column; justify-content: center; }
.menu__nav a {
  display: flex; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--paper-14);
  overflow: hidden;
}
.menu__nav a:last-child { border-bottom: 1px solid var(--paper-14); }
.menu__nav .mono { width: 40px; opacity: .5; }
.menu__word {
  display: inline-block;
  font: italic 800 clamp(40px, 8vh, 96px)/1 var(--display);
  letter-spacing: -.03em;
  text-transform: uppercase;
  padding: .06em 0 0;
  /* the open animation drives `transform` (GSAP); the hover slide uses `translate` so
     a CSS transition never fights it */
  transition: translate .7s var(--ease);
}
.menu__nav a:hover .menu__word { translate: 24px 0; }
.menu__foot { display: flex; justify-content: space-between; gap: 24px; opacity: .55; }
/* the page's bottom readout would print over the menu's own footer */
.hud-foot { transition: opacity .3s; }
.menu-open .hud-foot { opacity: 0; }

/* ----- Sections ---------------------------------------------------------- */
.section { position: relative; padding: clamp(110px, 18vh, 200px) var(--pad); }
.is-dark { color: var(--paper); }

/* ----- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 620px;
  padding: calc(var(--pad) + 76px) var(--pad) calc(var(--pad) + 64px);
  display: grid; grid-template-rows: auto 1fr auto;
}
.hero__meta {
  display: flex; justify-content: space-between;
  color: #fff; mix-blend-mode: difference;
  border-top: 1px solid rgba(255, 255, 255, .35);
  padding-top: 12px;
}
.hero__title {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(10px, 3vh, 40px) 0;
  font: 300 clamp(48px, 8.6vw, 168px)/1.02 var(--sans);
  letter-spacing: -.03em;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hero__title .row--r { align-self: flex-end; }
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  color: #fff; mix-blend-mode: difference;
}
.hero__sub { font: 500 clamp(18px, 1.7vw, 26px)/1.25 var(--sans); letter-spacing: -.01em; }
.hero__scroll { display: inline-flex; align-items: center; gap: 14px; }
.hero__scroll-line { position: relative; width: 64px; height: 1px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.hero__scroll-line::after {
  content: ''; position: absolute; inset: 0; background: #fff;
  animation: scrollline 2.2s var(--ease-io) infinite;
}
@keyframes scrollline { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ----- Manifesto --------------------------------------------------------- */
/* An editorial page on paper (it covers the landscape): light display type with the
   names in bold, a reading paragraph, then a misty line-drawn range with the club's
   one line drawn across it on scroll, and the two parts. */
.manifesto {
  min-height: 100vh;
  background: var(--paper);
  overflow: hidden;
  padding-bottom: clamp(48px, 8vh, 96px);
}
.manifesto > :not(.manifesto__range) { position: relative; z-index: 1; }

.manifesto__title {
  max-width: 14em;
  margin-top: clamp(24px, 4vh, 40px);
  font: 300 clamp(28px, 7.2vw, 72px)/1.13 var(--sans);
  letter-spacing: -.02em;
}
.manifesto__title strong { font-weight: 600; }
/* words not yet read are dimmed, not faded out */
.manifesto__title .w { opacity: .24; }
.manifesto__body {
  max-width: 25em; margin-top: clamp(28px, 4vh, 40px);
  font: 400 clamp(17px, 2.3vw, 21px)/1.62 var(--sans);
  color: var(--ink-60);
}
.manifesto__coda { margin-top: 20px; font: 400 clamp(17px, 2.3vw, 21px)/1.5 var(--sans); color: var(--ink-60); }
.manifesto__coda em { font-weight: 600; color: var(--ink); }

/* the range: a rendered image; the line is its own small SVG layer, so drawing it on
   scroll never repaints the mountains */
.manifesto__range { position: relative; z-index: 0; pointer-events: none; }
.manifesto__range img, .manifesto__range svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* both scale from the bottom-right corner, so the line stays where it was drawn on the range */
.manifesto__range img { object-fit: cover; object-position: 100% 100%; }
.manifesto__range svg { overflow: visible; }
/* width, dash and offset are set by initRange, in the drawing's own units; until then it's hidden */
.manifesto__range .range__line path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0 99999; }

.manifesto__parts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6vw; }
.part { position: relative; display: grid; align-content: start; padding: clamp(20px, 3vh, 32px) 0; }
.part__eyebrow { display: flex; align-items: center; gap: 12px; font: 500 12px/1.5 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.part__eyebrow i { width: 24px; height: 1px; background: currentColor; }
.part__word {
  margin: 10px 0 14px;
  font: italic 800 clamp(72px, 19vw, 168px)/.9 var(--sans);
  letter-spacing: -.035em; text-transform: uppercase;
  transition: transform .7s var(--ease);
}
.part__desc { font: 500 11px/1.75 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.part__count {
  position: absolute; right: 0; bottom: calc(clamp(20px, 3vh, 32px) + 30px);
  display: flex; align-items: center; gap: 18px;
  font: 400 13px/1 var(--sans); letter-spacing: .08em;
}
.part__count i { width: 1px; height: 52px; background: currentColor; }
@media (hover: hover) { .part:hover .part__word { transform: translateX(10px); } }

/* ----- Mark story -------------------------------------------------------- */
/* the paper page above ends in mist rather than a hard edge onto the terrain */
.mark-story::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 28vh; z-index: 0;
  background: linear-gradient(var(--paper), rgba(239, 238, 233, 0));
  pointer-events: none;
}
.mark-story { height: 420vh; position: relative; }
.mark-story__sticky {
  position: sticky; top: 0; height: 100vh;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 4vw;
  padding: 0 var(--pad);
}
.mark-story__art { display: grid; place-items: center; }
.mark-svg { width: min(74vh, 44vw); overflow: visible; }
.mark-svg path { fill: none; stroke-width: 124; stroke-linecap: round; stroke-linejoin: round; }
.mark-svg__ghost { stroke: var(--ink); opacity: .06; }
.mark-svg__a, .mark-svg__b { stroke: var(--ink); stroke-dasharray: 1 1.02; stroke-dashoffset: 1; }
.mark-svg__b { stroke: var(--ink); }
.mark-svg__note { opacity: 0; transition: opacity .6s; }
.mark-svg__note.is-on { opacity: 1; }
.mark-svg__note line { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 8 8; }
.mark-svg__note text { font: 500 30px var(--mono); letter-spacing: .14em; fill: var(--ink); }
.mark-story__copy { position: relative; max-width: 520px; }
.story-steps { position: relative; min-height: 300px; }
.story-step {
  position: absolute; inset: 0 0 auto;
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
  pointer-events: none;
}
.story-step.is-active { opacity: 1; transform: none; }
.story-step h2 {
  font: 300 clamp(30px, 3.4vw, 58px)/1.08 var(--sans);
  letter-spacing: -.025em;
  margin-bottom: 22px;
}
.story-step h2 strong, .story-step h2 em { font-weight: 600; font-style: normal; }
.story-step h2 em { display: block; }
.story-step p { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; max-width: 38ch; color: var(--ink-60); }

/* ----- Chapter openers --------------------------------------------------- */
.chapter { min-height: 120vh; display: grid; align-content: start; }
.chapter__index { display: flex; justify-content: space-between; border-top: 1px solid currentColor; padding-top: 12px; opacity: .75; }
.chapter__title {
  margin: clamp(30px, 6vh, 60px) 0 clamp(40px, 8vh, 90px);
  font: italic 800 clamp(96px, 21vw, 420px)/.8 var(--display);
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: #fff; mix-blend-mode: difference;
}
.chapter__title .row:first-child { font-size: .2em; font-weight: 500; font-style: normal; line-height: 1; letter-spacing: .22em; margin-bottom: .2em; }
.chapter__body { display: grid; grid-template-columns: 1fr 1.25fr; gap: 6vw; align-items: start; }
.chapter__lede { font: 500 clamp(20px, 2vw, 32px)/1.32 var(--sans); letter-spacing: -.01em; max-width: 26ch; }
.chapter__lede strong { font-weight: 600; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 14px 16px 0 0; border-top: 1px solid currentColor; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--ink-12); }
.stat dt { opacity: .6; }
.stat dd { font: italic 800 clamp(48px, 5vw, 92px)/1 var(--display); letter-spacing: -.03em; margin-top: 18px; font-variant-numeric: tabular-nums; }

/* ----- Ascent (horizontal altitude profile) ------------------------------ */
.ascent { height: 460vh; position: relative; }
.ascent__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.ascent__head { position: absolute; top: calc(var(--pad) + 86px); left: var(--pad); z-index: 2; }
.ascent__head h3 { font: 300 clamp(32px, 3.6vw, 64px)/1.06 var(--sans); letter-spacing: -.025em; }
.ascent__head h3 strong, .riders__head h3 strong { font-weight: 600; }
.ascent__meter {
  position: absolute; top: calc(var(--pad) + 86px); right: var(--pad); z-index: 2;
  display: grid; justify-items: end; gap: 4px;
}
.ascent__meter strong { font: italic 800 clamp(40px, 5vw, 92px)/.9 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ascent__track {
  --tw: 360vw;
  position: absolute; left: 0; top: 34vh; bottom: 12vh;
  width: var(--tw);
  will-change: transform;
}
.ascent__svg { position: absolute; left: 0; top: 0; width: var(--tw); height: 100%; overflow: visible; }
.ascent__reveal { position: absolute; left: 0; top: -20px; bottom: -20px; width: 0; overflow: hidden; }
.ascent__reveal .ascent__svg { top: 20px; height: calc(100% - 40px); }
.ascent__svg path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ascent__ghost { stroke: var(--ink); stroke-opacity: .16; stroke-width: 1; stroke-dasharray: 3 6; }
.ascent__line { stroke: var(--ink); stroke-width: 2.5; }
.ascent__head-dot {
  position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 6px rgba(11, 11, 11, .12), 0 0 0 16px rgba(11, 11, 11, .05);
}
.wp { position: absolute; left: calc(var(--u) * 100%); top: calc(var(--v) * 100%); }
.wp__dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px;
  border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper);
  transition: background .4s, transform .6s var(--ease);
}
.wp.is-reached .wp__dot { background: var(--ink); transform: scale(1.3); }
.wp__card {
  position: absolute; left: -1px; bottom: 34px;
  width: min(360px, 70vw);
  padding-left: 18px; border-left: 1px solid var(--ink);
  opacity: .25; transition: opacity .6s;
}
.wp--below .wp__card { bottom: auto; top: 34px; }
/* the summit sits near the top of the profile: its card hangs below, clear of the heading */
.wp:last-child .wp__card { bottom: auto; top: 34px; }
/* one card at a time, the latest waypoint reached, so cards never pile up on the
   heading, the elevation readout or each other */
.wp .wp__card, .wp.is-reached:has(~ .wp.is-reached) .wp__card { opacity: 0; }
.wp.is-reached .wp__card { opacity: 1; }
.wp__card h4 { font: 600 clamp(26px, 2.4vw, 40px)/1.08 var(--sans); letter-spacing: -.025em; margin: 10px 0 12px; }
.wp__card p:last-child { color: var(--ink-60); font-size: 15px; line-height: 1.55; }

/* ----- Guides ------------------------------------------------------------ */
.guides__title { font: 300 clamp(34px, 5vw, 92px)/1.06 var(--sans); letter-spacing: -.025em; margin-bottom: clamp(48px, 8vh, 90px); }
.guides__title strong { font-weight: 600; }
.guides__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide {
  position: relative;
  display: grid; gap: 16px; align-content: start;
  min-height: 380px; padding: 24px;
  border: 1px solid var(--ink-12); border-radius: 14px;
  background: rgba(239, 238, 233, .6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  overflow: hidden;
}
.guide::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(11, 11, 11, .07), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.guide:hover::before { opacity: 1; }
.guide h4 { font: 600 clamp(28px, 2.8vw, 48px)/1.06 var(--sans); letter-spacing: -.025em; margin-top: 70px; }
.guide p { color: var(--ink-60); max-width: 32ch; }
.guide__tag { align-self: end; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--ink-12); }
.guide--sum { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.guide--sum p { color: var(--paper-60); }

/* ----- Riders ring ------------------------------------------------------- */
.riders { height: 520vh; position: relative; }
.riders__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.riders__head { position: absolute; top: calc(var(--pad) + 86px); left: var(--pad); z-index: 3; }
.riders__head h3 { font: 300 clamp(32px, 3.6vw, 64px)/1.06 var(--sans); letter-spacing: -.025em; }
.ring {
  --cw: clamp(200px, 19vw, 300px);
  position: absolute; inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 40%;
}
.ring__inner {
  position: absolute; left: 50%; top: 52%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.rider-card {
  position: absolute;
  left: calc(var(--cw) * -.5); top: calc(var(--cw) * -.68);
  width: var(--cw); height: calc(var(--cw) * 1.36);
  padding: 16px;
  display: grid; grid-template-rows: auto 1fr auto;
  border-radius: 14px;
  background: var(--ink); color: var(--paper);
  overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
}
.rider-card__topo { position: absolute; inset: 0; opacity: .5; transition: opacity .6s; }
.rider-card__topo svg { width: 100%; height: 100%; }
.rider-card__topo path { fill: none; stroke: var(--paper); stroke-width: .35; }
.rider-card__topo .summit { stroke-width: .6; }
.rider-card.is-front .rider-card__topo { opacity: .9; }
.rider-card header, .rider-card footer { position: relative; display: flex; justify-content: space-between; opacity: .8; }
.rider-card__num { position: relative; align-self: end; font: italic 800 calc(var(--cw) * .58)/.8 var(--display); letter-spacing: -.03em; }
.riders__info {
  position: absolute; left: var(--pad); bottom: calc(var(--pad) + 70px); z-index: 3;
  width: min(360px, 80vw);
}
.riders__info h4 { font: italic 800 clamp(38px, 4vw, 68px)/.9 var(--display); letter-spacing: -.03em; text-transform: uppercase; margin: 6px 0 18px; }
.riders__meta { display: grid; gap: 0; }
.riders__meta div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-top: 1px solid var(--ink-12); }
.riders__meta dt { opacity: .55; }
.riders__note { margin-top: 14px; opacity: .45; text-transform: none; letter-spacing: .02em; }
.riders__dots { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 76px); display: grid; gap: 8px; z-index: 3; }
.riders__dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink); transition: background .3s, transform .4s var(--ease); }
.riders__dots i.is-on { background: var(--ink); transform: scale(1.4); }

/* ----- Moment (photo) ---------------------------------------------------- */
.moment { height: 300vh; position: relative; }
.moment__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.moment__media {
  position: absolute; inset: 0;
  clip-path: inset(24% 32% 24% 32% round 18px);
  will-change: clip-path;
  background: var(--ink);
}
.moment__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: scale(1.3); will-change: transform; }
/* the image's contrast(1.06) grade is baked into shymbulak-graded.jpg: a CSS filter re-runs
   on the full-screen bitmap every frame of the zoom */
.moment__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 35%, transparent 55%, rgba(0,0,0,.55)); }
.moment__caption {
  position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--pad) + 70px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px;
  color: #fff;
}
.moment__caption > * { opacity: 0; transform: translateY(30px); }
.moment__caption h3 { font: 300 clamp(44px, 7vw, 132px)/1 var(--sans); letter-spacing: -.03em; text-align: center; }
.moment__caption h3 strong { font-weight: 700; }
.moment__caption p:last-child { text-align: right; }

/* ----- Shift ------------------------------------------------------------- */
.shift { height: 280vh; position: relative; }
.shift__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; place-content: center; justify-items: center; text-align: center;
  color: #fff; mix-blend-mode: difference;
}
.shift__eyebrow { margin-bottom: 26px; opacity: .7; }
.shift__title { font: 300 clamp(48px, 9vw, 180px)/1 var(--sans); letter-spacing: -.035em; }
.shift__title strong { font-weight: 700; }
.marquee { position: absolute; left: 0; right: 0; bottom: 14vh; overflow: hidden; white-space: nowrap; }
.marquee__row { display: inline-flex; will-change: transform; }
.marquee__row span {
  font: italic 800 clamp(34px, 5vw, 92px)/1 var(--display);
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .6);
  padding-right: .3em;
}

/* ----- Surf / podium / tides --------------------------------------------- */
.chapter--surf .chapter__index { border-color: var(--paper); }
.is-dark .stat + .stat { border-left-color: var(--paper-14); }

.podium__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.podium__hero { display: flex; align-items: flex-start; gap: 2vw; }
.podium__big { font: italic 800 clamp(200px, 32vw, 560px)/.76 var(--display); letter-spacing: -.04em; }
.podium__big sup { font-size: .22em; vertical-align: top; position: relative; top: .25em; margin-left: .14em; letter-spacing: .02em; }
.podium__times { font: italic 800 clamp(60px, 8vw, 150px)/1 var(--display); opacity: .4; margin-top: 2vw; }
.podium__lede { font: 500 clamp(22px, 2.1vw, 34px)/1.32 var(--sans); letter-spacing: -.01em; margin-bottom: 40px; }
.medals { display: grid; gap: 14px; }
.medal {
  display: flex; align-items: center; gap: 22px;
  padding: 18px 22px 18px 18px;
  border: 1px solid var(--paper-14); border-radius: 14px;
  background: rgba(11, 11, 11, .45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
}
.medal__disc {
  flex: none; display: grid; place-items: center;
  width: 74px; height: 74px; border-radius: 50%;
  border: 1px solid var(--paper);
  font: italic 800 44px/1 var(--display);
  transform: translateZ(30px);
  background: radial-gradient(circle at 35% 30%, rgba(239,238,233,.25), transparent 60%);
}
.medal h4 { font: 600 28px/1.1 var(--sans); letter-spacing: -.02em; margin: 4px 0; }
.medal__where { opacity: .55; }

.tides { min-height: 120vh; display: grid; align-content: center; }
.tides__title { font: 300 clamp(48px, 9vw, 180px)/1 var(--sans); letter-spacing: -.035em; }
.tides__title strong { font-weight: 600; }
.tides__title .row--r { text-align: right; }
.tides__title em { font-style: normal; font-weight: 600; }
.tides__sub { margin-top: 40px; max-width: 34ch; font: 500 clamp(18px, 1.6vw, 24px)/1.4 var(--sans); color: var(--paper-60); }

/* ----- Dream ------------------------------------------------------------- */
.dream { min-height: 110vh; }
.dream__title { font: 300 clamp(36px, 5.4vw, 100px)/1.06 var(--sans); letter-spacing: -.025em; max-width: 17em; }
.dream__title em { display: block; font-style: normal; font-weight: 600; }
.dream__form { margin-top: clamp(56px, 10vh, 110px); max-width: 1100px; }
.dream__form label { display: block; opacity: .6; margin-bottom: 8px; }
.dream__field { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--paper); padding-bottom: 10px; }
.dream__field input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--paper);
  font: 500 clamp(26px, 3.6vw, 60px)/1.15 var(--sans); letter-spacing: -.02em;
  caret-color: var(--paper);
}
.dream__field input::placeholder { color: rgba(239, 238, 233, .28); }
.dream__send {
  flex: none; display: inline-flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 28px;
  border-radius: 64px; background: var(--paper); color: var(--ink);
  font: 600 15px/1 var(--sans);
}
.dream__send svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dream__status { min-height: 1.5em; margin-top: 14px; opacity: .8; }
.dream__form.is-shake .dream__field { animation: shake .5s var(--ease); }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(64px, 12vh, 130px); }
.path-card {
  position: relative; display: grid; gap: 50px;
  padding: 24px; min-height: 230px;
  border: 1px solid var(--paper-14); border-radius: 14px;
  background: rgba(11, 11, 11, .4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: background .5s, color .5s;
}
.path-card .mono { opacity: .6; }
.path-card__title { align-self: end; font: 600 clamp(30px, 3.2vw, 56px)/1.04 var(--sans); letter-spacing: -.025em; transform: translateZ(30px); }
.path-card__arrow { position: absolute; top: 20px; right: 24px; font-size: 28px; transition: transform .6s var(--ease); }
.path-card:hover { background: var(--paper); color: var(--ink); }
.path-card:hover .path-card__arrow { transform: translateX(8px) rotate(-45deg); }

/* ----- Footer ------------------------------------------------------------ */
.footer { position: relative; padding: clamp(80px, 14vh, 150px) var(--pad) calc(var(--pad) + 60px); }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 24px; padding-bottom: 60px; }
.footer__grid > div { display: grid; gap: 8px; align-content: start; }
.footer__grid a { width: fit-content; font-size: 18px; position: relative; }
.footer__grid a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.footer__grid a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__label { opacity: .5; margin-bottom: 10px; }
.footer__quote p:last-child { font: 500 clamp(22px, 2vw, 30px)/1.3 var(--sans); letter-spacing: -.01em; max-width: 24ch; }
.footer__mark {
  display: flex; align-items: center; justify-content: space-between;
  font: italic 800 clamp(64px, 12.5vw, 250px)/.82 var(--display); text-transform: uppercase;
  letter-spacing: -.02em;
  border-top: 1px solid var(--paper-14);
  padding-top: 3vw;
}
.footer__mark svg { width: .8em; height: .8em; overflow: visible; }
.footer__mark path { fill: none; stroke: var(--paper); stroke-width: 124; stroke-linecap: round; stroke-linejoin: round; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; margin-top: 3vw; opacity: .6; }

/* ----- Reading over the terrain ------------------------------------------- */
/* body copy sits on the line-drawn terrain. A feathered "mist" in the page colour sits
   behind each block, so the lines fade out around the words instead of cutting
   through them */
:root { --mist: rgba(239, 238, 233, .9); --mist-dark: rgba(11, 11, 11, .86); }
.story-step p, .chapter__lede, .wp__card, .riders__info,
.podium__lede, .tides__sub, .ascent__meter {
  background: var(--mist);
  box-shadow: 0 0 22px 16px var(--mist);
  border-radius: 10px;
}
.is-dark .chapter__lede, .is-dark .podium__lede, .is-dark .tides__sub {
  background: var(--mist-dark);
  box-shadow: 0 0 22px 16px var(--mist-dark);
}

/* ----- Fallbacks --------------------------------------------------------- */
.no-webgl body, .no-webgl { background: var(--paper); }
.no-webgl .is-dark, .no-webgl .shift { background: var(--ink); }
.no-webgl .shift__sticky, .no-webgl .chapter__title, .no-webgl .hero__title, .no-webgl .hero__meta, .no-webgl .hero__foot { mix-blend-mode: normal; color: inherit; }
.no-webgl .shift__sticky { color: var(--paper); }

/* ----- Responsive -------------------------------------------------------- */
@media (min-width: 901px) {
  /* the card ring sits right of centre, clear of the heading and the rider panel */
  .ring__inner { left: 56%; }
  /* below the headline, beside the reading paragraph */
  .manifesto__range { position: absolute; right: 0; top: 26%; width: 64%; height: auto; aspect-ratio: 1000 / 640; }  /* the image's own frame: nothing is cropped, so its faded edges survive */
  .manifesto__body, .manifesto__coda { max-width: 26em; }
  .manifesto__parts { margin-top: clamp(80px, 16vh, 180px); }
}

@media (max-width: 900px) {
  .hud__nav { display: none; }
  .hide-sm { display: none; }
  .sound__label { display: none; }
  .sound { padding: 0 13px; }
  .hero__title { font-size: 11vw; line-height: 1.04; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .mark-story__sticky { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 6vh; }
  .mark-svg { width: min(46vh, 72vw); }
  .story-steps { min-height: 230px; }
  .story-step h2 { font-size: 32px; }
  .chapter__body { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .ascent__track { --tw: 620vw; top: 40vh; bottom: 14vh; }
  .ascent__meter { top: auto; bottom: calc(var(--pad) + 52px); }
  .guides__grid { grid-template-columns: 1fr; }
  .guide { min-height: 0; }
  .guide h4 { margin-top: 30px; }
  /* the front card fits between the heading (~195 px) and the rider panel (~195 px)
     at any screen height; tall phones keep 56vw */
  .ring { --cw: clamp(110px, min(56vw, calc((100vh - 420px) / 1.36)), 260px); }
  .ring__inner { top: 50%; }
  .riders__info { bottom: calc(var(--pad) + 56px); }
  .riders__info h4 { font-size: 36px; margin-bottom: 8px; }
  .riders__meta div:nth-child(n+2), .riders__note { display: none; }
  .moment__caption { grid-template-columns: 1fr; text-align: left; }
  .moment__caption h3, .moment__caption p:last-child { text-align: left; }
  .podium__grid { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .dream__field { flex-direction: column; align-items: stretch; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__quote { grid-column: 1 / -1; }
  .menu__foot { flex-direction: column; }
  .menu__nav .mono { width: 28px; }
  .menu__word { font-size: min(8vh, 10.5vw); white-space: nowrap; }

  /* ---- legibility on phones ---- */
  .moment__caption p { text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
  .mono { font-size: 12px; letter-spacing: .14em; }
  .hud-foot__readout { display: none; }

  /* manifesto: the range rises just below the reading paragraph; the two parts stack */
  .manifesto { padding-top: 112px; }
  /* the summit sits ~18% down the image: this keeps it (and the line's drop) just below the text */
  .manifesto__range { height: 112vw; margin: -12vw calc(var(--pad) * -1) 0; }
  .manifesto__parts { grid-template-columns: 1fr; margin-top: -22vw; }

  .story-step p, .chapter__lede, .podium__lede, .tides__sub { line-height: 1.5; letter-spacing: 0; }
  .chapter__lede { font-size: 19px; }
  .podium__lede { font-size: 20px; }

  /* the altitude profile: every card sits between the heading and the meter */
  .wp__card { width: min(300px, calc(100vw - var(--pad) * 2)); }
  .wp--below .wp__card { top: auto; bottom: 34px; }
  .wp__card h4 { font-size: 26px; }
  .wp__card p:last-child { font-size: 15px; line-height: 1.5; }

  /* display lines whose desktop minimum is wider than a small phone: scale with the
     screen instead (same size as before at 375 px, smaller only below that) */
  .tides__title { font-size: clamp(36px, 11vw, 60px); }
  .shift__title { font-size: clamp(38px, 11.5vw, 62px); }
  .footer__mark { font-size: clamp(40px, 14vw, 64px); }

  .riders__meta div { padding: 10px 0; }
  .dream__field input { font-size: 22px; }
  .footer__base { flex-direction: column; gap: 6px; }
}

/* short phones (SE, small Androids, landscape-ish windows): the pinned sections tighten
   so the heading, the cards and the readouts each keep their own band */
@media (max-width: 900px) and (max-height: 700px) {
  .ascent__head, .riders__head { top: calc(var(--pad) + 70px); }
  .ascent__head .eyebrow, .riders__head .eyebrow { margin-bottom: 14px; }
  .ascent__head h3, .riders__head h3 { font-size: 30px; }
  .ascent__meter strong { font-size: 40px; }
  .wp__card { width: min(280px, calc(100vw - var(--pad) * 2)); }
  .wp__card h4 { font-size: 21px; margin: 6px 0 8px; }
  .wp__card p:last-child { font-size: 14px; line-height: 1.4; }
  /* ring between the heading (~200 px) and the rider panel (~150 px) */
  .ring { --cw: clamp(100px, min(56vw, calc((100vh - 360px) / 1.36)), 260px); }
  .ring__inner { top: calc(50% + 20px); }
  .riders__info { bottom: calc(var(--pad) + 44px); }
  .riders__info h4 { font-size: 30px; margin-bottom: 6px; }
}
@media (max-width: 900px) and (max-height: 560px) {
  .wp__card p:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scroll-line::after { animation: none; }
  #trail { display: none; }
}
