/* ============================================================
 * GuitarJacket — STORY page styles
 *
 * Model: SNAP + TRANSITION (not scroll-scrub).
 *   - Each scene is one screen tall and a scroll-snap stop, so there
 *     is a definite stop-and-read point per section.
 *   - When a scene becomes the active (centered) one, JS adds
 *     `.is-active`; elements transition from fully OFF-SCREEN (by their
 *     data-from edge) into a composed arrangement, then back out the
 *     same way when you leave. Compositor-driven => smooth.
 *
 * Per element:  data-from = left|right|top|bottom   --scale-from (opt)
 * ============================================================ */

/* ---- Full-bleed dark canvas over the theme ---------------- */
body.cfpe-story-active { background: #0c0c0d; }

.cfpe-story {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: #0c0c0d;
	color: #ece7df;
	overflow: hidden;          /* Safari < 16 has no clip */
	overflow: clip;            /* hide elements parked off-screen */
	-webkit-font-smoothing: antialiased;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--travel:   110vw;         /* horizontal off-screen distance */
	--travel-y: 110vh;         /* vertical off-screen distance   */
	--frame-cream: #f3ede2;    /* warm snapshot border           */
	--frame-gray:  #c6c3bc;    /* grayer snapshot border         */
}

.cfpe-story-active .wp-block-post-title,
.cfpe-story-active .entry-title,
.cfpe-story-active .wp-block-post-featured-image { display: none !important; }

/* Block themes (Twenty Twenty-Five) force `max-width: content-size` and
 * `margin: auto !important` onto direct children of the constrained
 * content area, squeezing the story into the ~620px column and clipping
 * the photo/text at the column edges. Re-assert true edge-to-edge bleed
 * with higher specificity so it overrides core's !important. */
body.cfpe-story-active .cfpe-story {
	max-width: none !important;
	width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}
/* And make sure no wrapping container clips the bleed. */
body.cfpe-story-active .wp-block-post-content,
body.cfpe-story-active .entry-content,
body.cfpe-story-active main {
	overflow: visible !important;
}

/* ---- Film grain + vignette (cheap, fixed) ----------------- */
.cfpe-story__grain {
	position: fixed;
	inset: 0;
	z-index: 4;
	pointer-events: none;
	opacity: 0.07;
	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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 160px 160px;
}
.cfpe-story::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background: radial-gradient(120% 80% at 50% 50%, transparent 58%, rgba(0,0,0,0.5) 100%);
}

/* ---- Intro ------------------------------------------------- */
.cfpe-story__intro {
	height: 78vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.4rem;
	text-align: center;
}
.cfpe-story__kicker {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 400;
	font-style: italic;
	font-size: clamp(2.4rem, 7vw, 5.5rem);
	color: #f4efe6;
	margin: 0;
	opacity: 0;
	transform: translateY(18px);
	animation: cfpe-st-rise 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}
.cfpe-story__hint {
	font-size: 0.72rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: rgba(236, 231, 223, 0.5);
	margin: 0;
	animation: cfpe-st-pulse 2.6s ease-in-out infinite;
}
@keyframes cfpe-st-rise { to { opacity: 1; transform: none; } }
@keyframes cfpe-st-pulse {
	0%, 100% { opacity: 0.25; transform: translateY(0); }
	50%      { opacity: 0.7;  transform: translateY(5px); }
}

/* ---- Scene = one beat of scroll --------------------------- *
 * Shorter than a full viewport so consecutive composed states are
 * fewer scrolls apart (no "4 swipes to the next section"). The stage
 * itself is sized to its content and centred in the viewport by JS,
 * so the scene only needs to provide the scroll distance. */
.cfpe-st-scene {
	position: relative;
	min-height: 86vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* Stage shrinks to its composition so absolute/flow children anchor to
 * the photo, not to a full-screen box. */
.cfpe-st-stage {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: fit-content;
	max-width: 92vw;
}
.cfpe-st-media { position: relative; }

/* Overlay beats (rockstar): a wide, full-height stage so the caption and
 * the artifact inset spread out to its corners (the original layout), with
 * the main photo centred inside it. The media wrapper fills the stage so
 * the inset still anchors to the big box, not to the photo. */
.cfpe-st-stage--overlay {
	width: min(1120px, 92vw);
	height: 100vh;
}
.cfpe-st-stage--overlay .cfpe-st-media {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cfpe-st-stage--overlay .cfpe-st-photo--main .cfpe-st-photo__img { max-height: 72vh; }

/* Stacked beats (fabric, patent): photo on top, caption flowing right
 * underneath it with a small gap — never floating at the screen bottom. */
.cfpe-st-stage--stacked { gap: clamp(0.5rem, 2vh, 1.4rem); }
.cfpe-st-stage--stacked .cfpe-st-text {
	position: static;
	max-width: min(34ch, 88vw);
	text-align: center;
}
/* Invisible sentinel at the scene's vertical center; JS watches it cross
 * the middle of the viewport to know the scene is centered (so the fly-in
 * begins only once it's composed in the middle — no "low then jump up"). */
.cfpe-st-anchor {
	position: absolute;
	top: 50%;
	left: 50%;   /* must stay inside the viewport horizontally: the full-bleed
	                story is shifted to x≈0, so left:0 fell off-screen and the
	                sentinel never intersected the viewport. */
	width: 1px;
	height: 1px;
	pointer-events: none;
}

/* ---- Element motion (continuous, scroll-linked) ----------- *
 * One value per scene drives everything:
 *   --focus  0..1   0 = flown apart at the browser edges, 1 = composed.
 * story.js sets --focus from scroll position with a shape that HOLDS at 1
 * (the read moment) and whose drift in/out OVERLAPS the neighbouring
 * scenes — so there is always motion under the scroll and never a dead gap.
 * Only applied once JS is live (.cfpe-anim) so no-JS still shows composed. */
.cfpe-st-el {
	--scale-from: 1;
	will-change: transform, opacity;
}
.cfpe-anim .cfpe-st-scene { --focus: 0; --shift: 0px; }
.cfpe-anim .cfpe-st-el {
	--tx: 0px;
	--ty: 0px;
	/* --shift (inherited from the scene, set by JS) pins the composition to
	   the viewport center while focused: converge AT center, stay put for
	   the hold, then fly apart from center — instead of riding up the page. */
	transform: translate3d(var(--tx), calc(var(--ty) + var(--shift)), 0)
	           scale(calc(1 + (1 - var(--focus)) * (var(--scale-from) - 1)));
	/* True 0 until a scene is genuinely entering, so parked photos never
	   ghost through. Ramps to full once it is meaningfully on its way in. */
	opacity: calc(var(--focus) * 1.3 - 0.06);
}
.cfpe-anim .cfpe-st-el[data-from="left"]   { --tx: calc((var(--focus) - 1) * var(--travel)); }
.cfpe-anim .cfpe-st-el[data-from="right"]  { --tx: calc((1 - var(--focus)) * var(--travel)); }
.cfpe-anim .cfpe-st-el[data-from="top"]    { --ty: calc((var(--focus) - 1) * var(--travel-y)); }
.cfpe-anim .cfpe-st-el[data-from="bottom"] { --ty: calc((1 - var(--focus)) * var(--travel-y)); }
/* The last scene sits right above the closing block ("Today / The next
   chapter…"). Its caption used to drop back down as it faded, straight
   through that block. Once the scene starts to leave (--dir is -1) the
   caption now stays where it is and fades; arriving is unchanged. */
.cfpe-anim .cfpe-st-scene--last .cfpe-st-text[data-from="bottom"] {
	--ty: calc((1 - var(--focus)) * var(--travel-y) * max(var(--dir, 1), 0));
}

/* ---- Photos (native aspect ratio, framed like prints) ----- */
.cfpe-st-photo { margin: 0; }
.cfpe-st-photo__img {
	display: block;
	width: auto;
	height: auto;
	background: #111;
}
.cfpe-st-photo--main { position: relative; z-index: 1; }
.cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 66vh;
	max-width: min(86vw, 880px);
	border: 1px solid rgba(255,255,255,0.06);
	box-shadow: 0 28px 64px rgba(0,0,0,0.6);
}
.cfpe-st-photo--main .cfpe-st-photo__scrim {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(0deg, rgba(8,8,9,0.55) 0%, rgba(8,8,9,0) 42%);
}
/* small "artifact" print with a white snapshot border */
.cfpe-st-photo--inset {
	position: absolute;
	z-index: 2;
	width: clamp(192px, 26vw, 312px);   /* 200% of the original size */
}
.cfpe-st-photo--inset .cfpe-st-photo__img {
	width: 100%;
	border: 6px solid #f3ede2;
	box-shadow: 0 16px 30px rgba(0,0,0,0.65);
	transform: rotate(-3deg);
}

/* ---- Text -------------------------------------------------- */
.cfpe-st-text {
	position: absolute;
	z-index: 3;
	max-width: min(30ch, 80vw);
}
.cfpe-st-text__inner { position: relative; }
.cfpe-st-text__inner::before {
	content: "";
	position: absolute;
	inset: -34% -40%;
	z-index: -1;
	background: radial-gradient(60% 60% at 50% 50%, rgba(6,6,7,0.85) 0%, rgba(6,6,7,0.42) 52%, rgba(6,6,7,0) 100%);
}
.cfpe-st-eyebrow {
	font-size: 0.7rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: rgba(231, 200, 140, 0.85);
	margin: 0 0 1rem;
}
.cfpe-st-lead {
	font-size: clamp(0.95rem, 1.5vw, 1.15rem);
	line-height: 1.5;
	color: rgba(236, 231, 223, 0.82);
	margin: 0 0 0.8rem;
	text-shadow: 0 1px 18px rgba(0,0,0,0.7);
}
.cfpe-st-line {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 400;
	font-size: clamp(1.4rem, 2.4vw, 2.1rem);
	line-height: 1.32;
	color: #f4efe6;
	margin: 0;
	text-shadow: 0 2px 26px rgba(0,0,0,0.78);
}
.cfpe-st-scene--hero .cfpe-st-line {
	font-style: italic;
	font-weight: 300;
	font-size: clamp(2rem, 4.6vw, 3.8rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
}
.cfpe-st-scene--hero .cfpe-st-text { max-width: min(17ch, 80vw); }

/* ============================================================
 * Per-section composition (anchored rest positions)
 * ============================================================ */

/* 1 — Rockstar: text over lower-left of photo; artifact top-right. */
.cfpe-st-scene--rockstar .cfpe-st-text {
	left: 4%;
	bottom: 12%;
	text-align: left;
}
.cfpe-st-scene--rockstar .cfpe-st-photo--inset {
	top: 18%;
	right: 10%;
}

/* Snapshot-style white border on the fabric + patent photos (like the
 * small artifact prints). */
.cfpe-st-scene--fabric .cfpe-st-photo--main .cfpe-st-photo__img,
.cfpe-st-scene--patent .cfpe-st-photo--main .cfpe-st-photo__img {
	border: 6px solid #f3ede2;
}

/* 2 — Fabric: photo, caption flows directly beneath (handled by stacked). */

/* 3 — Patent: wide concept photo as the base; the badge portrait sits on
 * top of it (sticking up above the top edge); caption flows beneath the
 * wide photo via the stacked layout. */
.cfpe-st-scene--patent .cfpe-st-photo--main .cfpe-st-photo__img {
	max-width: min(88vw, 1368px);
	max-height: 79vh;
}
.cfpe-st-scene--patent .cfpe-st-photo--inset {
	left: 0;
	right: 0;
	margin-inline: auto;
	bottom: 40%;   /* relative to the wide photo: overlaps it, rising above */
	width: clamp(190px, 21vw, 288px);
}
/* The patent badge gets the grayer snapshot border. */
.cfpe-st-scene--patent .cfpe-st-photo--inset .cfpe-st-photo__img {
	border-color: var(--frame-gray);
}

/* 4 — Attempts: the competitor (axsak) stacked ON TOP of the grid of other
 * covers (no overlap), both framed like gray snapshots; caption beneath. */
.cfpe-st-scene--attempts .cfpe-st-media {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(0.7rem, 2.2vh, 1.5rem);
}
.cfpe-st-scene--attempts .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 44vh;
	border: 8px solid var(--frame-gray);
}
.cfpe-st-scene--attempts .cfpe-st-photo--inset {
	position: static;
	order: -1;            /* axsak rests above the grid */
	width: clamp(240px, 30vw, 380px);
}
.cfpe-st-scene--attempts .cfpe-st-photo--inset .cfpe-st-photo__img {
	border-color: var(--frame-gray);
}

/* 5 — Hard to make: every prototype attempt fanned out like a hand of cards
 * (gray snapshots sharing one bottom pivot) — a pile of tries. The pieces
 * fly in from different edges and assemble into the fan. */
.cfpe-st-scene--hardtomake .cfpe-st-media {
	display: grid;
	grid-template-rows: auto auto;
	justify-items: center;
	align-items: end;
	row-gap: 5vh;               /* tighter gap between fan and wide 4-up */
}
.cfpe-st-scene--hardtomake.cfpe-st-scene .cfpe-st-stage--stacked {
	gap: clamp(0.35rem, 1.2vh, 0.9rem); /* pull caption closer to the stack */
}
/* Every individual prototype sits on the same spot and fans out from a
 * shared bottom pivot (a hand of cards). They must be in-flow grid items
 * (not the default absolute insets) so the row below them is real. */
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset {
	position: relative;
	grid-area: 1 / 1;
	width: auto;
}
.cfpe-st-scene--hardtomake .cfpe-st-photo__scrim { display: none; }
.cfpe-st-scene--hardtomake .cfpe-st-photo__img {
	width: auto;
	height: auto;
	max-height: 32vh;
	max-width: 21vw;
	border: 7px solid var(--frame-gray);
	box-shadow: 0 16px 34px rgba(0,0,0,0.55);
	transform-origin: 50% 100%; /* pivot near the bottom, like a fanned hand */
}
/* Spread the cards SIDEWAYS (with a gentle tilt) so each one is clearly
 * visible, instead of piling up on one pivot. Centre card on top. */
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(1) { z-index: 1; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(2) { z-index: 2; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(3) { z-index: 3; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(4) { z-index: 2; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(5) { z-index: 1; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(1) .cfpe-st-photo__img { transform: translateX(-21vw) rotate(-16deg) !important; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(2) .cfpe-st-photo__img { transform: translateX(-10.5vw) rotate(-8deg) !important; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(3) .cfpe-st-photo__img { transform: translateX(0) rotate(0deg)        !important; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(4) .cfpe-st-photo__img { transform: translateX(10.5vw) rotate(8deg)   !important; }
.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(5) .cfpe-st-photo__img { transform: translateX(21vw) rotate(16deg)    !important; }
/* The wide 4-up prototype photo: laid flat, no tilt, below the fan. */
.cfpe-st-scene--hardtomake .cfpe-st-photo--main {
	grid-row: 2;
	margin-top: -3vh;           /* nudge upward toward the fanned cards */
}
.cfpe-st-scene--hardtomake .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 28vh;           /* +65% from 17vh */
	max-width: min(92vw, 924px); /* +65% from 56vw */
	transform: none !important;
}

/* 6 — Working: two workshop photos side-by-side, mirrored tilt. They enter
 * from opposite edges (data-from left/right) and settle balanced. */
.cfpe-st-scene--working .cfpe-st-media {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: clamp(1rem, 3vw, 2.5rem);
}
.cfpe-st-scene--working .cfpe-st-photo {
	position: relative;   /* in-flow, not absolute inset */
	width: auto;
}
.cfpe-st-scene--working .cfpe-st-photo__scrim { display: none; }
.cfpe-st-scene--working .cfpe-st-photo__img {
	max-height: 58vh;
	max-width: 40vw;
	border: 7px solid var(--frame-gray);
	box-shadow: 0 16px 34px rgba(0,0,0,0.55);
	transform-origin: 50% 100%;
}
.cfpe-st-scene--working .cfpe-st-photo:nth-child(1) .cfpe-st-photo__img { transform: rotate(-5deg) !important; }
.cfpe-st-scene--working .cfpe-st-photo:nth-child(2) .cfpe-st-photo__img { transform: rotate(5deg)  !important; }

/* 7 — NAMM: the branded booth as the hero photo, with a candid booth shot
 * tucked over the lower-right corner like a snapshot. Both gray-framed. */
.cfpe-st-scene--namm .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 60vh;
	max-width: min(86vw, 880px);
	border: 7px solid var(--frame-gray);
	box-shadow: 0 22px 48px rgba(0,0,0,0.6);
}
.cfpe-st-scene--namm .cfpe-st-photo--main .cfpe-st-photo__scrim { display: none; }
.cfpe-st-scene--namm .cfpe-st-photo--inset {
	right: -4%;
	bottom: -7%;
	width: clamp(220px, 30vw, 380px);
}
.cfpe-st-scene--namm .cfpe-st-photo--inset .cfpe-st-photo__img {
	border-color: var(--frame-gray);
	transform: rotate(4deg);
}

/* 8 — Find a factory: candid travel snapshots in a tidy 2x2 grid (no
 * overlap, so every face shows) with a slight individual tilt each, like
 * prints arranged on a scrapbook page. */
.cfpe-st-scene--findfactory .cfpe-st-media {
	display: grid;
	grid-template-columns: repeat(2, auto);
	justify-items: center;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2rem) clamp(1.5rem, 3vw, 3rem);
}
.cfpe-st-scene--findfactory .cfpe-st-photo {
	position: relative;
	width: auto;
}
.cfpe-st-scene--findfactory .cfpe-st-photo__scrim { display: none; }
.cfpe-st-scene--findfactory .cfpe-st-photo__img {
	width: auto;
	height: auto;
	max-height: 33vh;
	max-width: 34vw;
	border: 7px solid var(--frame-gray);
	box-shadow: 0 16px 34px rgba(0,0,0,0.55);
}
.cfpe-st-scene--findfactory .cfpe-st-photo:nth-child(1) .cfpe-st-photo__img { transform: rotate(-3deg) !important; }
.cfpe-st-scene--findfactory .cfpe-st-photo:nth-child(2) .cfpe-st-photo__img { transform: rotate(2.5deg)  !important; }
.cfpe-st-scene--findfactory .cfpe-st-photo:nth-child(3) .cfpe-st-photo__img { transform: rotate(2deg)   !important; }
.cfpe-st-scene--findfactory .cfpe-st-photo:nth-child(4) .cfpe-st-photo__img { transform: rotate(-2.5deg) !important; }

/* 8.5 — Closed shop: a quiet text-only turning point. Large centered serif
 * on the bare canvas, no media. */
.cfpe-st-scene--closedshop .cfpe-st-media { display: none; }
.cfpe-st-scene--closedshop .cfpe-st-text {
	max-width: min(38ch, 88vw);
	text-align: center;
}
.cfpe-st-scene--closedshop .cfpe-st-line {
	font-family: "Fraunces", Georgia, serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(1.7rem, 3.6vw, 3rem);
	line-height: 1.32;
	color: #f4efe6;
}
/* A suspense beat: the line gently lifts a little while it fades, rather
   than flying off-screen. The short --travel-y keeps the rise subtle, and
   --dir (set by story.js, +1 arriving / -1 leaving) makes it lift UPWARD on
   exit. Opacity ramps faster than the drift so it fades out fully while
   still on screen — the fade carries the moment, not the movement. */
.cfpe-anim .cfpe-st-scene--closedshop .cfpe-st-el[data-from="bottom"] {
	--travel-y: 14vh;
	--ty: calc((1 - var(--focus)) * var(--travel-y) * var(--dir, 1));
	opacity: clamp(0, (var(--focus) - 0.5) * 2.6, 1);
}

/* 9 — Moving to China: the airport departure as the hero photo, with the
 * Bund arrival shot tucked over the lower-right corner like a snapshot. */
.cfpe-st-scene--movingtochina .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 58vh;
	max-width: min(86vw, 860px);
	border: 7px solid var(--frame-gray);
	box-shadow: 0 22px 48px rgba(0,0,0,0.6);
}
.cfpe-st-scene--movingtochina .cfpe-st-photo--main .cfpe-st-photo__scrim { display: none; }
.cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
	right: -4%;
	bottom: -7%;
	width: clamp(220px, 30vw, 380px);
}
.cfpe-st-scene--movingtochina .cfpe-st-photo--inset .cfpe-st-photo__img {
	border-color: var(--frame-gray);
	transform: rotate(-4deg);
}

/* 10 — Picked up: the pegboard of early jackets and the cutting table.
 * Desktop: side-by-side with a mirrored tilt, like scene 6 ("working").
 * Phones (see the mobile block below): the cutting photo is the star and
 * the pegboard rests over its lower-left corner. */
.cfpe-st-scene--pickedup .cfpe-st-photo__scrim { display: none; }
@media (min-width: 769px) {
	.cfpe-st-scene--pickedup .cfpe-st-media {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: clamp(1rem, 3vw, 2.5rem);
	}
	.cfpe-st-scene--pickedup .cfpe-st-photo {
		position: relative;   /* in-flow, not absolute inset */
		width: auto;
	}
	.cfpe-st-scene--pickedup .cfpe-st-photo .cfpe-st-photo__img {
		width: auto;
		max-height: 58vh;
		max-width: 40vw;
		border: 7px solid var(--frame-gray);
		box-shadow: 0 16px 34px rgba(0,0,0,0.55);
		transform-origin: 50% 100%;
	}
	.cfpe-st-scene--pickedup .cfpe-st-photo:nth-child(1) .cfpe-st-photo__img { transform: rotate(-5deg) !important; }
	.cfpe-st-scene--pickedup .cfpe-st-photo:nth-child(2) .cfpe-st-photo__img { transform: rotate(5deg)  !important; }
}

/* ---- Mobile ----------------------------------------------- */
@media (max-width: 768px) {
	/* Picked up: the cutting photo fills most of the screen; the pegboard
	   snapshot overlaps its lower-left third, below the guitar pattern on
	   the table, and hangs a little past the bottom edge. */
	.cfpe-st-scene--pickedup .cfpe-st-media { margin-bottom: 7vh; }
	.cfpe-st-scene--pickedup .cfpe-st-photo--main .cfpe-st-photo__img {
		max-height: 54vh;
		max-width: 86vw;
		border: 7px solid var(--frame-gray);
		box-shadow: 0 22px 48px rgba(0,0,0,0.6);
	}
	.cfpe-st-scene--pickedup .cfpe-st-photo--inset {
		left: -1%;
		bottom: -12%;
		width: 62vw;
	}
	.cfpe-st-scene--pickedup .cfpe-st-photo--inset .cfpe-st-photo__img {
		border-color: var(--frame-gray);
		transform: rotate(-4deg);
	}

	.cfpe-st-photo--main .cfpe-st-photo__img { max-height: 56vh; max-width: 92vw; }
	.cfpe-st-text { max-width: 84vw; }
	.cfpe-st-scene--hero .cfpe-st-text { max-width: 15ch; }
	.cfpe-st-scene--rockstar .cfpe-st-text { left: 6%; bottom: 8%; }

	/* Rockstar inset: on phones the desktop size/position lands the polaroid
	   on the standing figure's head. Shrink it and lift it into the
	   top-right corner so it only clips the photo's corner (background),
	   leaving the faces clear. Scoped to this scene so other sections'
	   insets are unaffected; desktop is unchanged. */
	.cfpe-st-scene--rockstar .cfpe-st-photo--inset {
		width: clamp(112px, 34vw, 180px);
		top: 24%;
		right: 4%;
	}

	/* Hard-to-make fan: the desktop dual max-height/max-width caps make the
	   cards wildly uneven on a phone (portrait shots tall & narrow, landscape
	   shots short & wide). Force every card to ONE identical portrait shape
	   via object-fit: cover so they read as a clean, even hand of cards, and
	   re-space the fan for the narrow screen. Note: this crops each photo's
	   edges (including the annotated one). */
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset .cfpe-st-photo__img {
		width: 23vw;
		height: 19vh;
		max-width: none;
		max-height: none;
		object-fit: cover;
		object-position: center;
		transform-origin: 50% 50%;   /* rotate about the card centre for a true arc */
	}
	/* Lay the cards along a gentle arc (centre highest, outer ones lower and
	   wider) with vertical stagger, so each card peeks above its neighbour
	   instead of stacking flat — far less mutual cover than a flat fan. */
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(1) .cfpe-st-photo__img { transform: translateX(-30vw) translateY(4.7vh) rotate(-18deg) !important; }
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(2) .cfpe-st-photo__img { transform: translateX(-15vw) translateY(1.2vh) rotate(-9deg)  !important; }
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(3) .cfpe-st-photo__img { transform: translateX(0)     translateY(0)     rotate(0deg)   !important; }
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(4) .cfpe-st-photo__img { transform: translateX(15vw)  translateY(1.2vh) rotate(9deg)   !important; }
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset:nth-child(5) .cfpe-st-photo__img { transform: translateX(30vw)  translateY(4.7vh) rotate(18deg)  !important; }

	/* Keep the wide 4-up photo lower with a clear gap, giving the arc room
	   to breathe above it. */
	.cfpe-st-scene--hardtomake .cfpe-st-media { row-gap: 7vh; }
	.cfpe-st-scene--hardtomake .cfpe-st-photo--main { margin-top: 0; }

	/* NAMM & Moving-to-China: the desktop tucks a second photo over the hero
	   photo's lower-right corner, which crowds a phone. On mobile, stack the
	   two photos vertically (hero on top, second below) so both read clearly. */
	.cfpe-st-scene--namm .cfpe-st-media,
	.cfpe-st-scene--movingtochina .cfpe-st-media {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2.5vh;
	}
	.cfpe-st-scene--namm .cfpe-st-photo--main .cfpe-st-photo__img,
	.cfpe-st-scene--movingtochina .cfpe-st-photo--main .cfpe-st-photo__img {
		max-height: 42vh;
		max-width: 92vw;
	}
	.cfpe-st-scene--namm .cfpe-st-photo--inset,
	.cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
		position: static;
		right: auto;
		bottom: auto;
		width: 70vw;
	}

	/* Patent: desktop floats the ID badge over the wide concept drawing. On
	   mobile they don't need to overlap — stack the badge on top of the
	   drawing (no overlap) and drop the caption noticeably lower. */
	.cfpe-st-scene--patent .cfpe-st-media {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2.5vh;
	}
	.cfpe-st-scene--patent .cfpe-st-photo--inset {
		position: static;
		order: -1;              /* badge rests above the drawing */
		left: auto;
		right: auto;
		bottom: auto;
		margin-inline: 0;
		width: clamp(170px, 46vw, 240px);
	}
	.cfpe-st-scene--patent .cfpe-st-photo--main .cfpe-st-photo__img {
		max-height: 32vh;
		max-width: 92vw;
	}
	.cfpe-st-scene--patent .cfpe-st-stage--stacked {
		gap: 6vh;               /* push the caption lower, away from the photos */
	}
}

.cfpe-story__end { height: 24vh; }

/* ============================================================
 * Static photo-essay fallback
 *
 * The cinematic layout is built for scroll-linked motion: 86vh
 * stages, text over photos, a fanned hand of cards. Frozen, that
 * reads as empty black space and overlapping piles.
 *
 * Same markup, restyled as a compact vertical photo essay — photos
 * in document flow, captions underneath. Applied when:
 *   - prefers-reduced-motion: reduce (Windows "Show animations"
 *     off, corporate GPOs, accessibility settings)
 *   - .cfpe-story--essay is set by JS (rAF never fired)
 * ============================================================ */

.cfpe-story--essay { overflow: visible; }
.cfpe-story--essay .cfpe-story__intro {
	height: auto;
	min-height: 0;
	padding: clamp(3.5rem, 12vh, 7rem) 1.5rem 2.5rem;
	gap: 0.6rem;
}
.cfpe-story--essay .cfpe-story__kicker { animation: none; opacity: 1; transform: none; }
.cfpe-story--essay .cfpe-story__hint { display: none; }
.cfpe-story--essay .cfpe-story__end { height: 3rem; }

.cfpe-story--essay .cfpe-st-scene {
	min-height: 0;
	padding: clamp(2.5rem, 6vh, 4.25rem) 0;
	border-bottom: 1px solid rgba(236, 231, 223, 0.1);
}
.cfpe-story--essay .cfpe-st-scene:last-of-type { border-bottom: 0; }

.cfpe-story--essay .cfpe-st-stage,
.cfpe-story--essay .cfpe-st-stage--overlay {
	width: min(840px, 92vw);
	max-width: 840px;
	height: auto;
	gap: 1.15rem;
}
.cfpe-story--essay .cfpe-st-stage--overlay .cfpe-st-media {
	position: relative;
	inset: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.15rem;
}

.cfpe-story--essay .cfpe-st-el {
	transform: none !important;
	opacity: 1 !important;
	will-change: auto;
}
.cfpe-story--essay .cfpe-st-text {
	position: static;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
	max-width: min(38ch, 88vw);
	text-align: center;
}
.cfpe-story--essay .cfpe-st-scene--hero .cfpe-st-text { max-width: min(20ch, 88vw); }
.cfpe-story--essay .cfpe-st-text__inner::before { display: none; }
.cfpe-story--essay .cfpe-st-line { text-shadow: none; }
.cfpe-story--essay .cfpe-st-photo--main .cfpe-st-photo__scrim { display: none; }

.cfpe-story--essay .cfpe-st-photo--inset {
	position: static;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
	width: min(280px, 72%);
	margin: 0 auto;
}
.cfpe-story--essay .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 58vh;
	max-width: min(86vw, 840px);
}
.cfpe-story--essay .cfpe-st-photo--inset .cfpe-st-photo__img { transform: rotate(-2.5deg); }

/* Desktop essay: two-photo overlay scenes become side-by-side
   spreads. (Mobile already stacks these in the cinematic rest
   layout; that stacking is applied in the 768px block below.) */
.cfpe-story--essay .cfpe-st-scene--rockstar .cfpe-st-media,
.cfpe-story--essay .cfpe-st-scene--namm .cfpe-st-media,
.cfpe-story--essay .cfpe-st-scene--movingtochina .cfpe-st-media {
	display: grid;
	grid-template-columns: 1fr minmax(160px, 28%);
	align-items: end;
	gap: 1.25rem;
	width: 100%;
}
.cfpe-story--essay .cfpe-st-scene--rockstar .cfpe-st-photo--inset,
.cfpe-story--essay .cfpe-st-scene--namm .cfpe-st-photo--inset,
.cfpe-story--essay .cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
	width: 100%;
	margin: 0;
}
.cfpe-story--essay .cfpe-st-scene--patent .cfpe-st-media {
	display: grid;
	grid-template-columns: minmax(140px, 22%) 1fr;
	align-items: center;
	gap: 1.25rem;
	width: 100%;
}
.cfpe-story--essay .cfpe-st-scene--patent .cfpe-st-photo--inset {
	order: -1;
	width: 100%;
	margin: 0;
}

.cfpe-story--essay .cfpe-st-scene--working .cfpe-st-media,
.cfpe-story--essay .cfpe-st-scene--pickedup .cfpe-st-media {
	display: flex;
	flex-direction: row;
	gap: clamp(0.8rem, 2.5vw, 1.6rem);
}
.cfpe-story--essay .cfpe-st-scene--working .cfpe-st-photo,
.cfpe-story--essay .cfpe-st-scene--pickedup .cfpe-st-photo { width: auto; flex: 1 1 0; }
.cfpe-story--essay .cfpe-st-scene--working .cfpe-st-photo__img,
.cfpe-story--essay .cfpe-st-scene--pickedup .cfpe-st-photo__img {
	max-width: 100%;
	max-height: 42vh;
	transform: none !important;
}

.cfpe-story--essay .cfpe-st-scene--findfactory .cfpe-st-media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.9rem 1rem;
	width: 100%;
}
.cfpe-story--essay .cfpe-st-scene--findfactory .cfpe-st-photo { width: auto; }
.cfpe-story--essay .cfpe-st-scene--findfactory .cfpe-st-photo__img {
	max-width: 100%;
	max-height: 28vh;
	transform: none !important;
}

.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-media {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-template-rows: auto;
	justify-items: stretch;
	align-items: stretch;
	gap: 0.55rem;
	width: 100%;
	row-gap: 0.9rem;
}
.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-photo--inset {
	position: relative;
	grid-area: auto;
	width: auto;
}
.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-photo--inset .cfpe-st-photo__img {
	width: 100%;
	height: 18vh;
	max-width: none;
	max-height: none;
	object-fit: cover;
	transform: none !important;
}
.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-photo--main {
	grid-column: 1 / -1;
	grid-row: auto;
	margin-top: 0.2rem;
}
.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-photo--main .cfpe-st-photo__img {
	max-height: 32vh;
	max-width: 100%;
	transform: none !important;
}

.cfpe-story--essay .cfpe-st-scene--closedshop {
	padding-top: clamp(3rem, 8vh, 5rem);
	padding-bottom: clamp(3rem, 8vh, 5rem);
}
.cfpe-story--essay .cfpe-st-scene--closedshop .cfpe-st-text { margin: 0 auto; }

@media (max-width: 768px) {
	/* Follow the cinematic *mobile* rest: stack overlay pairs so
	   nothing sits on a face or crowds a corner. */
	.cfpe-story--essay .cfpe-st-scene--rockstar .cfpe-st-media,
	.cfpe-story--essay .cfpe-st-scene--namm .cfpe-st-media,
	.cfpe-story--essay .cfpe-st-scene--movingtochina .cfpe-st-media,
	.cfpe-story--essay .cfpe-st-scene--patent .cfpe-st-media {
		display: flex;
		flex-direction: column;
		align-items: center;
		grid-template-columns: none;
		gap: 1rem;
	}
	.cfpe-story--essay .cfpe-st-scene--rockstar .cfpe-st-photo--inset,
	.cfpe-story--essay .cfpe-st-scene--namm .cfpe-st-photo--inset,
	.cfpe-story--essay .cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
		width: min(70vw, 280px);
	}
	.cfpe-story--essay .cfpe-st-scene--patent .cfpe-st-photo--inset {
		width: clamp(170px, 46vw, 240px);
	}

	.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-media {
		grid-template-columns: repeat(2, 1fr);
	}
	.cfpe-story--essay .cfpe-st-scene--hardtomake .cfpe-st-photo--inset .cfpe-st-photo__img { height: 16vh; }
	.cfpe-story--essay .cfpe-st-scene--working .cfpe-st-media,
	.cfpe-story--essay .cfpe-st-scene--pickedup .cfpe-st-media { flex-direction: column; }
	.cfpe-story--essay .cfpe-st-scene--working .cfpe-st-photo__img,
	.cfpe-story--essay .cfpe-st-scene--pickedup .cfpe-st-photo__img {
		max-height: 36vh;
		max-width: 92vw;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.cfpe-story-snap { scroll-snap-type: none; }

	.cfpe-story { overflow: visible; }
	.cfpe-story__intro {
		height: auto;
		min-height: 0;
		padding: clamp(3.5rem, 12vh, 7rem) 1.5rem 2.5rem;
		gap: 0.6rem;
	}
	.cfpe-story__kicker { animation: none; opacity: 1; transform: none; }
	.cfpe-story__hint { display: none; }
	.cfpe-story__end { height: 3rem; }

	.cfpe-st-scene {
		min-height: 0;
		padding: clamp(2.5rem, 6vh, 4.25rem) 0;
		border-bottom: 1px solid rgba(236, 231, 223, 0.1);
	}
	.cfpe-st-scene:last-of-type { border-bottom: 0; }

	.cfpe-st-stage,
	.cfpe-st-stage--overlay {
		width: min(840px, 92vw);
		max-width: 840px;
		height: auto;
		gap: 1.15rem;
	}
	.cfpe-st-stage--overlay .cfpe-st-media {
		position: relative;
		inset: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1.15rem;
	}

	.cfpe-anim .cfpe-st-el,
	.cfpe-st-el {
		transform: none !important;
		opacity: 1 !important;
		transition: none !important;
		will-change: auto;
	}
	.cfpe-st-text {
		position: static;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		max-width: min(38ch, 88vw);
		text-align: center;
	}
	.cfpe-st-scene--hero .cfpe-st-text { max-width: min(20ch, 88vw); }
	.cfpe-st-text__inner::before { display: none; }
	.cfpe-st-line { text-shadow: none; }
	.cfpe-st-photo--main .cfpe-st-photo__scrim { display: none; }

	.cfpe-st-photo--inset {
		position: static;
		left: auto;
		right: auto;
		top: auto;
		bottom: auto;
		width: min(280px, 72%);
		margin: 0 auto;
	}
	.cfpe-st-photo--main .cfpe-st-photo__img {
		max-height: 58vh;
		max-width: min(86vw, 840px);
	}
	.cfpe-st-photo--inset .cfpe-st-photo__img { transform: rotate(-2.5deg); }

	.cfpe-st-scene--rockstar .cfpe-st-media,
	.cfpe-st-scene--namm .cfpe-st-media,
	.cfpe-st-scene--movingtochina .cfpe-st-media {
		display: grid;
		grid-template-columns: 1fr minmax(160px, 28%);
		align-items: end;
		gap: 1.25rem;
		width: 100%;
	}
	.cfpe-st-scene--rockstar .cfpe-st-photo--inset,
	.cfpe-st-scene--namm .cfpe-st-photo--inset,
	.cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
		width: 100%;
		margin: 0;
	}
	.cfpe-st-scene--patent .cfpe-st-media {
		display: grid;
		grid-template-columns: minmax(140px, 22%) 1fr;
		align-items: center;
		gap: 1.25rem;
		width: 100%;
	}
	.cfpe-st-scene--patent .cfpe-st-photo--inset {
		order: -1;
		width: 100%;
		margin: 0;
	}

	.cfpe-st-scene--working .cfpe-st-media,
	.cfpe-st-scene--pickedup .cfpe-st-media {
		display: flex;
		flex-direction: row;
		gap: clamp(0.8rem, 2.5vw, 1.6rem);
	}
	.cfpe-st-scene--working .cfpe-st-photo,
	.cfpe-st-scene--pickedup .cfpe-st-photo { width: auto; flex: 1 1 0; }
	.cfpe-st-scene--working .cfpe-st-photo__img,
	.cfpe-st-scene--pickedup .cfpe-st-photo__img {
		max-width: 100%;
		max-height: 42vh;
		transform: none !important;
	}

	.cfpe-st-scene--findfactory .cfpe-st-media {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.9rem 1rem;
		width: 100%;
	}
	.cfpe-st-scene--findfactory .cfpe-st-photo { width: auto; }
	.cfpe-st-scene--findfactory .cfpe-st-photo__img {
		max-width: 100%;
		max-height: 28vh;
		transform: none !important;
	}

	.cfpe-st-scene--hardtomake .cfpe-st-media {
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		grid-template-rows: auto;
		justify-items: stretch;
		align-items: stretch;
		gap: 0.55rem;
		width: 100%;
		row-gap: 0.9rem;
	}
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset {
		position: relative;
		grid-area: auto;
		width: auto;
	}
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset .cfpe-st-photo__img {
		width: 100%;
		height: 18vh;
		max-width: none;
		max-height: none;
		object-fit: cover;
		transform: none !important;
	}
	.cfpe-st-scene--hardtomake .cfpe-st-photo--main {
		grid-column: 1 / -1;
		grid-row: auto;
		margin-top: 0.2rem;
	}
	.cfpe-st-scene--hardtomake .cfpe-st-photo--main .cfpe-st-photo__img {
		max-height: 32vh;
		max-width: 100%;
		transform: none !important;
	}

	.cfpe-st-scene--closedshop {
		padding-top: clamp(3rem, 8vh, 5rem);
		padding-bottom: clamp(3rem, 8vh, 5rem);
	}
	.cfpe-st-scene--closedshop .cfpe-st-text { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
	.cfpe-st-scene--rockstar .cfpe-st-media,
	.cfpe-st-scene--namm .cfpe-st-media,
	.cfpe-st-scene--movingtochina .cfpe-st-media,
	.cfpe-st-scene--patent .cfpe-st-media {
		display: flex;
		flex-direction: column;
		align-items: center;
		grid-template-columns: none;
		gap: 1rem;
	}
	.cfpe-st-scene--rockstar .cfpe-st-photo--inset,
	.cfpe-st-scene--namm .cfpe-st-photo--inset,
	.cfpe-st-scene--movingtochina .cfpe-st-photo--inset {
		width: min(70vw, 280px);
	}
	.cfpe-st-scene--patent .cfpe-st-photo--inset {
		width: clamp(170px, 46vw, 240px);
	}
	.cfpe-st-scene--hardtomake .cfpe-st-media {
		grid-template-columns: repeat(2, 1fr);
	}
	.cfpe-st-scene--hardtomake .cfpe-st-photo--inset .cfpe-st-photo__img { height: 16vh; }
	.cfpe-st-scene--working .cfpe-st-media,
	.cfpe-st-scene--pickedup .cfpe-st-media { flex-direction: column; }
	.cfpe-st-scene--working .cfpe-st-photo__img,
	.cfpe-st-scene--pickedup .cfpe-st-photo__img {
		max-height: 36vh;
		max-width: 92vw;
	}
}

/* ============================================================
 * Full-screen photo viewer
 * ============================================================ */

/* "Photos open larger" cue. */
.cfpe-story__tip {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	color: rgba(236, 231, 223, 0.42);
}
.cfpe-story__tip--mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
	.cfpe-story__tip--touch { display: none; }
	.cfpe-story__tip--mouse { display: inline; }
}

.cfpe-story [data-cfpe-zoom] {
	cursor: zoom-in;
	-webkit-tap-highlight-color: transparent;
	transition: filter 0.25s ease;
}
@media (hover: hover) {
	.cfpe-story [data-cfpe-zoom]:hover { filter: brightness(1.1); }
}
.cfpe-story [data-cfpe-zoom]:focus { outline: none; }
.cfpe-story [data-cfpe-zoom]:focus-visible {
	outline: 2px solid rgba(231, 200, 140, 0.95);
	outline-offset: 4px;
}

/* While the scroll animation runs, only scenes that are mostly on screen take
 * clicks (faded neighbours can overlap them), and the caption lets taps fall
 * through to the photo beneath it. */
.cfpe-anim .cfpe-st-scene:not(.is-live) .cfpe-st-el { pointer-events: none; }
.cfpe-anim .cfpe-st-text { pointer-events: none; }

/* The viewer itself. */
.cfpe-lb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	overscroll-behavior: contain;
	-webkit-tap-highlight-color: transparent;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #ece7df;
}
.cfpe-lb[hidden] { display: none; }
.cfpe-lb.is-open { opacity: 1; pointer-events: auto; }
.cfpe-lb:focus { outline: none; }

.cfpe-lb__backdrop {
	position: absolute;
	inset: 0;
	background: #060607;
}

.cfpe-lb__figure {
	position: relative;
	margin: 0;
	padding-top: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 100vw;
	will-change: transform;
}
.cfpe-lb.is-settling .cfpe-lb__figure,
.cfpe-lb.is-settling .cfpe-lb__backdrop { transition: transform 0.22s ease, opacity 0.22s ease; }

.cfpe-lb__img {
	display: block;
	max-width: 100vw;
	max-height: 100vh;
	object-fit: contain;
	background: #111;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	transition: opacity 0.18s ease;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}
.cfpe-lb.is-loading .cfpe-lb__img { opacity: 0; }

/* Zooming the open photo (assets/shared/photo-zoom.js): only the photo
   grows; the caption and arrows step aside while it is zoomed. */
.cfpe-lb { overflow: hidden; }
.cfpe-lb__img { position: relative; z-index: 1; cursor: zoom-in; }
.cfpe-lb.is-zoomed .cfpe-lb__img { cursor: grab; }
.cfpe-lb.is-zoom-dragging .cfpe-lb__img { cursor: grabbing; }
.cfpe-lb.is-zoom-settling .cfpe-lb__img { transition: transform 0.22s ease, opacity 0.18s ease; }
.cfpe-lb__cap,
.cfpe-lb__nav { transition: opacity 0.18s ease, background 0.2s ease; }
.cfpe-lb.is-zoomed .cfpe-lb__cap,
.cfpe-lb.is-zoomed .cfpe-lb__nav { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
	.cfpe-lb.is-zoom-settling .cfpe-lb__img,
	.cfpe-lb__cap,
	.cfpe-lb__nav { transition: none; }
}

.cfpe-lb__cap {
	max-width: min(52ch, 90vw);
	margin: 0;
	padding: 0 16px;
	text-align: center;
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(0.95rem, 1.4vw, 1.12rem);
	line-height: 1.4;
	color: rgba(236, 231, 223, 0.82);
}
.cfpe-lb__cap:empty { display: none; }

.cfpe-lb__count {
	position: absolute;
	top: 18px;
	left: 20px;
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	color: rgba(236, 231, 223, 0.55);
}
.cfpe-lb__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	margin: -1px;
}

.cfpe-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 20, 22, 0.55);
	color: #f4efe6;
	cursor: pointer;
	transition: background 0.2s ease;
}
.cfpe-lb__btn[hidden] { display: none; }
.cfpe-lb__btn:hover { background: rgba(60, 60, 64, 0.75); }
.cfpe-lb__btn:focus { outline: none; }
.cfpe-lb.is-keyboard .cfpe-lb__btn:focus-visible { outline: 2px solid rgba(231, 200, 140, 0.95); outline-offset: 2px; }
.cfpe-lb__close { top: 8px; right: 10px; }
.cfpe-lb__nav { top: 50%; margin-top: -24px; }
.cfpe-lb__prev { left: 22px; }
.cfpe-lb__next { right: 22px; }

@media (max-width: 699px) {
	.cfpe-lb__count { top: 20px; left: 16px; }
	.cfpe-lb__close { top: max(8px, env(safe-area-inset-top)); right: 6px; }
	.cfpe-lb__nav { width: 40px; height: 40px; margin-top: -20px; background: rgba(12, 12, 13, 0.5); }
	.cfpe-lb__prev { left: 6px; }
	.cfpe-lb__next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.cfpe-lb,
	.cfpe-lb__img,
	.cfpe-lb.is-settling .cfpe-lb__figure,
	.cfpe-lb.is-settling .cfpe-lb__backdrop { transition: none; }
}

/* Phones: the intro filled most of the first screen with black, and the first
   photo started below the fold. A shorter intro lets the opening scene begin
   drifting in on the first screen, and the title appears sooner. */
@media (max-width: 699px) {
	.cfpe-story__intro {
		height: 34vh;
		height: 34svh;
		min-height: 220px;
		gap: 1rem;
	}
	.cfpe-story__kicker {
		animation-duration: 0.9s;
		animation-delay: 0s;
	}
}

/* ============================================================
 * Outro: where the story meets the product
 * ============================================================ */
.cfpe-story__outro {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	max-width: 640px;
	margin: clamp(2rem, 8vh, 5rem) auto 0;
	padding: 0 1.5rem;
	text-align: center;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: #ece7df;
}
.cfpe-story__outro-kicker {
	margin: 0 0 0.9rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #e7c88c;
}
.cfpe-story__outro-title {
	margin: 0 0 1rem;
	font-family: "Fraunces", Georgia, serif;
	font-weight: 400;
	font-style: italic;
	font-size: clamp(1.9rem, 5.5vw, 3rem);
	line-height: 1.15;
	color: #f4efe6;
	text-wrap: balance;
}
.cfpe-story__outro-text {
	margin: 0 auto 1.6rem;
	max-width: 50ch;
	font-size: 1.02rem;
	line-height: 1.65;
	color: #b7b1a6;
}
.cfpe-story__outro-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}
.cfpe-story__outro-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.7rem 1.5rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	color: #ece7df;
	background: rgba(27, 27, 31, 0.9);
	border: 1px solid rgba(236, 231, 223, 0.18);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cfpe-story__outro-btn:hover {
	color: #f7e088;
	border-color: rgba(231, 200, 140, 0.5);
	background: rgba(231, 200, 140, 0.1);
}
.cfpe-story__outro-btn--primary {
	color: #17130a;
	background: linear-gradient(180deg, #f3d99b, #e7c88c);
	border-color: rgba(231, 200, 140, 0.8);
	font-weight: 700;
	padding-inline: 1.9rem;
}
.cfpe-story__outro-btn--primary:hover {
	color: #17130a;
	background: linear-gradient(180deg, #f7e2ad, #edd19a);
	border-color: #f7e088;
}
.cfpe-story__outro-btn:focus-visible { outline: 2px solid #f7e088; outline-offset: 2px; }
@media (max-width: 600px) {
	.cfpe-story__outro-actions { flex-direction: column; align-items: center; }
	.cfpe-story__outro-btn { width: 100%; max-width: 320px; }
}
