/* =========================================================================
   P1 Wraps — CASE STUDY pages (/case-studies, /case-studies/<slug>)
   Loaded only by P1CaseStudy/P1CaseStudies, on top of /p1wraps/styles.css.
   Everything is scoped under .p1-case so nothing leaks into the service /
   landing / gallery styles. Ported from "Simple Sites\p1wraps\case-study-mockup".

   New-for-case-studies ideas:
     • .cs-hero      full-bleed photo + faded job-branding word covering the page edge
     • .cs-glance    "at a glance" fact strip (client / vehicle / services / material)
     • .cs-reel      portrait 9:16 reel in a phone-style frame
     • .cs-chapter   alternating story chapters (copy + photos)
     • .cs-spec      material / equipment spec callouts
     • .cs-compare   arrived vs delivered
     • .cs-build     behind-the-scenes filmstrip
     • .cs-gallery   finished-car grid (3-up, feature tile spans)
     • .cs-related   more case studies

   Per-job accent: --cs-accent is the colour of THIS job's livery; defaults to
   the P1 teal, so a job with no natural colour still looks on-brand.
   ========================================================================= */
.p1-case {
	--cs-accent: #45d8cc;
	--cs-accent-ink: #0a1a1c;
	--cs-ink: #111a27;
	--cs-ink-2: #131d2b;
	--cs-line: rgba(255, 255, 255, 0.1);
	--cs-wrap: 1152px;
	background: var(--cs-ink);
	color: var(--p1-text);
}
.p1-case .cs-wrap {
	width: 100%;
	max-width: var(--cs-wrap);
	margin: 0 auto;
	padding-inline: 24px;
}
.p1-case .cs-eyebrow {
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 15px;
	color: var(--cs-accent);
	margin: 0 0 12px;
}
.p1-case h2 {
	font-size: clamp(30px, 3.4vw, 44px);
	color: #fff;
	letter-spacing: -0.02em;
	line-height: 1.08;
}
.p1-case .accent {
	color: var(--cs-accent);
}
.p1-case .cs-prose p {
	font-size: 17px;
	line-height: 1.75;
	color: var(--p1-muted);
	margin: 0 0 18px;
}
.p1-case .cs-prose p strong {
	color: #fff;
	font-weight: 600;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.p1-case .cs-hero {
	position: relative;
	min-height: 92vh;
	display: flex;
	align-items: flex-end;
	padding: 170px 0 64px;
	overflow: hidden;
	isolation: isolate;
}
.p1-case .cs-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 62% 50%;
	z-index: -3;
}
/* Scrim: clear at the top-right so the car reads, solid at the bottom-left under the copy. */
.p1-case .cs-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		linear-gradient(90deg, rgba(17, 26, 39, 0.92) 0%, rgba(17, 26, 39, 0.55) 45%, rgba(17, 26, 39, 0.15) 100%),
		linear-gradient(180deg, rgba(17, 26, 39, 0.35) 0%, rgba(17, 26, 39, 0) 30%, rgba(17, 26, 39, 0.75) 78%, var(--cs-ink) 100%);
}
/* Job branding, oversized and bleeding off the page. Placeholder = outlined type; the
   real thing will be the job's vector graphic (R.S. lettering / the livery stripe) at the
   same opacity. Faded with a gradient mask so it never fights the headline. */
.p1-case .cs-hero-brand {
	position: absolute;
	right: -0.12em;
	top: 90px;
	z-index: -1;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: clamp(120px, 24vw, 340px);
	line-height: 0.85;
	letter-spacing: -0.05em;
	color: transparent;
	-webkit-text-stroke: 2px rgba(255, 255, 255, 0.55);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	opacity: 0.32;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
}
.p1-case .cs-hero-brand small {
	display: block;
	font-size: 0.32em;
	letter-spacing: 0.02em;
	-webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.45);
}
.p1-case .cs-hero-copy {
	max-width: 760px;
}
.p1-case .cs-crumb {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 14px;
	color: var(--p1-muted);
	margin-bottom: 26px;
}
.p1-case .cs-crumb a:hover {
	color: var(--cs-accent);
}
.p1-case .cs-hero h1 {
	font-size: clamp(38px, 5.2vw, 72px);
	line-height: 1;
	letter-spacing: -0.035em;
	color: #fff;
	margin: 0 0 20px;
	text-wrap: balance;
}
.p1-case .cs-hero-sub {
	font-size: clamp(17px, 1.5vw, 21px);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.82);
	max-width: 56ch;
	margin: 0 0 34px;
}
.p1-case .cs-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.p1-case .btn-accent {
	background: var(--cs-accent);
	color: var(--cs-accent-ink);
}

/* ── At a glance ─────────────────────────────────────────────────────── */
/* Desktop: one ruled strip, five columns. Narrower: a spec-sheet list, label left,
   value right, one hairline per row. No cards, no chips, no swatches. */
.p1-case .cs-glance {
	position: relative;
	z-index: 2;
	background: var(--cs-ink);
	border-bottom: 1px solid var(--cs-line);
}
.p1-case .cs-glance-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	column-gap: 32px;
	margin: 0;
	padding: 28px 0;
}
.p1-case .cs-glance-item {
	min-width: 0;
	padding-left: 20px;
	border-left: 1px solid var(--cs-line);
}
.p1-case .cs-glance-item:first-child {
	padding-left: 0;
	border-left: 0;
}
.p1-case .cs-glance-k {
	margin: 0 0 6px;
	font-family: var(--font-heading);
	font-size: 14px;
	color: var(--p1-muted);
}
.p1-case .cs-glance-v {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 15.5px;
	line-height: 1.4;
	color: #fff;
	text-wrap: pretty;
}
.p1-case .cs-glance-v a {
	color: var(--cs-accent);
}
.p1-case .cs-glance-v a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
@media (max-width: 1080px) {
	.p1-case .cs-glance-grid {
		grid-template-columns: 1fr;
		padding: 8px 0;
	}
	.p1-case .cs-glance-item {
		display: grid;
		grid-template-columns: 140px 1fr;
		gap: 16px;
		align-items: baseline;
		padding: 14px 0;
		border-left: 0;
		border-bottom: 1px solid var(--cs-line);
	}
	.p1-case .cs-glance-item:last-child {
		border-bottom: 0;
	}
	.p1-case .cs-glance-k {
		margin: 0;
	}
}
@media (max-width: 480px) {
	.p1-case .cs-glance-item {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}

/* ── Intro + portrait reel ───────────────────────────────────────────── */
.p1-case .cs-intro {
	padding: 120px 0 110px;
	background: var(--cs-ink);
}
.p1-case .cs-intro-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 72px;
	align-items: center;
}
.p1-case .cs-intro-copy h2 {
	margin: 0 0 24px;
}
.p1-case .cs-intro .cs-prose p:first-of-type {
	font-size: 21px;
	line-height: 1.55;
	color: #fff;
	font-weight: 300;
}
/* Portrait reel: 9:16 in a soft phone frame, glowing in the job's accent. */
.p1-case .cs-reel {
	position: relative;
	width: min(100%, 360px);
	margin-inline: auto;
	aspect-ratio: 9 / 16;
	border-radius: 0;
	overflow: hidden;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.14);
}
.p1-case .cs-reel-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.p1-case .cs-reel img,
.p1-case .cs-reel video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.p1-case .cs-reel-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 84px;
	height: 84px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--cs-accent) 92%, transparent);
	color: var(--cs-accent-ink);
	cursor: pointer;
}

.p1-case .cs-reel-play:hover {
	background: var(--cs-accent);
}
.p1-case .cs-reel-play svg {
	width: 34px;
	height: 34px;
	margin-left: 4px;
}
.p1-case .cs-reel-tag {
	position: absolute;
	left: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 11px;
	background: rgba(0, 0, 0, 0.7);
	font-family: var(--font-heading);
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}
.p1-case .cs-reel-tag i {
	display: none;
}
.p1-case .cs-reel-caption {
	margin: 18px auto 0;
	max-width: 360px;
	text-align: center;
	font-size: 14px;
	color: var(--p1-muted);
}

/* ── Story chapters ──────────────────────────────────────────────────── */
.p1-case .cs-story {
	background: var(--cs-ink-2);
	padding: 120px 0 40px;
	position: relative;
	overflow: hidden;
}
.p1-case .cs-story-head {
	max-width: 720px;
	margin: 0 auto 90px;
	text-align: center;
}
.p1-case .cs-story-head p {
	margin-top: 16px;
	color: var(--p1-muted);
	font-size: 17px;
	line-height: 1.65;
}
.p1-case .cs-chapter {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: center;
	margin: 0 auto 120px;
	position: relative;
}
.p1-case .cs-chapter--flip .cs-chapter-media {
	order: 2;
}
.p1-case .cs-chapter-body h2 {
	font-size: clamp(26px, 2.8vw, 36px);
	margin: 0 0 18px;
}
.p1-case .cs-chapter-body .cs-prose p {
	font-size: 16.5px;
}
.p1-case .cs-chapter-media {
	position: relative;
}
/* Single-image chapters: locked square crop so the photo stands as tall as the copy. */
.p1-case .cs-chapter-media img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}
/* Two stacked images: a big one and a smaller offset one, for chapters with detail shots. */
.p1-case .cs-chapter-media.is-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.p1-case .cs-chapter-media.is-duo img {
	box-shadow: none;
}
.p1-case .cs-chapter-media.is-duo img:first-child {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 10;
}
.p1-case .cs-chapter-media.is-duo img + img {
	aspect-ratio: 1 / 1;
}
.p1-case .cs-caption {
	margin-top: 12px;
	font-size: 13.5px;
	color: var(--p1-muted);
}

/* Spec row — plain hairline-ruled line, no card, no icon tile. Logo (if any) sits left. */
.p1-case .cs-spec {
	margin-top: 28px;
	padding: 18px 0;
	border-top: 1px solid var(--cs-line);
	border-bottom: 1px solid var(--cs-line);
	display: flex;
	align-items: center;
	gap: 22px;
}
.p1-case .cs-spec-logo {
	flex: none;
	height: 28px;
	width: auto;
	display: block;
}
.p1-case .cs-spec-k {
	display: block;
	font-family: var(--font-heading);
	font-size: 14px;
	color: var(--p1-muted);
	margin-bottom: 3px;
}
.p1-case .cs-spec-v {
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 17px;
	color: #fff;
}
.p1-case .cs-spec-v small {
	display: block;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 14px;
	color: var(--p1-muted);
	margin-top: 2px;
}

/* ── Arrived vs delivered ────────────────────────────────────────────── */
.p1-case .cs-compare {
	background: var(--cs-ink-2);
	padding: 40px 0 130px;
}
.p1-case .cs-compare-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
}
.p1-case .cs-compare-cell {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}
.p1-case .cs-compare-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.p1-case .cs-compare-cell figcaption {
	position: absolute;
	left: 18px;
	bottom: 18px;
	padding: 8px 14px;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
}
.p1-case .cs-compare-cell.is-after figcaption {
	background: var(--cs-accent);
	color: var(--cs-accent-ink);
}

/* ── Pull quote ──────────────────────────────────────────────────────── */
.p1-case .cs-quote {
	position: relative;
	padding: 120px 0;
	background: var(--cs-ink);
	overflow: hidden;
}
.p1-case .cs-quote::before {
	content: '“';
	position: absolute;
	left: 50%;
	top: 40px;
	transform: translateX(-50%);
	font-family: var(--font-heading);
	font-size: 420px;
	line-height: 1;
	color: color-mix(in srgb, var(--cs-accent) 9%, transparent);
	pointer-events: none;
}
.p1-case .cs-quote blockquote {
	position: relative;
	margin: 0 auto;
	max-width: 880px;
	text-align: center;
	font-family: var(--font-heading);
	font-weight: 500;
	font-size: clamp(24px, 3vw, 38px);
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: #fff;
	text-wrap: balance;
}
.p1-case .cs-quote figcaption {
	margin-top: 28px;
	text-align: center;
	font-size: 15px;
	color: var(--p1-muted);
}
.p1-case .cs-quote figcaption b {
	color: var(--cs-accent);
	font-weight: 600;
}

/* ── Behind the scenes filmstrip ─────────────────────────────────────── */
.p1-case .cs-build {
	background: var(--cs-ink);
	padding: 0 0 120px;
}
.p1-case .cs-build-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 40px;
	margin-bottom: 36px;
}
.p1-case .cs-build-head p {
	max-width: 46ch;
	color: var(--p1-muted);
	font-size: 16px;
	line-height: 1.6;
}
.p1-case .cs-strip {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 0 24px 18px;
	margin: 0 -24px;
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--cs-accent) 60%, transparent) transparent;
}
.p1-case .cs-strip figure {
	flex: 0 0 auto;
	width: clamp(240px, 26vw, 340px);
	margin: 0;
	scroll-snap-align: start;
}
.p1-case .cs-strip img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.p1-case .cs-strip figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	color: var(--p1-muted);
}

/* ── Finished gallery ────────────────────────────────────────────────── */
.p1-case .cs-gallery {
	background: var(--cs-ink-2);
	padding: 120px 0;
}
.p1-case .cs-gallery-head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 48px;
}
.p1-case .cs-gallery-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 1fr;
	gap: 8px;
}
.p1-case .cs-gallery-grid li {
	margin: 0;
	min-width: 0;
	/* Lightbox close returns to #cs-g-N; keep the tile clear of the sticky header. */
	scroll-margin-top: 140px;
}
.p1-case .cs-gallery-grid li.is-wide {
	grid-column: span 2;
}
.p1-case .cs-gallery-grid li.is-big {
	grid-column: span 2;
	grid-row: span 2;
}
.p1-case .cs-gallery-grid a {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #000;
}
.p1-case .cs-gallery-grid li.is-wide a {
	aspect-ratio: 2 / 1;
}
.p1-case .cs-gallery-grid li.is-big a {
	aspect-ratio: auto;
}
.p1-case .cs-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}


/* ── Services used ───────────────────────────────────────────────────── */
.p1-case .cs-services {
	background: var(--cs-ink);
	padding: 120px 0;
}
.p1-case .cs-services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 44px;
}
.p1-case .cs-svc {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #000;
	border-radius: 0;
}
.p1-case .cs-svc img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
	opacity: 0.85;
}

.p1-case .cs-svc::after {
	content: '';
	pointer-events: none;
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 35%, rgba(17, 26, 39, 0.92) 100%);
}
.p1-case .cs-svc-body {
	position: absolute;
	left: 22px;
	right: 22px;
	bottom: 20px;
	z-index: 1;
}
.p1-case .cs-svc-body span {
	display: block;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cs-accent);
	margin-bottom: 6px;
	font-family: var(--font-heading);
}
.p1-case .cs-svc-body h3 {
	font-size: 22px;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
}
.p1-case .cs-svc-body h3 svg {
	width: 20px;
	height: 20px;
	color: var(--cs-accent);
	transition: transform 0.2s ease;
}
.p1-case .cs-svc:hover h3 svg {
	transform: translateX(4px);
}

/* ── Related case studies ────────────────────────────────────────────── */
.p1-case .cs-related {
	background: var(--cs-ink-2);
	padding: 120px 0;
}
.p1-case .cs-related-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 40px;
	margin-bottom: 40px;
}
.p1-case .cs-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.p1-case .cs-card {
	display: block;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--cs-line);
	border-radius: 0;
	overflow: hidden;
	transition:
		transform 0.2s ease,
		border-color 0.2s ease;
}
.p1-case .cs-card:hover {
	border-color: color-mix(in srgb, var(--cs-accent) 50%, transparent);
}
.p1-case .cs-card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}
.p1-case .cs-card-body {
	padding: 20px 22px 24px;
}
/* Tags read as one typographic line ("Fleet branding / Commercial / 6 vehicles"), not pill chips. */
.p1-case .cs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}
.p1-case .cs-tags li {
	font-family: var(--font-heading);
	font-size: 14px;
	font-weight: 500;
	color: var(--p1-muted);
}
.p1-case .cs-tags li + li::before {
	content: '/';
	margin: 0 0.55em;
	color: var(--cs-line);
}
.p1-case .cs-tags li.is-accent {
	color: var(--cs-accent);
}
.p1-case .cs-card h3 {
	font-size: 20px;
	color: #fff;
	margin: 0 0 8px;
	line-height: 1.2;
}
.p1-case .cs-card p {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--p1-muted);
}
.p1-case .cs-card-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 14px;
	color: var(--cs-accent);
}
.p1-case .cs-card-more svg {
	width: 16px;
	height: 16px;
}

/* ── Case studies index page ─────────────────────────────────────────── */
.p1-case .cs-index-hero {
	padding: 170px 0 60px;
	background: var(--cs-ink);
}
.p1-case .cs-index-hero h1 {
	font-size: clamp(38px, 5vw, 66px);
	letter-spacing: -0.035em;
	color: #fff;
	margin: 0 0 18px;
}
.p1-case .cs-index-hero p {
	max-width: 60ch;
	font-size: 18px;
	line-height: 1.6;
	color: var(--p1-muted);
}
.p1-case .cs-index {
	padding: 40px 0 130px;
	background: var(--cs-ink);
}
.p1-case .cs-feature {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	border: 1px solid var(--cs-line);
	border-radius: 0;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.03);
	margin-bottom: 28px;
	transition: border-color 0.2s ease;
}
.p1-case .cs-feature:hover {
	border-color: color-mix(in srgb, var(--cs-accent) 50%, transparent);
}
.p1-case .cs-feature img {
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	display: block;
}
.p1-case .cs-feature-body {
	padding: 44px 44px 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.p1-case .cs-feature-body h2 {
	font-size: clamp(28px, 3vw, 40px);
	margin: 0 0 14px;
}
.p1-case .cs-feature-body p {
	font-size: 16.5px;
	line-height: 1.65;
	color: var(--p1-muted);
}
.p1-case .cs-feature-body .cs-card-more {
	margin-top: 22px;
}
/* Alternate tiles mirror (image right) so a short list doesn't read as a template. */
.p1-case .cs-feature--flip {
	grid-template-columns: 1fr 1.4fr;
}
.p1-case .cs-feature--flip .cs-feature-body {
	order: -1;
}
/* Below the case studies: pointer to the full gallery. */
.p1-case .cs-more {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 56px;
	padding-top: 36px;
	border-top: 1px solid var(--cs-line);
}
.p1-case .cs-more h2 {
	font-size: clamp(22px, 2.4vw, 30px);
	margin: 0 0 6px;
}
.p1-case .cs-more p {
	margin: 0;
	color: var(--p1-muted);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
	.p1-case .cs-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.p1-case .cs-services-grid,
	.p1-case .cs-cards {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 860px) {
	.p1-case .cs-hero {
		min-height: 0;
		padding: 130px 0 48px;
	}
	.p1-case .cs-hero-bg {
		object-position: 70% 50%;
	}
	.p1-case .cs-hero-brand {
		top: 70px;
		font-size: clamp(96px, 30vw, 160px);
	}
	.p1-case .cs-intro,
	.p1-case .cs-story,
	.p1-case .cs-gallery,
	.p1-case .cs-services,
	.p1-case .cs-related,
	.p1-case .cs-quote {
		padding-block: 72px;
	}
	.p1-case .cs-intro-grid,
	.p1-case .cs-chapter,
	.p1-case .cs-feature {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.p1-case .cs-feature--flip .cs-feature-body {
		order: 0;
	}
	.p1-case .cs-chapter {
		margin-bottom: 72px;
	}
	.p1-case .cs-chapter--flip .cs-chapter-media {
		order: 0;
	}
	.p1-case .cs-compare-grid {
		grid-template-columns: 1fr;
	}
	.p1-case .cs-gallery-grid {
		grid-template-columns: 1fr 1fr;
	}
	.p1-case .cs-gallery-grid li.is-big,
	.p1-case .cs-gallery-grid li.is-wide {
		grid-column: span 2;
		grid-row: auto;
	}
	.p1-case .cs-gallery-grid li.is-big a {
		aspect-ratio: 4 / 3;
	}
	.p1-case .cs-services-grid,
	.p1-case .cs-cards {
		grid-template-columns: 1fr;
	}
	.p1-case .cs-build-head,
	.p1-case .cs-related-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	.p1-case .cs-feature img {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
	.p1-case .cs-feature-body {
		padding: 28px 24px 30px;
	}
	.p1-case .cs-quote::before {
		font-size: 260px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.p1-case .cs-reel-play::before {
		animation: none;
	}
}

/* ── Gallery lightbox: zero-JS :target overlays (platform rule 20) ───────
   Each thumbnail links to #cs-shot-N; the overlay with that id shows via :target.
   Close/scrim go back to the thumbnail's own #cs-g-N, so the page lands where it was.
   Overlay img is loading="lazy" inside display:none, so full-size files only load on open.
   Rule 20a: no transform/filter/animation on any ancestor; z-index beats .hdr (50) + .btt (120). */
.cs-lb {
	position: fixed;
	inset: 0;
	z-index: 500;
	display: none;
	grid-template-columns: 72px 1fr 72px;
	align-items: center;
	background: rgba(9, 14, 22, 0.96);
}
.cs-lb:target {
	display: grid;
}
.cs-lb-scrim {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.cs-lb-fig {
	position: relative;
	z-index: 1;
	grid-column: 2;
	margin: 0;
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 64px 0 56px;
	box-sizing: border-box;
	min-height: 0;
	pointer-events: none;
}
.cs-lb-fig img {
	max-width: 100%;
	max-height: 100%;
	min-height: 0;
	object-fit: contain;
	display: block;
	pointer-events: auto;
}
.cs-lb-fig figcaption {
	flex: none;
	font-size: 14px;
	color: var(--p1-muted);
	text-align: center;
	max-width: 70ch;
}
.cs-lb-x,
.cs-lb-prev,
.cs-lb-next {
	position: relative;
	z-index: 2;
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}
.cs-lb-x:hover,
.cs-lb-prev:hover,
.cs-lb-next:hover {
	background: var(--cs-accent);
	border-color: var(--cs-accent);
	color: var(--cs-accent-ink);
}
.cs-lb-x svg,
.cs-lb-prev svg,
.cs-lb-next svg {
	width: 22px;
	height: 22px;
}
.cs-lb-x {
	position: absolute;
	top: 18px;
	right: 18px;
}
.cs-lb-prev {
	grid-column: 1;
	grid-row: 1;
	justify-self: center;
}
.cs-lb-next {
	grid-column: 3;
	grid-row: 1;
	justify-self: center;
}
.cs-lb-count {
	position: absolute;
	z-index: 2;
	top: 30px;
	left: 24px;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 720px) {
	.cs-lb {
		grid-template-columns: 1fr;
	}
	.cs-lb-fig {
		grid-column: 1;
		padding: 64px 12px 80px;
	}
	.cs-lb-prev,
	.cs-lb-next {
		position: absolute;
		bottom: 16px;
		grid-column: auto;
	}
	.cs-lb-prev {
		left: 16px;
	}
	.cs-lb-next {
		right: 16px;
	}
}