/*
Theme Name: Eerste Zin
Theme URI: https://secrets2discover.com
Author: Kim (Secrets2Discover)
Description: Website voor schrijfster Brigitte Kok. Een roulette van eerste zinnen, een polaroid, een boekenkast om doorheen te scrollen, boeken met popup en directe PDF-verkoop via WooCommerce, blog, Instagram/Facebook en bedankmails in dezelfde stijl. Alles aan te passen via Weergave > Customizer.
Version: 1.3.1
Requires at least: 6.3
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: eerstezin
*/

/* ==========================================================
   Tokens (colors are overwritten from the Customizer)
   ========================================================== */
:root {
	--night: #2B1D24;      /* late evening, reading lamp on */
	--accent: #A8475B;     /* wine: the red thread */
	--bg: #F1E9E4;         /* old paper */
	--sage: #7E9A84;       /* the trees she saves */
	--glow: #D4A04C;       /* lamplight */
	--ink: #2E2328;
	--muted: #6E5F66;
	--line: #E0D2CB;
	--paper: #FBF7F4;
	--on-night: #F2E9E6;
	--on-night-soft: #C3B1B5;

	--serif: "Literata", Georgia, serif;
	--sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	--script: "Parisienne", "Snell Roundhand", cursive;
	--hand: "Caveat", "Bradley Hand", cursive;

	--wrap: 1160px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--space: clamp(4.5rem, 10vw, 8rem);
	--radius: 14px;
}

/* ==========================================================
   Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.125rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--night); margin: 0 0 .6em; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--prose { max-width: calc(44rem + 2 * var(--gutter)); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }

/* Paper grain (Customizer > Kleuren & sfeer) */
body.has-grain::after {
	content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .08; mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Handwritten bits */
.hand-note {
	display: inline-flex; align-items: flex-start; gap: .3rem;
	font-family: var(--hand); font-size: 1.55rem; line-height: 1.1; color: var(--accent);
}
.hand-arrow { width: 52px; height: 36px; flex: none; }
.hand-arrow path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .95em 1.7em; border-radius: 999px; border: 1.5px solid var(--accent);
	background: var(--accent); color: #fff; text-decoration: none;
	font: 600 1rem/1 var(--sans); letter-spacing: .01em; cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 82%, #000); border-color: color-mix(in srgb, var(--accent) 82%, #000); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

.link-btn {
	background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent);
	font: 600 1rem var(--sans); text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px;
}
.link-btn:hover { text-decoration-thickness: 2px; }

/* ==========================================================
   Header
   ========================================================== */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5.5rem; }
.brand__name {
	font-family: var(--script); font-weight: 400; font-size: 2.3rem; line-height: 1;
	color: var(--night); text-decoration: none; letter-spacing: 0; padding-top: .2em;
}
.brand .custom-logo { max-height: 3rem; width: auto; }

.site-nav .nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; }
.site-nav a { color: inherit; text-decoration: none; font-weight: 500; font-size: 1rem; padding-block: .3rem; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { border-bottom-color: currentColor; }

.site-header--over-hero { position: absolute; inset: 0 0 auto; background: transparent; border-bottom-color: transparent; color: var(--on-night); }
.site-header--over-hero .brand__name { color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: .75rem; margin-right: -.75rem; color: inherit; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 24px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--night); color: var(--on-night); padding: 1rem var(--gutter) 2rem; display: none; }
	.site-nav.is-open { display: block; }
	.site-nav .nav-list { flex-direction: column; gap: 0; }
	.site-nav a { display: block; padding: .9rem 0; font-family: var(--serif); font-size: 1.5rem; font-style: italic; border: 0; }
}

/* ==========================================================
   Hero: the roulette of first sentences
   ========================================================== */
.hero {
	position: relative;
	min-height: 100svh;
	display: flex; align-items: center;
	padding: 8rem 0 9rem;
	background-color: var(--night);
	background-image:
		radial-gradient(60rem 40rem at 8% -10%, color-mix(in srgb, var(--glow) 26%, transparent), transparent 70%),
		linear-gradient(color-mix(in srgb, var(--night) 86%, transparent), color-mix(in srgb, var(--night) 94%, transparent)),
		var(--hero-image, none);
	background-size: auto, cover, cover; background-position: center;
	color: var(--on-night);
}
.hero__inner {
	position: relative; z-index: 2;
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: clamp(3rem, 6vw, 6rem); align-items: center;
}

.hero__quote { margin: 0; }
.hero__sentence {
	display: grid; margin: 0;
	font-family: var(--serif); font-style: italic; font-weight: 400;
	font-size: clamp(2rem, 4.4vw, 3.9rem); line-height: 1.16; letter-spacing: -.015em; color: #fff;
	text-wrap: balance;
}
.hero__live, .hero__sizer { grid-area: 1 / 1; align-self: end; }
.hero__sizer { visibility: hidden; }
.hero__live .is-rolling { color: var(--glow); opacity: .75; }

.hero__source { margin-top: 1.6rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-style: normal; }
.hero__source-label { font-family: var(--hand); font-size: 1.55rem; color: var(--on-night-soft); }
.hero__source-link { font-family: var(--serif); font-size: 1.15rem; color: #fff; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.hero__source-link cite { font-style: normal; }
.hero__source { transition: opacity .35s; }
.hero__source.is-hidden { opacity: 0; }

/* Roulette controls: next, pause, and a thin red thread that fills up */
.roulette__controls { display: flex; align-items: center; gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); max-width: 30rem; }
.roulette__timer { flex: 1; height: 2px; background: rgba(255, 255, 255, .14); border-radius: 2px; overflow: hidden; }
.roulette__timer span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.roulette.is-paused .roulette__timer span { background: var(--on-night-soft); }
.roulette__next {
	flex: none; background: none; border: 0; padding: .4rem 0; cursor: pointer; color: #fff;
	font: 600 1rem var(--sans); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .35em; text-decoration-thickness: 2px;
}
.roulette__next:hover { color: var(--glow); }
.roulette__pause {
	flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .3);
	background: none; color: #fff; display: grid; place-items: center; cursor: pointer;
}
.roulette__pause:hover { border-color: #fff; }
.roulette__pause .i-play, .roulette.is-paused .roulette__pause .i-pause { display: none; }
.roulette.is-paused .roulette__pause .i-play { display: block; }

/* Hello + polaroid */
.hero__me { display: grid; justify-items: start; gap: 2rem; }
.polaroid {
	position: relative; margin: 0; display: block; width: min(15rem, 70vw);
	padding: .8rem .8rem 0; background: #FFFDF9; color: var(--ink); text-decoration: none;
	rotate: 3deg; box-shadow: 0 2px 3px rgba(0, 0, 0, .25), 0 28px 40px -18px rgba(0, 0, 0, .65);
	transition: rotate .4s cubic-bezier(.2, .8, .2, 1);
}
.polaroid:hover { rotate: 0deg; }
.polaroid__img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #E9DED8; }
.polaroid__img--empty { display: grid; place-items: center; font-family: var(--hand); font-size: 2rem; color: var(--muted); border: 2px dashed var(--line); }
.polaroid__note { display: block; padding: .55rem 0 .7rem; text-align: center; font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.tape {
	position: absolute; top: -.85rem; left: 50%; width: 6rem; height: 1.6rem; translate: -50% 0; rotate: -4deg; z-index: 2;
	background: color-mix(in srgb, var(--glow) 55%, #fff); opacity: .85;
	clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 45%);
}
.hero__hello { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; line-height: 1.35; color: #fff; margin: 0 0 .45rem; letter-spacing: 0; }
.hero__intro { color: var(--on-night-soft); margin-bottom: 1.6rem; max-width: 24rem; }

/* The red thread: drawn once on load */
.thread { position: absolute; left: 0; right: 0; bottom: -80px; width: 100%; height: 200px; z-index: 3; pointer-events: none; }
.thread path { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ez-draw 2.6s .4s cubic-bezier(.6, .1, .3, 1) forwards; }
@keyframes ez-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
	.hero { min-height: 0; padding: 7.5rem 0 7rem; }
	.hero__inner { grid-template-columns: 1fr; }
	.hero__me { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.5rem; }
	.polaroid { width: 8.5rem; padding: .5rem .5rem 0; }
	.polaroid__note { font-size: 1.2rem; padding: .35rem 0 .45rem; }
	.tape { width: 4rem; height: 1.1rem; top: -.6rem; }
	.thread { height: 120px; bottom: -50px; }
}
@media (max-width: 480px) {
	.hero__me { grid-template-columns: 1fr; }
}

/* ==========================================================
   Sections
   ========================================================== */
.section { padding-block: var(--space); position: relative; }
.section--tight { padding-top: 0; }
.section__head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.section__intro { color: var(--muted); font-size: 1.15rem; margin: 0; }
.section__more { margin: 3rem 0 0; }
.empty-note { padding: 1.5rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.prose { max-width: 65ch; }
.prose p, .prose li { line-height: 1.75; }
.prose h2 { font-size: 2rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.5rem; margin-top: 2em; }
.prose blockquote { margin: 2em 0; padding-left: 1.3em; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 1.3em; line-height: 1.45; color: var(--night); }
.prose img { border-radius: var(--radius); }
.prose--letter p { font-family: var(--serif); font-size: 1.12rem; }

/* About: a letter on the desk */
.about__grid { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); grid-template-areas: "text side"; align-items: start; }
.about__grid.has-photo { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); grid-template-areas: "photo text" "side text"; }
.about__photo { grid-area: photo; margin: 0; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--radius) var(--radius); }
.about__text {
	grid-area: text; position: relative;
	background: var(--paper); padding: clamp(2rem, 5vw, 3.5rem); border-radius: 4px;
	box-shadow: 0 1px 2px rgba(43, 29, 36, .08), 0 24px 40px -28px rgba(43, 29, 36, .45);
	rotate: -.6deg;
}
.about__text::before {
	content: ""; position: absolute; top: -.8rem; left: 2.5rem; width: 6.5rem; height: 1.6rem; rotate: -5deg;
	background: color-mix(in srgb, var(--sage) 45%, #fff); opacity: .85;
	clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 45%);
}
.signature { font-family: var(--script); font-size: 3.2rem; line-height: 1; color: var(--accent); margin: 1.2rem 0 0; rotate: -4deg; transform-origin: left; }
.about__side { grid-area: side; display: grid; gap: 2rem; padding-top: clamp(0rem, 6vw, 5rem); }
.about__quote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.25; color: var(--night); }
.hand-note--about { display: block; color: var(--accent); rotate: -2deg; font-size: 1.45rem; line-height: 1.25; max-width: 22rem; }
@media (max-width: 860px) {
	.about__grid, .about__grid.has-photo { grid-template-columns: 1fr; grid-template-areas: "photo" "text" "side"; }
	.about__photo { max-width: 22rem; }
	.about__side { padding-top: 0; }
}

/* ==========================================================
   The bookshelf (carousel)
   ========================================================== */
.shelf-section {
	background-color: var(--night);
	background-image:
		radial-gradient(48rem 30rem at 50% 38%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%);
	color: var(--on-night);
	overflow: hidden;
}
.shelf-section .section__title { color: #fff; }
.shelf-section .section__intro { color: var(--on-night-soft); }
.shelf-section .leaf-note { color: var(--on-night-soft); border-top-color: rgba(255, 255, 255, .12); }

.carousel { --w: clamp(170px, 24vw, 270px); --t: 26px; --cover-top: 4rem; position: relative; }
/* one long shelf; the books slide along it */
.carousel::before {
	content: ""; position: absolute; left: 0; right: 0; z-index: 0; height: 16px;
	top: calc(var(--cover-top) + var(--w) * 1.5 - 2px);
	background: linear-gradient(#6B4A3C, #4A3129 55%, #2E1D19);
	box-shadow: 0 3px 0 rgba(255, 220, 180, .15) inset, 0 22px 34px -8px rgba(0, 0, 0, .6);
}
.carousel__track {
	--slide: min(980px, 86vw);
	display: flex; overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-behavior: smooth;
	padding-inline: calc((100% - var(--slide)) / 2);
	scrollbar-width: none; cursor: grab; position: relative; z-index: 1;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carousel__track:focus-visible { outline-offset: -4px; }

.slide {
	flex: 0 0 var(--slide); scroll-snap-align: center;
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start;
	gap: 0 clamp(2rem, 5vw, 4.5rem); padding-block: 2rem 1rem;
	opacity: .38; transition: opacity .5s;
}
.slide.is-active { opacity: 1; }

.slide__stage { position: relative; display: grid; justify-items: center; padding: 2rem 0 0; perspective: 1400px; }
.slide__text { align-self: center; padding-bottom: 2.5rem; }

/* 3D book. --w = cover width, --t = thickness */
.book3d {
	position: relative; z-index: 1; width: var(--w); height: calc(var(--w) * 1.5);
	padding: 0; border: 0; background: none; cursor: pointer;
	transform-style: preserve-3d; transform: rotateY(-24deg);
	transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.slide:not(.is-active) .book3d { transform: rotateY(-38deg); }
.book3d:hover, .book3d:focus-visible { transform: rotateY(-6deg) translateY(-6px); }
.book3d__body { position: absolute; inset: 0; transform-style: preserve-3d; }
.book3d__front {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	transform: translateZ(calc(var(--t) / 2)); border-radius: 1px 4px 4px 1px;
	box-shadow: inset 4px 0 6px -3px rgba(255, 255, 255, .3);
}
.book3d__front--plain { display: grid; place-items: center; padding: 1.5rem; background: var(--accent); color: #fff; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
.book3d__body::before { /* pages */
	content: ""; position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--t);
	transform: translateX(calc(var(--w) - var(--t) / 2 - 3px)) rotateY(90deg);
	background: repeating-linear-gradient(90deg, #FFFDF8 0 2px, #E8DDD2 2px 3px);
}
.book3d__body::after { /* back cover + shadow */
	content: ""; position: absolute; inset: 0;
	transform: translateZ(calc(var(--t) / -2)); border-radius: 1px 4px 4px 1px;
	background: #1E1418; box-shadow: -18px 10px 40px 4px rgba(0, 0, 0, .55);
}

.slide__text { padding-block: 1rem; max-width: 34rem; }
.slide__title { font-size: clamp(2rem, 3.6vw, 3rem); color: #fff; margin-bottom: 1rem; }
.slide__sentence {
	position: relative; font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.45; color: var(--on-night);
	padding-left: 1.2rem; border-left: 2px solid var(--glow); margin-bottom: 1.3rem;
}
.slide__teaser { color: var(--on-night-soft); margin-bottom: 1.8rem; }
.slide__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.slide__actions .link-btn { color: var(--on-night); }
.slide__price { font-family: var(--hand); font-size: 1.9rem; line-height: 1; color: var(--glow); rotate: -4deg; }
.slide__price del { opacity: .6; font-size: .8em; margin-right: .2em; }
.slide__price ins { text-decoration: none; }

.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2.5rem; }
.carousel__arrow {
	width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .3);
	background: none; color: #fff; font-size: 1.25rem; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.carousel__arrow:hover { background: #fff; border-color: #fff; color: var(--night); }
.carousel__arrow:disabled { opacity: .3; pointer-events: none; }
.carousel__dots { display: flex; gap: .55rem; }
.carousel__dot { width: .65rem; height: .65rem; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .3); cursor: pointer; transition: width .3s, background-color .3s; }
.carousel__dot.is-active { width: 2rem; background: var(--glow); }

.leaf-note { display: flex; align-items: center; gap: .6rem; color: var(--muted); margin: 0; }
.leaf-note svg { color: var(--sage); flex: none; }
.leaf-note--books { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
	.carousel { --w: 50vw; --t: 20px; --cover-top: 3rem; }
	.carousel__track { --slide: 84vw; }
	.slide { grid-template-columns: 1fr; padding-top: 1rem; }
	.slide__text { padding-top: 2.6rem; padding-bottom: 0; }
	.slide__title { font-size: 2rem; }
	.slide__sentence { font-size: 1.15rem; }
}

/* ==========================================================
   Social
   ========================================================== */
.social-block { background: var(--paper); }
.feed { margin-bottom: 2.5rem; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.social__link { display: inline-flex; align-items: center; gap: .55rem; padding: .8em 1.4em; border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); text-decoration: none; font-weight: 600; transition: background-color .2s, color .2s; }
.social__link:hover { background: var(--accent); color: #fff; }
.social--small .social__link { padding: .55rem; border-color: var(--on-night-soft); color: var(--on-night); }
.social--small .social__link:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }

/* ==========================================================
   Pages, posts, shop
   ========================================================== */
.page-head { padding-bottom: clamp(2rem, 4vw, 3rem); }
.page-title { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 1rem; }
.entry__date { display: block; font-family: var(--hand); font-size: 1.5rem; color: var(--accent); margin-bottom: .6rem; }
.entry__image { margin: 0 auto clamp(2rem, 5vw, 4rem); }
.entry__image img { width: 100%; border-radius: var(--radius); }
.entry__content { padding-bottom: var(--space); }
.single .entry__content p { font-family: var(--serif); }
.entry__content > * + h2 { margin-top: 2em; }
.entry__nav { padding-bottom: var(--space); }
.entry__nav .nav-links { display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.entry__nav a { text-decoration: none; color: var(--night); font-family: var(--serif); font-size: 1.2rem; }
.entry__nav a span { display: block; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.entry__nav .nav-next { text-align: right; margin-left: auto; }

.book__sentence { font-family: var(--serif); font-style: italic; font-size: 1.1rem; line-height: 1.45; color: var(--ink); margin-bottom: .8rem; }
.linked-book { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 2rem; align-items: start; margin-bottom: var(--space); padding-top: 2.5rem; border-top: 2px solid var(--accent); }
.linked-book__cover img { box-shadow: 0 18px 28px -14px rgba(43, 29, 36, .5); border-radius: 2px 5px 5px 2px; }
.linked-book__label { font-family: var(--hand); font-size: 1.5rem; color: var(--accent); margin: 0 0 .1rem; }
.linked-book__title { font-size: 1.9rem; margin-bottom: .6rem; }
.linked-book__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (max-width: 560px) { .linked-book { grid-template-columns: 1fr; } .linked-book__cover { max-width: 9rem; } }

.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: var(--night); }
.pagination .page-numbers.current { background: var(--night); color: #fff; }

.shop-wrap { padding-bottom: var(--space); }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button,
.wc-block-components-button:not(.is-link), .wp-element-button {
	background: var(--accent) !important; color: #fff !important; border-radius: 999px !important; font-family: var(--sans) !important; font-weight: 600 !important;
}
.wc-block-components-title, .woocommerce h2, .woocommerce h3 { font-family: var(--serif); font-weight: 500; }
.ez-consent { font-size: .95rem; }

.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--night); color: var(--on-night); padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.site-footer a { color: var(--on-night); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; }
.site-footer .brand__name { color: #fff; font-size: 3rem; display: inline-block; margin-bottom: .8rem; }
.site-footer .leaf-note { color: var(--on-night-soft); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-start; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-list a { text-decoration: none; }
.footer-list a:hover { text-decoration: underline; }
.site-footer__bottom { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); color: var(--on-night-soft); font-size: .9rem; }
.site-footer__bottom p { margin: 0; }

/* ==========================================================
   Book popup
   ========================================================== */
.book-modal {
	width: min(980px, calc(100% - 2rem)); max-height: min(92svh, 860px);
	padding: 0; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink);
	box-shadow: 0 40px 80px -30px rgba(20, 12, 16, .6); overflow: auto; overscroll-behavior: contain;
}
.book-modal::backdrop { background: color-mix(in srgb, var(--night) 78%, transparent); backdrop-filter: blur(3px); }
.book-modal[open] .bm { animation: ez-open .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes ez-open { from { opacity: 0; transform: translateY(14px); } }
.book-modal__close {
	position: sticky; top: .8rem; display: grid; place-items: center; margin: .8rem .8rem -3.6rem auto; z-index: 5;
	width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: var(--paper); color: var(--night); cursor: pointer; box-shadow: 0 2px 10px rgba(43, 29, 36, .15);
}

.bm { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.bm__gallery { background: var(--bg); padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.bm__stage { position: relative; width: 100%; max-width: 330px; aspect-ratio: 2 / 3; }
.bm__stage img, .bm__stage .book__placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.bm__stage img { filter: drop-shadow(0 20px 22px rgba(43, 29, 36, .35)); }
.bm__stage img.is-active, .bm__stage .book__placeholder { opacity: 1; }
.book__placeholder { display: grid; place-items: center; padding: 1.5rem; background: var(--accent); color: #fff; text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
.bm__tabs { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.bm__tab { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .5em 1.1em; font: 500 .9rem var(--sans); cursor: pointer; }
.bm__tab.is-active { background: var(--night); border-color: var(--night); color: #fff; }

.bm__info { padding: clamp(1.75rem, 4vw, 3.25rem); }
.bm__title { font-size: clamp(2rem, 4vw, 2.8rem); padding-right: 2.5rem; }
.bm__sentence { font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.4; color: var(--accent); margin-bottom: 1.6rem; }
.bm__desc { font-size: 1.05rem; }
.bm__desc p { font-family: var(--serif); }
.bm__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin: 2rem 0 1rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.bm__price { font-family: var(--hand); font-size: 2rem; line-height: 1; color: var(--accent); }
.bm__price ins { text-decoration: none; }
.bm__small { color: var(--muted); font-size: .92rem; margin: 0; }

@media (max-width: 760px) {
	.book-modal { width: 100%; max-width: 100%; max-height: 100svh; height: 100svh; border-radius: 0; margin: 0; }
	.bm { grid-template-columns: 1fr; }
	.bm__stage { max-width: 240px; }
}

/* ==========================================================
   Less motion for people who asked for it
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.carousel__track { scroll-behavior: auto; }
	.thread path { stroke-dashoffset: 0; }
}
