/* rememberme.fm story pages (stories/, built by scripts/stories/build.mjs). A clearing under
   the Milky Way: the teller's video is the opening screen, the song and the story follow on a
   night sheet. Playfair for the moment and for their words, Inter for ours. */
@font-face { font-family: 'Playfair Display'; src: url('/fonts/playfair-display-latin.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/playfair-display-latin-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: Inter; src: url('/fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --night: oklch(0.15 0.035 278);
  --night-ink: oklch(0.2 0.04 278);
  --ivory: oklch(0.97 0.014 85);
  --ink: var(--ivory);
  --ink-2: oklch(0.97 0.014 85 / 0.8);
  --ink-3: oklch(0.97 0.014 85 / 0.58);
  --paper: oklch(0.175 0.035 278);
  --paper-2: oklch(0.215 0.04 278);
  --rule: oklch(1 0 0 / 0.1);
  --fire: oklch(0.8 0.14 66);
  --fire-bright: oklch(0.86 0.13 78);
  --fire-wash: oklch(0.8 0.14 66 / 0.17);
  --glass: oklch(0.17 0.035 278 / 0.55);
  --pad: clamp(20px, 5vw, 64px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --fill: var(--fire-bright);
  --track: oklch(1 0 0 / 0.18);
  background: var(--night);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
q { quotes: '“' '”'; }
h1, h2, .chip-title, .song-title, .lyric-line, .pair-wrote q, .pull p, .answers dt, .rel-title, .brand { font-family: 'Playfair Display', Georgia, serif; }

.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.sky::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, oklch(0.12 0.035 278 / 0.72) 0%, oklch(0.12 0.035 278 / 0.38) 42%, transparent 66%); }

.top { position: absolute; inset: 0 0 auto; z-index: 4; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--pad); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 600; text-decoration: none; }
.brand img { width: 30px; height: auto; }
.brand em { color: var(--fire); font-weight: 500; }
.top-nav { display: flex; align-items: center; gap: 24px; }
.top-link { color: var(--ink-2); font-size: 16px; font-weight: 600; text-underline-offset: 4px; }
.top-cta { display: none; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--fire-bright); color: var(--night-ink); font-size: 15px; font-weight: 700; text-decoration: none; transition: transform 0.2s ease-out; }
.top-cta:hover { transform: translateY(-1px); }

/* The hero: the teller's video, and what they say in it. --arw / --arh is the video's shape. */
.hero { display: grid; gap: 22px; padding: 84px var(--pad) 48px; }
.kicker { margin-bottom: 12px; color: var(--fire); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
h1 { font-size: clamp(36px, 4vw, 58px); font-style: italic; font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; text-indent: -0.4em; }
h1 em { color: var(--fire); font-weight: 500; }
.hero-video { position: relative; overflow: hidden; isolation: isolate; justify-self: center; width: min(100%, calc(78svh * var(--arw) / var(--arh))); aspect-ratio: var(--arw) / var(--arh); border-radius: 26px; background: var(--night-ink); box-shadow: 0 0 0 1px oklch(1 0 0 / 0.14), 0 40px 90px -30px oklch(0 0 0 / 0.85); }
.hero-video video { width: 100%; height: 100%; object-fit: cover; }
.hero-video::after { content: ''; position: absolute; inset: 55% 0 0; z-index: 1; background: linear-gradient(transparent, oklch(0.12 0.035 278 / 0.6)); pointer-events: none; transition: opacity 0.4s; }
[data-sound='on'] .hero-video::after { opacity: 0; }
.caption { position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 10%; color: oklch(0.99 0 0); font-size: clamp(19px, 2.4vh, 24px); font-weight: 650; line-height: 1.3; text-align: center; text-wrap: balance; text-shadow: 0 1px 2px oklch(0 0 0 / 0.65), 0 0 22px oklch(0 0 0 / 0.5); opacity: 0; transition: opacity 0.12s linear, bottom 0.3s ease-out; pointer-events: none; }
.caption.is-on { opacity: 1; }
[data-sound='on'] .caption { bottom: 84px; }
.sound { position: absolute; z-index: 3; top: 16px; left: 50%; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ivory); color: var(--night-ink); font-size: 16px; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: 0 12px 30px -12px oklch(0 0 0 / 0.6); transform: translateX(-50%); transition: opacity 0.3s, transform 0.2s ease-out; animation: beckon 2.6s ease-in-out 2.5s infinite; }
.sound:hover { transform: translateX(-50%) scale(1.03); }
.sound-icon { width: 1.3em; height: 1.3em; flex: none; }
[data-sound='on'] .sound { opacity: 0; pointer-events: none; }

.hero-body { display: grid; gap: 20px; align-content: start; }
.dek { max-width: 30em; color: var(--ink-2); font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.chapter-box { padding: 16px 18px; border-radius: 22px; background: var(--glass); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 0 0 1px oklch(1 0 0 / 0.06); backdrop-filter: blur(14px) saturate(1.2); }
.box-label { margin-bottom: 6px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.chapters button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; width: calc(100% + 20px); margin: 0 -10px; padding: 8px 10px; border-radius: 12px; font-size: 16px; cursor: pointer; transition: background-color 0.2s; }
.chapters button:hover { background: oklch(1 0 0 / 0.07); }
.chapters button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.chapter-time { min-width: 38px; padding-top: 1px; color: var(--fire); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-label { color: var(--ink-2); font-weight: 600; }
[data-chapter].is-now .chapter-label { color: var(--ink); }
[data-chapter].is-now button { background: oklch(1 0 0 / 0.1); }

.song-chip { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 20px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 0 0 1px oklch(1 0 0 / 0.06); }
.song-chip img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.song-chip div { display: grid; min-width: 0; }
.chip-label { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.chip-title { font-size: 19px; font-weight: 600; line-height: 1.25; }

/* Play, drawn in CSS so it turns into pause while the song plays. */
.play { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--fire-bright); color: var(--night-ink); font-size: 16px; font-weight: 700; cursor: pointer; transition: transform 0.2s ease-out; }
.play:hover { transform: translateY(-1px); }
.chip-play, .mini-play { width: 48px; min-height: 48px; padding: 0; }
.chip-play .play-label, .mini-play .play-label, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.play-icon { position: relative; display: inline-block; flex: none; width: 0.9em; height: 1em; }
.play-icon::before, .play-icon::after { content: ''; position: absolute; top: 0; height: 100%; background: currentColor; transition: clip-path 0.2s ease-out, width 0.2s ease-out, left 0.2s ease-out; }
.play-icon::before { left: 0.06em; width: 0.86em; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.play-icon::after { left: 0.06em; width: 0; }
[data-playing='true'] [data-play] .play-icon::before { left: 0.08em; width: 0.28em; clip-path: none; border-radius: 1px; }
[data-playing='true'] [data-play] .play-icon::after { left: 0.54em; width: 0.28em; border-radius: 1px; }

.scrub { display: flex; flex: 1 1 200px; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.scrub input[type='range'] { --p: 0%; flex: 1; min-width: 0; height: 20px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.scrub input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--fill) var(--p), var(--track) var(--p)); }
.scrub input[type='range']::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--fill) var(--p), var(--track) var(--p)); }
.scrub input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--fill); }
.scrub input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--fill); }

/* The sheet. */
.sheet { position: relative; max-width: 1120px; margin: 0 auto; padding: clamp(36px, 6vw, 80px) clamp(20px, 6vw, 96px) 40px; border-radius: 32px 32px 0 0; background: var(--paper); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 -30px 80px -40px oklch(0 0 0 / 0.7); }
.block { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.block:first-child { border-top: 0; padding-top: 0; }
.block h2 { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
.num { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 1px solid oklch(0.8 0.14 66 / 0.6); border-radius: 50%; color: var(--fire); font-size: 17px; font-weight: 600; }
.block-lead { max-width: 36em; margin: -8px 0 24px; color: var(--ink-2); font-size: 17px; }

.song-head { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.song-head img { width: 132px; height: 132px; border-radius: 20px; object-fit: cover; box-shadow: 0 18px 40px -22px oklch(0 0 0 / 0.8); }
.song-head-text { display: grid; flex: 1; gap: 6px; min-width: 0; }
.song-title { font-size: 26px; font-weight: 600; line-height: 1.2; }
.song-meta { color: var(--ink-3); font-size: 15px; }
.song-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 8px; }

/* Lines you can tap to hear: they read as text until hovered. */
.lyric-line > button, [data-cue] > button { all: unset; display: block; box-sizing: border-box; border-radius: 6px; cursor: pointer; }
.lyric-line > button:focus-visible, [data-cue] > button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.lyrics { columns: 1; column-gap: 64px; }
.lyric-section { break-inside: avoid; margin-bottom: 28px; }
.lyric-label { margin-bottom: 8px; color: var(--fire); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.lyrics .lyric-line button { padding: 3px 8px; margin-left: -8px; font-size: 20px; line-height: 1.5; color: var(--ink-2); transition: background-color 0.3s, color 0.3s; }
.lyrics .lyric-line button:hover { color: var(--ink); background: var(--paper-2); }
.lyrics .lyric-line.is-now button { color: var(--ink); background: var(--fire-wash); }
[data-started='true'] .lyrics .lyric-line.is-past button { color: var(--ink-3); }

.pairs { display: grid; gap: 16px; }
.pair { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--rule); border-radius: 20px; background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.pair-field { display: block; margin-bottom: 8px; color: var(--ink-3); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.pair-wrote q { font-size: 21px; font-style: italic; line-height: 1.4; }
.pair-time { margin-left: 6px; color: var(--fire); }
.pair-song .lyric-line { padding: 1px 6px; margin-left: -6px; border-radius: 6px; font-size: 20px; line-height: 1.45; color: var(--ink-2); transition: background-color 0.3s, color 0.3s; }
.pair-song .lyric-line.is-now { background: var(--fire-wash); color: var(--ink); }
.pair-play { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--fire); font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.story-text { display: grid; gap: 1.05em; max-width: 680px; color: var(--ink-2); font-size: 19px; line-height: 1.72; }
.story > .story-text:first-of-type p:first-child::first-letter { float: left; margin: 0.08em 0.1em 0 0; color: var(--fire); font-family: 'Playfair Display', Georgia, serif; font-size: 4.1em; font-weight: 600; line-height: 0.82; }
.pull { max-width: 760px; margin: 36px 0; padding-left: 28px; border-left: 3px solid var(--fire-bright); }
.pull p { font-size: clamp(22px, 2.4vw, 28px); font-style: italic; line-height: 1.4; }
.pull cite { display: block; margin-top: 12px; color: var(--ink-3); font-size: 15px; font-style: normal; font-weight: 600; }

.transcript { display: grid; gap: 2px; max-width: 820px; }
.transcript button { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-size: 17px; line-height: 1.55; transition: background-color 0.25s, color 0.25s; }
.transcript button:hover { background: var(--paper-2); }
.cue-time { padding-top: 3px; color: var(--fire); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-cue].is-now button { background: var(--fire-wash); color: var(--ink); }

.answers { display: grid; gap: 16px; margin-bottom: 34px; }
.answers > div { padding: 24px; border-radius: 20px; background: var(--paper-2); }
.answers dt { margin-bottom: 8px; font-size: 22px; font-weight: 600; }
.answers dd { color: var(--ink-2); font-size: 17px; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 32px; border-radius: 999px; background: var(--fire-bright); color: var(--night-ink); font-size: 17px; font-weight: 700; text-decoration: none; box-shadow: 0 16px 40px -16px oklch(0.75 0.16 60 / 0.8); transition: transform 0.2s ease-out; }
.cta:hover { transform: translateY(-1px); }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.cta-note { color: var(--ink-3); font-size: 16px; }

/* Story cards: related stories on a story page, every story on the hub. */
.cards { display: grid; gap: 18px; }
.cards a { display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px; height: 100%; padding: 16px; border: 1px solid var(--rule); border-radius: 20px; text-decoration: none; transition: transform 0.2s, background-color 0.2s; }
.cards a:hover { transform: translateY(-2px); background: var(--paper-2); }
.cards img { grid-row: 1 / 4; width: 88px; height: 88px; border-radius: 14px; object-fit: cover; }
.rel-title { font-size: 20px; font-weight: 600; line-height: 1.2; }
.rel-who { color: var(--ink-3); font-size: 14px; }
.rel-quote { margin-top: 8px; color: var(--ink-2); font-size: 15px; font-style: italic; line-height: 1.5; }
.hub-head { max-width: 760px; padding: 120px var(--pad) 56px; margin: 0 auto; text-align: center; }
.hub-head h1 { text-indent: 0; }
.hub-head .dek { margin: 18px auto 0; }
.hub-head .cta { margin-top: 28px; }
.hub-group + .hub-group { margin-top: 56px; }
.hub-group h2 { margin-bottom: 20px; font-size: clamp(26px, 3vw, 34px); font-weight: 600; }

.mini { position: fixed; left: 50%; bottom: 16px; z-index: 5; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: min(560px, calc(100% - 24px)); padding: 8px; border-radius: 20px; background: oklch(0.19 0.035 278 / 0.88); box-shadow: 0 0 0 1px oklch(1 0 0 / 0.08), 0 20px 50px -20px oklch(0 0 0 / 0.8); backdrop-filter: blur(16px) saturate(1.2); transform: translate(-50%, 140%); transition: transform 0.45s var(--out); }
[data-started='true'] .mini[data-away='true'] { transform: translate(-50%, 0); }
.mini img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.mini-text { display: grid; min-width: 0; }
.mini-title { font-size: 14px; font-weight: 700; }
.mini-line { overflow: hidden; color: var(--ink-2); font-family: 'Playfair Display', Georgia, serif; font-size: 15px; font-style: italic; white-space: nowrap; text-overflow: ellipsis; }

.site-foot { max-width: 1120px; margin: 0 auto; padding: 40px var(--pad) 120px; background: var(--paper); color: var(--ink-3); font-size: 14px; text-align: center; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 14px; }

@media (min-width: 640px) {
  .top-cta { display: inline-flex; }
  .cards--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(0, 540px) auto; grid-template-rows: auto 1fr; column-gap: clamp(40px, 6vw, 96px); row-gap: 24px; justify-content: center; align-content: center; min-height: 100svh; padding-top: 88px; }
  .hero-head { grid-column: 1; grid-row: 1; align-self: end; }
  .hero-body { grid-column: 1; grid-row: 2; }
  .hero-cta { justify-self: start; }
  .hero-video { grid-column: 2; grid-row: 1 / 3; width: auto; height: min(calc(100svh - 136px), 800px); }
  .hero--wide .hero-video { align-self: center; width: min(46vw, 720px); height: auto; }
  .pair { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 32px; align-items: start; padding: 28px 30px; }
  .pair-song { padding-left: 32px; border-left: 1px solid var(--rule); }
  .lyrics { columns: 2; }
  .answers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--three, .cards--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--three a, .cards--grid a { grid-template-columns: 1fr; grid-template-rows: auto; align-content: start; }
  .cards--three img, .cards--grid img { grid-row: auto; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 14px; }
}
@media (max-width: 979px) {
  .sky img { object-position: 50% 100%; }
  .sky::after { background: linear-gradient(180deg, oklch(0.12 0.035 278 / 0.5), oklch(0.12 0.035 278 / 0.15) 45%, oklch(0.12 0.035 278 / 0.6)); }
  .song-head { align-items: flex-start; }
  .song-head img { width: 88px; height: 88px; }
}
@keyframes beckon {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.97 0.014 85 / 0.7), 0 12px 30px -12px oklch(0 0 0 / 0.6); }
  60% { box-shadow: 0 0 0 12px oklch(0.97 0.014 85 / 0), 0 12px 30px -12px oklch(0 0 0 / 0.6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
