/* Case Studies hub + cards — accessible typography */

.wh-case-studies-hub {
	--wh-cs-card-gap: clamp(20px, 3vw, 32px);
}

.wh-cs-back-wrap {
	margin: 0 0 12px;
}

.wh-cs-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: max(1rem, 16px);
	font-weight: 600;
	color: var(--tx-muted, #6b7280);
	text-decoration: none;
}

.wh-cs-back:hover,
.wh-cs-back:focus-visible {
	color: var(--tx-accent, #c8102e);
}

.wh-cs-hub-hero {
	padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
	background: var(--tx-bg-soft, #f7f7f5);
	border-bottom: 1px solid var(--tx-border, #e5e5e5);
}

.wh-cs-hub-hero__title {
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	line-height: 1.15;
	max-width: 18ch;
	margin-bottom: 16px;
}

.wh-cs-hub-hero__lead {
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	line-height: 1.75;
	color: var(--tx-lead, #4b5563);
	max-width: 62ch;
	margin: 0 0 24px;
}

.wh-cs-hub-hero__actions {
	margin-top: 8px;
}

.wh-cs-hub-grid {
	padding: var(--space-section, clamp(48px, 6.5vw, 88px)) 0;
}

.wh-cs-hub-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: var(--wh-cs-card-gap);
}

.wh-cs-card {
	border: 1px solid var(--tx-border, #e5e5e5);
	border-radius: var(--tx-radius-lg, 14px);
	background: var(--tx-bg-card, #fff);
	overflow: hidden;
	box-shadow: var(--tx-shadow-sm, 0 1px 2px rgba(10, 10, 10, 0.05));
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.wh-cs-card:hover,
.wh-cs-card:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--tx-shadow-md, 0 8px 24px rgba(10, 10, 10, 0.08));
}

.wh-cs-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.wh-cs-card__media {
	aspect-ratio: 16 / 10;
	background: var(--tx-bg-soft, #f7f7f5);
	overflow: hidden;
}

.wh-cs-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wh-cs-card__body {
	padding: clamp(20px, 3vw, 28px);
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
}

.wh-cs-card__eyebrow {
	margin: 0;
	font-size: max(0.8125rem, 13px);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tx-muted, #6b7280);
}

.wh-cs-card__title {
	margin: 0;
	font-size: clamp(1.375rem, 2.2vw, 1.75rem);
	line-height: 1.25;
}

.wh-cs-card__excerpt {
	margin: 0;
	font-size: clamp(1rem, 1.4vw, 1.125rem);
	line-height: 1.75;
	color: var(--tx-lead, #4b5563);
	flex: 1;
}

.wh-cs-card__cta {
	margin-top: 8px;
	font-size: max(1rem, 16px);
	font-weight: 700;
	color: var(--tx-accent, #c8102e);
}

.wh-cs-hub-empty {
	font-size: 1.125rem;
	line-height: 1.75;
	color: var(--tx-muted, #6b7280);
}

@media (max-width: 640px) {
	.wh-cs-hub-grid__list {
		grid-template-columns: 1fr;
	}
}

/* Standalone Case Study page (/case-study/) -------------------------------- */

.wh-case-study-page {
	background: #fff;
	color: #141414;
}

/* Hero — left-aligned split layout (not centered masthead) */
.wh-case-study-hero--split {
	text-align: left;
	border-bottom: 1px solid #ececec;
}

.wh-case-study-hero__copy {
	text-align: left;
}

.wh-case-study-hero__copy .i3d-crumbs {
	margin-bottom: 16px;
	text-align: left;
}

.wh-case-study-hero__copy .i3d-crumbs,
.wh-case-study-hero__copy .i3d-crumbs--start {
	width: 100%;
}

.wh-case-study-hero__copy .i3d-crumbs__list,
.wh-case-study-hero__copy .i3d-crumbs--start .i3d-crumbs__list {
	justify-content: flex-start;
	margin-left: 0;
	margin-right: auto;
}

.wh-case-study-hero__copy .i3d-kicker,
.wh-case-study-hero__copy .wh-rnd-hero__title,
.wh-case-study-hero__copy .wh-rnd-hero__lead {
	margin-left: 0;
	margin-right: auto;
	text-align: left;
}

.wh-case-study-hero__copy .wh-rnd-hero__title {
	max-width: 16ch;
}

.wh-case-study-hero__copy .wh-rnd-hero__lead {
	max-width: 58ch;
}

.wh-case-study-hero__copy .wh-rnd-hero__actions {
	justify-content: flex-start;
}

.wh-case-study-hero__grid:not(:has(.wh-rnd-hero__media)) {
	grid-template-columns: 1fr;
	max-width: 820px;
}

.wh-case-study-hero__grid .wh-rnd-hero__media,
.wh-case-study-hero__media {
	background: transparent;
	border: 0;
	box-shadow: none;
	margin: 0;
	min-width: 0;
}

.wh-case-study-hero__grid .wh-rnd-hero__media img {
	width: 100%;
	height: auto;
	aspect-ratio: auto;
	max-height: none;
	object-fit: contain;
	object-position: center;
	background: transparent;
	border-radius: 22px;
}

/* Hero video — click-to-play stage */
.wh-case-study-hero__video {
	position: relative;
	width: 100%;
	isolation: isolate;
}

.wh-case-study-hero__video .wh-video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	width: 100%;
	background: #111;
	overflow: hidden;
	border-radius: 22px;
	box-shadow:
		0 18px 48px rgba(15, 23, 42, 0.12),
		0 2px 0 rgba(200, 16, 46, 0.08);
	transform: translateZ(0);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.wh-case-study-hero__video:hover .wh-video-frame,
.wh-case-study-hero__video:focus-within .wh-video-frame {
	transform: translateY(-3px);
	box-shadow:
		0 28px 56px rgba(15, 23, 42, 0.16),
		0 2px 0 rgba(200, 16, 46, 0.12);
}

.wh-case-study-hero__video .wh-video-frame iframe,
.wh-case-study-hero__video .wh-video-frame .wh-video-el,
.wh-case-study-hero__video .wh-video-frame video,
.wh-case-study-hero__video .wh-video-frame .i3d-video__iframe,
.wh-case-study-hero__video .wh-video-frame .i3d-video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	object-fit: cover;
}

.wh-case-study-hero__video .i3d-video__play {
	appearance: none;
	border: 0;
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	cursor: pointer;
	background: #111;
	border-radius: 22px;
}

.wh-case-study-hero__video .i3d-video__play::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 10, 0.18) 0%, transparent 36%),
		linear-gradient(0deg, rgba(10, 10, 10, 0.55) 0%, transparent 42%);
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.wh-case-study-hero__video .i3d-video__play-btn {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	width: 76px;
	height: 76px;
	margin: 0;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: #0a0a0a;
	background: rgba(255, 255, 255, 0.96);
	border: 0;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
	transform: translate(-50%, -50%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, color 0.22s ease;
}

.wh-case-study-hero__video .i3d-video__play-btn svg {
	margin-left: 3px;
	width: 28px;
	height: 28px;
}

.wh-case-study-hero__video .i3d-video__play:hover .i3d-video__play-btn,
.wh-case-study-hero__video .i3d-video__play:focus-visible .i3d-video__play-btn {
	background: var(--tx-accent, #c8102e);
	color: #fff;
	transform: translate(-50%, -50%) scale(1.06);
}

.wh-case-study-hero__video .i3d-video__play:focus-visible {
	outline: 2px solid var(--tx-accent, #c8102e);
	outline-offset: 4px;
}

.wh-case-study-hero__video-label {
	position: absolute;
	z-index: 3;
	left: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 0 14px;
	border-radius: 999px;
	background: rgba(10, 10, 10, 0.72);
	color: #fff;
	font-family: var(--tx-font-body, Manrope, sans-serif);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.wh-case-study-hero__video-label::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tx-accent, #c8102e);
	box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.55);
	animation: wh-cs-video-pulse 1.8s ease-out infinite;
}

.wh-case-study-hero__video-accent {
	display: block;
	width: 100%;
	height: 3px;
	margin-top: 0;
	border-radius: 0 0 22px 22px;
	background: linear-gradient(90deg, var(--tx-accent, #c8102e) 0%, #111 55%, transparent 100%);
	transform: translateY(-3px);
}

.wh-case-study-hero__video.is-playing .wh-case-study-hero__video-label,
.wh-case-study-hero__video:has(iframe) .wh-case-study-hero__video-label,
.wh-case-study-hero__video:has(video.wh-video-el) .wh-case-study-hero__video-label {
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
}

@keyframes wh-cs-video-pulse {
	0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5); }
	70% { box-shadow: 0 0 0 10px rgba(200, 16, 46, 0); }
	100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

@media (max-width: 900px) {
	.wh-case-study-hero__video .i3d-video__play-btn {
		width: 64px;
		height: 64px;
	}

	.wh-case-study-hero__video-label {
		left: 12px;
		bottom: 12px;
		font-size: 11px;
		min-height: 30px;
		padding: 0 12px;
	}
}

/* Origin story — left accent bar */
.wh-case-study-story__inner {
	max-width: 720px;
	margin: 0;
	text-align: left;
	border-left: 3px solid var(--tx-accent, #c8102e);
	padding-left: clamp(20px, 3vw, 28px);
}

.wh-case-study-story__inner .wh-rnd-prose {
	text-align: left;
	margin-top: 12px;
}

/* The challenge — left header + numbered cards */
.wh-case-study-problem__head,
.wh-case-study-outcomes__head,
.wh-case-study-partners__head {
	max-width: 680px;
	margin: 0 0 clamp(28px, 4vw, 40px);
	text-align: left;
	border-left: 3px solid var(--tx-accent, #c8102e);
	padding-left: clamp(20px, 3vw, 28px);
}

.wh-case-study-problem__head {
	border-left-color: rgba(200, 16, 46, 0.85);
}

.wh-case-study-problem__head .i3d-kicker,
.wh-case-study-outcomes__head .i3d-kicker {
	color: rgba(255, 255, 255, 0.72);
}

.wh-case-study-problem__head .i3d-section-lead {
	max-width: 62ch;
	margin-left: 0;
	margin-right: 0;
}

.wh-case-study-problem__grid {
	margin-top: 0;
}

.wh-case-study-problem__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px 20px 24px;
	min-height: 100%;
	transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.wh-case-study-problem__card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.1);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.wh-case-study-problem__num {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--tx-accent, #c8102e);
	border: 2px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	font-family: var(--tx-font-heading, Syne, sans-serif);
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	color: #fff !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wh-case-study-problem__content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wh-case-study-problem__title {
	margin: 0;
	font-family: var(--tx-font-heading, Syne, sans-serif);
	font-size: clamp(1.0625rem, 1.2vw, 1.1875rem) !important;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: #fff !important;
}

.wh-case-study-problem__text {
	margin: 0;
	font-size: max(1rem, 16px) !important;
	line-height: 1.65 !important;
	color: rgba(255, 255, 255, 0.78) !important;
}

/* Outcomes */
.wh-case-study-outcomes {
	background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.wh-case-study-outcomes__head {
	border-left-color: var(--tx-accent, #c8102e);
}

.wh-case-study-outcomes__head .i3d-kicker {
	color: var(--tx-muted, #6b7280);
}

.wh-case-study-outcomes__head .wh-rnd-outcomes__title {
	text-align: left;
	margin-bottom: 0;
}

.wh-case-study-outcome {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px 20px;
	text-align: left;
	box-shadow: 0 10px 30px rgba(15, 15, 15, 0.05);
	border: 1px solid #ececec;
	border-top: 3px solid var(--tx-accent, #c8102e);
	border-radius: 14px;
	background: #fff;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.wh-case-study-outcome:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(15, 15, 15, 0.08);
}

.wh-case-study-outcome__num {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--tx-accent, #c8102e);
	border: none;
	box-shadow: 0 6px 16px rgba(200, 16, 46, 0.22);
	font-family: var(--tx-font-heading, Syne, sans-serif);
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	color: #fff !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wh-case-study-outcome__title {
	margin: 0;
	font-family: var(--tx-font-heading, Syne, sans-serif);
	font-size: clamp(1.125rem, 1.3vw, 1.3125rem) !important;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tx-accent, #c8102e) !important;
}

.wh-case-study-outcome__text {
	margin: 0;
	font-size: max(1rem, 16px) !important;
	line-height: 1.65 !important;
	color: var(--tx-lead, #4b5563) !important;
}

.wh-case-study-partners__head .i3d-section-lead {
	max-width: 62ch;
	margin-left: 0;
	margin-right: 0;
}

.wh-case-study-partners .wh-rnd-partners__grid article {
	box-shadow: 0 8px 24px rgba(15, 15, 15, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border-radius: 14px;
}

.wh-case-study-partners .wh-rnd-partners__grid article:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(15, 15, 15, 0.07);
}

.wh-case-study-cta {
	padding-top: clamp(48px, 7vw, 72px);
}

.wh-case-study-cta__inner {
	gap: clamp(20px, 4vw, 36px);
	align-items: flex-start !important;
	text-align: left;
}

.wh-case-study-cta .i3d-consult__copy {
	text-align: left;
}

.wh-case-study-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-start;
}

.i3d-btn--ghost-on-dark {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.42);
	background: transparent;
}

.i3d-btn--ghost-on-dark:hover,
.i3d-btn--ghost-on-dark:focus-visible {
	color: #111;
	background: #fff;
	border-color: #fff;
}

@media (max-width: 980px) {
	.wh-case-study-hero__grid .wh-rnd-hero__media {
		order: -1;
	}

	.wh-case-study-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.wh-case-study-cta__actions {
		width: 100%;
	}

	.wh-case-study-cta__actions .i3d-btn {
		flex: 1 1 auto;
		justify-content: center;
	}
}
