/**
 * Alphapreneurs case study — /alphapreneurs-case-study/
 * Loaded only on that page (inc/case-study.php). Builds on style.css tokens.
 */

.case-study .screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Hero ------------------------------------------------------------------ */
.cs-hero { padding-bottom: 4rem; }
.cs-hero .page-hero-sub { max-width: 760px; margin-inline: auto; }
.cs-hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.5rem; }
.cs-facts { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid rgba(230,168,23,0.2); }
.cs-facts-note { margin-top: 1.5rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); font-family: var(--font-head); }

/* Shared ---------------------------------------------------------------- */
.cs-subhead { font-family: var(--font-head); font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 1.5rem; }
.section-navy .cs-subhead { color: var(--gold-bright); }
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }

.cs-list { display: flex; flex-direction: column; gap: 0.8rem; margin: 1.5rem 0 2rem; }
.cs-list li { position: relative; padding-left: 1.4rem; color: var(--grey-700); font-size: 0.95rem; line-height: 1.65; }
.cs-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.cs-list-dark li { color: rgba(255,255,255,0.8); }
.cs-list-dark strong { color: var(--white); }

/* Engine 01: toolkit groups -------------------------------------------- */
.cs-groups { background: var(--white); border: 1px solid var(--grey-100); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-sm); }
.cs-group { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--grey-100); }
.cs-group:last-child { border-bottom: 0; padding-bottom: 0; }
.cs-group strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 0.98rem; font-weight: 600; }
.cs-group span:not(.cs-group-count) { display: block; color: var(--grey-600); font-size: 0.86rem; line-height: 1.6; margin-top: 0.2rem; }
.cs-group-count { flex-shrink: 0; width: 2.75rem; font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--gold-deep); }
.cs-group-total { border-top: 2px solid var(--navy); margin-top: 0.5rem; padding-top: 1.25rem; }
.cs-group-total strong { align-self: center; }

.cs-spotlight { background: var(--navy-gradient); color: rgba(255,255,255,0.82); border-radius: var(--radius-lg); padding: 2.75rem; box-shadow: var(--shadow-lg); }
.cs-spotlight h3 { color: var(--white); font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 1rem 0; }
.cs-spotlight p { line-height: 1.75; }
.cs-spotlight .cs-why { margin-top: 1rem; padding: 1rem 1.25rem; border-left: 3px solid var(--gold); background: rgba(255,255,255,0.05); }
.cs-spotlight .cs-why strong { color: var(--gold-bright); }
.cs-spotlight .cs-list li { color: rgba(255,255,255,0.8); }
.cs-tag { display: inline-block; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy); background: var(--gold-gradient); padding: 0.35rem 0.8rem; border-radius: var(--radius); }

/* Charts ---------------------------------------------------------------- */
.cs-charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.cs-chart { margin: 0; background: var(--white); border: 1px solid var(--grey-100); border-radius: var(--radius-lg); padding: 2.25rem; box-shadow: var(--shadow-sm); }
.cs-chart-title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--navy); margin-bottom: 1.75rem; line-height: 1.5; }
.cs-bars { display: flex; flex-direction: column; gap: 1.1rem; }
.cs-bar { display: grid; grid-template-columns: minmax(8rem, 11rem) 1fr 5.5rem; gap: 1rem; align-items: center; }
.cs-bar-label { font-size: 0.88rem; color: var(--grey-600); }
.cs-bar-track { height: 14px; background: var(--grey-100); border-radius: 999px; overflow: hidden; }
.cs-bar-fill { display: block; height: 100%; width: 0; background: var(--grey-400); border-radius: 999px; transition: width 1.2s var(--ease-out) 0.2s; }
.cs-chart.visible .cs-bar-fill, .no-js .cs-bar-fill { width: var(--w); }
.cs-bar.is-hl .cs-bar-fill { background: var(--gold-gradient); }
.cs-bar.is-hl .cs-bar-label { color: var(--navy); font-weight: 600; }
.cs-bar-value { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--grey-600); text-align: right; line-height: 1; white-space: nowrap; }
.cs-bar.is-hl .cs-bar-value { color: var(--gold-deep); }
.cs-chart-note { margin-top: 1.5rem; font-size: 0.9rem; color: var(--grey-700); line-height: 1.65; }
.cs-chart-source { margin-top: 0.75rem; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--grey-400); font-family: var(--font-head); }
.cs-chart-tile { display: flex; flex-direction: column; }
.cs-tile-num { font-family: var(--font-display); font-size: clamp(3.5rem, 7vw, 5rem); font-weight: 700; line-height: 1; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Charts on navy */
.section-navy .cs-chart { background: rgba(255,255,255,0.04); border-color: rgba(230,168,23,0.2); box-shadow: none; }
.section-navy .cs-chart-title { color: var(--white); }
.section-navy .cs-bar-label, .section-navy .cs-bar-value { color: rgba(255,255,255,0.65); }
.section-navy .cs-bar.is-hl .cs-bar-label { color: var(--white); }
.section-navy .cs-bar.is-hl .cs-bar-value { color: var(--gold-bright); }
.section-navy .cs-bar-track { background: rgba(255,255,255,0.1); }
.section-navy .cs-bar-fill { background: rgba(255,255,255,0.35); }
.section-navy .cs-chart-note { color: rgba(255,255,255,0.75); }
.section-navy .cs-chart-source { color: rgba(255,255,255,0.45); }

/* Engine 02: pipeline --------------------------------------------------- */
.cs-pipeline { list-style: none; margin: 0 0 4.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: none; }
.cs-step { position: relative; padding: 2rem; border: 1px solid rgba(230,168,23,0.2); border-radius: var(--radius-lg); background: rgba(255,255,255,0.03); }
.cs-step-num { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; line-height: 1; background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-step h3 { color: var(--white); font-size: 1.35rem; margin: 0.75rem 0 0.6rem; }
.cs-step p { color: rgba(255,255,255,0.72); font-size: 0.92rem; line-height: 1.7; }
.cs-split-dark { align-items: center; }

/* Ownership ------------------------------------------------------------- */
.cs-own-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.cs-own { padding: 2rem; border-top: 3px solid var(--gold); background: var(--grey-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.cs-own h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.cs-own p { color: var(--grey-600); font-size: 0.92rem; line-height: 1.7; }

/* Comparison table ------------------------------------------------------ */
.cs-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.cs-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cs-table th, .cs-table td { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--grey-100); text-align: center; }
.cs-table thead th { font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-600); font-weight: 600; }
.cs-table tbody th { text-align: left; font-weight: 500; color: var(--navy); font-size: 0.95rem; }
.cs-table tbody tr:last-child th, .cs-table tbody tr:last-child td { border-bottom: 0; }
.cs-table .cs-col-us { background: rgba(230,168,23,0.08); }
.cs-table thead .cs-col-us { color: var(--navy); background: var(--gold-gradient); }
.cs-mark { font-size: 1.15rem; font-weight: 700; }
.cs-mark-yes { color: var(--gold-deep); }
.cs-mark-partial { color: var(--grey-400); }
.cs-mark-no { color: var(--grey-200); }

/* Sources --------------------------------------------------------------- */
.cs-sources-title { font-size: 1.6rem; margin-bottom: 1.5rem; }
.cs-sources { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.7rem; }
.cs-sources li { list-style: decimal; color: var(--grey-700); font-size: 0.9rem; line-height: 1.65; }
.cs-sources a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; }
.cs-disclaimer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--grey-100); font-size: 0.8rem; color: var(--grey-400); line-height: 1.6; }

/* RTL ------------------------------------------------------------------- */
[dir="rtl"] .cs-list li { padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] .cs-list li::before { left: auto; right: 0; }
[dir="rtl"] .cs-bar-value { text-align: left; }
[dir="rtl"] .cs-table tbody th { text-align: right; }
[dir="rtl"] .cs-spotlight .cs-why { border-left: 0; border-right: 3px solid var(--gold); }
[dir="rtl"] .cs-sources { padding-left: 0; padding-right: 1.25rem; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
	.cs-split, .cs-charts { grid-template-columns: 1fr; }
	.cs-pipeline { grid-template-columns: repeat(2, 1fr); }
	.cs-own-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.cs-pipeline, .cs-own-grid { grid-template-columns: 1fr; }
	.cs-groups, .cs-spotlight, .cs-chart { padding: 1.75rem 1.25rem; }
	.cs-bar { grid-template-columns: 1fr 5.5rem; gap: 0.4rem 0.75rem; }
	.cs-bar-label { grid-column: 1 / -1; }
	.cs-hero-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.cs-bar-fill { transition: none; }
}
