:root {
  --ink: #191713;
  --stock: #f1e3d3;
  --page: #faf6ee;
  --blue: #173c62;
  --serif: "Baskerville", "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --gutter: clamp(20px, 3vw, 66px);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: var(--serif); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible, label:has(:focus-visible) { outline: 2px solid currentColor; outline-offset: 5px; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 400; letter-spacing: -.055em; line-height: .98; }
.opening, .spread { position: relative; }
.jacket {
  position: relative; isolation: isolate; height: 100svh; min-height: 460px;
  overflow: hidden; background: var(--stock);
}
.jacket picture, .jacket img { position: absolute; inset: 0; width: 100%; height: 100%; }
.jacket picture { z-index: -1; }
.jacket img { object-fit: cover; object-position: center top; }
.mast { position: absolute; inset: clamp(16px,1.5vw,32px) var(--gutter) auto; display: flex; justify-content: space-between; align-items: baseline; }
.wordmark { font-size: clamp(32px,3vw,54px); letter-spacing: -.06em; line-height: 1; }
.mast a { text-decoration: none; font-size: clamp(19px,1.55vw,28px); }
.mast a:hover { text-decoration: underline; }
h1 { position: absolute; top: 23%; left: var(--gutter); font-size: clamp(58px,7.35vw,154px); }
.platform, .caption, .imprint, legend, .annotation-intro, .colophon { font-family: var(--sans); }
.platform { position: absolute; bottom: var(--gutter); left: var(--gutter); font-size: clamp(14px,1.25vw,22px); }
.leaf { display: grid; place-items: center; min-height: 100svh; padding: 70px var(--gutter); background: var(--page); }
.excerpt { width: min(100%, 54rem); }
.imprint { color: var(--blue); font-size: .87rem; margin-bottom: 2.3rem; }
.excerpt h2, footer h2 { font-size: clamp(48px,6.1vw,104px); }
#passage { margin: 1.35rem 0 1.6rem; max-width: 36em; min-height: 5.5em; font-size: clamp(21px,2.3vw,38px); line-height: 1.34; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .8rem; color: var(--blue); margin-bottom: .6rem; padding: 0; }
.levels { display: flex; flex-wrap: wrap; gap: .1em 1em; }
.levels label { position: relative; cursor: pointer; padding: .55em 0; color: #615a50; font-size: 1.12rem; }
.levels label:has(:checked) { color: var(--ink); text-decoration: underline; text-underline-offset: .35em; }
.levels input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.caption { font-size: .78rem; color: #665e53; margin-top: .9rem; }
#reader { position: absolute; top: max(460px, 100svh); pointer-events: none; }
.verso { display: none; }
@media (prefers-reduced-motion: no-preference) and (min-height: 650px) {
  .turning { height: calc(100svh + 85svh); }
  .turning .spread { height: 100svh; position: sticky; top: 0; overflow: hidden; }
  .turning .jacket { z-index: 2; position: absolute; inset: 0; }
  .turning .verso { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
  .turning #reader { top: 85svh; }
}
.margins { background: var(--blue); color: #f7ecd7; padding: clamp(72px,11vw,180px) var(--gutter); }
.margin-inner { max-width: 60rem; margin: auto; }
.margins h2 { font-size: clamp(60px,9vw,145px); }
.annotation-intro { margin-top: 1.1rem; font-size: 1rem; }
.annotation { margin: clamp(45px,7vw,100px) 0 0 auto; max-width: 38em; min-height: 8em; }
.annotation summary { list-style: none; cursor: pointer; }
.annotation summary::-webkit-details-marker { display: none; }
.annotation summary span { font-size: clamp(24px,3vw,44px); text-decoration: underline; text-decoration-color: #b49e72; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.annotation small { display: block; font: .8rem var(--sans); margin-top: 1rem; }
.annotation small::after { content: " +"; }
.annotation[open] small::after { content: " −"; }
.annotation p { margin: 1.1rem 0 0 1.5rem; font: italic clamp(24px,3vw,38px)/1.2 "Bradley Hand", var(--serif); color: #f1cb89; transform: rotate(-2deg); }
footer { max-width: 64rem; margin: auto; padding: clamp(65px,8vw,130px) var(--gutter) 24px; }
footer p { margin: 1.6rem 0; max-width: 36em; font-size: clamp(19px,2vw,26px); line-height: 1.48; }
.folio-link { font-size: 1.25rem; color: var(--blue); }
.colophon { display: flex; justify-content: space-between; gap: 12px; margin-top: 5rem; font-size: .82rem; }
.colophon span { display: flex; gap: 1rem; }
@media (max-aspect-ratio: 4/5) {
  .cover-copy { position: absolute; top: 14%; inset-inline: var(--gutter); }
  h1 { position: static; font-size: clamp(49px,12.8vw,112px); }
  .platform { position: static; margin-top: clamp(18px,4svh,48px); font-size: clamp(13px,2.7vw,20px); }
  .jacket img { object-position: center bottom; }
}
@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 6/5) {
  .jacket img { object-position: 40% center; }
  h1 { top: 19%; }
}
@media (max-width: 600px) {
  .leaf { padding: 42px var(--gutter); }
  .imprint { margin-bottom: 1.4rem; }
  .levels { gap: 0 .8em; }
  .levels label { font-size: 1rem; }
  #passage { min-height: 8.2em; }
}
#wave { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#play-wave { position: absolute; right: var(--gutter); bottom: var(--gutter); padding: .5em .8em; border: 1px solid #897d6c; border-radius: 2em; background: #f4ebdc; color: var(--ink); font: .78rem var(--sans); cursor: pointer; }
#play-wave:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1 > span { display: block; }
h1 b { display: block; font-weight: inherit; }
.annotation summary span { text-decoration: none; background-image: linear-gradient(#d6b97d,#d6b97d); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1px; }
@media (prefers-reduced-motion: no-preference) {
  h1 > span { overflow: clip; padding: 0 .13em .12em 0; margin: 0 -.13em -.12em 0; }
  h1 b { animation: set-line .9s cubic-bezier(.18,.85,.22,1) both; }
  h1 span:nth-child(2) b { animation-delay: .09s; }
  h1 span:nth-child(3) b { animation-delay: .18s; }
  .turning .excerpt { transform: translateY(calc(var(--lift, 0) * 40px)); opacity: calc(1 - var(--lift, 0) * .35); }
  .inked .annotation summary span { animation: mark-paper 1.25s .18s ease both; }
  .annotation[open] p { animation: hand-note .85s ease-out both; }
}
@keyframes set-line { from { transform: translateY(108%) rotate(1.5deg); } to { transform: none; } }
@keyframes mark-paper { from { background-size: 0% 1px; } to { background-size: 100% 1px; } }
@keyframes hand-note { from { clip-path: inset(-20% 100% -30% 0); } to { clip-path: inset(-20% 0 -30% 0); } }
