/* Cultivate: the reel */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* two looks. Chalk is the default; Charcoal is chosen in the header and stored.
   paper = the page, text = type on it, night = the dark grounds (films, invest, credits). */
:root {
  --paper: #f3f2ed;
  --paper-2: #e5e4dc;
  --paper-3: #fafaf6;
  --text: #2f4a35;
  --text-2: #56685a;
  --rule: 47 74 53;
  --accent: #5a3b1f;
  --night: #1d2f23;
  --night-2: #2f4a35;
  --on-night: #eef1ea;
  --on-night-2: #c6d1c5;
  --on-night-rule: 238 241 234;
  --scrim: 16 28 20;

  /* Arial carries everything; the wide Archivo is kept for the wordmark alone (header, hero, footer) */
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --wide: "Archivo", Arial, ui-sans-serif, system-ui, sans-serif;
  --cjk-zh: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --cjk-ja: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Source Han Serif JP", serif;
  --face: var(--sans);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --rail: var(--gutter);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);

  color-scheme: light;
}
:root[data-look="charcoal"] {
  --paper: #1d1e1c;
  --paper-2: #282926;
  --paper-3: #232421;
  --text: #e9e7e0;
  --text-2: #a9a9a1;
  --rule: 233 231 224;
  --accent: #c99c6c;
  --night: #121312;
  --night-2: #2a2b28;
  --on-night: #ece9e2;
  --on-night-2: #b4b3ab;
  --on-night-rule: 236 233 226;
  --scrim: 10 10 9;
  color-scheme: dark;
}

html:lang(zh-Hans) { --face: Arial, var(--cjk-zh); }
html:lang(ja) { --face: Arial, var(--cjk-ja); }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--text-2) var(--paper-2);
  background: var(--paper);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--face);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--text); color: var(--paper); }
[data-tone="dark"] ::selection { background: var(--on-night); color: var(--night); }

h1, h2, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.4em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; border-radius: 2px; }
svg { display: block; }

.skip {
  position: fixed; left: var(--gutter); top: 1rem; z-index: 50;
  padding: 0.6rem 0.9rem; background: var(--text); color: var(--paper);
  transform: translateY(-200%); transition: transform 0.3s var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ---------- labels (shared voice) ---------- */
.lbl, .ep-meta, .credits dt, .play, .act {
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  line-height: 1.2;
}
html:lang(zh-Hans) :is(.lbl, .ep-meta, .credits dt, .play, .act),
html:lang(ja) :is(.lbl, .ep-meta, .credits dt, .play, .act) {
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

/* ---------- header ---------- */
.top {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem);
  padding: max(0.5rem, env(safe-area-inset-top)) var(--gutter) 0.5rem;
  background: var(--paper);
}
.top a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.mark { margin-right: auto; font-family: var(--wide); font-stretch: 112%; font-weight: 640; font-size: 0.75rem; letter-spacing: 0.16em; }
.top-nav { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
@media (hover: hover) { .top-nav a:hover span, .mark:hover { text-decoration: underline; text-underline-offset: 0.5em; } }

/* ---------- language: one toggle, the choices drop down beneath the header ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; padding: 0 0.15rem;
}
.lang-now { display: inline-block; min-width: 2.2em; text-align: left; }
.lang-now:lang(zh-Hans), .lang-now:lang(ja) { text-transform: none; letter-spacing: 0.04em; font-size: 0.75rem; }
.lang-now:lang(zh-Hans) { font-family: var(--sans), var(--cjk-zh); }
.lang-now:lang(ja) { font-family: var(--sans), var(--cjk-ja); }
.lang-toggle svg { width: 0.6rem; height: 0.375rem; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform 0.45s var(--ease-out); }
.lang-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) { .lang-toggle:hover .lang-now { text-decoration: underline; text-underline-offset: 0.5em; } }
/* the chain on load: each language steps through once, like a destination blind */
.lang-now.is-chain-out { animation: roll-out 0.14s var(--ease-in) both; }
.lang-now.is-chain-in { animation: roll-in 0.32s var(--ease-out) both; }

.lang-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem clamp(1.5rem, 3.5vw, 3rem);
  padding: 0.75rem var(--gutter) 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid rgb(var(--rule) / 0.28);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s var(--ease-out);
}
.lang-panel.is-open { clip-path: inset(0 0 -1px 0); }
.lang-panel button {
  min-height: 48px;
  font-weight: 400; font-size: 0.875rem; line-height: 1.2;
  text-transform: none;
  opacity: 0; transform: translateY(-0.5rem);
  transition: opacity 0.3s var(--ease-out), transform 0.5s var(--ease-out);
}
.lang-panel button[lang="zh-Hans"] { font-family: var(--sans), var(--cjk-zh); letter-spacing: 0.04em; }
.lang-panel button[lang="ja"] { font-family: var(--sans), var(--cjk-ja); letter-spacing: 0.04em; }
.lang-panel.is-open button { opacity: 1; transform: none; }
.lang-panel.is-open button:nth-child(2) { transition-delay: 0.05s; }
.lang-panel.is-open button:nth-child(3) { transition-delay: 0.1s; }
.lang-panel button[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
@media (hover: hover) { .lang-panel button:hover { color: var(--accent); } }

/* ---------- look: one toggle; the dark half slides across like an eclipse ---------- */
.look { display: grid; place-items: center; width: 2.25rem; min-height: 44px; margin-right: -0.55rem; }
.look i {
  position: relative; overflow: hidden;
  width: 0.875rem; height: 0.875rem; border-radius: 50%;
  border: 1px solid currentColor;
  transition: transform 0.45s var(--ease-out);
}
.look i::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: currentColor;
  transform: translateX(105%);
  transition: transform 0.6s var(--ease-out);
}
:root[data-look="charcoal"] .look i::after { transform: none; }
@media (hover: hover) { .look:hover i { transform: scale(1.15); } }
/* the page eases between looks rather than flashing */
html.is-switching, html.is-switching * { transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out), fill 0.5s var(--ease-out), stroke 0.5s var(--ease-out), border-color 0.5s var(--ease-out) !important; }
@media (prefers-reduced-motion: reduce) {
  html.is-switching, html.is-switching * { transition: none !important; }
  .lang-panel, .lang-panel button, .look i::after { transition: none; }
}

@media (max-width: 480px) {
  .top { gap: 0.9rem; }
  .top-nav { gap: 0.9rem; }
}

/* the destination-blind roll */
[data-i18n] { display: inline-block; }
:is(p, h1, h2, dt, dd)[data-i18n] { display: block; }
.is-rolling-out { animation: roll-out 0.18s var(--ease-in) both; }
.is-rolling-in { animation: roll-in 0.5s var(--ease-out) both; }
@keyframes roll-out { to { transform: translateY(-0.6em); opacity: 0; filter: blur(3px); } }
@keyframes roll-in { from { transform: translateY(0.7em); opacity: 0; filter: blur(3px); } }

/* ---------- the belt: the films, running ---------- */
.belt {
  --h: clamp(300px, 60svh, 560px);
  --belt-s: 110s;
  position: relative;
  overflow: hidden;
  height: calc(var(--h) + 2.4rem);
}
@media (max-width: 820px) {
  .belt { --h: clamp(260px, 46svh, 380px); --belt-s: 80s; }
}
/* the margin sits outside the track's width, so the belt starts on the gutter and the seam still holds */
.track { display: flex; width: max-content; height: 100%; margin-left: var(--gutter); }
/* the run is cloned by script, so the belt only moves once it can loop without a seam */
.track[data-loop] { animation: belt var(--belt-s) linear infinite; }
.belt[data-paused] .track { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }
/* margins, not gap, so both halves of the track measure exactly the same */
.tile { flex: none; height: 100%; margin: 0 0.75rem 0 0; display: flex; flex-direction: column; }
.tile--wide { width: calc(var(--h) * 16 / 9); }
.tile--tall, .tile--card { width: calc(var(--h) * 4 / 5); }
.frame { height: var(--h); overflow: hidden; background: var(--night); }
.frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cap {
  flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  white-space: nowrap; overflow: hidden;
}
.card {
  position: relative; isolation: isolate; overflow: hidden;
  height: var(--h);
  padding: calc(var(--h) * 0.055);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem;
  background: var(--night); color: var(--on-night);
}
.card--ink { background: var(--night-2); }
/* the card's film plays behind its title; the scrim keeps the type legible */
.card video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(var(--scrim) / 0.82), rgb(var(--scrim) / 0.35) 55%, rgb(var(--scrim) / 0.12));
}
.card-title { font-size: 0.875rem; line-height: 1.3; }
html:lang(zh-Hans) .card-title, html:lang(ja) .card-title { letter-spacing: 0.04em; }
.card .lbl { color: var(--on-night-2); }

.bar {
  margin: 0.35rem var(--gutter) 0;
  border-top: 1px solid rgb(var(--rule) / 0.28);
}
.bar p { padding: 0.9rem 0 0; text-wrap: balance; }

/* ---------- intro ---------- */
.intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 1.5rem;
  align-items: end;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--gutter) clamp(2.5rem, 5vw, 4.5rem);
}
.title {
  grid-column: 1 / span 7;
  /* the header's wordmark, set large and light; it thickens under the pointer (main.js) */
  font-family: var(--wide);
  text-transform: uppercase;
  font-stretch: 112%;
  font-weight: 260;
  font-size: clamp(2.4rem, 7.2vw, 7.75rem);
  line-height: 0.9;
  letter-spacing: 0.1em;
  margin: 0 -0.1em 0 -0.04em;
  color: var(--text);
}
.title .ch { display: inline-block; text-align: center; white-space: pre; }
.title .ch, .title .sr { font-weight: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:lang(zh-Hans) .title, html:lang(ja) .title { font-family: var(--wide); font-weight: 300; letter-spacing: 0.12em; font-size: clamp(3rem, 9vw, 9.5rem); }
.title.is-rolling-out, .title.is-rolling-in { will-change: transform; }
.intro-copy { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 0.5rem; }
.hook { max-width: 34rem; text-wrap: pretty; }
.goes { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin-bottom: -0.3rem; }
.go {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: 44px;
  text-decoration: none;
}
.go--lead { color: var(--accent); }
.go svg { width: 1.25rem; height: 0.75rem; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.45s var(--ease-out); }
@media (hover: hover) {
  .go:hover span { text-decoration: underline; text-underline-offset: 0.6em; }
  .go:hover svg { transform: translateX(3px); }
}
html:lang(ja) :is(.hook, .lead, .body, .bar p) { word-break: auto-phrase; line-break: strict; }
html:lang(zh-Hans) :is(.hook, .lead, .body, .bar p) { line-break: strict; }
html:lang(zh-Hans) .hook, html:lang(ja) .hook { line-height: 1.85; max-width: 30rem; }
@media (max-width: 860px) {
  .title, .intro-copy { grid-column: 1 / -1; }
  .title { font-size: clamp(2.4rem, 12vw, 6rem); }
  .goes { margin-bottom: 0; }
}

/* ---------- range: the series as a ridge, one film above each summit ---------- */
.range { position: relative; margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.range-stops {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
/* each column is centred on its summit (1/6, 1/2, 5/6 of the width) */
/* --drop staggers the films to follow the summits; the stem below fills down to the ground */
.stop { display: flex; flex-direction: column; align-items: center; padding: var(--drop) clamp(0.75rem, 2.2vw, 2.25rem) 0; }
.stop::after { content: ""; display: block; flex: 1 0 1.5rem; width: 1px; margin-top: 1rem; background: rgb(var(--rule) / 0.4); }
.stop-link { display: flex; flex-direction: column; gap: 0.9rem; width: 100%; text-decoration: none; }
.stop-frame {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--night);
}
.stop-frame video, .stop-dots { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover; }
.stop-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; flex-wrap: wrap; }
.stop-title { font-size: 0.875rem; line-height: 1.3; }
.stop-meta { color: var(--text-2); }

/* the films reveal as the range scrolls into view, the next one last */
.range.is-armed .stop-link { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease-out); }
.range.is-armed .stop:nth-child(2) .stop-link { transition-delay: 0.12s; }
.range.is-armed .stop:nth-child(3) .stop-link { transition-delay: 0.24s; }
.range.is-in .stop-link { clip-path: inset(-1rem -1rem -1rem -1rem); }

@media (hover: hover) {
  a.stop-link:hover .stop-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
}

/* on a desktop with a pointer each film rests as a square crop in the frame's lower left corner, showing
   the middle of the picture; under the pointer the crop opens out to the full 16:9 and the picture settles */
@media (hover: hover) and (min-width: 821px) {
  .stop-frame {
    clip-path: inset(25% 58% 0 0);
    transition: clip-path 0.9s var(--ease-out);
  }
  .stop-frame video, .stop-dots { transform: translate(-29%, 12.5%); transition: transform 0.9s var(--ease-out); }
  .stop-link:is(:hover, :focus-visible) .stop-frame { clip-path: inset(0 0 0 0); }
  .stop-link:is(:hover, :focus-visible) :is(video, .stop-dots) { transform: none; }
  .stop-link:focus-visible { outline: none; }
  .stop-link:focus-visible .stop-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
}

/* on touch screens there is no pointer to open the crop, so it opens as the film scrolls into the
   middle of the screen and closes again as it leaves (main.js toggles .is-open) */
@media (hover: none), (max-width: 820px) {
  .range.is-cropping .stop-frame {
    clip-path: inset(25% 58% 0 0);
    transition: clip-path 1s var(--ease-out);
  }
  .range.is-cropping .stop-frame video, .range.is-cropping .stop-dots { transform: translate(-29%, 12.5%); transition: transform 1s var(--ease-out); }
  .range.is-cropping .stop-link.is-open .stop-frame { clip-path: inset(0 0 0 0); }
  .range.is-cropping .stop-link.is-open :is(video, .stop-dots) { transform: none; }
}

/* the episode still being made: no frame, just a field of dots slowly filling in (main.js) */
.stop--next .stop-frame { background: none; }
.stop-note { margin: 0.2rem 0 0; max-width: 24rem; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.stop--next .go { align-self: flex-start; min-height: 44px; margin-top: -0.25rem; }
.stop--next .go span { color: var(--accent); }
.stop--next .go svg { stroke: var(--accent); }
@media (hover: hover) {
  .stop--next .go:hover span { text-decoration: underline; }
  .stop--next .go:hover svg { transform: translateX(3px); }
}
.range-land { position: relative; height: clamp(5rem, 9vw, 8.5rem); }
.range-land svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.range-land path { fill: none; stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.range-land .range-ground { fill: var(--paper-2); stroke: none; }
.range-land .range-far { opacity: 0.4; }
.range-line--next { stroke-dasharray: 4 5; opacity: 0.7; }
/* the green carries on below the ridge, down to the first film */
.range::after { content: ""; display: block; margin-top: -1px; height: clamp(3.5rem, 8vw, 7rem); background: var(--paper-2); }
/* a hairline from each film down to its summit, and a dot on the summit */
.post { position: absolute; left: var(--x); top: 0; height: calc(var(--y) / 120 * 100%); width: 1px; background: rgb(var(--rule) / 0.4); }
.post::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: var(--accent);
}
.post--next::after { background: var(--paper-2); border: 1px solid var(--accent); }

@media (max-width: 820px) {
  .range-stops { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; padding: 0 var(--gutter); }
  .stop { padding: 0; }
  .stop::after, .post { display: none; }
  .range-land { margin-top: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .range.is-armed .stop-link { clip-path: none; transition: none; }
  .stop-frame, .stop-frame video, .stop-dots { transition: none !important; }
}

/* ---------- episodes: full-bleed film ---------- */
.ep { position: relative; }
.ep-frame {
  position: relative;
  height: 100svh;
  min-height: 32rem;
  background: var(--night);
  overflow: hidden;
  color: var(--on-night);
  transition: height 0.9s var(--ease-out), min-height 0.9s var(--ease-out);
}
.ep-loop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.6s var(--ease-out);
}
.ep-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgb(var(--scrim) / 0.78) 0%, rgb(var(--scrim) / 0.35) 34%, rgb(var(--scrim) / 0) 62%);
  transition: opacity 0.6s var(--ease-out);
}
.ep-over {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--rail);
  bottom: clamp(2rem, 8svh, 5.5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 2rem;
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}
.ep-title {
  grid-column: 1 / -1;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.3;
}
html:lang(zh-Hans) .ep-title, html:lang(ja) .ep-title { letter-spacing: 0.04em; }
.ep-meta { margin-top: 0.4rem; align-self: center; }
.play {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-top: 0.4rem;
  min-height: 48px;
  justify-self: end;
}
.play svg { width: 2.25rem; height: 2.25rem; flex: none; }
.play circle { fill: none; stroke: currentColor; stroke-width: 1; transition: fill 0.4s var(--ease-out); }
.play path { fill: currentColor; transition: fill 0.4s var(--ease-out); }
@media (hover: hover) {
  .play:hover circle { fill: var(--on-night); }
  .play:hover path { fill: var(--night); }
}
.play:active svg { transform: scale(0.96); }
@media (max-width: 640px) {
  .ep-over { grid-template-columns: 1fr; }
  .play { justify-self: start; }
}

.ep-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3;
  opacity: 0; transition: opacity 0.6s var(--ease-out) 0.35s;
}
.ep-frame.is-playing {
  height: min(56.25vw, 100svh);
  min-height: 0;
  background: #000;
}
.ep-frame.is-playing iframe { opacity: 1; }
.ep-frame.is-playing .ep-loop,
.ep-frame.is-playing::after { opacity: 0; }
.ep-frame.is-playing .ep-over { opacity: 0; transform: translateY(1.5rem); pointer-events: none; }

/* ---------- episode notes: editorial ---------- */
.ep-notes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 1.75rem;
  padding: clamp(4.5rem, 12vw, 10rem) var(--rail) clamp(5rem, 14vw, 12rem) var(--gutter);
  align-items: end;
}
.ep-notes .lead {
  grid-column: 1 / span 8;
  text-wrap: balance;
  max-width: 34ch;
}
.ep-notes .body {
  grid-column: 9 / span 4;
  color: var(--text-2);
  max-width: 34ch;
  text-wrap: pretty;
}
.ep-notes--flip .lead { grid-column: 5 / span 8; justify-self: end; text-align: right; }
.ep-notes--flip .body { grid-column: 1 / span 4; grid-row: 1; }
html:lang(zh-Hans) .ep-notes .lead, html:lang(ja) .ep-notes .lead { line-height: 1.9; max-width: 24em; }
html:lang(zh-Hans) .ep-notes .body, html:lang(ja) .ep-notes .body { line-height: 1.9; }
@media (max-width: 860px) {
  .ep-notes { grid-template-columns: 1fr; }
  .ep-notes > *, .ep-notes--flip > * { grid-column: 1 !important; grid-row: auto !important; justify-self: start !important; text-align: left !important; }
}

/* ---------- invest: the ground ---------- */
.invest {
  background: var(--night-2);
  color: var(--on-night);
  padding: clamp(5rem, 13vw, 11rem) var(--rail) clamp(4rem, 10vw, 8rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
}
.invest-title {
  grid-column: 1 / -1;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.3;
}
html:lang(zh-Hans) .invest-title, html:lang(ja) .invest-title { letter-spacing: 0.04em; }
.invest-case {
  grid-column: 1 / span 7;
  margin-top: 1rem;
}
.invest-case .body { max-width: 46ch; color: var(--on-night); text-wrap: pretty; }
html:lang(zh-Hans) .invest-case .body, html:lang(ja) .invest-case .body { line-height: 1.9; }
.routes {
  grid-column: 1 / -1;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid rgb(var(--on-night-rule) / 0.35);
}
.route {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid rgb(var(--on-night-rule) / 0.35);
  align-items: center;
}
.route dt {
  grid-column: 1 / span 3;
  line-height: 1.3;
}
html:lang(zh-Hans) .route dt, html:lang(ja) .route dt { letter-spacing: 0.04em; }
.route dd { grid-column: 4 / span 5; color: var(--on-night-2); max-width: 40ch; }
.route .route-act { grid-column: 9 / span 4; justify-self: end; color: var(--on-night); text-align: right; }
.act {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 2.375rem; padding: 0 0.95rem;
  font-size: 0.6875rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.act svg { width: 1rem; height: 0.625rem; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 0.45s var(--ease-out); }
.act--pay { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
@media (hover: hover) {
  .act:hover { background: var(--on-night); color: var(--night); }
  .act--pay:hover { background: transparent; color: var(--on-night); }
  .act:hover svg { transform: translateX(3px); }
}
.act:active { transform: scale(0.98); }
@media (max-width: 860px) {
  .invest-case { grid-column: 1 / -1; }
  .route dt, .route dd, .route .route-act { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .route dt { margin-bottom: 0.15rem; }
}

/* ---------- credits ---------- */
.credits {
  background: var(--night);
  color: var(--on-night-2);
  padding: clamp(3rem, 6vw, 5rem) var(--rail) max(2.5rem, env(safe-area-inset-bottom)) var(--gutter);
}
.credits dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.75rem clamp(1rem, 2vw, 2rem);
}
.credits dt { color: var(--on-night); margin-bottom: 0.4rem; }
.credits dd a { text-decoration: none; }
@media (hover: hover) { .credits a:hover { color: var(--on-night); text-decoration: underline; } }
.credits-mark {
  margin: clamp(3rem, 8vw, 6rem) -0.1em 0 -0.04em;
  /* the wordmark again, in capitals, set to the full measure */
  font-family: var(--wide);
  text-transform: uppercase;
  font-stretch: 112%;
  font-weight: 260;
  font-size: calc((100vw - 2 * var(--gutter)) / 6.6);
  line-height: 0.8;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: rgb(var(--on-night-rule) / 0.14);
  user-select: none;
}
.credits-by { margin-top: clamp(2rem, 4vw, 3rem); color: var(--on-night-2); }
.credits-by a { color: var(--on-night); }

@media (prefers-reduced-motion: reduce) {
  .is-rolling-out, .is-rolling-in { animation: none; }
  .ep-frame, .ep-over, .ep-loop { transition: none; }
}
