@import url('../fonts/fonts.css');

/* =========================================================================
   Kage — an editorial night walk laid over a live WebGL mountain.
   Layer order: world canvas (0) · foreground cutouts (3, above the reading
   layer, because you are standing behind them) · chrome (6).
   ========================================================================= */

:root {
  --ink: #05070b;
  --ink-deep: #020306;
  --charcoal: #0f1520;
  --slate: #1a2331;
  --bone: #e9e3d6;
  --bone-dim: rgba(233, 227, 214, 0.58);
  --bone-faint: rgba(233, 227, 214, 0.34);
  --amber: #f0a35c;
  --vermilion: #c8402c;
  --vermilion-soft: rgba(200, 64, 44, 0.5);
  --rule: rgba(233, 227, 214, 0.13);
  --rule-strong: rgba(233, 227, 214, 0.26);

  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --jp: 'Shippori Mincho', ui-serif, 'Yu Mincho', 'Hiragino Mincho ProN', serif;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --measure: 34rem;
  --fg-band: clamp(190px, 29vh, 340px);
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --slow: 1.4s;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink-deep);
  color: var(--bone);
  font-family: var(--sans);
  font-size: clamp(0.98rem, 0.62vw + 0.82rem, 1.12rem);
  line-height: 1.75;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection {
  background: var(--vermilion-soft);
  color: var(--bone);
}

.skip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  padding: 0.85rem 1.4rem;
  background: var(--ink);
  border: 1px solid var(--rule-strong);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform 0.28s var(--ease);
}

.skip:focus-visible {
  transform: translateY(0);
}

/* --------------------------------------------------------------- the world */

.world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: var(--ink-deep);
}

/* If WebGL never starts, the page still has a night sky to sit on. */
.world-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  background:
    radial-gradient(58vw 42vw at 18% 14%, rgba(200, 64, 44, 0.24), transparent 62%),
    radial-gradient(90vw 70vw at 70% 96%, rgba(26, 35, 49, 0.7), transparent 70%),
    linear-gradient(180deg, #070b13 0%, #05070b 52%, #020306 100%);
}

.no-webgl .world {
  display: none;
}

.no-webgl .world-fallback {
  display: block;
}

/* --------------------------------------------------------------- the cursor */

.cursor,
.cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}

.cursor {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--bone);
}

.cursor__ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--rule-strong);
  transition: width 0.32s var(--ease), height 0.32s var(--ease),
    margin 0.32s var(--ease), border-color 0.32s var(--ease);
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .has-cursor .cursor,
  .has-cursor .cursor__ring {
    opacity: 1;
  }

  .has-cursor .cursor__ring.is-hot {
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
    border-color: var(--amber);
  }
}

/* ---------------------------------------------------------------- the chrome */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.2vw, 1.9rem) var(--gutter);
  mix-blend-mode: normal;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.nav::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 3, 6, 0.82), rgba(2, 3, 6, 0));
  pointer-events: none;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.72rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.wordmark__jp {
  font-family: var(--jp);
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--vermilion);
}

.nav__list {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-faint);
  transition: color 0.4s var(--ease);
}

.nav__link em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 0.6rem;
  color: var(--vermilion);
  opacity: 0.7;
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link[aria-current='true'] {
  color: var(--bone);
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  background: rgba(5, 7, 11, 0.6);
  border: 1px solid var(--rule);
  color: var(--bone);
  font: inherit;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

/* the chapter rail */

.rail {
  position: fixed;
  right: clamp(0.9rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: flex-end;
  transition: opacity 0.6s var(--ease);
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-faint);
  transition: color 0.5s var(--ease);
}

.rail__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.6s var(--ease), opacity 0.4s var(--ease);
}

.rail__tick {
  width: 26px;
  height: 1px;
  background: var(--rule-strong);
  transition: width 0.6s var(--ease), background 0.5s var(--ease);
}

.rail__item:hover,
.rail__item:focus-visible,
.rail__item[aria-current='true'] {
  color: var(--bone);
}

.rail__item:hover .rail__label,
.rail__item:focus-visible .rail__label {
  max-width: 12rem;
  opacity: 1;
}

.rail__item[aria-current='true'] .rail__tick {
  width: 52px;
  background: var(--vermilion);
}

/* --------------------------------------------------- foreground cutout band */

.foreground {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fg-band);
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.fg-set {
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, 8%, 0);
  transition: opacity 1.05s var(--ease), filter 1.05s var(--ease),
    transform 1.25s var(--ease);
}

.fg-set[data-active='true'] {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

/* Cutouts are scaled off the band height, so each one is seen whole rather
   than cropped by the band. Widths follow from each image's own proportion. */
.fg {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
  will-change: transform;
}

.fg--flip {
  transform: scaleX(-1);
}

/* ------------------------------------------------------------------ layout */

.shell {
  position: relative;
  z-index: 2;
}

.chapter {
  position: relative;
  min-height: 185vh;
}

.chapter--hero {
  min-height: 155vh;
}

.chapter--hero .chapter__inner {
  padding-bottom: calc(var(--fg-band) * 0.5);
}

.chapter__inner {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3.6rem, 7.5vh, 5.5rem) var(--gutter) calc(var(--fg-band) * 0.68);
  opacity: calc(1 - var(--veil, 0));
  filter: blur(calc(var(--veil, 0) * 9px));
  transform: translate3d(0, calc(var(--veil, 0) * -2.4vh), 0);
}

.chapter__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    102deg,
    rgba(2, 3, 6, 0.84) 0%,
    rgba(2, 3, 6, 0.68) 30%,
    rgba(2, 3, 6, 0.5) 58%,
    rgba(2, 3, 6, 0.36) 100%
  );
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  /* the scene behind the type is live and occasionally bright; this keeps the
     reading edge crisp without resorting to panels or cards */
  text-shadow: 0 1px 24px rgba(2, 3, 6, 0.88), 0 0 3px rgba(2, 3, 6, 0.55);
}

/* small technical labels and fine rules */

.label {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.label--warm {
  color: var(--amber);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.chapter__head {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.6rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(1.3rem, 2.8vh, 2rem);
}

.chapter__num {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.8;
  color: var(--vermilion);
}

.chapter__kicker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* headings */

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display--hero {
  font-size: clamp(2.7rem, 7.4vw, 8rem);
  line-height: 0.9;
  max-width: 17ch;
}

.display--chapter {
  font-size: clamp(2.1rem, 4.5vw, 4.6rem);
  max-width: 18ch;
}

.display em {
  font-style: italic;
  color: var(--amber);
}

/* word-by-word reveal */

.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 62ms);
}

.is-in .word > span {
  transform: translateY(0);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.is-in [data-reveal],
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* vertical Japanese display type */

.vertical {
  position: absolute;
  top: clamp(6rem, 16vh, 12rem);
  right: clamp(3.4rem, 7vw, 8rem);
  z-index: -1;
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--jp);
  font-weight: 500;
  font-size: clamp(2.6rem, 7.6vw, 7.4rem);
  line-height: 1.05;
  letter-spacing: 0.16em;
  color: rgba(233, 227, 214, 0.09);
  user-select: none;
  pointer-events: none;
}

.vertical--warm {
  color: rgba(200, 64, 44, 0.24);
}

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

.hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}

.hero__foot {
  display: grid;
  gap: clamp(1.6rem, 3vw, 3.4rem);
  margin-top: clamp(1.6rem, 3.6vh, 2.8rem);
}

@media (min-width: 62rem) {
  .hero__foot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
    align-items: end;
  }
}

.hero__lede {
  max-width: var(--measure);
  margin: 0;
  color: var(--bone-dim);
}

.hero__meta {
  display: grid;
  max-width: 22rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem clamp(1rem, 2vw, 2rem);
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.hero__meta dt {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.hero__meta dd {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(1.4rem, 3.2vh, 2.2rem);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-faint);
  text-decoration: none;
}

.scroll-cue span {
  display: block;
  width: 54px;
  height: 1px;
  background: var(--rule-strong);
  position: relative;
  overflow: hidden;
}

.scroll-cue span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: translateX(-100%);
  animation: cue 3.4s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ------------------------------------------------------------------ bodies */

.chapter__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.6rem);
  margin-top: clamp(1.5rem, 3.2vh, 2.3rem);
}

/* keep the reading column clear of the fixed chapter rail */
@media (min-width: 62rem) {
  .chapter__inner,
  .manifesto {
    padding-right: clamp(5rem, 7vw, 8.5rem);
  }

  .chapter__body--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }

  .chapter__body--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }

  .chapter__body--triple {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.prose p {
  max-width: var(--measure);
  margin: 0 0 1rem;
  color: var(--bone-dim);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 500;
  color: var(--bone);
}

/* index lists with fine rules */

.index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.plate + .index {
  margin-top: clamp(1.2rem, 2.6vh, 1.9rem);
}

.index li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
}

.index__num {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--vermilion);
  font-variant-numeric: tabular-nums;
}

.index__name {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.55vw, 1.4rem);
  line-height: 1.22;
}

.index__name span {
  display: block;
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--bone-dim);
  margin-top: 0.15rem;
}

.index__jp {
  font-family: var(--jp);
  font-size: 1rem;
  color: var(--bone-faint);
}

/* ------------------------------------------------------------------ plates */

.plates {
  display: grid;
  gap: clamp(1.3rem, 2.4vw, 2rem);
}

@media (min-width: 48rem) {
  .plates--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .plates--pair .plate:nth-child(2) {
    margin-top: clamp(1.5rem, 5vh, 3.2rem);
  }
}

.plate {
  margin: 0;
  width: 100%;
  max-width: 32rem;
}

.chapter__body--split > .plate,
.chapter__body--wide > .plate,
.chapter__body--triple > .plate {
  justify-self: end;
}

.plate__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  border: 1px solid var(--rule);
  background: var(--charcoal);
}

.plate__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06) translate3d(0, var(--shift, 0px), 0);
  transition: transform 1.2s var(--ease), opacity 1.2s var(--ease);
  will-change: transform;
}

.plate__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 3, 6, 0.06), rgba(2, 3, 6, 0.42));
  pointer-events: none;
}

.plate--tall .plate__frame {
  aspect-ratio: 4 / 5;
}

/* the play control sits in the middle of the image, never the caption */
.plate__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bone);
  cursor: pointer;
}

.plate__play span {
  display: grid;
  place-items: center;
  width: clamp(56px, 7vw, 82px);
  aspect-ratio: 1;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: rgba(5, 7, 11, 0.42);
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease),
    transform 0.6s var(--ease);
}

.plate__play svg {
  width: 26%;
  translate: 8% 0;
  fill: currentColor;
}

.plate__play:hover span,
.plate__play:focus-visible span {
  border-color: var(--amber);
  background: rgba(240, 163, 92, 0.14);
  transform: scale(1.06);
}

.plate__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.plate__caption b {
  font-weight: 500;
  color: var(--bone-dim);
  letter-spacing: 0.16em;
}

/* pull-quote */

.quote {
  margin: clamp(1.5rem, 3.4vh, 2.4rem) 0 0;
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid var(--vermilion);
  max-width: 30rem;
}

.quote blockquote {
  margin: 0;
}

.quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.85vw, 1.6rem);
  line-height: 1.32;
}

.quote figcaption {
  margin-top: 0.9rem;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

/* ---------------------------------------------------------------- manifesto */

.manifesto {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 16vh, 12rem) var(--gutter) clamp(2rem, 5vh, 3.5rem);
  background: linear-gradient(180deg, rgba(2, 3, 6, 0) 0%, rgba(2, 3, 6, 0.86) 38%, #020306 100%);
}

.manifesto__statement {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.2vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(2rem, 5vh, 3.4rem);
  max-width: 22ch;
}

.manifesto__jp {
  font-family: var(--jp);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.3em;
  color: var(--vermilion);
  margin: 0 0 1.6rem;
}

.colophon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(1.6rem, 3vw, 3rem);
  padding-top: clamp(2rem, 5vh, 3.2rem);
  border-top: 1px solid var(--rule);
}

.colophon h3 {
  margin: 0 0 0.7rem;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.colophon p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--bone-dim);
}

.manifesto__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.manifesto__foot a {
  text-decoration: none;
  transition: color 0.4s var(--ease);
}

.manifesto__foot a:hover {
  color: var(--bone);
}

/* ------------------------------------------------------------ cinema mode */

.is-cinema .nav,
.is-cinema .rail,
.is-cinema .chapter__inner,
.is-cinema .manifesto {
  opacity: 0;
  pointer-events: none;
}

.cinema-note {
  position: fixed;
  left: 50%;
  bottom: clamp(1.6rem, 5vh, 3rem);
  translate: -50% 0;
  z-index: 20;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--rule);
  background: rgba(2, 3, 6, 0.6);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-faint);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}

.is-cinema .cinema-note {
  opacity: 1;
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 61.99rem) {
  .rail {
    display: none;
  }

  /* On a phone a chapter cannot hold still: the copy has to scroll past. So the
     composition stops being pinned, and the cutouts drop behind the reading
     layer instead of over it. */
  .chapter__inner {
    position: static;
    padding-bottom: clamp(4rem, 14vh, 8rem);
  }

  .foreground {
    z-index: 1;
  }

  .chapter__inner::before {
    background: linear-gradient(
      180deg,
      rgba(2, 3, 6, 0.42) 0%,
      rgba(2, 3, 6, 0.64) 38%,
      rgba(2, 3, 6, 0.56) 100%
    );
  }

  .vertical {
    right: clamp(0.6rem, 3vw, 2rem);
    top: clamp(5rem, 11vh, 8rem);
    font-size: clamp(2.4rem, 12vw, 4.6rem);
  }
}

@media (max-width: 47.99rem) {
  :root {
    --fg-band: clamp(150px, 24vh, 240px);
  }

  .nav__toggle {
    display: inline-flex;
  }

  /* copy scrolls under the fixed bar on a phone, so the bar needs a real floor */
  .nav::after {
    background: linear-gradient(
      180deg,
      rgba(2, 3, 6, 0.97) 0%,
      rgba(2, 3, 6, 0.9) 62%,
      rgba(2, 3, 6, 0) 100%
    );
    inset: 0 0 -1.4rem;
  }

  /* the vertical JP becomes a margin note rather than a backdrop */
  .vertical {
    right: 0.1rem;
    top: clamp(4rem, 9vh, 6rem);
    font-size: clamp(1.9rem, 8.6vw, 3.2rem);
    letter-spacing: 0.12em;
    color: rgba(233, 227, 214, 0.08);
  }

  .vertical--warm {
    color: rgba(200, 64, 44, 0.2);
  }

  .display--hero,
  .display--chapter {
    padding-right: 2.6rem;
  }

  .nav__nav {
    position: fixed;
    inset: 0;
    z-index: 14;
    display: grid;
    align-content: center;
    padding: var(--gutter);
    background: var(--ink-deep);
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
  }

  /* the trigger steps aside for its own panel */
  .nav__nav[data-open='true'] + .nav__toggle {
    opacity: 0;
    pointer-events: none;
  }

  .nav__nav[data-open='true'] {
    transform: translateY(0);
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list li {
    border-bottom: 1px solid var(--rule);
  }

  .nav__link {
    justify-content: flex-start;
    gap: 1.4rem;
    width: 100%;
    padding: 1.1rem 0;
    font-size: 0.82rem;
  }

  .nav__close {
    position: absolute;
    top: clamp(1rem, 2.2vw, 1.9rem);
    right: var(--gutter);
    padding: 0.5rem 0.9rem;
    background: none;
    border: 1px solid var(--rule);
    color: var(--bone);
    font: inherit;
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .chapter,
  .chapter--hero {
    min-height: 170vh;
  }

  .index li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .index__jp {
    grid-column: 2;
  }
}

@media (min-width: 48rem) {
  .nav__close {
    display: none;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .word > span,
  [data-reveal] {
    transform: none;
    opacity: 1;
  }

  .chapter__inner {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .fg-set {
    filter: none;
    transform: none;
  }

  .plate__frame img {
    transform: scale(1);
  }
}
