/* book.css · The Design Book's own chrome: ink, white, cobalt and acid, the same colour-block
   language as the motion library, so the book reads as one object. Every world brings its own
   palette and type in sites/<id>.css; nothing here is cream. · owner: Lizzy East */

:root {
  --ink: #0f0f14; --ink-2: #1b1c24; --line: #33354a; --grey: #a9adbd; --white: #ffffff;
  --cobalt: #304cff; --acid: #cfff3e; --vermilion: #ff4122;
  --display: "Syne", "Arial Black", sans-serif;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --fx-dur: 800ms;
  --fx-distance: 28px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 0; }
body {
  margin: 0; background: var(--ink); color: var(--white);
  font: 400 17px/1.55 var(--sans); -webkit-text-size-adjust: 100%; overflow-x: clip;
}
img, video, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
::selection { background: var(--acid); color: var(--ink); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* progress */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--acid); z-index: 60; }

/* ------------------------------------------------------------- the spreads */
.spread { position: relative; overflow: clip; padding-block: clamp(72px, 9vw, 136px); }
.spread--flush { padding-block: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); min-width: 0; }
@media (max-width: 480px) { .spread h1, .spread h2, .spread h3 { overflow-wrap: anywhere; } }
.chapter {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 7px;
  border: 2px solid currentColor; font: 700 12px/1 var(--display); letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chapter b { letter-spacing: 0.04em; font-weight: 800; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-bottom: clamp(28px, 4vw, 52px); }
.who .what { font: 500 13px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.78; }
.eyebrow { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 18px; }
.eyebrow--pill { padding: 9px 14px; border: 1px solid currentColor; border-radius: 999px; }
.lede { max-width: 58ch; font-size: clamp(17px, 1.5vw, 20px); }
.btnrow { display: flex; gap: 12px 14px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 0 26px; font: 700 14px/1 var(--display); letter-spacing: 0.04em; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--btn-r, 4px);
}
.btn--ghost { background: transparent !important; border-color: currentColor; color: inherit !important; }
.fxlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(36px, 5vw, 64px); }
.fxlist span, .fxlist a {
  font: 700 10.5px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 11px; border: 1px dashed currentColor; border-radius: 6px; opacity: 0.72; text-decoration: none;
}
.fxlist a:hover, .fxlist a:focus-visible { opacity: 1; }
.fxlist b { font: 800 10.5px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 0; margin-right: 6px; }
.ph { position: relative; overflow: clip; }
.ph img, .ph video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pause {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border: 1px solid currentColor; border-radius: 999px; font: 500 12px/1 var(--sans);
  letter-spacing: 0.12em; text-transform: uppercase; background: rgb(15 15 20 / 0.55); color: #fff;
}
.pause::before { content: ""; width: 0.7rem; height: 0.8rem; border-inline: 0.22rem solid currentColor; }
.pause[aria-pressed="true"]::before { border: 0; border-left: 0.7rem solid currentColor; border-block: 0.4rem solid transparent; width: 0; height: 0; }
.pause:disabled { opacity: 0.55; cursor: default; }
.stat b { display: block; font: 800 clamp(40px, 5.4vw, 74px)/0.95 var(--display); letter-spacing: -0.03em; }
.stat > span { display: block; margin-top: 8px; font: 500 11px/1.4 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.75; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; }

/* ------------------------------------------------------------- the cover */
.cover { min-height: 100svh; display: grid; align-content: end; color: var(--white); background: var(--ink); }
.cover > canvas[data-fx-ambient] { z-index: 0; }
.cover .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 3vw, 40px); }
.cover .wrap > * { min-width: 0; }
.cover .brand { font: 700 12px/1 var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--acid); }
.cover h1 { font: 800 clamp(34px, 8.4vw, 132px)/0.88 var(--display); letter-spacing: -0.05em; text-transform: uppercase; text-wrap: balance; max-width: 14ch; }
.cover h1 em { font: italic 400 1em/0.86 var(--serif); letter-spacing: -0.03em; text-transform: none; color: var(--acid); }
.cover .lede { color: var(--grey); }
.cover .row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.cover .counts { display: flex; flex-wrap: wrap; gap: 26px 44px; }
.cover .counts b { display: block; font: 800 clamp(30px, 3.6vw, 52px)/1 var(--display); letter-spacing: -0.03em; }
.cover .counts span { display: block; margin-top: 6px; font: 500 11px/1.4 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); }
.cover .btn { background: var(--acid); color: var(--ink); }

/* ------------------------------------------------------------- how / built / close */
.how { background: var(--cobalt); color: var(--white); }
.how h2 { font: 800 clamp(34px, 5.6vw, 84px)/0.92 var(--display); letter-spacing: -0.045em; text-transform: uppercase; max-width: 18ch; margin-top: 28px; }
.how h2 em { font: italic 400 1em/0.92 var(--serif); text-transform: none; letter-spacing: -0.02em; }
.how .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; margin-top: clamp(40px, 5vw, 72px); border-top: 2px solid rgb(255 255 255 / 0.35); }
.how .steps > div { padding-top: 22px; border-top: 2px solid rgb(255 255 255 / 0.35); margin-top: -2px; }
.how .steps b { display: block; font: 800 44px/1 var(--display); letter-spacing: -0.04em; margin-bottom: 10px; }
.how .steps p { font-size: 15px; opacity: 0.92; }
.built { background: var(--white); color: var(--ink); }
.built h2 { font: 800 clamp(34px, 5.6vw, 84px)/0.92 var(--display); letter-spacing: -0.045em; text-transform: uppercase; margin-top: 28px; max-width: 16ch; }
.built h2 em { font: italic 400 1em/0.92 var(--serif); text-transform: none; letter-spacing: -0.02em; color: var(--cobalt); }
.built .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2px; margin-top: clamp(40px, 5vw, 72px); background: var(--ink); border: 2px solid var(--ink); }
.built .grid > div { background: var(--white); padding: 24px; }
.built .grid h3 { font: 800 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 12px; }
.built .grid p { font-size: 15px; }
.close { background: var(--ink); color: var(--white); min-height: 80svh; display: grid; align-content: center; }
.close h2 { font: 800 clamp(40px, 8vw, 128px)/0.88 var(--display); letter-spacing: -0.05em; text-transform: uppercase; max-width: 14ch; }
.close h2 em { font: italic 400 1em/0.88 var(--serif); text-transform: none; letter-spacing: -0.03em; color: var(--acid); }
.close .lede { color: var(--grey); margin-top: 28px; }
.close .colophon { margin-top: clamp(48px, 7vw, 96px); padding-top: 22px; border-top: 1px solid var(--line); color: var(--grey); font-size: 13px; max-width: 90ch; }

/* ------------------------------------------------------------- shared parts the worlds reuse */
.event { display: grid; grid-template-columns: 74px 1fr auto; gap: 20px; align-items: center; padding: 18px 0; border-top: 1px solid; }
.event:last-child { border-bottom: 1px solid; }
.event .date { text-align: center; }
.event .date b { display: block; font: 800 26px/1 var(--display); }
.event .date span { font: 600 10px/1.6 var(--sans); letter-spacing: 0.3em; }
.event h4 { font: 700 18px/1.2 var(--sans); }
.event .venue { font-size: 13px; opacity: 0.72; margin-top: 4px; }
.badge { display: inline-block; font: 700 10px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; padding: 7px 10px; border-radius: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0; }
.filters button { font: 700 11px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid currentColor; opacity: 0.62; }
.filters button[aria-pressed="true"] { opacity: 1; }
.player { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 14px; backdrop-filter: blur(10px); }
.player .art { width: 52px; height: 52px; border-radius: 9px; }
.player .meta b { display: block; font-size: 14px; }
.player .meta span { font-size: 11.5px; opacity: 0.72; }
.player .ctl { display: flex; gap: 8px; }
.player .ctl button, .tplay { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid currentColor; display: grid; place-items: center; }
.player .bar { grid-column: 1 / -1; height: 3px; border-radius: 99px; overflow: hidden; background: rgb(255 255 255 / 0.16); }
.player .bar i { display: block; height: 100%; width: 0%; background: currentColor; transition: width 0.3s linear; }
.tracks .track { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid; }
.tracks .track:last-child { border-bottom: 1px solid; }
.tracks .dur { font: 600 12px/1 var(--sans); letter-spacing: 0.1em; opacity: 0.72; }
.toast { position: fixed; left: 50%; bottom: 26px; translate: -50% 12px; z-index: 98; max-width: min(520px, 88vw); padding: 14px 22px; border-radius: 14px; background: #16151a; color: #f4f5f7; font: 500 14px/1.5 var(--sans); box-shadow: 0 12px 40px rgb(0 0 0 / 0.35); opacity: 0; pointer-events: none; text-align: center; }
.toast.on { opacity: 1; translate: -50% 0; }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity 0.25s, translate 0.25s; } }
@media (max-width: 720px) {
  .event { grid-template-columns: 60px 1fr; }
  .event .act { grid-column: 2; }
}
