/*
 * Blood Code — immersive cover-reveal page.
 * Palette sampled directly from the book cover.
 */

.bc {
	/* Sampled from Blood_Code.png */
	--void: #060102;
	--ink: #0d0304;
	--blood-deep: #300203;
	--blood: #9c0e0d;
	--crimson: #e1231f;
	--ember: #ff4a3d;
	--bone: #f3ece6;
	--ash: #9a8b88;

	--display: "Oswald", "Helvetica Neue", Impact, sans-serif;
	--cover: "Bebas Neue", "Oswald", Impact, sans-serif; /* closest free match to the cover's title face */
	--serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--gut: clamp(1.25rem, 5vw, 3rem);
	--beat: clamp(3.25rem, 9vh, 5.5rem); /* vertical rhythm between story beats; kept tight so the story reads in a few flicks */

	position: relative;
	background: var(--void);
	color: var(--bone);
	font-family: var(--serif);
	font-size: clamp(1.0625rem, 0.55vw + 0.95rem, 1.25rem);
	line-height: 1.7;
	overflow-x: clip;
}

.bc *,
.bc *::before,
.bc *::after {
	box-sizing: border-box;
}

:where(.bc) :where(p, h1, h2, h3, blockquote, figure, dl, dd, ol, ul) {
	margin: 0;
	padding: 0;
}

:where(.bc) :where(ol, ul) {
	list-style: none;
}

.bc section {
	position: relative;
	padding-inline: var(--gut);
}

/* ── Scroll trail ─────────────────────────────────────────────────────── */

.bc-trail {
	position: fixed;
	inset-block: 0;
	right: 0;
	width: 3px;
	background: rgb(255 255 255 / 6%);
	z-index: 40;
}

.bc-trail__fill {
	display: block;
	width: 100%;
	height: 0;
	background: linear-gradient(180deg, var(--blood), var(--crimson) 70%, var(--ember));
	box-shadow: 0 0 12px rgb(225 35 31 / 70%);
}

.bc-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 50;
	padding: 0.75rem 1.25rem;
	background: var(--crimson);
	color: #fff;
	font-family: var(--display);
	text-decoration: none;
}

.bc-skip:focus {
	left: 0;
}

/* ── Shared type ──────────────────────────────────────────────────────── */

.bc-kicker,
.bc-label {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(0.7rem, 1.6vw, 0.8rem);
	letter-spacing: 0.42em;
	text-transform: uppercase;
	color: var(--crimson);
}

.bc-label--dim {
	color: var(--ash);
	letter-spacing: 0.3em;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.bc-hero {
	min-height: 100svh;
	display: grid;
	grid-template-rows: 1fr auto;
	place-items: center;
	padding-block: clamp(1.5rem, 5vh, 3.5rem) 1.25rem;
	text-align: center;
	overflow: hidden;
}

.bc-atmos {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bc-atmos__roses {
	position: absolute;
	inset-block: -12%;
	width: min(46vw, 30rem);
	background-size: cover;
	background-position: center;
	mix-blend-mode: screen;
	opacity: 0.62;
	filter: blur(1px) saturate(1.9) brightness(1.18) contrast(1.1);
	will-change: transform;

	/* Without a mask these read as two rectangles pasted over the black. */
	-webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 48%, #000 18%, transparent 76%);
	mask-image: radial-gradient(ellipse 72% 62% at 50% 48%, #000 18%, transparent 76%);
}

.bc-atmos__roses--l {
	left: -8%;
	transform: translateY(calc(var(--scroll, 0) * -40px));
}

.bc-atmos__roses--r {
	right: -8%;
	scale: -1 1;
	opacity: 0.44;
	transform: translateY(calc(var(--scroll, 0) * -70px));
}

.bc-atmos__vignette {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 55% at 50% 45%, transparent 0%, rgb(6 1 2 / 72%) 65%, var(--void) 100%),
		linear-gradient(180deg, rgb(6 1 2 / 85%) 0%, transparent 22% 70%, var(--void) 100%);
}

.bc-atmos__grain {
	position: absolute;
	inset: 0;
	opacity: 0.22;
	-webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

/*
 * Everything a reader needs is on the first screen: the title, the book, the
 * hook and the pre-order button. On wide screens the book sits beside the
 * title and the pitch; on phones they stack title, book, pitch.
 */
.bc-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 76rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
	grid-template-areas:
		"copy  book"
		"pitch book";
	column-gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
	text-align: left;
}

.bc-hero__copy  { grid-area: copy;  align-self: end; }
.bc-hero__pitch { grid-area: pitch; align-self: start; }

.bc-title {
	font-family: var(--cover);
	font-weight: 400;
	font-size: clamp(4.2rem, 11vw, 9.5rem);
	line-height: 0.88;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin-block: 0.9rem 1.1rem;
}

/*
 * The cover's lettering: coral on BLOOD fading to pale pink on CODE, eaten
 * through with rust. The speckle layer sits over the colour and both are
 * clipped to the letters.
 */
.bc-title__l,
.bc-reveal__title {
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.05 0 0 0 0 0.05 3.2 0 0 0 -1.55'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23r)'/%3E%3C/svg%3E"),
		linear-gradient(180deg, #d4574c 0%, #df7a6f 45%, #e8aca3 78%, #ecc0b8 100%);
	background-size: 220px 220px, 100% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 0 28px rgb(225 35 31 / 28%));
}

.bc-title__l {
	display: block;
}

/* The two words share one gradient, as on the cover, not one each. */
.bc-title__l:first-child { background-size: 220px 220px, 100% 200%; background-position: 0 0, 0 0; }
.bc-title__l:last-child  { background-size: 220px 220px, 100% 200%; background-position: 40px 90px, 0 100%; }

.bc-byline {
	font-family: var(--display);
	font-weight: 300;
	font-size: clamp(0.85rem, 2.4vw, 1.05rem);
	letter-spacing: 0.44em;
	text-transform: uppercase;
	color: rgb(243 236 230 / 62%);
}

.bc-hero__line {
	margin-top: 0.5rem;
	font-size: clamp(1.15rem, 0.8vw + 1rem, 1.5rem);
	font-style: italic;
	color: rgb(243 236 230 / 76%);
}

.bc-hero__good {
	margin-top: 0.6rem;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(1.6rem, 5vw, 2.4rem);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--crimson);
	text-shadow: 0 0 34px rgb(225 35 31 / 55%);
}

.bc-cue {
	position: relative;
	z-index: 1;
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--display);
	font-size: 0.68rem;
	font-weight: 300;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: rgb(243 236 230 / 45%);
}

.bc-cue svg {
	animation: bc-drift 2.4s ease-in-out infinite;
}

@keyframes bc-drift {
	0%, 100% { transform: translateY(0); opacity: 0.5; }
	50%      { transform: translateY(7px); opacity: 1; }
}

.bc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.25rem;
	margin-top: clamp(1.1rem, 3vh, 1.75rem);
}

.bc-hero__date {
	font-family: var(--display);
	font-weight: 300;
	font-size: 0.72rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: rgb(243 236 230 / 55%);
}

/* ── The 3D book ──────────────────────────────────────────────────────── */

.bc-book {
	grid-area: book;
	position: relative;
	justify-self: center;
	width: 100%;
	height: min(78svh, 44rem);
	cursor: grab;
	touch-action: pan-y pinch-zoom; /* sideways drags spin the book, vertical ones still scroll the page */
}

.bc-book:active { cursor: grabbing; }

.bc-book::before {
	/* Red light pooling under the book. */
	content: "";
	position: absolute;
	inset: 18% 8% -4%;
	background: radial-gradient(ellipse 50% 40% at 50% 62%, rgb(225 35 31 / 34%), transparent 70%);
	filter: blur(18px);
	pointer-events: none;
}

.bc-book__flat {
	position: absolute;
	inset: 0;
	margin: auto;
	height: 82%;
	width: auto;
	max-width: 90%;
	object-fit: contain;
	box-shadow: 0 30px 70px rgb(0 0 0 / 75%);
	transition: opacity 0.4s ease;
}

.bc-book__canvas {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.bc-book__canvas canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.bc-book.is-ready .bc-book__canvas { opacity: 1; }
.bc-book.is-ready .bc-book__flat   { opacity: 0; }

.bc-book__toggle {
	position: absolute;
	z-index: 2;
	right: 0.25rem;
	bottom: 0.5rem;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgb(243 236 230 / 22%);
	border-radius: 50%;
	background: rgb(6 1 2 / 70%);
	color: rgb(243 236 230 / 70%);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease, color 0.2s ease, border-color 0.2s ease;
}

.bc-book.is-ready .bc-book__toggle { opacity: 1; }
.bc-book__toggle:hover,
.bc-book__toggle:focus-visible { color: var(--bone); border-color: var(--bone); }
.bc-book__toggle:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
.bc-book__toggle svg { fill: currentColor; }
.bc-book__toggle .i-play,
.bc-book__toggle.is-paused .i-pause { display: none; }
.bc-book__toggle.is-paused .i-play { display: inline; }

/* ── Title sequence ───────────────────────────────────────────────────── */

/*
 * A full-screen stage pinned while the section scrolls past it; the scroll
 * distance is the sequence's running time. Weights in blood-code-titles.js
 * add up to 10.7, at roughly 45% of a screen each.
 */
.bc .bc-titles {
	position: relative;
	height: calc(100svh + 10.7 * 45svh);
	padding: 0;
}

.bc-titles__stage {
	position: sticky;
	top: 0;
	height: 100svh;
	overflow: hidden;
	background: #120304;
}

.bc-titles canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Screen-print grain over every scene, so flat colour never looks digital. */
.bc-titles__stage::after {
	content: "";
	position: absolute;
	inset: -50%;
	pointer-events: none;
	opacity: 0.32;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='4'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: bc-grain 0.9s steps(3) infinite;
}

@keyframes bc-grain {
	0%   { transform: translate(0, 0); }
	33%  { transform: translate(-3%, 2%); }
	66%  { transform: translate(2%, -3%); }
	100% { transform: translate(0, 0); }
}

.bc-titles__caps {
	position: absolute;
	z-index: 1;
	left: var(--gut);
	right: var(--gut);
	bottom: calc(clamp(1.5rem, 6vh, 3.5rem) + 44px + env(safe-area-inset-bottom));
	pointer-events: none;
}

/*
 * A soft band of shade behind the captions, shown only while one is up, so a
 * line reads against any scene without a box around it.
 */
.bc-titles__caps::before {
	content: "";
	position: absolute;
	left: calc(var(--gut) * -1);
	right: calc(var(--gut) * -1);
	bottom: calc((clamp(1.5rem, 6vh, 3.5rem) + 44px + env(safe-area-inset-bottom)) * -1);
	height: 46svh;
	background: linear-gradient(to top, rgb(6 1 2 / 78%), rgb(6 1 2 / 40%) 55%, transparent);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.bc-titles__stage.has-cap .bc-titles__caps::before { opacity: 1; }

.bc-titles__stage[data-tone="light"] .bc-titles__caps::before {
	background: linear-gradient(to top, rgb(236 223 211 / 85%), rgb(236 223 211 / 45%) 55%, transparent);
}

.bc-cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin-inline: auto;
	max-width: 24ch;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(1.6rem, 3.8vw, 2.8rem);
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-align: center;
	color: var(--bone);
	text-wrap: balance;
	text-shadow: 0 2px 20px rgb(6 1 2 / 70%);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.bc-cap.is-on {
	opacity: 1;
	transform: none;
}

.bc-cap--hit {
	font-weight: 500;
	color: var(--ember);
}

/*
 * The lines that land with each kill: title cards in the cover's lettering,
 * big enough that nobody scrolls past them.
 */
.bc-cap--big {
	max-width: 16ch;
	font-family: var(--cover);
	font-weight: 400;
	font-size: clamp(3rem, 9vw, 6.75rem);
	line-height: 0.92;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	transform: scale(1.08);
	transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bc-cap--big.bc-cap--hit { color: var(--crimson); }

.bc-cap--small {
	font-size: clamp(0.85rem, 1.8vw, 1.05rem);
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--ash);
}

.bc-cap__pov {
	display: block;
	margin-bottom: 0.6rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.5em;
	text-transform: uppercase;
	color: var(--crimson);
}

/* On the pale scenes, captions switch to ink. */
.bc-titles__stage[data-tone="light"] .bc-cap {
	color: var(--ink);
	text-shadow: none;
}

.bc-titles__stage[data-tone="light"] .bc-cap--hit { color: var(--blood); }

/* Without the script, the section is simply the story as text. */
.bc-titles:not(.is-live) { height: auto; }
.bc-titles:not(.is-live) .bc-titles__stage { position: static; height: auto; padding: var(--beat) var(--gut); }
.bc-titles:not(.is-live) canvas { display: none; }
.bc-titles:not(.is-live) .bc-titles__caps { position: static; }
.bc-titles:not(.is-live) .bc-cap { position: static; opacity: 1; transform: none; margin-bottom: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
	.bc-titles__stage::after { animation: none; }
	.bc-cap { transition: none; }
}

/* ── The reveal: a dark room that scrolling lights up ─────────────────── */

/*
 * Everything here hangs off --lit, which blood-code.js raises from 0 to 1 as
 * the cover crosses the viewport. One value drives the lamp, the floor pool,
 * the roses, the dust and the cover's own exposure — so it all comes up
 * together, and scrolling back takes it all down again.
 */
.bc-reveal {
	--lit: 0;

	position: relative;
	padding-block: var(--beat);
	overflow: hidden;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.bc-room {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Roses massed at the foot of the room, emerging as the light reaches them. */
.bc-room__roses {
	position: absolute;
	inset: auto 0 0;
	height: 62%;
	background-size: cover;
	background-position: 30% 70%;
	opacity: calc(var(--lit) * 0.55);
	filter: brightness(calc(0.2 + var(--lit) * 0.55)) saturate(1.15);
	-webkit-mask-image: linear-gradient(to top, #000 0%, transparent 88%);
	mask-image: linear-gradient(to top, #000 0%, transparent 88%);
}

/* Light pooling up off the floor. */
.bc-room__pool {
	position: absolute;
	left: 50%;
	bottom: -14%;
	width: min(90rem, 160%);
	height: 78%;
	transform: translateX(-50%) scale(calc(0.82 + var(--lit) * 0.18));
	background: radial-gradient(
		ellipse at center bottom,
		rgb(225 35 31 / 42%) 0%,
		rgb(156 14 13 / 16%) 38%,
		transparent 70%
	);
	filter: blur(22px);
	opacity: var(--lit);
}

/* Motes turning over in the beam. */
.bc-room__dust {
	position: absolute;
	inset: 0;
	opacity: calc(var(--lit) * 0.55);
	background-image:
		radial-gradient(1.6px 1.6px at 18% 28%, rgb(255 214 206 / 55%), transparent 60%),
		radial-gradient(1.2px 1.2px at 74% 41%, rgb(255 190 180 / 45%), transparent 60%),
		radial-gradient(1.8px 1.8px at 41% 63%, rgb(255 224 216 / 40%), transparent 60%),
		radial-gradient(1.1px 1.1px at 88% 72%, rgb(255 200 190 / 45%), transparent 60%),
		radial-gradient(1.4px 1.4px at 29% 84%, rgb(255 210 200 / 35%), transparent 60%),
		radial-gradient(1.2px 1.2px at 62% 18%, rgb(255 205 195 / 40%), transparent 60%);
	animation: bc-motes 26s linear infinite;
}

@keyframes bc-motes {
	0%   { transform: translate3d(0, 0, 0); }
	100% { transform: translate3d(-3%, -9%, 0); }
}

/* Holds the corners black no matter how bright the middle gets. */
.bc-room__dark {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 78% 62% at 50% 52%, transparent 30%, rgb(6 1 2 / 82%) 78%, var(--void) 100%);
}

/* The line before the light finds it — fades out as the cover arrives. */
.bc-reveal__whisper {
	position: relative;
	z-index: 1;
	font-style: italic;
	font-size: clamp(1rem, 0.5vw + 0.9rem, 1.2rem);
	color: rgb(243 236 230 / 40%);
	opacity: calc(1 - var(--lit) * 1.6);
}

.bc-reveal__label {
	position: relative;
	z-index: 1;
	margin-top: 0.9rem;
	opacity: var(--lit);
}

.bc-reveal__fig {
	position: relative;
	z-index: 1;
	margin-top: clamp(1.25rem, 4vh, 2rem);
	width: min(14rem, 60vw); /* the big book is already up top; this is the reprise */
}

.bc-reveal__glow {
	position: absolute;
	inset: -26%;
	opacity: var(--lit);
}

/* Nested so the flicker multiplies with --lit instead of fighting it. */
.bc-reveal__glow::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, rgb(225 35 31 / 52%), transparent 66%);
	filter: blur(30px);
	animation: bc-flicker 7s ease-in-out infinite;
}

/* A bulb deciding whether to stay on. */
@keyframes bc-flicker {
	0%, 100% { opacity: 1; }
	3%       { opacity: 0.45; }
	5%       { opacity: 1; }
	8%       { opacity: 0.68; }
	10%      { opacity: 1; }
	47%      { opacity: 1; }
	49%      { opacity: 0.8; }
	51%      { opacity: 1; }
}

.bc-reveal__img {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
	box-shadow:
		0 2px 4px rgb(0 0 0 / 60%),
		0 30px 70px rgb(0 0 0 / 75%),
		0 0 0 1px rgb(243 236 230 / 10%);

	/* Sitting in the dark until the light gets to it. */
	filter:
		brightness(calc(0.06 + var(--lit) * 0.94))
		contrast(calc(0.88 + var(--lit) * 0.24))
		saturate(calc(0.22 + var(--lit) * 0.78));
	transform: scale(calc(0.955 + var(--lit) * 0.045));
}

/* Light sweeping across the face of it, strongest mid-reveal. */
.bc-reveal__sheen {
	position: absolute;
	inset: 0;
	border-radius: 3px;
	background-image: linear-gradient(100deg, transparent 42%, rgb(255 242 236 / 22%) 50%, transparent 58%);
	background-size: 300% 100%;
	background-position: calc(150% - var(--lit) * 190%) 0;
	mix-blend-mode: screen;
	opacity: calc(var(--lit) * (1 - var(--lit)) * 3.2);
	pointer-events: none;
}

.bc-reveal__title {
	position: relative;
	z-index: 1;
	margin-top: clamp(1.25rem, 3.5vh, 2rem);
	font-family: var(--cover);
	font-weight: 400;
	font-size: clamp(2.75rem, 9vw, 4.75rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
}

.bc-reveal__series {
	margin-top: 0.6rem;
	font-family: var(--display);
	font-weight: 300;
	font-size: 0.78rem;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--ash);
}

.bc-facts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.5rem, 6vw, 4rem);
	margin-top: clamp(1.75rem, 4vh, 2.5rem);
	padding-block: 1.25rem;
	border-block: 1px solid rgb(243 236 230 / 12%);
	width: 100%;
}

.bc-facts dt {
	font-family: var(--display);
	font-size: 0.66rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ash);
}

.bc-facts dd {
	margin: 0.45rem 0 0;
	font-family: var(--display);
	font-weight: 400;
	font-size: 1.05rem;
}

.bc-tropes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin-top: 1.25rem;
}

.bc-tropes li {
	padding: 0.45rem 1rem;
	border: 1px solid rgb(225 35 31 / 35%);
	border-radius: 999px;
	font-family: var(--display);
	font-weight: 300;
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgb(243 236 230 / 80%);
}

/* Content that joined the reveal from the old pre-order section has to sit
   above the room's dark corners, like the cover does. */
.bc-reveal .bc-facts,
.bc-reveal .bc-tropes,
.bc-reveal .bc-actions,
.bc-reveal .bc-count__live {
	position: relative;
	z-index: 1;
}

/* ── CTA ──────────────────────────────────────────────────────────────── */

.bc-cta__h {
	position: relative;
	z-index: 1;
	margin-top: clamp(1.25rem, 3.5vh, 2rem);
	max-width: 18ch;
	font-family: var(--display);
	font-weight: 300;
	font-size: clamp(1.9rem, 6vw, 3.4rem);
	line-height: 1.08;
	text-wrap: balance;
}

.bc-count {
	position: relative;
	z-index: 1;
	display: flex;
	gap: clamp(1rem, 5vw, 3rem);
	margin-top: clamp(1.25rem, 3.5vh, 2rem);
	font-variant-numeric: tabular-nums;
}

.bc-count > div {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.bc-count span {
	font-family: var(--display);
	font-weight: 300;
	font-size: clamp(2rem, 7vw, 3.25rem);
	line-height: 1;
	color: var(--bone);
}

.bc-count small {
	font-family: var(--display);
	font-size: 0.62rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ash);
}

.bc-count__live {
	margin-top: 2rem;
	font-family: var(--display);
	font-size: clamp(1.5rem, 5vw, 2.25rem);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ember);
}

.bc-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.9rem;
	margin-top: clamp(1.5rem, 4vh, 2.25rem);
}

.bc-btn {
	display: inline-block;
	padding: 1rem 2rem;
	border: 1px solid rgb(243 236 230 / 28%);
	border-radius: 2px;
	font-family: var(--display);
	font-weight: 400;
	font-size: 0.8rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--bone);
	text-decoration: none;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.bc-btn:hover,
.bc-btn:focus-visible {
	border-color: var(--bone);
	background: rgb(243 236 230 / 8%);
	transform: translateY(-2px);
}

.bc-btn--primary {
	background: var(--blood);
	border-color: var(--blood);
	box-shadow: 0 10px 40px rgb(156 14 13 / 45%);
}

.bc-btn--primary:hover,
.bc-btn--primary:focus-visible {
	background: var(--crimson);
	border-color: var(--crimson);
	color: #fff;
}

/* ── Author ───────────────────────────────────────────────────────────── */

.bc-author {
	max-width: 62rem;
	margin-inline: auto;
	padding-block: var(--beat);
	display: grid;
	grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
	gap: clamp(1.75rem, 5vw, 3.5rem);
	align-items: start;
	border-top: 1px solid rgb(243 236 230 / 10%);
}

.bc-author__img {
	width: 100%;
	height: auto;
	border-radius: 50%;
	filter: grayscale(1) contrast(1.05);
	box-shadow: 0 0 0 1px rgb(243 236 230 / 14%);
}

.bc-author__name {
	margin-block: 0.75rem 1.25rem;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(1.6rem, 4.5vw, 2.25rem);
	letter-spacing: 0.01em;
}

.bc-author__txt p + p {
	margin-top: 1rem;
}

.bc-author__txt p:not(.bc-label) {
	color: rgb(243 236 230 / 70%);
	max-width: 56ch;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.bc-footer {
	max-width: 62rem;
	margin-inline: auto;
	padding: 3rem var(--gut) 4.5rem;
	border-top: 1px solid rgb(243 236 230 / 10%);
	font-size: 0.85rem;
	color: rgb(243 236 230 / 45%);
	text-align: center;
}

.bc-footer a {
	color: rgb(243 236 230 / 70%);
}

.bc-footer__fine {
	margin-top: 0.5rem;
	font-size: 0.78rem;
	color: rgb(243 236 230 / 32%);
}

/* ── Reveal choreography ──────────────────────────────────────────────── */

.bc-r,
[data-bc-in] {
	opacity: 0;
	transform: translateY(22px);
	transition:
		opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
		transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s);
}

.bc-r.is-in,
[data-bc-in].is-in {
	opacity: 1;
	transform: none;
}

/*
 * Rewinding is not a performance. Everything exits fast and without its
 * entrance stagger, so scrolling back up feels like a rewind rather than a
 * second, slower animation — and the next scroll down replays cleanly.
 */
.bc-r:not(.is-in),
[data-bc-in]:not(.is-in) {
	transition-duration: 0.35s;
	transition-delay: 0s;
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 56rem) {
	.bc-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "copy" "book" "pitch";
		text-align: center;
	}

	.bc-title {
		font-size: clamp(3.4rem, 17vw, 6rem);
		margin-block: 0.5rem 0.6rem;
	}

	.bc-book {
		height: clamp(15rem, 40svh, 26rem);
	}

	.bc-hero__line {
		font-size: 1.05rem;
		line-height: 1.5;
	}

	.bc-hero__good {
		margin-top: 0.3rem;
		font-size: 1.5rem;
	}

	.bc-hero__actions {
		justify-content: center;
		margin-top: 0.9rem;
	}

	

	

	

	

	
}

@media (max-width: 40rem) {
	/* Phones: images shrink so each beat fits in roughly one screen. */
	.bc { --beat: 2.5rem; }
	.bc-hero { padding-block: 1rem 0.75rem; }
	.bc-hero .bc-cue { margin-top: 0.5rem; }
	.bc-book { height: clamp(14rem, 36svh, 22rem); }

	
	
	

	
	

	
	
	

	.bc-reveal__fig { width: min(12rem, 48vw); }
	.bc-facts { gap: 1rem 1.5rem; padding-block: 1rem; }
	.bc-facts dd { font-size: 0.95rem; }

	.bc-author {
		grid-template-columns: 5rem minmax(0, 1fr);
		gap: 1rem;
		align-items: start;
	}

	.bc-author__img { width: 5rem; }
	.bc-author__txt p:not(.bc-label) { font-size: 1rem; line-height: 1.6; }

	

	.bc-count {
		gap: 1.25rem;
	}

	

	
}

/* ── Motion preferences ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.bc-r,
[data-bc-in],
.bc-reveal__img {
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
	}

	.bc-r,
	[data-bc-in] {
		opacity: 1;
		transform: none;
	}

	

	/* Bring the room straight up to full light instead of animating it. */
	.bc-reveal { --lit: 1; }

	.bc-reveal__img {
		filter: none;
		transform: none;
	}

	.bc-reveal__sheen { opacity: 0; }
	.bc-reveal__glow::before,
	.bc-room__dust { animation: none !important; }
	
	

	.bc-cue svg {
		animation: none;
	}

	.bc-atmos__roses {
		transform: none !important;
	}

	

	
}

/* ── Page chrome ──────────────────────────────────────────────────────── */

/*
 * The page used to run inside a WordPress block theme, which supplied the
 * reset and the root background. Standalone, it supplies its own.
 */
html {
	/* Keeps overscroll bounce black instead of flashing white. */
	background-color: #060102;
}

body {
	margin: 0;
	background-color: #060102;
}

img {
	max-width: 100%;
}

/* ── Concept-preview tape ─────────────────────────────────────────────── */

/*
 * The server adds this tape to the page (lib/preview-notice.mjs). It sits at
 * the bottom, slim and translucent, so it never takes space from the story.
 * Only its controls take clicks.
 */
.bc-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.preview-notice {
	/* The tape sits outside .bc, so it needs its own copy of the display face. */
	--display: "Oswald", "Helvetica Neue", Impact, sans-serif;
	position: fixed;
	z-index: 45;
	inset: auto 0 0;
	height: calc(44px + env(safe-area-inset-bottom));
	padding-bottom: env(safe-area-inset-bottom);
	pointer-events: none;
	background: #f3cf45ed;
	color: #111;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid #111;
}

.preview-notice::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 3px;
	background: repeating-linear-gradient(115deg, #111 0 12px, transparent 12px 22px);
}

.preview-tape {
	position: absolute;
	inset: 4px 230px auto 0;
	height: 39px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 25px), transparent);
}

.preview-notice[data-preview-notice="neutral"] .preview-tape { right: 64px; }

.preview-tape-track {
	display: flex;
	width: max-content;
	animation: preview-tape-flow 34s linear infinite;
}

.preview-tape-group { display: flex; flex-shrink: 0; }

.preview-tape-group > span {
	display: flex;
	align-items: center;
	gap: 1.8rem;
	padding-right: 1.8rem;
	height: 39px;
	white-space: nowrap;
	font: 600 0.68rem/1 var(--display);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.preview-tape-group i { font-style: normal; font-size: 0.9rem; }

@keyframes preview-tape-flow { to { transform: translateX(-50%); } }

.preview-tape-controls {
	position: absolute;
	top: 0;
	right: max(12px, env(safe-area-inset-right));
	display: flex;
	gap: 0.5rem;
	align-items: center;
	pointer-events: auto;
}

.preview-tape-controls a,
.preview-tape-pause {
	display: inline-flex;
	justify-content: center;
	gap: 0.65rem;
	align-items: center;
	min-height: 44px;
	padding: 0.4rem 0.65rem;
	border: 0;
	background: transparent;
	color: #111;
	text-decoration: none;
	font: 600 0.72rem/1 var(--display);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.preview-tape-controls a { border-left: 1px solid #1115; }
.preview-cta-copy { display: flex; flex-direction: column; gap: 4px; }
.preview-cta-copy small { font: 400 0.6rem/1 var(--display); letter-spacing: 0.08em; }
.preview-tape-controls a:hover,
.preview-tape-pause:hover { background: #1111; }
.preview-tape-controls a:focus-visible,
.preview-tape-pause:has(input:focus-visible) { outline: 2px solid #111; outline-offset: -4px; }

.preview-tape-pause { position: relative; width: 44px; }
.preview-tape-pause svg { fill: currentColor; }
.preview-tape-pause input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.preview-tape-pause .i-play,
.preview-notice:has(input:checked) .i-pause { display: none; }
.preview-notice:has(input:checked) .i-play { display: inline; }
.preview-notice:has(input:checked) .preview-tape-track { animation-play-state: paused; }

/* Keep the first screen's button and the footer's last line clear of the tape. */
.has-preview-notice .bc-hero { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
.has-preview-notice .bc-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

@media (max-width: 40rem) {
	.preview-tape { right: 205px; }
	.preview-notice[data-preview-notice="neutral"] .preview-tape { right: 52px; }
	.preview-tape-group > span { font-size: 0.62rem; gap: 1.2rem; padding-right: 1.2rem; }
	.preview-tape-controls { right: max(4px, env(safe-area-inset-right)); gap: 0; }
	.preview-tape-controls a { font-size: 0.64rem; padding-inline: 0.5rem; }

	/* The tape takes 44px, so the hero gives up the scroll cue rather than the button. */
	.has-preview-notice .bc-hero .bc-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.preview-tape-track { animation: none; }
	.preview-tape-pause { display: none; }
}
