/*
VOICE: a quiet, exact studio with a sense of humour; plain sentences, no sales talk.
IDEA: a curated library shelf. Services are books; each opens an entry in a catalogue list.
PICTURE: a full-width shelf of coloured books of different sizes and typefaces, one facing out with the logo.
COLOUR and TYPE: warm paper, ink, hairline rules; colour lives only in the books. Fraunces for headings, Karla for everything else.
LAYOUT: centred headline over an edge-to-edge shelf; catalogue as ruled rows; deep brown band for contact.
*/

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 300 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 300 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/karla.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
	--paper: #f5f5f2;
	--ink: #161412;
	--muted: #5b5b57;
	--rule: #161412;
	--hair: #d6d6d1;
	--deep: #2a201c;
	--spine: #e8e6df;
	--blue: #2448d8;
	--mustard: #d9a21b;
	--green: #2f6b3c;
	--brown: #6b4529;
	--pink: #f0a8b8;
	--orange: #ee6a2a;
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Karla", "Helvetica Neue", Arial, sans-serif;
	--pad-x: max(20px, 5vw, calc((100% - 1240px) / 2));
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.6 var(--sans);
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

@media (pointer: fine) {
	html, body { cursor: var(--til-cursor, auto) 12 2, auto; }
	a, button { cursor: var(--til-cursor, pointer) 12 2, pointer; }
}

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 300; text-wrap: balance; font-optical-sizing: auto; }
h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.015em; }
h3 { font-size: 24px; line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

.band { padding: clamp(64px, 9vw, 128px) var(--pad-x); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; }
.section-intro { max-width: 46ch; color: var(--muted); }

/* Header */
.site-head {
	position: sticky; top: 0; z-index: 10;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
	padding: 12px var(--pad-x);
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: block; width: 46px; height: 36px; }
.brand-name { font-weight: 500; font-size: 17px; letter-spacing: 0.01em; }
.custom-logo { display: block; height: 40px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; text-decoration: none; font-size: 15px; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.site-nav .nav-contact { border: 1px solid var(--ink); border-radius: 999px; padding: 0 18px; }
.site-nav .nav-contact:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* Hero */
.hero { padding-top: clamp(48px, 7vw, 104px); overflow: hidden; }
.hero-copy { padding: 0 var(--pad-x); text-align: center; }
.hero h1 {
	font-size: clamp(42px, 6.2vw, 92px);
	line-height: 1.02;
	letter-spacing: -0.025em;
	max-width: 14ch;
	margin: 0 auto;
}
.lede { max-width: 44ch; margin: 24px auto 0; font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); }

.shelf-wrap { margin-top: clamp(48px, 6vw, 80px); }
.shelf {
	display: flex; align-items: flex-end; justify-content: center;
	gap: clamp(14px, 1.6vw, 22px);
	height: clamp(230px, 24vw, 320px);
	border-bottom: 1.5px solid var(--rule);
}
.group { position: relative; display: flex; align-items: flex-end; height: 100%; flex: none; }
.filler { display: flex; align-items: flex-end; gap: 0; height: 100%; flex: 1 0 clamp(40px, 6vw, 140px); overflow: hidden; }
.filler-left { justify-content: flex-end; }
.filler .book { flex: none; }

.book {
	position: relative;
	display: flex; align-items: center; justify-content: flex-start;
	height: var(--h); width: var(--w); flex: none;
	background: var(--c); color: var(--on);
	writing-mode: vertical-rl;
	padding: 14px 0;
	text-decoration: none; white-space: nowrap; overflow: hidden;
	transform: rotate(var(--r, 0deg)); transform-origin: 50% 100%;
	transition: transform 220ms cubic-bezier(.2, .7, .2, 1);
	animation: shelve 640ms cubic-bezier(.2, .7, .2, 1) backwards;
	animation-delay: calc(var(--i) * 22ms + 100ms);
}
.book span { overflow: hidden; text-overflow: ellipsis; max-height: 100%; }
.spine-serif { font: italic 400 16px/1 var(--serif); }
.spine-plain { font: 500 14px/1 var(--sans); }
.spine-caps { font: 700 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.mark-bands::before, .mark-bands::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor; opacity: 0.55; }
.mark-bands::before { top: 10px; }
.mark-bands::after { top: 14px; }
.mark-dot::after { content: ""; position: absolute; left: 50%; bottom: 12px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: currentColor; opacity: 0.7; }
a.book:hover, a.book:focus-visible { transform: translateY(-14px) rotate(var(--r, 0deg)); }
a.book:focus-visible { outline-offset: 3px; }

.faceout {
	align-self: flex-end;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	width: clamp(130px, 12vw, 170px); height: 78%; flex: none;
	background: var(--deep); color: var(--spine);
	transform: rotate(-2deg); transform-origin: 50% 100%;
	animation: shelve 640ms cubic-bezier(.2, .7, .2, 1) 240ms backwards;
}
.faceout .brand-mark { width: 64px; height: 50px; }
.faceout span { font: italic 300 18px/1.1 var(--serif); text-align: center; padding: 0 12px; }

.call-label { display: none; }
.call { position: absolute; left: 0; top: calc(100% + 10px); font-size: 12px; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; }
.shelf-note { margin: 48px var(--pad-x) 0; padding-bottom: clamp(48px, 6vw, 80px); font-size: 14px; color: var(--muted); text-align: center; }

@keyframes shelve { from { transform: translateY(105%); } }
@media (prefers-reduced-motion: reduce) {
	.book, .faceout { animation: none; }
	a.book:hover, a.book:focus-visible { transform: rotate(var(--r, 0deg)); }
}

/* Catalogue */
.catalogue { border-top: 1px solid var(--rule); }
.entries { list-style: none; margin: clamp(40px, 5vw, 64px) -16px 0; padding: 0; border-bottom: 1px solid var(--rule); }
.entry {
	display: grid;
	grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 0.9fr) 170px;
	gap: 12px 32px; align-items: baseline;
	padding: 28px 16px;
	border-top: 1px solid var(--rule);
	transition: background-color 240ms, color 240ms;
}
.entry-call { font-size: 13px; color: var(--muted); }
.entry-desc { font-size: 16px; }
.entry-books { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.entry:focus { outline: none; }
.entry:target, .entry.is-open { background: color-mix(in srgb, var(--c, var(--ink)) 16%, var(--paper)); }

/* Approach */
.approach { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); }
.approach-head .section-intro, .process .section-intro { margin-top: 20px; }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; margin: 0; }
.principle { border-top: 1px solid var(--hair); padding-top: 18px; }
.principle dt { font: 400 24px/1.15 var(--serif); letter-spacing: -0.01em; }
.principle dd { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

/* Process */
.process { border-top: 1px solid var(--rule); }
.steps { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.step { position: relative; padding: 24px 20px 0 0; display: flex; flex-direction: column; gap: 8px; }
.step + .step { padding-left: 18px; border-left: 1px solid var(--hair); }
.step-n { font-size: 13px; color: var(--muted); }
.step h3 { font-size: 22px; }
.step p { font-size: 15px; color: var(--muted); }

/* Contact */
.contact { background: var(--deep); color: var(--paper); }
.contact h2 { font-size: clamp(40px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -0.025em; max-width: 15ch; }
.contact-lede { max-width: 48ch; margin-top: 24px; color: #d8d0c6; font-size: 18px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.button {
	display: inline-flex; align-items: center; min-height: 52px; padding: 0 30px;
	background: var(--paper); color: var(--ink); text-decoration: none; font: 500 16px/1 var(--sans);
	border: 1px solid var(--paper); border-radius: 999px;
	transition: background-color 160ms, color 160ms;
}
.button:hover { background: transparent; color: var(--paper); }
.contact :focus-visible { outline-color: var(--paper); }
.contact-detail { font-size: 16px; color: #d8d0c6; text-decoration: none; overflow-wrap: anywhere; }

/* Footer */
.site-foot {
	padding: 22px var(--pad-x);
	background: var(--deep); color: #d8d0c6;
	border-top: 1px solid #4a3d36;
	font-size: 14px;
}
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot :focus-visible { outline-color: var(--paper); }

/* Inner pages */
.page .entry { display: block; max-width: 70ch; border: 0; margin: 0; padding: 0; }
.entry-title { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; margin-bottom: 32px; }
.entry-body img { max-width: 100%; height: auto; }

/* Inner page titles */
.page-title { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -0.025em; }
.entry-title-sm { font: 400 24px/1.15 var(--serif); letter-spacing: -0.01em; }

/* Add to enquiry */
.entry-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.entry-price { font-size: 14px; color: var(--muted); }
.add {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
	font: 500 14px/1 var(--sans); color: var(--ink); background: transparent;
	border: 1px solid var(--ink); border-radius: 999px; transition: background-color 160ms, color 160ms;
}
.add::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.add:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.add .add-on, .add[aria-pressed="true"] .add-off { display: none; }
.add[aria-pressed="true"] .add-on { display: inline; }
.add[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.tray {
	position: fixed; z-index: 30; left: 50%; bottom: 20px; transform: translateX(-50%);
	display: flex; align-items: center; gap: 18px;
	padding: 8px 8px 8px 22px; border-radius: 999px;
	background: var(--deep); color: var(--paper);
	box-shadow: 0 10px 30px rgba(22, 20, 18, 0.25);
	animation: rise 260ms cubic-bezier(.2, .7, .2, 1);
}
.tray[hidden] { display: none; }
.tray-count { font-size: 15px; white-space: nowrap; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }

.button-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); min-height: 44px; padding: 0 22px; }
.button-paper:hover { background: transparent; color: var(--paper); }
.button-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); cursor: pointer; }
.button-ink:hover { background: transparent; color: var(--ink); }

/* Enquiry card */
.enquiry-card {
	width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
	padding: clamp(24px, 4vw, 40px); border: 1px solid var(--ink); border-radius: 4px;
	background: var(--paper); color: var(--ink);
}
.enquiry-card::backdrop { background: rgba(22, 20, 18, 0.5); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card-head h2 { font-size: 36px; }
.card-close { font: 500 14px/1 var(--sans); background: none; border: 0; padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); cursor: pointer; }
.card-intro { margin: 10px 0 24px; color: var(--muted); font-size: 16px; }

/* Form */
.enquiry-form { display: grid; gap: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pick { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pick legend { font-size: 14px; color: var(--muted); margin-bottom: 10px; padding: 0; }
.pick-item { position: relative; }
.pick-item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-item span {
	display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
	border: 1px solid var(--hair); border-radius: 999px; font-size: 14px; transition: background-color 160ms, border-color 160ms;
}
.pick-item span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--c); }
.pick-item input:checked + span { border-color: var(--ink); background: color-mix(in srgb, var(--c) 18%, transparent); }
.pick-item input:checked + span::before { background: var(--c); }
.pick-item input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--muted); }
.opt { color: #8c867e; }
.field input, .field textarea {
	font: 400 16px/1.5 var(--sans); color: var(--ink);
	background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
	padding: 8px 0;
}
.field textarea { border: 1px solid var(--ink); padding: 10px 12px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9a948c; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 1px 0 var(--blue); }
.form-error { font-size: 14px; color: #a3321a; }
.enquiry-form .button { justify-self: start; }

.notice { margin: 0 0 32px; padding: 14px 18px; border: 1px solid var(--ink); font-size: 16px; }
.notice-sent { background: color-mix(in srgb, var(--green) 14%, var(--paper)); }
.notice-error, .notice-missing { background: color-mix(in srgb, var(--orange) 14%, var(--paper)); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.contact-copy .section-intro { margin-top: 20px; }
.details { margin: 40px 0 0; display: grid; gap: 14px; }
.details div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding-top: 14px; border-top: 1px solid var(--hair); }
.details dt { font-size: 14px; color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.site-nav .nav-contact[aria-current="page"] { background: var(--ink); color: var(--paper); text-decoration: none; }

/* Narrow screens */
@media (max-width: 1100px) {
	.entry { grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.4fr); }
	.entry-books { grid-column: 3; }
	.entry-action { grid-column: 2 / -1; flex-direction: row; align-items: center; justify-content: flex-start; }
}
@media (max-width: 900px) {
	.contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
	.shelf-note { margin-top: 12px; }
	.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
	.step:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
	.approach { grid-template-columns: minmax(0, 1fr); }
	.section-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
	.entry { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 24px 16px; }
	.entry-books { grid-column: auto; display: flex; flex-wrap: wrap; gap: 0 16px; }
	.entry-action { grid-column: auto; margin-top: 8px; }
	.fields { grid-template-columns: minmax(0, 1fr); }
	.tray { left: 16px; right: 16px; transform: none; justify-content: space-between; }
	@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.site-nav { width: 100%; margin-left: -12px; flex-wrap: nowrap; }
	.site-nav a { padding: 0 10px; }
	.site-nav .nav-contact { margin-left: auto; }
	.principles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
	.step, .step + .step { padding: 20px 0; border-left: 0; border-top: 1px solid var(--hair); }
	.step:first-child { border-top: 0; }
	.shelf-note { margin-top: 12px; }
}

/* Price cards (v3): one per package. Shown as a list without JS, in a dialog with JS. */
.price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; padding: 0 var(--pad-x) clamp(48px, 6vw, 80px); }
.js .price-list { display: none; }
.pkg { display: flex; flex-direction: column; gap: 10px; padding: 28px; border: 1px solid var(--ink); background: var(--paper); }
.pkg-swatch { width: 72px; height: 8px; background: var(--c, var(--ink)); margin-bottom: 6px; }
.pkg-title { font-size: 30px; line-height: 1.1; font-weight: 400; }
.pkg-price { font: 300 clamp(40px, 5vw, 56px)/1 var(--serif); letter-spacing: -0.02em; margin-top: 6px; }
.pkg-per { font-size: 15px; color: var(--muted); }
.pkg-desc { font-size: 16px; margin-top: 8px; }
.pkg-includes { margin: 4px 0 0; padding-left: 20px; font-size: 15px; color: var(--muted); line-height: 1.7; }
.pkg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.text-link { font: 500 15px/1 var(--sans); color: var(--ink); background: none; border: 0; padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.card-dialog {
	width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto;
	padding: 0; border: 0; border-radius: 4px; background: var(--paper); color: var(--ink);
	box-shadow: 0 24px 60px rgba(22, 20, 18, 0.3);
	border-top: 10px solid var(--c, var(--ink));
}
.card-dialog::backdrop { background: rgba(22, 20, 18, 0.55); }
.card-dialog[open] { animation: card-in 260ms cubic-bezier(.2, .7, .2, 1); }
@keyframes card-in { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .card-dialog[open] { animation: none; } }
.card-dialog .card-close { position: absolute; top: 14px; right: 20px; }
.card-dialog .pkg { border: 0; padding: clamp(28px, 5vw, 44px); background: transparent; }
.card-dialog .pkg-swatch { display: none; }
.card-dialog .pkg-title:focus { outline: none; }
.card-form { padding: clamp(28px, 5vw, 44px); }
.card-form-title { font-size: 32px; font-weight: 300; }
.card-form .card-intro { margin: 8px 0 22px; }
.card-form .pick-item span::before { border-color: var(--ink); }
.card-form .pick-item input:checked + span { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.card-form .pick-item input:checked + span::before { background: var(--ink); }

/* Realistic books: linen-bound spines (a woven thread texture), a rounded spine
   (light on the left, shade on the right), titles pressed into the cloth,
   and a soft shadow where each book meets the shelf. */
:root {
	--linen: url("../img/linen.png");
}
.book {
	background-color: var(--c);
	background-image:
		linear-gradient(90deg,
			rgba(0,0,0,.28) 0%, rgba(0,0,0,.06) 7%, rgba(255,255,255,.14) 20%, rgba(255,255,255,.04) 34%,
			rgba(0,0,0,0) 55%, rgba(0,0,0,.08) 80%, rgba(0,0,0,.3) 100%),
		linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,0) 12%, rgba(0,0,0,0) 85%, rgba(0,0,0,.14)),
		var(--linen);
	background-size: 100% 100%, 100% 100%, 256px 256px;
	background-blend-mode: normal, normal, soft-light;
	border-radius: 3px 3px 1px 1px;
	box-shadow: 1px 0 0 rgba(0,0,0,.22), 3px 1px 6px -2px rgba(0,0,0,.35);
}
/* Pressed-in titles: ink sinks into the cloth, with a shadow on the upper edge and a catch of light below. */
.book span, .faceout span {
	color: color-mix(in srgb, var(--on, var(--spine)) 78%, var(--c, var(--deep)));
	text-shadow: -1px -1px 0 rgba(0,0,0,.38), 1px 1px 0 rgba(255,255,255,.22);
}
.mark-bands::before, .mark-bands::after, .mark-dot::after { box-shadow: 1px 1px 0 rgba(255,255,255,.2), -1px -1px 0 rgba(0,0,0,.25); }
.faceout .brand-mark { opacity: .82; filter: drop-shadow(-1px -1px 0 rgba(0,0,0,.45)) drop-shadow(1px 1px 0 rgba(255,255,255,.18)); }
.faceout {
	background-color: var(--deep);
	background-image:
		linear-gradient(90deg, rgba(0,0,0,.45) 0, rgba(255,255,255,.12) 5px, rgba(0,0,0,.25) 9px, rgba(0,0,0,0) 14px),
		linear-gradient(160deg, rgba(255,255,255,.08), rgba(0,0,0,0) 45%, rgba(0,0,0,.2)),
		var(--linen);
	background-size: 100% 100%, 100% 100%, 256px 256px;
	background-blend-mode: normal, normal, soft-light;
	border-radius: 2px 4px 4px 2px;
	box-shadow: 6px 4px 14px -4px rgba(0,0,0,.45);
}
.shelf { position: relative; box-shadow: 0 10px 18px -12px rgba(0,0,0,.45); }

/* Paper grain over the whole page so the white reads as paper, not screen. */
body::after {
	content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .16; mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .4 0 0 0 0 .4 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Footer row and privacy note */
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.privacy { margin-top: 14px; border-top: 1px solid #4a3d36; padding-top: 14px; }
.privacy summary { cursor: pointer; width: max-content; }
.privacy summary:hover { text-decoration: underline; }
.privacy-body { max-width: 62ch; padding: 6px 0 10px; line-height: 1.6; }
.privacy-body p + p { margin-top: 10px; }
.privacy-body a { text-decoration: underline; text-underline-offset: 3px; }
.form-privacy { font-size: 13px; color: var(--muted); margin-top: -8px; }
.form-privacy a { color: var(--ink); text-underline-offset: 3px; }

/* Phones and tablets: one shelf per group, stacked, so nothing scrolls sideways. */
@media (max-width: 1000px) {
	.shelf-wrap { margin-top: 40px; }
	.shelf {
		flex-direction: column; align-items: stretch; justify-content: flex-start;
		gap: 0; height: auto; border-bottom: 0; box-shadow: none;
		padding: 0 var(--pad-x);
	}
	.filler { display: none; }
	.group {
		height: 224px; padding: 0 4px; gap: 0;
		border-bottom: 1.5px solid var(--rule);
		box-shadow: 0 10px 16px -12px rgba(0,0,0,.4);
		margin-bottom: 30px;
	}
	.group .book { width: max(var(--w), 36px); height: max(var(--h), 84%); }
	.group .book.mark-dot::after { bottom: 8px; width: 5px; height: 5px; margin-left: -2.5px; }
	.group .book { padding-bottom: 20px; }
	.group .spine-plain { font-size: 13px; }
	.group .spine-serif { font-size: 15px; }
	.call {
		position: static; order: 2; margin-left: auto; align-self: flex-end;
		padding: 0 0 10px 16px; text-align: right; white-space: normal; max-width: 9em; line-height: 1.35;
	}
	.call-label { display: block; color: var(--ink); font-size: 14px; }
	.faceout { position: relative; height: 160px; width: 124px; margin: 0 auto 30px; gap: 10px; overflow: visible; transform: none; animation-name: shelve-flat; }
	.faceout::after {
		content: ""; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
		width: calc(100vw - 2 * max(20px, 5vw)); height: 1.5px; background: var(--rule);
		box-shadow: 0 10px 16px -12px rgba(0,0,0,.4);
	}
	.faceout .brand-mark { width: 50px; height: 40px; }
	.faceout span { font-size: 15px; }
	.shelf-note { margin-top: 0; }
}
@keyframes shelve-flat { from { transform: translateY(40px); opacity: 0; } }
