/* ==========================================================================
   HDL Commerce V3 — case study pages

   Source: case-story.css 1-35, ported whole (only `.cs-next:hover .arr`
   needed no change). Load AFTER base.css.

   NOTE: the handoff also ships `assets/case.css` (`.case-hero-grid`,
   `.case-quote`, `.cs-split`, `.case-next`, `.case-slot`). No page links it
   and no markup uses those classes — it is the superseded green-era case
   system and is deliberately not ported. See css-port-notes.md.

   `.cs-built` carries the 2px seam over a hairline parent — the same cell
   treatment as `.steps3`. That is the signature; keep the 2px.
   ========================================================================== */

.cs-hero {
	position: relative;
	padding: clamp( 90px, 12vh, 150px ) 0 clamp( 40px, 5vw, 64px );
	background: var( --wp--preset--color--base );
	overflow: hidden;
}

body.flush .cs-hero {
	padding-top: clamp( 180px, 16vw, 240px );
}

.cs-hero .dots {
	position: absolute;
	inset: 0;
	background-image: radial-gradient( #151a20 1px, transparent 1px );
	background-size: 26px 26px;
	opacity: 0.6;
	pointer-events: none;
}

.cs-hero .in {
	position: relative;
	z-index: 1;
}

.cs-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	font-family: var( --font-mono );
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --wp--preset--color--dim );
}

.cs-meta i {
	width: 9px;
	height: 9px;
	background: var( --wp--preset--color--accent );
	color: var( --wp--preset--color--on-accent );
	flex: 0 0 auto;
}

.cs-meta s {
	width: 20px;
	height: 1px;
	background: var( --wp--custom--rule-dotted );
	text-decoration: none;
}

.cs-meta b {
	color: var( --wp--preset--color--accent-bright );
	font-weight: 400;
}

.cs-h1 {
	margin-top: clamp( 24px, 3vw, 38px );
	font-family: var( --font-display );
	font-weight: 400;
	font-size: clamp( 2.5rem, 6.4vw, 5.4rem );
	line-height: 1.02;
	letter-spacing: -0.045em;
	color: var( --wp--preset--color--contrast );
	max-width: var( --hero-h-measure, 20ch );
	text-wrap: pretty;
}

.cs-dek {
	margin-top: clamp( 20px, 2.4vw, 30px );
	font-size: clamp( 1.05rem, 1.5vw, 1.28rem );
	font-weight: 300;
	line-height: 1.6;
	color: #aeb6c0;
	max-width: var( --hero-lead-measure, 58ch );
	text-wrap: pretty;
}

.cs-shot {
	margin-top: clamp( 38px, 4.6vw, 64px );
	border: 1px dotted var( --wp--custom--rule-dotted );
	background: #0b0d10;
	aspect-ratio: 21/9;
	--slot-bg: #0b0d10;
}

.cs-shot image-slot {
	width: 100%;
	height: 100%;
	display: block;
}

.cs-figures {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin-top: clamp( 30px, 3.4vw, 44px );
	border-block: 1px solid rgba( 255, 255, 255, 0.09 );
}

.cs-figures > div {
	flex: 1 1 200px;
	padding: clamp( 20px, 2.4vw, 28px ) clamp( 16px, 2vw, 24px );
	border-left: 1px dotted var( --wp--custom--rule-dotted );
}

.cs-figures > div:first-child {
	border-left: 0;
	padding-left: 0;
}

.cs-figures b {
	display: block;
	font-family: var( --font-display );
	font-weight: 400;
	font-size: clamp( 1.8rem, 3.4vw, 2.6rem );
	line-height: 1;
	letter-spacing: -0.045em;
	color: var( --wp--preset--color--contrast );
}

.cs-figures span {
	display: block;
	margin-top: 10px;
	font-size: 0.84rem;
	color: var( --wp--custom--status--mute );
	line-height: 1.5;
}

/* the 2px seam over a hairline parent — cards read as cells */
.cs-built {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 2px;
	background: var( --wp--custom--hairline );
	border: 1px solid var( --wp--custom--hairline );
	margin-top: clamp( 30px, 3.6vw, 46px );
}

.cs-built a,
.cs-built div {
	background: var( --wp--preset--color--base );
	padding: clamp( 20px, 2.4vw, 28px );
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;
	transition: background 0.2s;
}

.cs-built a:hover {
	background: #07090c;
}

.cs-built .nm {
	display: flex;
	align-items: center;
	gap: 11px;
	font-size: 0.98rem;
	color: var( --wp--preset--color--contrast );
	font-weight: 500;
}

.cs-built .nm i {
	width: 9px;
	height: 9px;
	background: var( --wp--preset--color--accent );
	color: var( --wp--preset--color--on-accent );
	flex: 0 0 auto;
}

.cs-built p {
	font-size: 0.88rem;
	color: var( --wp--custom--status--mute );
	line-height: 1.6;
}

.cs-built a .go {
	margin-top: auto;
	font-family: var( --font-mono );
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --wp--preset--color--accent-bright );
}

.cs-next {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	padding: clamp( 22px, 2.8vw, 34px );
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s;
}

.cs-next:hover {
	background: #07090c;
	border-color: rgba( 0, 208, 143, 0.45 );
}

.cs-next .lb {
	font-family: var( --font-mono );
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --wp--preset--color--dim );
}

.cs-next .t {
	display: block;
	margin-top: 10px;
	font-family: var( --font-display );
	font-weight: 400;
	font-size: clamp( 1.2rem, 2.2vw, 1.75rem );
	letter-spacing: -0.03em;
	color: var( --wp--preset--color--contrast );
}

.cs-next .d {
	display: block;
	margin-top: 8px;
	font-size: 0.9rem;
	color: var( --wp--custom--status--mute );
}

.cs-next .arr {
	font-family: var( --font-mono );
	font-size: 1.4rem;
	color: var( --wp--preset--color--accent );
	flex: 0 0 auto;
	transition: transform 0.2s;
}

.cs-next:hover .arr {
	transform: translateX( 6px );
}

@media ( prefers-reduced-motion: reduce ) {
	.cs-next:hover .arr {
		transform: none;
	}
}

@media ( max-width: 900px ) {
	.cs-built {
		grid-template-columns: 1fr 1fr;
	}

	.cs-shot {
		aspect-ratio: 16/10;
	}

	.cs-figures > div {
		border-left: 0;
		padding-left: 0;
	}
}

@media ( max-width: 560px ) {
	.cs-built {
		grid-template-columns: 1fr;
	}
}
