/* Music (v5): the records in RIRRI'S House and their Eleven Music prompts. The homepage's paper, ink and one red; the
   colour comes from the sleeves themselves (the House's own covers). The crate at the top is the House's crate in
   paper: the sleeves stand in a pale-wood box and rise to meet the pointer (music.js). Then the red pen takes one
   prompt apart, and every record follows with its prompt set like a liner note. */
/* Georgia, resized to Newsreader's measurements, stands in while Newsreader loads, so the text doesn't jump when it
   arrives (measured from the Latin files with fontTools: width, ascent and descent) */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 92.2%; ascent-override: 79.72%; descent-override: 28.74%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader Fallback"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 84.61%; ascent-override: 86.87%; descent-override: 31.32%; line-gap-override: 0%; }
:root {
  --paper: #F6F6F3; --sheet: #FFFFFF; --ink: #121418; --ink-2: #4A4F57; --hair: rgba(18, 20, 24, .12);
  --red: #E0301E; --red-ink: #C42412;
  --wood: #E9DDC7; --wood-2: #DCCBAE;  /* the crate: the House's pale wood */
  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif; --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace; --pen: "Caveat", cursive;
  --g: clamp(16px, 3.4vw, 48px); --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html.motion { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; }
.meta { font: 400 13px/1.4 var(--mono); color: var(--ink-2); }

.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 var(--g); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mark { font: italic 500 26px/1 var(--serif); text-decoration: none; padding: 6px 0; }
.mark span { color: var(--red); }
.nav { display: flex; gap: clamp(14px, 2.2vw, 30px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a[aria-current] { box-shadow: inset 0 -1.5px 0 currentColor; }
.nav .email { color: var(--red-ink); }

.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin: clamp(24px, 4vw, 48px) var(--g) 0; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.head h1 { font: italic 600 clamp(64px, 10vw, 150px)/.85 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.04em; }
.head .side { display: grid; gap: 10px; justify-items: end; text-align: right; max-width: 31em; }
.head .side p:first-child { color: var(--ink-2); }
@media (max-width: 640px) { .head .side { justify-items: start; text-align: left; } }

/* ---------- the crate ---------- */
.crate { margin: clamp(34px, 5vw, 64px) var(--g) 0; }
/* a sleeve stays about 12% of the crate wide however many records there are: more records only fan them closer */
.sleeves { list-style: none; margin: 0; padding: clamp(20px, 3vw, 44px) 6.5% 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; position: relative; z-index: 1; }
.sleeves li { --lift: 0; position: relative; z-index: var(--i); width: calc(var(--n) * 12%); margin-left: calc(50% - var(--n) * 6%); }
/* the raised sleeve comes in front of every other one, however many records there are (a fixed 20 left it behind the
   later sleeves once the crate held more than 21) */
.sleeves li.up { z-index: calc(var(--n) + 1); }
.sleeves a { display: block; border-radius: 3px; transform-origin: 50% 100%;
  transform: translateY(calc(var(--lift) * -30%)) rotate(calc(var(--t) * (1 - var(--lift)))); }
.sleeves img { border-radius: 3px; box-shadow: 0 1px 0 rgba(18, 20, 24, .08), 0 14px 26px -10px rgba(18, 20, 24, .28); user-select: none; -webkit-user-select: none; }
.sleeves a:focus-visible { outline-offset: 4px; }
.bin { position: relative; }
.back { position: absolute; z-index: 0; left: .8%; right: .8%; bottom: 0; height: 58%; border-radius: 5px 5px 0 0;
  background: linear-gradient(#D6C3A2, #E3D4B9 70%); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45); }
.lip { position: relative; z-index: 2; height: clamp(40px, 4.6vw, 68px); margin-top: calc(-1 * clamp(26px, 3vw, 44px)); border-radius: 4px 4px 2px 2px;
  background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(150, 116, 70, .035) 46px 47px, transparent 47px 130px), linear-gradient(var(--wood), var(--wood-2));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(18, 20, 24, .08), 0 18px 30px -22px rgba(18, 20, 24, .5); }
.caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; align-items: baseline; margin-top: 14px; min-height: 2.2em; }
.caption b { font: italic 600 clamp(22px, 2vw, 28px)/1.1 var(--serif); }
.caption span { font: 400 13px/1.4 var(--mono); color: var(--ink-2); }
@media (max-width: 720px) {
  .crate { margin-inline: 0; }
  .sleeves { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 18px var(--g) 0; scrollbar-width: none; }
  .sleeves::-webkit-scrollbar { display: none; }
  .sleeves li { flex: 0 0 44vw; width: auto; margin: 0; scroll-snap-align: center; }
  .lip { margin-inline: 0; border-radius: 0; margin-top: -7vw; height: 11vw; }
  .back { left: 0; right: 0; border-radius: 0; height: 50%; }
  .caption { padding: 0 var(--g); }
}

/* ---------- section heads ---------- */
.anatomy, .records, .faq { margin: clamp(72px, 9vw, 128px) var(--g) 0; }
.sec-title, .sec-head h2 { font: italic 600 clamp(38px, 4.4vw, 64px)/1 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.02em; }
.sec-title { padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.sec-head p { color: var(--ink-2); max-width: 30em; }
.sec-head a, .aside a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } }

/* ---------- one prompt, taken apart by the red pen ---------- */
.parts { list-style: none; margin: 0; padding: 0; }
.parts li { display: grid; grid-template-columns: minmax(8em, 12.5em) minmax(0, 1fr); gap: 4px 28px; align-items: baseline; padding: clamp(14px, 1.6vw, 20px) 0; border-bottom: 1px dashed var(--hair); }
.parts .pen { font: 600 clamp(24px, 2vw, 29px)/1 var(--pen); color: var(--red); rotate: -3deg; justify-self: start; }
.parts q { quotes: none; font: 400 clamp(23px, 2.5vw, 36px)/1.25 var(--serif); letter-spacing: -.01em;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--red) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; text-decoration-skip-ink: none; }
.aside { margin-top: 18px; color: var(--ink-2); max-width: 46em; font-size: 15.5px; }
@media (max-width: 640px) { .parts li { grid-template-columns: 1fr; } }

/* ---------- the records ---------- */
.rec { display: grid; grid-template-columns: minmax(180px, 380px) minmax(0, 1fr); gap: 24px clamp(28px, 4.4vw, 72px); padding: clamp(32px, 4vw, 52px) 0; border-bottom: 1px solid var(--hair); scroll-margin-top: 88px; }
.rec .cover { width: 100%; border-radius: 3px; box-shadow: 0 1px 0 rgba(18, 20, 24, .08), 0 22px 40px -22px rgba(18, 20, 24, .42); align-self: start; }
.rec .body { max-width: 44em; align-self: center; }
.rec h3 { margin-top: 10px; font: italic 600 clamp(36px, 4.2vw, 62px)/.95 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.025em; }
.rec:target h3 { background: linear-gradient(transparent 64%, rgba(224, 48, 30, .2) 0); }
.rec .note { margin-top: 12px; color: var(--ink-2); font-size: 18px; }
.prompt { margin-top: 24px; }
.prompt blockquote { background: var(--sheet); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px rgba(18, 20, 24, .04); padding: clamp(18px, 2vw, 26px) clamp(20px, 2.4vw, 30px); }
.prompt blockquote p { font: 400 clamp(19px, 1.55vw, 22px)/1.55 var(--serif); }
.prompt figcaption { margin-top: 8px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); }
.where { margin-top: 18px; font-size: 15.5px; color: var(--ink-2); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 16px; }
.copy { min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s, transform .12s var(--ease); }
.copy:hover { background: var(--red-ink); }
.copy:active { transform: scale(.97); }
.copy.done { background: var(--red-ink); }
.go { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 500; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.go:hover { color: var(--red-ink); }
@media (max-width: 700px) {
  .rec { grid-template-columns: 1fr; }
  .rec .cover { width: min(100%, 420px); }
}

/* ---------- questions ---------- */
.faq dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px 40px; padding: 22px 0; border-bottom: 1px solid var(--hair); }
.faq dt { font: 600 clamp(21px, 1.8vw, 26px)/1.2 var(--serif); }
.faq dd { color: var(--ink-2); max-width: 38em; }
@media (max-width: 700px) { .faq dl > div { grid-template-columns: 1fr; } }

.credit { margin: 56px var(--g) 0; padding: 22px 24px; background: var(--sheet); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); max-width: 760px; color: var(--ink-2); font-size: 15px; }
.credit b { color: var(--ink); font-weight: 500; }
.credit a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; z-index: 60; background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-size: 14px; transition: opacity .25s, translate .35s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; translate: -50% 0; }

footer { display: flex; justify-content: space-between; gap: 12px; padding: 72px var(--g) 40px; color: var(--ink-2); font-size: 14px; }
footer .foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer a { display: inline-block; padding-block: 6px; text-underline-offset: 3px; text-decoration-thickness: 1px; }
footer a:hover { color: var(--red-ink); }

.skip { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: #121418; color: #fff; z-index: 100; }
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .nav .hide-s { display: none; } }
/* the four links left from 380 px down: tighter, and under 340 px Writing waits in the page (Home shows it a scroll away) */
@media (max-width: 380px) { .nav { gap: 12px; font-size: 14px; } }
@media (max-width: 340px) { .nav .hide-xs { display: none; } }
main, footer { max-width: 1760px; margin-inline: auto; }
.top { padding-inline: max(var(--g), calc((100% - 1760px) / 2 + var(--g))); }
@media (prefers-reduced-motion: reduce) { .copy, .toast { transition: none; } .sleeves a { transform: rotate(var(--t)); } }
