/**
 * SA — Case Studies: the /case-studies/ archive, its category archives, and
 * single case study pages. Self-contained tokens (same black + bright
 * yellow palette as the rest of the site) defined on :root — not scoped to
 * .case-studies-page — because the card grid also gets embedded on Service
 * template pages (body.service-page), which need these variables too.
 */

:root {
	--cs-black: #191919;
	--cs-yellow: #fdd201;
	--cs-yellow-glow: rgba(253, 210, 1, 0.55);
	--cs-ink: #17233d;
	--cs-bg-alt: #f6f7f9;
	--cs-border: #e2e8f0;
	--cs-muted: #5b6b82;
}

/* ==========================================================================
   Hero band — matches the other pages' black bookend sections.
   ========================================================================== */

.case-studies-hero {
	background: var(--cs-black);
	color: #fff;
	padding-block: clamp(3rem, 6vw, 5rem);
	text-align: center;
}
.case-studies-hero__heading {
	color: #fff;
	font-weight: 700;
	margin-bottom: 0.75rem;
}
.case-studies-hero__text {
	color: rgba(255, 255, 255, 0.75);
	max-width: 38rem;
	margin: 0 auto;
	font-size: 1.05rem;
	line-height: 1.7;
}

/* ==========================================================================
   Category filter tabs
   ========================================================================== */

.case-studies-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin: 0 0 2.75rem;
}
.case-studies-filters a {
	padding: 0.55rem 1.25rem;
	border-radius: 999px;
	border: 1px solid var(--cs-border);
	color: var(--cs-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.case-studies-filters a:hover {
	border-color: var(--cs-black);
}
.case-studies-filters a.is-active {
	background: var(--cs-black);
	border-color: var(--cs-black);
	color: var(--cs-yellow);
}

/* ==========================================================================
   Card grid — shared by the archive, category archives, and the embedded
   section on Service template pages.
   ========================================================================== */

.case-study-cards {
	margin-top: 0;
}

.case-study-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--cs-border);
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 14px 32px -20px rgba(23, 35, 61, 0.3);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.case-study-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 22px 42px -18px rgba(23, 35, 61, 0.32);
}

.case-study-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--cs-bg-alt);
}
.case-study-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.case-study-card:hover .case-study-card__media img {
	transform: scale(1.05);
}
.case-study-card__media-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cs-muted);
	background: linear-gradient(135deg, var(--cs-bg-alt), #eef1f5);
}
.case-study-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}
.case-study-card__badge {
	display: inline-block;
	background: var(--cs-yellow);
	color: var(--cs-black);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
}

.case-study-card__body {
	padding: 1.5rem 1.5rem 1.75rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
.case-study-card__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--cs-ink);
	margin-bottom: 0.5rem;
}
.case-study-card__title a {
	color: inherit;
	text-decoration: none;
}
.case-study-card__title a:hover {
	text-decoration: underline;
}
.case-study-card__excerpt {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--cs-muted);
	margin-bottom: 1.25rem;
	flex-grow: 1;
}
.case-study-card__link {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--cs-ink);
	text-decoration: none;
}
.case-study-card__link svg {
	transition: transform 0.2s ease;
}
.case-study-card__link:hover svg {
	transform: translateX(3px);
}

.case-studies-empty {
	text-align: center;
	color: var(--cs-muted);
	padding: 3rem 0;
	font-size: 1.05rem;
}

/* ==========================================================================
   Buttons (local — self-contained stylesheet, same look as .service-btn)
   ========================================================================== */

.case-study-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 2rem;
	border-radius: 0.5rem;
	font-weight: 700;
	font-size: 1.02rem;
	text-decoration: none;
	white-space: nowrap;
	background: var(--cs-yellow);
	color: #14110a;
	box-shadow: 0 0 12px 2px var(--cs-yellow-glow);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.case-study-btn:hover,
.case-study-btn:focus {
	color: #14110a;
	transform: translateY(-1px);
	box-shadow: 0 0 22px 5px var(--cs-yellow-glow);
}

/* ==========================================================================
   Single case study page
   ========================================================================== */

.case-study-single__hero {
	position: relative;
	overflow: hidden;
	background: var(--cs-black);
	padding-block: clamp(3rem, 7vw, 5rem);
}

/* Soft glow orbs, same decorative language as the site's other black hero
   bands (assets/css/service.css .service-hero__orb) — static here, not
   animated, so the header stays calm rather than competing with the
   Results panel/quote below. */
.case-study-single__hero::before,
.case-study-single__hero::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
}
.case-study-single__hero::before {
	width: 24rem;
	height: 24rem;
	top: -10rem;
	right: -6rem;
	background: radial-gradient(circle, rgba(253, 210, 1, 0.22), transparent 70%);
}
.case-study-single__hero::after {
	width: 18rem;
	height: 18rem;
	bottom: -10rem;
	left: 8%;
	background: radial-gradient(circle, rgba(253, 210, 1, 0.12), transparent 70%);
}
.case-study-single__hero > .container {
	position: relative;
	z-index: 1;
}

.case-study-single__crumb {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	width: fit-content;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	transition: color 0.15s ease;
}
.case-study-single__crumb:hover {
	color: var(--cs-yellow);
}
.case-study-single__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}
.case-study-single__badge {
	display: inline-block;
	background: var(--cs-yellow);
	color: #14110a;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.4rem 0.95rem;
	border-radius: 999px;
	box-shadow: 0 8px 18px -4px rgba(253, 210, 1, 0.4);
}
.case-study-single__title {
	color: #fff;
	font-weight: 700;
	line-height: 1.1;
	font-size: clamp(2.1rem, 4.5vw, 3.1rem);
	margin-bottom: 0;
}

/* Sits beside the title instead of as a huge full-width banner below it —
   a glassy panel (rather than the raw image floating on black) since these
   are usually device-mockup PNGs/WebPs with white or transparent
   backgrounds, and object-fit: contain + a max-height keep it from
   dominating the hero regardless of the image's own aspect ratio. */
.case-study-single__media {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 1rem;
	padding: 1.5rem;
}
.case-study-single__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 20rem;
	object-fit: contain;
	margin: 0 auto;
}

.case-study-single__body {
	padding-block: clamp(3rem, 6vw, 5rem);
}
.case-study-single__content {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--cs-ink);
}
.case-study-single__content p {
	margin-bottom: 1.25rem;
}

.case-study-single__panel {
	background: var(--cs-bg-alt);
	border-radius: 1rem;
	padding: 1.75rem;
}
.case-study-single__panel h2 {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--cs-ink);
	margin-bottom: 1.1rem;
}
.case-study-single__results {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.case-study-single__results li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--cs-ink);
}
.case-study-single__results svg {
	flex-shrink: 0;
	margin-top: 0.15rem;
	color: var(--cs-yellow);
	background: var(--cs-black);
	border-radius: 50%;
	padding: 3px;
	box-sizing: content-box;
}

.case-study-single__back {
	margin-top: 3rem;
	text-align: center;
}

/* ==========================================================================
   Case study body content — the standard structure every case study's
   the_content is built from (see sa_case_study_body_html() in
   inc/case-studies.php, and the "Case Study Body" block pattern editors
   duplicate from when writing a new one).
   ========================================================================== */

.case-study-content__meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 1.25rem;
	background: var(--cs-bg-alt);
	border-radius: 0.85rem;
	padding: 1.5rem 1.75rem;
	margin-bottom: 2rem;
}
.case-study-content__meta > div {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}
.case-study-content__meta span {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--cs-muted);
}
.case-study-content__meta strong {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--cs-ink);
}
.case-study-content__meta a {
	color: var(--cs-ink);
	text-decoration: underline;
}
.case-study-content__meta a:hover {
	color: var(--cs-black);
}

.case-study-content h2 {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--cs-ink);
	margin: 2.5rem 0 1.1rem;
}
.case-study-content > h2:first-of-type {
	margin-top: 0;
}

.case-study-content__points {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.25rem;
	margin: 1.5rem 0;
}
.case-study-content__point {
	background: #fff;
	border: 1px solid var(--cs-border);
	border-radius: 0.85rem;
	padding: 1.5rem;
}
.case-study-content__point h3 {
	font-size: 1rem;
	font-weight: 700;
	color: var(--cs-ink);
	margin-bottom: 0.5rem;
}
.case-study-content__point p {
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--cs-muted);
	margin-bottom: 0;
}

.case-study-content__quote {
	position: relative;
	margin: 2.5rem 0;
	padding: 1.75rem 2rem;
	background: var(--cs-black);
	border-radius: 0.85rem;
	border-left: 4px solid var(--cs-yellow);
}
.case-study-content__quote p {
	color: #fff;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.55;
	margin-bottom: 0.5rem;
	font-style: normal;
}
.case-study-content__quote cite {
	display: block;
	color: var(--cs-yellow);
	font-size: 0.85rem;
	font-weight: 700;
	font-style: normal;
}

.case-study-content__cta {
	margin: 2.75rem 0 0.5rem;
	padding: 2rem;
	background: var(--cs-bg-alt);
	border-radius: 0.85rem;
	text-align: center;
}
.case-study-content__cta h2 {
	margin-top: 0;
	margin-bottom: 0.5rem;
}
.case-study-content__cta p {
	color: var(--cs-muted);
	max-width: 34rem;
	margin: 0 auto 1.5rem;
}
