/* Paper Chorus site. Colours are the app's Malachite tokens (design/palette.json). */
:root {
  color-scheme: light dark;
  --bg: #F5F7F5; --surface: #FFFFFF; --raised: #EBF0EC;
  --ink: #182820; --ink-2: #43584E; --ink-3: #53685C; --line: #C9D3CC;
  --accent: #174C3C; --accent-on: #FFFFFF; --word: #BCD7B9;
  --field: #123C32; --night: #0C1512; --leaf: #C2E687; --pale: #F0F5F1;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --gutter: clamp(20px, 5vw, 56px);
  --wide: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101A16; --surface: #17251E; --raised: #203129;
    --ink: #F0F5F1; --ink-2: #BDCDC2; --ink-3: #9FB3A5; --line: #3A4B40;
    --accent: #C2E687; --accent-on: #173525; --word: #465E37;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--word); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
p { text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 28px; font-size: 0.9375rem; font-weight: 500; }
.top nav a { text-decoration: none; padding-block: 6px; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; }

/* Hero: always night, whatever the theme. */
.hero { background: var(--night); color: var(--pale); position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 70% at 85% 30%, rgba(23, 76, 60, 0.75), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(18, 60, 50, 0.6), transparent 70%);
}
.hero-grid { display: grid; gap: 44px; padding-block: 28px 72px; align-items: center; }
.hero h1 { font-size: clamp(2.75rem, 8.5vw, 5.5rem); letter-spacing: -0.035em; line-height: 0.98; }
.hero .lede { margin-top: 24px; font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.45; color: #C9D8CE; max-width: 30em; }
.hero .when { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; font-weight: 500; color: var(--pale); }
.hero .when::before { content: ""; width: 28px; height: 2px; background: var(--leaf); }
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 72px; padding-block: 40px 96px; }
}

/* The stage: the app's own film with the reading sheet over it. */
.stage { position: relative; border-radius: 30px; overflow: hidden; background: #0A120F; aspect-ratio: 9 / 16.6; max-height: min(780px, max(520px, 100vh - 150px)); max-height: min(780px, max(520px, 100svh - 150px)); width: 100%; max-width: 440px; margin-inline: auto;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(240, 245, 241, 0.1); }
.stage .film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 18, 15, 0) 20%, rgba(10, 18, 15, 0.82) 62%); pointer-events: none; }
.sheet { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; background: #17251E; color: #F0F5F1; border-radius: 20px; padding: 18px 18px 16px; border: 1px solid #2B3B32; }
.voices { display: flex; gap: 6px; justify-content: space-between; }
.voices li { flex: 1; display: grid; justify-items: center; gap: 6px; font-size: 0.75rem; font-weight: 500; color: #9FB3A5; transition: color 0.15s linear; }
.voices img { width: 46px; height: 46px; border-radius: 50%; opacity: 0.5; outline: 2px solid transparent; outline-offset: 2px; transition: opacity 0.15s linear, outline-color 0.15s linear; }
.voices li.on { color: #F0F5F1; }
.voices li.on img { opacity: 1; outline-color: #C2E687; }
.passage { margin-top: 16px; font: 400 1.0625rem/1.5 var(--book); height: 9.6em; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
.passage-inner { transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.passage p + p { margin-top: 0.5em; }
.passage .w { border-radius: 2px; padding: 1px 2px; margin: -1px -2px; }
.passage .w.now { background: #465E37; box-shadow: 0 2px 0 #C2E687; }
.transport { margin-top: 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.play { width: 54px; height: 54px; border-radius: 50%; border: 0; background: #C2E687; color: #173525; display: grid; place-items: center; cursor: pointer; }
.play:hover { background: #D0EE9E; }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play .i-pause, .play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }
.bar { height: 2px; background: #3A4B40; position: relative; border-radius: 2px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #C2E687; border-radius: 2px; }
.bar i::after { content: ""; position: absolute; right: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: #C2E687; }
.clock { font-size: 0.8125rem; font-weight: 500; color: #BDCDC2; font-variant-numeric: tabular-nums; }
.stage-note { margin: 14px auto 0; max-width: 440px; font-size: 0.875rem; color: #9FB3A5; text-align: center; }

/* Sections */
section { padding-block: clamp(72px, 10vw, 136px); }
.lead { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); line-height: 1.5; color: var(--ink-2); max-width: 34em; margin-top: 20px; }
.split { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 88px; } .split.flip > :first-child { order: 2; } }

/* Cast */
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 28px 12px; }
.cast li { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 0.9375rem; font-weight: 500; line-height: 1.25; }
.cast img { width: 84px; height: 84px; border-radius: 50%; background: var(--field); }
.cast-of { margin-bottom: 28px; font-weight: 500; color: var(--ink-2); }

/* Ruled lists */
.ruled { border-top: 1px solid var(--line); }
.ruled > li, .ruled > div { display: grid; grid-template-columns: minmax(96px, 9.5em) 1fr; gap: 20px; padding-block: 17px; border-bottom: 1px solid var(--line); align-items: baseline; }
.ruled dt, .ruled .k { font-weight: 600; }
.ruled dd, .ruled .v { color: var(--ink-2); }
.notes { margin-top: 36px; display: grid; gap: 10px; font-size: 1.1875rem; line-height: 1.4; font-weight: 500; color: var(--ink); }

/* Shelf */
.shelf-band { background: var(--field); color: var(--pale); overflow: hidden; }
.shelf-band .lead { color: #C9D8CE; }
.rows { margin-top: 56px; display: grid; gap: 20px; }
.row { display: flex; gap: 20px; width: max-content; animation: drift 90s linear infinite; }
.row:nth-child(2) { animation-direction: reverse; animation-duration: 110s; }
.row img { width: clamp(120px, 15vw, 176px); aspect-ratio: 2 / 3; height: auto; border-radius: 3px; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.75); background: #0C2A22; }
@keyframes drift { to { transform: translateX(-50%); } }
.rows:hover .row { animation-play-state: paused; }

/* Yours */
.plate { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 640px; }
.plate img { width: 100%; height: 100%; object-fit: cover; }

/* Private */
.quiet { background: var(--raised); }
.quiet h2 { max-width: 14em; }

/* Footer */
footer { padding-block: 44px 56px; font-size: 0.9375rem; color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 28px; }
.foot nav { display: flex; gap: 24px; }
.foot p { max-width: 38em; }

/* Text pages */
.page { padding-block: 40px 96px; }
.page h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); letter-spacing: -0.03em; }
.page .dated { margin-top: 14px; color: var(--ink-3); }
.prose { max-width: 40em; }
.prose h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin-top: 52px; line-height: 1.2; }
.prose p, .prose ul { margin-top: 14px; color: var(--ink-2); }
.prose p.short { font-size: 1.3125rem; line-height: 1.45; color: var(--ink); margin-top: 32px; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.mail { display: inline-block; margin-top: 28px; padding: 15px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-on); font-weight: 600; text-decoration: none; }
.mail:hover { filter: brightness(1.08); }
.faq { margin-top: 20px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: 17px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; }
.lost { min-height: 60vh; display: grid; align-content: center; gap: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row { animation: none; }
  .rows { overflow-x: auto; }
  .passage-inner, .voices img, .voices li { transition: none; }
}

/* Apple's badge, as supplied. Hover changes opacity only. */
.get { margin-top: 32px; }
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge img { width: 180px; height: auto; }
.store-badge:hover { opacity: 0.85; }
