/* ==========================================================================
   Stravum Builder — Case Study widgets
   (widgets/case-study-hero.php · case-study-stats.php · case-study-gallery.php)

   PART FILE. Enqueued automatically by st_builder_enqueue_parts() (it globs
   assets/parts/*.css), on the front end and inside the editor canvas.

   Everything here is the structural minimum + Digital Vanguard dark defaults.
   All per-instance styling comes from the style engine (control `selectors`),
   which is emitted in a later <style> element inside the block markup — so
   engine rules must win. That is why every selector the engine also targets is
   kept to at most TWO classes here: the engine's version is
   `.st-el-{uid} .st-cs…` (also two), and the later stylesheet wins on a tie.
   Never add a third class (or an id) to those selectors.

   No Tailwind utilities are used: the compiled tailwind.css cannot be rebuilt
   on this host, so new visuals are expressed as plain CSS against the same
   token values theme.json ships.
   ========================================================================== */

.st-cshero,
.st-csstats,
.st-csgal {
	--st-cs-accent: #fd5b38;
	--st-cs-peach: #ffb4a4;
	--st-cs-white: #ffffff;
	--st-cs-text: #a9adc1;
	--st-cs-deep: #0a0c10;
	--st-cs-low: #191c23;
	--st-cs-border: rgba(255, 255, 255, 0.08);
}

/* ======================================================== Editor-only note. */
.st-cs-note {
	padding: 22px 20px;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--st-cs-text);
	background-color: var(--st-cs-low);
	border: 1px dashed var(--st-cs-border);
	border-radius: 14px;
}

/* ============================================================ Hero. */
.st-cshero {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	min-width: 0;
}

.st-cshero.is-align-center {
	align-items: center;
	text-align: center;
}

.st-cshero-eyebrow {
	margin: 0;
	font-family: "Geist", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--st-cs-peach);
}

.st-cshero-title {
	margin: 0;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: clamp(34px, 5.2vw, 64px);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.035em;
	color: var(--st-cs-white);
	overflow-wrap: break-word;
}

.st-cshero-client {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	font-family: "Geist", sans-serif;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #e0e2ec;
}

.st-cshero-client-label {
	color: var(--st-cs-accent);
	font-weight: 600;
}

.st-cshero-summary {
	margin: 0;
	max-width: 720px;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 18px;
	line-height: 1.7;
	color: var(--st-cs-text);
	overflow-wrap: break-word;
}

.is-align-center .st-cshero-summary {
	margin-left: auto;
	margin-right: auto;
}

.st-cshero-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: "Geist", sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--st-cs-accent);
	text-decoration: none;
	transition: color 0.25s ease, gap 0.25s ease;
}

.st-cshero-link::after {
	content: "\2197";
	font-size: 14px;
	letter-spacing: 0;
}

.st-cshero-link:hover {
	color: var(--st-cs-peach);
	gap: 12px;
}

/* =========================================================== Stats. */
.st-csstats {
	display: block;
	min-width: 0;
}

.st-csstats-heading {
	margin: 0 0 28px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: clamp(26px, 3.2vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--st-cs-white);
}

.st-csstats.is-align-center .st-csstats-heading,
.st-csstats.is-align-center .st-csstats-item {
	text-align: center;
	align-items: center;
}

.st-csstats-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.st-csstats-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	padding: 28px 24px;
	background-color: var(--st-cs-low);
	border: 1px solid var(--st-cs-border);
	border-radius: 16px;
}

.st-csstats-value {
	display: block;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: clamp(44px, 6vw, 80px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	overflow-wrap: break-word;
}

/* Solid numerals. */
.is-solid .st-csstats-value {
	color: var(--st-cs-peach);
	-webkit-text-fill-color: var(--st-cs-peach);
}

/* Hollow / outlined numerals — the site's established stat treatment
   (transparent fill + a stroke), same technique as .gradient-text's
   -webkit-text-fill-color:transparent in the theme's custom.css. */
.is-hollow .st-csstats-value {
	color: transparent;
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke-width: 1px;
	-webkit-text-stroke-color: rgba(253, 91, 56, 0.9);
}

/* Anything without text-stroke support would render invisible numbers, so
   fall back to a solid fill there. */
@supports not ((-webkit-text-stroke-width: 1px) or (text-stroke-width: 1px)) {
	.is-hollow .st-csstats-value {
		color: var(--st-cs-peach);
		-webkit-text-fill-color: var(--st-cs-peach);
	}
}

.st-csstats-label {
	display: block;
	font-family: "Geist", sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.5;
	color: var(--st-cs-text);
	overflow-wrap: break-word;
}

/* ========================================================= Gallery. */
.st-csgal {
	display: block;
	min-width: 0;
}

.st-csgal-heading {
	margin: 0 0 24px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: clamp(24px, 3vw, 40px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--st-cs-white);
}

.st-csgal-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.st-csgal-item {
	margin: 0;
	min-width: 0;
}

.st-csgal-media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background-color: var(--st-cs-deep);
	border: 1px solid var(--st-cs-border);
	border-radius: 16px;
}

.st-csgal-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.st-csgal-link {
	display: block;
	text-decoration: none;
}

.st-csgal-link:hover img {
	transform: scale(1.04);
}

.st-csgal-caption {
	margin-top: 10px;
	font-family: "Geist", sans-serif;
	font-size: 12px;
	letter-spacing: 0.06em;
	line-height: 1.5;
	color: var(--st-cs-text);
}

/* ==================================================== Responsive fallbacks.
   The style engine's own tablet/mobile rules (from the responsive `columns`
   controls) are emitted later and win whenever they are set. */
@media (max-width: 1024px) {
	.st-csstats-grid,
	.st-csgal-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.st-csstats-grid,
	.st-csgal-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
