/* Home page only (body.p-home), on top of site.css. */
.p-home { background: var(--lake-950); }
.p-home main { animation: none; }
.p-home h2 { font-size: var(--step-head); }
.p-home p { margin: 0; }
.p-home ul { list-style: none; margin: 0; padding: 0; }
.p-home figure { margin: 0; }

/* Hero: the lake, the type in its sky, the book on its water */
.r-hero { position: relative; margin-top: calc(-1 * var(--nav-h)); min-height: max(100svh, 760px); overflow: hidden; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; padding: calc(var(--nav-h) + clamp(12px, 2svh, 24px)) var(--m) clamp(32px, 5svh, 56px); color: var(--paper-h); background: var(--lake-950); }
.r-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; animation: r-settle 2.4s var(--press) both; }
@keyframes r-settle { from { transform: scale(1.05); } }
.r-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, var(--lake-950), oklch(0.27 0.05 215 / 0)); pointer-events: none; } /* taste-skill-ignore: scrim that melts the water into the next section */
.r-hero > *:not(.r-hero-bg) { position: relative; z-index: 2; }
.p-home .r-hero h1 { grid-column: 1 / -1; color: var(--ink-h); font-size: clamp(2.5rem, min(10.6vw, 19svh), 13.5rem); letter-spacing: -0.035em; line-height: 0.98; font-weight: 400; }
.r-hero-foot { grid-column: 1 / span 6; align-self: end; display: grid; gap: 24px; animation: r-rise 700ms var(--press) 350ms both; }
@keyframes r-rise { from { opacity: 0; transform: translateY(16px); } }
.r-lead { font-size: var(--step-lead); line-height: 1.28; max-width: 32ch; }
.r-book { grid-column: 8 / span 4; grid-row: 2; align-self: end; justify-self: center; perspective: 1400px; margin-bottom: clamp(32px, 7svh, 72px); }
.r-book img { width: auto; height: clamp(240px, 42svh, 520px); transform: rotateY(-20deg) rotateX(1deg); box-shadow: var(--lift); -webkit-box-reflect: below 2px linear-gradient(to bottom, transparent 62%, oklch(1 0 0 / 0.32)); transition: transform 300ms var(--press); } /* taste-skill-ignore: the cover's reflection on the water */
@media (hover: hover) and (pointer: fine) { .r-book img:hover { transform: rotateY(-6deg) rotateX(0deg); } }

/* Reach: dark water, huge figures, the cover's mosaic edge to edge */
.r-reach { background: var(--lake-950); color: var(--paper-h); padding-top: clamp(96px, 11vw, 160px); }
.r-reach-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.r-reach-top h2 { grid-column: 1 / span 8; }
.r-reach-top p { grid-column: 9 / -1; }
.p-home .r-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; margin: clamp(64px, 8vw, 128px) auto; }
.r-facts li, .r-facts a { display: flex; flex-direction: column; gap: 4px; }
.r-facts strong { font-weight: 400; font-size: clamp(3rem, 1rem + 6vw, 7rem); letter-spacing: -0.03em; line-height: 1; color: var(--paper-h); }
.r-mosaic { display: grid; grid-template-columns: repeat(6, 1fr); }
.r-mosaic figure { aspect-ratio: 1; overflow: hidden; background: var(--lake-800); }
.r-mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--press); }
@media (hover: hover) and (pointer: fine) { .r-mosaic figure:hover img { transform: scale(1.05); } }

/* Day: an open hardback lying on a table in morning light */
.r-day { position: relative; overflow: clip; background: var(--lake-800); padding-block: clamp(96px, 10vw, 144px) clamp(128px, 12vw, 176px); }
.cover-face { display: none; }
.book-cover { display: contents; }
.r-day-desk { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-day .r-wrap { position: relative; z-index: 1; max-width: 1376px; }
.spread { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 12px 12px 16px; background: var(--lake-950); box-shadow: 0 4px 8px oklch(0.15 0.03 220 / 0.3), 0 48px 96px -24px oklch(0.12 0.03 220 / 0.65); perspective: 2400px; } /* taste-skill-ignore: the open book lies above the table */
.page { position: relative; background: var(--paper-h); padding: clamp(32px, 5vw, 80px); min-width: 0; min-height: min(72svh, 680px); box-shadow: 0 2px 0 #f1f5f6, 0 3px 0 #d9c98f, 0 5px 0 #f1f5f6, 0 6px 0 var(--gold-h); } /* taste-skill-ignore: stacked page edges with the gold fore-edge */
.page::before { content: ""; position: absolute; inset: 0; pointer-events: none; } /* taste-skill-ignore: spine shadow */
.page-l::before { background: linear-gradient(to left, oklch(0.2 0.03 220 / 0.2), oklch(0.2 0.03 220 / 0.05) 5%, oklch(0.2 0.03 220 / 0) 14%); } /* taste-skill-ignore: spine shadow of the open book */
.p-home .page-r::before { background: linear-gradient(to right, oklch(0.2 0.03 220 / 0.2), oklch(0.2 0.03 220 / 0.05) 5%, oklch(0.2 0.03 220 / 0) 14%); } /* taste-skill-ignore: spine shadow of the open book */
.page > * { position: relative; }
.page-l { display: flex; flex-direction: column; gap: 32px; }
.p-home .page-l h2 { font-size: clamp(2.5rem, 1rem + 4vw, 5rem); font-weight: 400; letter-spacing: -0.03em; }
.page-l .r-big { max-width: 32ch; }
.page-l .r-big::first-letter { float: left; font-size: 3.65em; line-height: 0.8; padding: 0.07em 0.08em 0 0; font-weight: 400; }
.p-home .page-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-size: var(--step-small); margin-top: auto; padding-top: 32px; }
.p-home .page-r { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: clamp(32px, 5vw, 80px); }
.page-r li { max-width: min(40ch, calc(100% - 96px)); }
.page-r p { line-height: 1.35; margin-top: 4px; }
.ribbon { position: absolute; z-index: 2; left: 90%; top: 0; bottom: -48px; width: 14px; background: var(--gold-h); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 10px), 0 100%); }


/* Scroll-driven opening: JS adds .book-live on wide screens with motion allowed and drives --open from 0 to 1. */
.book-live .r-day { height: 280svh; padding: 0; overflow: clip; }
.book-live .r-day-stage { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); display: grid; place-items: center; overflow: hidden; perspective: 2600px; }
.book-live .r-day .r-wrap { width: auto; max-width: none; margin: 0; }
.book-live .spread { --page-w: min(44vw, calc((100svh - var(--nav-h) - 112px) * 0.575)); width: calc(2 * var(--page-w)); height: calc(var(--page-w) / 0.575); display: block; padding: 0; background: none; box-shadow: none; transform-style: preserve-3d; transform: translateX(calc((var(--open, 0) - 1) * 25%)); } /* taste-skill-ignore: removes spread shadow */
.book-live .page-r { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; min-height: 0; padding: clamp(24px, 3vw, 40px); box-shadow: 0 0 0 10px var(--lake-950), 0 40px 80px -16px oklch(0.12 0.03 220 / 0.6); gap: 12px; } /* taste-skill-ignore: hard cover edge */
.book-live .page-r li { max-width: 100%; padding-right: 32px; }
.p-home.book-live .page-r h3 { font-size: 1.5rem; }
.book-live .page-r p { font-size: var(--step-small); line-height: 1.3; }
.book-live .book-cover { display: block; position: absolute; left: 50%; top: 0; width: 50%; height: 100%; z-index: 3; transform-origin: 0 50%; transform-style: preserve-3d; transform: rotateY(calc(var(--open, 0) * -180deg)) translateZ(1px); }
.book-live .cover-face, .book-live .page-l { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 10px var(--lake-950), 0 40px 80px -16px oklch(0.12 0.03 220 / 0.6); } /* taste-skill-ignore: hard cover edge */
.book-live .cover-face { display: block; object-fit: cover; object-position: 50% 50%; }
.book-live .page-l { min-height: 0; transform: rotateY(180deg); padding: clamp(24px, 3vw, 48px); gap: 20px; }
.p-home.book-live .page-l h2 { font-size: clamp(2.5rem, 1rem + 2.6vw, 4rem); }
.book-live .ribbon { left: 94%; bottom: -40px; z-index: 1; }

/* Shelf: the real covers, standing */
.r-shelf { background: var(--paper-h); padding-block: clamp(96px, 11vw, 160px); }
.r-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px 32px; }
.p-home .r-books { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3.4vw, 48px); margin-top: clamp(64px, 6vw, 96px); align-items: start; }
.r-books li:nth-child(even) { margin-top: clamp(32px, 4vw, 64px); }
.r-books a { display: block; }
.r-bookcover { display: block; perspective: 1200px; margin-bottom: 24px; }
.r-bookcover img { width: 100%; height: auto; box-shadow: var(--lift); transition: transform 300ms var(--press); } /* taste-skill-ignore: standing book */
.r-books p { margin-top: 8px; line-height: 1.35; }
.r-price { display: inline-block; margin-top: 12px; padding-block: 8px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
@media (hover: hover) and (pointer: fine) { .r-books a:hover .r-bookcover img { transform: translateY(-8px); } }

/* Groups: full-height street, list beside it */
.r-groups { background: var(--tone); display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.r-groups-photo { position: relative; min-height: 100%; overflow: hidden; }
.r-groups-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.r-groups-text { padding: clamp(64px, 8vw, 128px) var(--m); display: grid; gap: 32px; align-content: center; min-width: 0; }
.p-home .r-groups-text h2 { font-size: clamp(2.5rem, 1.2rem + 4vw, 5rem); }
.p-home .r-rows { display: grid; gap: 8px; }
.r-rows a { display: block; padding-block: 12px; }
.r-rows h3 { transition: color 150ms ease-out; }
.r-rows .progress { height: 8px; background: var(--paper-h); border-radius: 0; margin-block: 12px 8px; }
.r-rows .progress > span { background: var(--lake-600); border-radius: 0; }
.r-rows p { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--step-small); }
@media (hover: hover) and (pointer: fine) { .r-rows a:hover h3 { color: var(--lake-600); } }

/* Reply: controls set straight on the photograph */
.r-reply { position: relative; overflow: hidden; background: var(--lake-950); color: var(--paper-h); padding-block: clamp(96px, 10vw, 144px); }
.r-reply-bg { position: absolute; inset: 0; }
.r-reply-bg img { width: 100%; height: 112%; object-fit: cover; }
.r-reply .copies { z-index: 2; }
.r-reply::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, oklch(0.27 0.05 215 / 0.8) 30%, oklch(0.27 0.05 215 / 0) 65%); pointer-events: none; } /* taste-skill-ignore: directional photo scrim */
.r-reply-form { position: relative; z-index: 2; display: grid; gap: 24px; justify-items: start; }
.r-reply-form > * { max-width: min(640px, 100%); }
.p-home .r-reply-form h2 { max-width: none; }
.reply-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: var(--step-lead); line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; margin-top: 16px; }
.reply-count strong { font-weight: 400; font-size: clamp(4.5rem, 2rem + 8vw, 10rem); letter-spacing: -0.03em; line-height: 0.95; }
.reply-count b { font-weight: 500; }
.reply-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.reply-presets button { min-height: 44px; border: 0; border-radius: 0; background: oklch(1 0 0 / 0.14); color: var(--paper-h); font: inherit; font-size: var(--step-small); font-variant-numeric: lining-nums; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms var(--press); }
.reply-presets button[aria-pressed="true"] { background: var(--paper-h); color: var(--ink-h); }
.reply-presets button:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .reply-presets button[aria-pressed="false"]:hover { background: oklch(1 0 0 / 0.26); } }
.reply-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: grab; }
.reply-range::-webkit-slider-runnable-track { height: 8px; background: linear-gradient(to right, var(--gold-h) var(--fill, 9%), oklch(1 0 0 / 0.24) var(--fill, 9%)); } /* taste-skill-ignore: slider fill */
.reply-range::-moz-range-track { height: 8px; background: oklch(1 0 0 / 0.24); }
.reply-range::-moz-range-progress { height: 8px; background: var(--gold-h); }
.reply-range::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; background: var(--paper-h); border: 0; border-radius: 0; }
.reply-range::-moz-range-thumb { width: 32px; height: 32px; background: var(--paper-h); border: 0; border-radius: 0; }
.reply-range:active { cursor: grabbing; }

/* More: four plain doors */
.r-more { background: var(--lake-950); color: var(--paper-h); padding-block: clamp(64px, 8vw, 96px) 0; }
.p-home .r-more-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 48px; }
.r-more-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 12px; font-size: var(--step-sub); letter-spacing: -0.015em; line-height: 1.15; }
.r-more-list i { font-size: 0.8em; transition: transform 150ms var(--press); }
@media (hover: hover) and (pointer: fine) { .r-more-list a:hover i { transform: translateX(8px); } }

@media (max-width: 900px) {
  .r-hero { display: flex; flex-direction: column; gap: 24px; justify-content: space-between; }
  .r-book { align-self: center; margin: 0 0 56px; order: 1; }
  .r-book img { height: clamp(200px, 30svh, 320px); }
  .r-hero-foot { order: 2; }
  .r-actions .btn { flex: 1 1 100%; }
  .r-reach-top { display: flex; flex-direction: column; align-items: stretch; }
  .p-home .r-facts { grid-template-columns: 1fr 1fr; }
  .r-mosaic { grid-template-columns: repeat(4, 1fr); }
  .spread { grid-template-columns: minmax(0, 1fr); }
  .page { min-height: 0; }
  .page::before { display: none; }
  .ribbon { left: auto; right: 32px; bottom: auto; height: 96px; }
  .page-r li { max-width: none; }
  .p-home .r-books { grid-template-columns: 1fr 1fr; }
  .r-groups { display: flex; flex-direction: column; }
  .r-groups-photo { aspect-ratio: 4 / 3; min-height: 0; }
  .r-reply { padding-bottom: 340px; }
  .r-reply::after { background: linear-gradient(to bottom, oklch(0.27 0.05 215 / 0.82) 45%, oklch(0.27 0.05 215 / 0.55)); } /* taste-skill-ignore: photo scrim */
  .p-home .r-more-list { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .p-home .brand > span { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .r-hero-bg, .r-hero-foot { animation: none; }
  .p-home .btn:active, .reply-presets button:active { transform: none; }
  .r-book img { transition: none; }
}
