/* ==========================================================================
   AlphaPros — Case studies (template-parts/case-study.php)
   Open, editorial layout: no boxed cards; hairlines, large type and the 3D artwork carry the page.
   ========================================================================== */

@keyframes ap-shimmer { to { background-position: -200% 0; } }
@keyframes ap-float-y { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.cs-hero .text-gradient,
.cs-results .text-gradient {
	background-image: linear-gradient(90deg, #b57be8, #e7c4ff, #b57be8);
	background-size: 200% 100%;
	animation: ap-shimmer 6s linear infinite;
}

.cs-section-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.15; margin-bottom: .45em; }

/* Hero
   ========================================================================== */
.cs-hero {
	position: relative;
	margin-top: calc(var(--ap-header-h) * -1);
	padding: calc(var(--ap-header-h) + clamp(72px, 10vw, 140px)) 0 clamp(96px, 12vw, 170px);
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	background:
		radial-gradient(45% 55% at 50% 30%, rgba(150, 60, 210, .35), transparent 70%),
		var(--cs-hero-bg) center bottom / cover no-repeat,
		#050204;
}
.cs-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 160px;
	z-index: -1;
	background: linear-gradient(180deg, transparent, var(--ap-bg));
}
.cs-hero__inner { max-width: 940px; }
.cs-hero__title { font-size: clamp(2.8rem, 6.6vw, 5.2rem); line-height: 1.05; letter-spacing: -.015em; margin-bottom: .45em; }
.cs-hero__title .text-gradient { display: block; }
.cs-hero__intro { max-width: 720px; margin: 0 auto; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.85; color: var(--ap-text); }
.cs-hero__scroll {
	position: absolute;
	left: 50%;
	bottom: 36px;
	width: 1px;
	height: 56px;
	background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .5));
	overflow: hidden;
}
.cs-hero__scroll::after {
	content: "";
	position: absolute;
	left: 0;
	top: -40%;
	width: 1px;
	height: 40%;
	background: var(--ap-primary-soft);
	box-shadow: 0 0 8px var(--ap-primary);
	animation: ap-scroll-line 2.2s ease-in-out infinite;
}
@keyframes ap-scroll-line { to { top: 100%; } }

/* Challenge: sticky intro + hairline rows
   ========================================================================== */
.cs-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.cs-split__aside { position: sticky; top: calc(var(--ap-header-h) + 40px); }
.cs-challenge__lead { font: 500 clamp(1.3rem, 2.2vw, 1.75rem)/1.55 var(--ap-font-heading); color: var(--ap-white); margin-bottom: .9em; }
.cs-challenge__more { margin: 0; font-weight: 600; color: var(--ap-primary-soft); }
.cs-split__aside .eyebrow + .cs-rows { margin-top: 0; }

.cs-split--stacked { grid-template-columns: 1fr; gap: 28px; }
.cs-split--stacked .cs-split__aside { position: static; }
.cs-split--stacked .cs-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); border-top: 0; }
.cs-split--stacked .cs-row { border-top: 1px solid var(--ap-border); border-bottom: 0; }
.cs-split--stacked .cs-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--ap-border); }
.cs-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ap-border); }
.cs-row {
	position: relative;
	display: grid;
	grid-template-columns: 56px 48px minmax(0, 1fr);
	align-items: start;
	gap: 22px;
	padding: 30px 0;
	border-bottom: 1px solid var(--ap-border);
}
/* Purple line sweeps along the divider on hover */
.cs-row::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg, var(--ap-primary), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .6s var(--ap-ease);
}
.cs-row:hover::after { transform: scaleX(1); }
.cs-row__num { font: 800 2.2rem/1 var(--ap-font-heading); color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .25); transition: -webkit-text-stroke-color .3s; }
.cs-row:hover .cs-row__num { -webkit-text-stroke-color: var(--ap-primary-soft); }
.cs-row__icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--ap-primary-soft); }
.cs-row__icon img,
.cs-row__icon .icon { width: 40px; height: 40px; filter: drop-shadow(0 0 12px rgba(175, 71, 254, .7)); transition: transform .5s var(--ap-ease); }
.cs-row:hover .cs-row__icon img,
.cs-row:hover .cs-row__icon .icon { transform: scale(1.12) rotate(-6deg); }
.cs-row__body p { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.75; color: var(--ap-text); }
.cs-row__title { margin: 6px 0 0; font-size: 1.3rem; line-height: 1.35; }
.cs-row--title .cs-row__title { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-top: 8px; }

/* Solution
   ========================================================================== */
.cs-solution {
	position: relative;
	background: radial-gradient(50% 60% at 50% 0%, rgba(120, 40, 170, .22), transparent 70%);
}
.cs-solution__head { max-width: 860px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.cs-solution__lead { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.8; color: var(--ap-text); }

.cs-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); list-style: none; margin: 0; padding: 0; }
.cs-checks li {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 20px 0;
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--ap-white);
	border-top: 1px solid var(--ap-border);
	transition: color .3s, padding-left .4s var(--ap-ease);
}
.cs-checks li:hover { padding-left: 8px; }
.cs-checks__icon { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; margin-top: 1px; color: var(--ap-white); background: var(--ap-primary); border-radius: 50%; box-shadow: 0 0 16px rgba(175, 71, 254, .5); }
.cs-checks__icon .icon { width: 15px; height: 15px; stroke-width: 2.6; }

.cs-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.cs-pillar { position: relative; padding-top: 26px; border-top: 1px solid var(--ap-border); }
.cs-pillar::before { content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 2px; background: var(--ap-primary); box-shadow: 0 0 12px rgba(175, 71, 254, .8); transition: width .6s var(--ap-ease); }
.cs-pillar:hover::before { width: 100%; }
.cs-pillar__num { display: block; margin-bottom: 14px; font: 700 .85rem/1 var(--ap-font-heading); letter-spacing: .12em; color: var(--ap-primary-soft); }
.cs-pillar__title { font-size: 1.25rem; line-height: 1.35; margin-bottom: .5em; }
.cs-pillar p { margin: 0; line-height: 1.8; color: var(--ap-text); }

.cs-impact { max-width: 980px; margin: clamp(56px, 7vw, 96px) auto 0; text-align: center; }
.cs-impact .eyebrow { display: block; }
.cs-impact blockquote { margin: 0; padding: 0; border: 0; }
.cs-impact blockquote p { margin: 0; font: 700 clamp(1.6rem, 3.4vw, 2.6rem)/1.35 var(--ap-font-heading); color: var(--ap-white); }
.cs-impact .cs-figure { font-size: 1.15em; }

/* Program details: alternating artwork rows
   ========================================================================== */
.cs-details { padding-top: clamp(24px, 3vw, 40px); }
.cs-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
.cs-feature + .cs-feature { margin-top: clamp(64px, 8vw, 120px); }
.cs-feature--flip .cs-feature__art { order: 2; }
.cs-feature__art { position: relative; }
.cs-feature__art::before {
	content: "";
	position: absolute;
	inset: 10% 8% -6%;
	z-index: -1;
	background: radial-gradient(closest-side, rgba(175, 71, 254, .45), transparent);
	filter: blur(30px);
}
.cs-feature__art img {
	width: 100%;
	border-radius: 28px;
	-webkit-mask-image: radial-gradient(120% 110% at 50% 40%, #000 60%, transparent 100%);
	mask-image: radial-gradient(120% 110% at 50% 40%, #000 60%, transparent 100%);
	animation: ap-float-y 8s ease-in-out infinite;
	transition: transform .8s var(--ap-ease);
}
.cs-feature--flip .cs-feature__art img { animation-delay: -4s; }
.cs-feature:hover .cs-feature__art img { transform: scale(1.03) rotate(-1deg); }
.cs-feature__num { display: block; margin-bottom: 12px; font: 800 clamp(3rem, 6vw, 4.5rem)/1 var(--ap-font-heading); color: transparent; -webkit-text-stroke: 1px rgba(200, 150, 255, .4); }
.cs-feature__title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.2; margin-bottom: .6em; }
.cs-feature__body p { margin: 0 0 1em; font-size: 1.05rem; line-height: 1.85; color: var(--ap-text); }
.cs-feature__body p:last-child { margin-bottom: 0; }
.cs-feature__list { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
.cs-feature__list li { position: relative; padding-left: 26px; font-size: 1.05rem; line-height: 1.8; color: var(--ap-text); }
.cs-feature__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 9px; background: var(--ap-primary); border-radius: 50%; box-shadow: 0 0 0 4px rgba(175, 71, 254, .18), 0 0 12px rgba(175, 71, 254, .7); }

/* Results: full-bleed band over the wireframe wave
   ========================================================================== */
.cs-results {
	position: relative;
	margin-top: clamp(56px, 7vw, 96px);
	padding: clamp(80px, 10vw, 130px) 0 clamp(120px, 14vw, 200px);
	text-align: center;
	background:
		linear-gradient(180deg, var(--ap-bg) 0%, rgba(5, 2, 4, 0) 22%),
		var(--cs-results-bg) center bottom / 100% auto no-repeat,
		#050204;
}
.cs-results__head { max-width: 760px; margin: 0 auto clamp(48px, 6vw, 80px); }
.cs-results__title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05; margin-bottom: .35em; }
.cs-results__head p:last-child { margin: 0; font-size: 1.1rem; line-height: 1.8; color: var(--ap-text); }
.cs-results__grid { display: flex; flex-wrap: wrap; justify-content: center; row-gap: clamp(40px, 5vw, 64px); }
.cs-result {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 calc(100% / var(--cs-per-row, 4));
	gap: 22px;
	padding: 8px clamp(16px, 2.4vw, 36px);
}
.cs-result__icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(175, 71, 254, .45), rgba(175, 71, 254, .08) 70%);
	box-shadow: 0 0 0 1px rgba(175, 71, 254, .35), 0 0 40px rgba(175, 71, 254, .35);
	transition: transform .5s var(--ap-ease), box-shadow .5s;
}
.cs-result__icon img { width: 34px; height: 34px; }
.cs-result:hover .cs-result__icon { transform: translateY(-6px) scale(1.06); box-shadow: 0 0 0 1px rgba(175, 71, 254, .6), 0 0 60px rgba(175, 71, 254, .6); }
.cs-result p { margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ap-white); }
.cs-figure {
	display: inline-block;
	font-family: var(--ap-font-heading);
	font-weight: 800;
	line-height: 1.15;
	background: linear-gradient(180deg, #ffffff, #cfa0f5);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.cs-figure { font-size: 1.25em; }
.cs-result p .cs-figure--lead { display: block; margin-bottom: 4px; font-size: clamp(2rem, 3.2vw, 2.7rem); }
.cs-result p { max-width: 300px; }

/* Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.cs-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cs-result { flex-basis: 50%; }
	.cs-results { background-size: 180% auto, auto; }
}
@media (max-width: 960px) {
	.cs-split { grid-template-columns: 1fr; }
	.cs-split--stacked .cs-rows { grid-template-columns: 1fr; }
	.cs-split--stacked .cs-row:nth-last-child(2) { border-bottom: 0; }
	.cs-split__aside { position: static; }
	.cs-feature,
	.cs-feature--flip { grid-template-columns: 1fr; gap: 28px; }
	.cs-feature--flip .cs-feature__art { order: 0; }
	.cs-feature__art { max-width: 520px; }
	.cs-checks { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.cs-row { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 24px 0; }
	.cs-row__num { grid-row: span 2; font-size: 1.6rem; }
	.cs-row__icon { width: 40px; height: 40px; justify-content: start; }
	.cs-row__icon img, .cs-row__icon .icon { width: 32px; height: 32px; }
	.cs-pillars { grid-template-columns: 1fr; }
	.cs-result { flex-basis: 100%; }
}
