/* Case studies (single-case_study.php, archive-case_study.php, inc/case-studies.php).
   Tokens come from blog-hub.css (.blog-hub) and article typography from blog-post.css (.blog-post);
   the dark hero and pill buttons follow the 404 / product page heroes. Scoped to .cs-page. */

.cs-page {
	--cs-hero: linear-gradient(180deg, #020019 0%, #15002a 100%);
	--cs-grad: linear-gradient(90deg, #ff4bf0 0%, #d586ff 50%, #9172ff 100%);
	--cs-btn-grad: linear-gradient(90deg, #7400b2 0%, #5511bc 50%, #d500c3 100%);
	--cs-violet-50: #f7f1ff;
	--cs-violet-300: #c8a3ff;
}

/* The header is transparent over the hero (nav.js, via the product-page-hero-block marker), so the
   page background behind it matches the top of the hero. */
html:has(.cs-page),
body:has(.cs-page) {
	background-color: #020019;
}
body:has(.cs-page) #smooth-content,
body:has(.cs-page) .site-main.cs-page {
	background-color: #fff;
}

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

/* ── Hero ── */
.cs-page .cs-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--cs-hero);
	color: #fff;
	padding: 2.5rem 0 3.5rem; /* header sits above the hero in the flow; matches /book-a-demo/ */
	/* The marker class brings product-hero defaults; keep ours in charge. */
	width: 100% !important;
	max-width: none !important;
	left: auto !important;
	right: auto !important;
	margin: 0 !important;
	min-height: 0 !important;
}
@media (min-width: 1024px) {
	.cs-page .cs-hero { padding: 3rem 0 5rem; }
}
.cs-page .cs-hero__light {
	position: absolute;
	z-index: -1;
	top: -15%;
	right: -30%;
	width: 95%;
	max-width: 70rem;
	opacity: 0.4;
	transform: rotate(-8deg);
	pointer-events: none;
}
@media (min-width: 1024px) {
	.cs-page .cs-hero__light { right: -12%; width: 70%; }
}
.cs-hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) {
	.cs-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4rem; }
}
.cs-page .cs-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.25rem; font-size: 14px; color: rgba(255, 255, 255, 0.65); }
.cs-page .cs-crumbs a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.cs-page .cs-crumbs a:hover { color: #fff; text-decoration: underline; }
.cs-page .cs-eyebrow {
	display: inline-block;
	margin: 0 0 1rem;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	background: var(--cs-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
.cs-page .cs-hero__title {
	max-width: 22ch;
	margin: 0 0 1.25rem;
	font-size: clamp(2rem, 4.2vw, 3.25rem);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.035em;
	color: #fff;
}
.cs-page .cs-hero__dek {
	max-width: 56ch;
	margin: 0;
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.82);
}
.cs-page .cs-award {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 1.5rem 0 0;
	padding: 0.4rem 0.9rem;
	border: 1px solid rgba(200, 163, 255, 0.4);
	border-radius: 999px;
	background: rgba(155, 89, 255, 0.14);
	font-size: 14px;
	font-weight: 500;
	color: #fff;
}
.cs-page .cs-award svg { flex: none; color: var(--cs-violet-300); }
.cs-hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.cs-page .cs-hero__media { position: relative; margin: 0; }
.cs-page .cs-hero__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 20px;
}
.cs-page .cs-hero__logo {
	position: absolute;
	left: 1rem;
	bottom: 1rem;
	display: flex;
	align-items: center;
	padding: 0.6rem 0.9rem;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(2, 0, 25, 0.25);
}
.cs-page .cs-hero__logo img { display: block; width: auto; max-width: 9rem; max-height: 2.25rem; }

/* ── Buttons ── */
.cs-page .cs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.75rem 1.75rem;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}
.cs-page .cs-btn:focus-visible { outline: 2px solid #9b59ff; outline-offset: 3px; }
.cs-page .cs-btn--light { background: #fff; }
.cs-page .cs-btn--light span {
	background: var(--cs-btn-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-weight: 600;
}
.cs-page .cs-btn--light:hover { transform: translateY(-1px); }
.cs-page .cs-btn--ghost { color: #fff !important; border-color: rgba(255, 255, 255, 0.4) !important; background: transparent; }
.cs-page .cs-btn--ghost:hover { border-color: #fff !important; background: rgba(255, 255, 255, 0.08); }
.cs-page .cs-btn--dark { background: #090a0b; color: #fcfcfc !important; }
.cs-page .cs-btn--dark:hover { background: #2a2d31; }

/* ── Results strip ── */
.cs-stats { padding: 2.5rem 0 0; background: #fff; }
@media (min-width: 1024px) { .cs-stats { padding-top: 3.5rem; } }
.cs-page .cs-stats__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 900px) {
	.cs-page .cs-stats__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cs-page .cs-stats__list--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cs-page .cs-stats__list--1 { grid-template-columns: minmax(0, 1fr); max-width: 24rem; }
.cs-page .cs-stat {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 1.5rem;
	border: 1px solid var(--cs-violet-300);
	border-radius: 20px;
	background: var(--cs-violet-50);
}
.cs-page .cs-stat__value {
	font-size: clamp(1.9rem, 3.4vw, 2.75rem);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.04em;
	color: #31007c;
}
.cs-page .cs-stat__label { font-size: 15px; line-height: 1.45; color: var(--bh-body); }

/* ── Story + sidebar ── */
.cs-page .cs-layout { padding-bottom: 4rem; }
.cs-page .cs-content > h2:first-child { margin-top: 0; }

.cs-page .cs-quote {
	position: relative;
	margin: 2.5rem 0 0;
	padding: 2rem 1.75rem 1.75rem;
	border-radius: 20px;
	background: var(--cs-hero);
	color: #fff;
}
@media (min-width: 768px) { .cs-page .cs-quote { padding: 2.5rem 2.5rem 2rem; } }
.cs-page .cs-quote__mark { display: block; margin-bottom: 1rem; color: #d586ff; }
.cs-page .cs-quote__text { margin: 0; padding: 0; border: 0 !important; background: none; }
.cs-page .cs-quote__text p {
	margin: 0;
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	font-weight: 400;
	font-style: normal;
	line-height: 1.45;
	letter-spacing: -0.015em;
	color: #fff;
}
.cs-page .cs-quote__who { display: flex; flex-direction: column; gap: 2px; margin-top: 1.25rem; font-size: 15px; }
.cs-page .cs-quote__who strong { font-weight: 600; color: #fff; }
.cs-page .cs-quote__who span { color: rgba(255, 255, 255, 0.7); }

.cs-page .cs-facts,
.cs-page .cs-side-cta {
	padding: 1.5rem;
	border: 1px solid var(--bh-border);
	border-radius: 20px;
	background: #fff;
}
.cs-page .cs-facts__title,
.cs-page .cs-side-cta__title {
	margin: 0 0 1rem;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--bh-ink);
}
.cs-page .cs-facts dl { display: flex; flex-direction: column; gap: 0.9rem; margin: 0; }
.cs-page .cs-facts dl > div { display: flex; flex-direction: column; gap: 2px; }
.cs-page .cs-facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #64707d; }
.cs-page .cs-facts dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--bh-text); }
.cs-page .cs-side-cta { background: var(--cs-violet-50); border-color: var(--cs-violet-300); }
.cs-page .cs-side-cta__title { margin-bottom: 0.5rem; }
.cs-page .cs-side-cta__text { margin: 0 0 1.25rem; font-size: 15px; line-height: 1.5; color: var(--bh-body); }
.cs-page .cs-side-cta .cs-btn { width: 100%; }

/* ── Cards (archive + more stories) ── */
.cs-page .cs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 700px) { .cs-page .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cs-page .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cs-page .cs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bh-border);
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.2s, transform 0.2s;
}
.cs-page .cs-card:hover { border-color: var(--bh-border-strong); transform: translateY(-2px); }
.cs-page .cs-card:focus-within { outline: 2px solid #9b59ff; outline-offset: 2px; }
.cs-page .cs-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--cs-hero); }
.cs-page .cs-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-page .cs-card__logo {
	position: absolute;
	left: 0.875rem;
	bottom: 0.875rem;
	display: flex;
	padding: 0.45rem 0.7rem;
	border-radius: 10px;
	background: #fff;
}
.cs-page .cs-card__logo img { display: block; width: auto; max-width: 7rem; max-height: 1.6rem; }
.cs-page .cs-card__body { display: flex; flex: 1; flex-direction: column; gap: 0.6rem; padding: 1.25rem 1.25rem 1.4rem; }
.cs-page .cs-card__client { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #7429e5; }
.cs-page .cs-card__title { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }
.cs-page .cs-card__title a { color: var(--bh-ink); text-decoration: none; border-bottom: 0 !important; }
.cs-page .cs-card__title a:hover { color: #31007c; }
/* No photo: the client's name on the dark panel. */
.cs-page .cs-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 1.5rem;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 500;
	letter-spacing: -0.03em;
	text-align: center;
	background: var(--cs-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}
/* The whole card is the link. */
.cs-page .cs-card__title a::after { content: ""; position: absolute; inset: 0; }
.cs-page .cs-card__title a:focus-visible { outline: none; }
.cs-page .cs-card__stat { margin: 0; font-size: 15px; line-height: 1.45; color: var(--bh-body); }
.cs-page .cs-card__stat strong { font-weight: 600; color: #31007c; }
.cs-page .cs-card__meta { margin: 0; font-size: 14px; color: #64707d; }
.cs-page .cs-card__more { margin-top: auto; padding-top: 0.4rem; font-size: 15px; font-weight: 500; color: #7429e5; }

.cs-list { padding: 3rem 0 4.5rem; background: #fff; }
@media (min-width: 1024px) { .cs-list { padding: 4rem 0 5.5rem; } }
.cs-page .cs-empty { margin: 0; font-size: 18px; color: var(--bh-body); }

.cs-more { padding: 3.5rem 0 4.5rem; background: #f7f9fc; border-top: 1px solid var(--bh-border); }
.cs-more__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.5rem; }
.cs-page .cs-h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.03em; color: var(--bh-ink); }
.cs-page .cs-link { font-size: 16px; font-weight: 500; color: #7429e5; text-decoration: none; }
.cs-page .cs-link:hover { text-decoration: underline; }

/* ── Closing band ── */
.cs-band { padding: 0 0 4.5rem; background: #fff; }
.cs-more + .cs-band { padding-top: 0; background: #f7f9fc; }
.cs-band__inner {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem 1.75rem;
	border-radius: 20px;
	background: var(--cs-hero);
	color: #fff;
}
@media (min-width: 768px) {
	.cs-band__inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 2.5rem 3rem; }
}
.cs-page .cs-band__title { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.03em; color: #fff; }
.cs-page .cs-band__text { max-width: 52ch; margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.8); }

@media (prefers-reduced-motion: reduce) {
	.cs-page .cs-card,
	.cs-page .cs-btn { transition: none; }
	.cs-page .cs-card:hover,
	.cs-page .cs-btn--light:hover { transform: none; }
}
