/* ================================================================
   Case Study Detail — RanksBreathe.com
   Follows site design: dark hero + white body sections
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue: #0052e0;
    --blue-d: #0040c0;
    --blue-l: #e8f0ff;
    --dark: #060d1a;
    --dark2: #0f172a;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --border: #e2e8f0;
    --boff: #dce8ff;
    --off: #f0f5ff;
    --green: #16a34a;
    --teal: #0891b2;
    --purple: #7c3aed;
    --amber: #d97706;
    --red: #dc2626;
    --font: "Plus Jakarta Sans", sans-serif;
    --mono: "JetBrains Mono", monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --radius: 20px;
    --radius-sm: 14px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: #fff;
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

.cs-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
}

/* ── ANIMATIONS ── */
@keyframes csFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
}
@keyframes csPulse {
    0%, 100% { opacity: .6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.05); }
}
@keyframes csDrawLine {
    to { stroke-dashoffset: 0; }
}
@keyframes csCountPop {
    0%   { opacity: 0; transform: scale(.7) translateY(10px); }
    60%  { transform: scale(1.05) translateY(-2px); }
    100% { opacity: 1; transform: none; }
}

/* ── SCROLL REVEAL ── */
.cs-rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.cs-rv.in {
    opacity: 1;
    transform: none;
}

/* ================================================================
   SECTION 1 — HERO (DARK — matches site hero pattern)
   ================================================================ */
.cs-hero {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 2rem;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark2) 100%);
}

.cs-hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0, 82, 224, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 82, 224, .05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
    pointer-events: none;
}

.cs-hero-orb1 {
    position: absolute; top: -20%; right: -10%;
    width: min(700px, 70vw); height: min(700px, 70vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 82, 224, .2), transparent 65%);
    pointer-events: none; animation: csPulse 6s ease-in-out infinite;
}
.cs-hero-orb2 {
    position: absolute; bottom: -30%; left: -10%;
    width: min(500px, 55vw); height: min(500px, 55vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, .12), transparent 65%);
    pointer-events: none; animation: csPulse 8s ease-in-out infinite 2s;
}

.cs-hero-content {
    position: relative; z-index: 2;
    text-align: center; max-width: 820px; margin: 0 auto;
}

/* Breadcrumbs */
.cs-breadcrumb {
    display: flex; align-items: center; justify-content: center;
    gap: .5rem; font-size: .78rem; font-weight: 500;
    color: rgba(255,255,255,.35); margin-bottom: 1rem;
    animation: csFadeUp .6s var(--ease) both;
}
.cs-breadcrumb a { color: rgba(255,255,255,.35); transition: color .2s; }
.cs-breadcrumb a:hover { color: #60a5fa; }
.cs-breadcrumb svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.cs-breadcrumb .current { color: rgba(255,255,255,.55); }

/* Badges */
.cs-hero-badges {
    display: flex; align-items: center; justify-content: center;
    gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem;
    animation: csFadeUp .6s var(--ease) .08s both;
}
.cs-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: #93c5fd;
    background: rgba(0, 82, 224, .15); border: 1px solid rgba(0, 82, 224, .3);
    border-radius: 100px; padding: .3rem .9rem;
}

/* H1 */
.cs-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -.04em; color: #fff;
    margin-bottom: .75rem; animation: csFadeUp .6s var(--ease) .15s both;
}
.cs-hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, #bfdbfe, #60a5fa 45%, #0052e0 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.cs-hero-sub {
    font-size: 1rem; color: rgba(255,255,255,.5); line-height: 1.65;
    max-width: 60ch; margin: 0 auto 1.5rem;
    animation: csFadeUp .6s var(--ease) .22s both;
}

/* Hero metrics */
.cs-hero-metrics {
    display: flex; align-items: center; justify-content: center;
    gap: 0; animation: csFadeUp .6s var(--ease) .3s both;
}
.cs-hm-item { text-align: center; padding: .75rem 1.25rem; position: relative; }
.cs-hm-item:not(:last-child)::after {
    content: ''; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%); width: 1px; height: 40px;
    background: rgba(255,255,255,.1);
}
.cs-hm-val {
    font-size: 2rem; font-weight: 800; letter-spacing: -.04em;
    color: #fff; line-height: 1;
}
.cs-hm-val .suffix { font-size: .85em; color: #93c5fd; font-weight: 700; }
.cs-hm-lbl {
    font-size: .7rem; color: rgba(255,255,255,.35); margin-top: .3rem;
    font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
}

/* ================================================================
   SHARED — Section Labels & Titles (WHITE background sections)
   ================================================================ */
.cs-sec-label {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .14em; color: var(--blue); margin-bottom: .75rem;
}
.cs-sec-label::before {
    content: ''; width: 20px; height: 2px;
    background: var(--blue); border-radius: 2px;
}
.cs-sec-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800;
    color: var(--text); letter-spacing: -.03em;
    line-height: 1.15; margin-bottom: .75rem;
}

/* ================================================================
   SECTION 2 — CLIENT OVERVIEW (White card)
   ================================================================ */
.cs-overview-sec { padding: 2.5rem 0; }

.cs-overview-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem 2.5rem;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,82,224,.06);
    transition: border-color .3s, box-shadow .3s;
}
.cs-overview-card:hover {
    border-color: var(--boff);
    box-shadow: 0 8px 40px rgba(0,82,224,.1);
}
.cs-overview-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), #3b82f6, #60a5fa);
}

/* Logo — top-left aligned with badge feel */
.cs-ov-logo {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--off); border: 1.5px solid var(--boff);
    display: flex; align-items: center; justify-content: center;
    padding: 10px; margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.cs-ov-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Details — clean 3-col grid */
.cs-ov-details {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
}
.cs-ov-label {
    font-size: .6rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: var(--blue); margin-bottom: .3rem;
}
.cs-ov-value {
    font-size: .85rem; font-weight: 600; color: var(--text); line-height: 1.5;
}
.cs-ov-value .tag {
    display: inline-block; font-size: .68rem; font-weight: 600;
    background: var(--off); border: 1px solid var(--boff);
    color: var(--blue); border-radius: 6px;
    padding: .2rem .55rem; margin: .15rem .25rem .15rem 0;
    transition: background .2s, border-color .2s;
}
.cs-ov-value .tag:hover {
    background: rgba(0,82,224,.06);
    border-color: rgba(0,82,224,.2);
}
.cs-ov-services { grid-column: 1 / -1; }

/* ================================================================
   SECTION 3 — THE CHALLENGE
   ================================================================ */
.cs-challenge-sec { padding:0; }

.cs-challenge-intro {
    font-size: 1rem; color: var(--text2); line-height: 1.8;
    max-width: 70ch; margin-bottom: 1.5rem;
}
.cs-challenge-intro strong { color: var(--blue); }

.cs-challenge-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.cs-challenge-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 1.5rem;
    transition: all .3s var(--ease); position: relative; overflow: hidden;
}
.cs-challenge-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 3px; height: 100%; background: var(--red);
    opacity: 0; transition: opacity .3s;
}
.cs-challenge-card:hover {
    border-color: rgba(220, 38, 38, .3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(220, 38, 38, .08);
}
.cs-challenge-card:hover::before { opacity: 1; }

.cs-challenge-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(220, 38, 38, .08);
    border: 1px solid rgba(220, 38, 38, .15);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; color: var(--red);
}
.cs-challenge-icon svg {
    width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2;
}
.cs-challenge-card h4 {
    font-size: .88rem; font-weight: 700; color: var(--text);
    margin-bottom: .5rem;
}
.cs-challenge-card p {
    font-size: .8rem; color: var(--text2); line-height: 1.65;
}

/* ================================================================
   SECTION 4 — STRATEGY TIMELINE
   ================================================================ */
.cs-strategy-sec { padding: 2.5rem 0; }

.cs-timeline { position: relative; padding-left: 3rem; }
.cs-timeline::before {
    content: ''; position: absolute; left: 15px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(180deg, var(--blue), #3b82f6, var(--teal));
}

.cs-phase { position: relative; margin-bottom: 2.5rem; padding-left: 2rem; }
.cs-phase:last-child { margin-bottom: 0; }

.cs-phase-dot {
    position: absolute; left: -3rem; top: 0;
    width: 32px; height: 32px; border-radius: 50%;
    background: #fff; border: 2px solid var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: .65rem; font-weight: 800; color: var(--blue); z-index: 2;
    transition: all .3s;
}
.cs-phase:hover .cs-phase-dot {
    background: var(--blue); color: #fff;
    box-shadow: 0 0 20px rgba(0, 82, 224, .3);
}

.cs-phase-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: .75rem; flex-wrap: wrap;
}
.cs-phase-title {
    font-size: 1.15rem; font-weight: 800; color: var(--text);
    letter-spacing: -.02em;
}
.cs-phase-time {
    font-size: .72rem; font-weight: 600; color: var(--blue);
    background: var(--off); border: 1px solid var(--boff);
    border-radius: 100px; padding: .2rem .7rem;
}
.cs-phase-tag {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--teal);
    background: rgba(8, 145, 178, .08);
    border: 1px solid rgba(8, 145, 178, .2);
    border-radius: 100px; padding: .2rem .65rem;
}

.cs-phase-desc {
    font-size: .9rem; color: var(--text2); line-height: 1.7;
    margin-bottom: 1rem; max-width: 65ch;
}

.cs-phase-actions { display: flex; flex-direction: column; gap: .5rem; }
.cs-action {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .82rem; color: var(--text); line-height: 1.5;
}
.cs-action::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--green); flex-shrink: 0; margin-top: .45rem;
}

/* ================================================================
   SECTION 5 — RESULTS (Light bg with accent cards)
   ================================================================ */
.cs-results-sec {
    padding: 2.5rem 0;
}

/* Big counter cards */
.cs-big-metrics {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem; margin-bottom: 2.5rem;
}
.cs-big-metric {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 1.75rem 1.25rem;
    text-align: center; position: relative; overflow: hidden;
    transition: all .3s var(--ease);
}
.cs-big-metric::before {
    content: ''; position: absolute;
    bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    transform: scaleX(0); transition: transform .3s;
}
.cs-big-metric:hover {
    transform: translateY(-4px);
    border-color: var(--boff);
    box-shadow: 0 12px 32px rgba(0,82,224,.1);
}
.cs-big-metric:hover::before { transform: scaleX(1); }

.cs-bm-value {
    font-size: 2.5rem; font-weight: 800; letter-spacing: -.04em;
    color: var(--text); line-height: 1; margin-bottom: .5rem;
}
.cs-bm-value .prefix { color: var(--green); }
.cs-bm-value .suffix { font-size: .7em; color: var(--blue); }
.cs-bm-label {
    font-size: .72rem; font-weight: 600; color: var(--text3);
    text-transform: uppercase; letter-spacing: .08em;
}

/* Traffic Growth Chart */
.cs-chart-wrap {
    background: var(--dark);
    border: 1.5px solid rgba(0,82,224,.15);
    border-radius: var(--radius);
    padding: 2rem 2.5rem; margin-bottom: 2.5rem;
    position: relative; overflow: hidden;
}
.cs-chart-title {
    font-size: .85rem; font-weight: 700; color: #fff;
    margin-bottom: .25rem;
}
.cs-chart-subtitle {
    font-size: .75rem; color: rgba(255,255,255,.35);
    margin-bottom: 1.5rem;
}
.cs-chart-svg { width: 100%; height: 250px; }
.cs-chart-line {
    fill: none; stroke: var(--blue); stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(0, 82, 224, .4));
}
.cs-chart-line.animated {
    stroke-dasharray: 2000; stroke-dashoffset: 2000;
    animation: csDrawLine 2.5s var(--ease) forwards;
}
.cs-chart-area {
    fill: url(#chartGradient); opacity: 0;
    transition: opacity 1s 1.5s;
}
.cs-chart-area.animated { opacity: 1; }
.cs-chart-dot {
    fill: #fff; stroke: var(--blue); stroke-width: 2; r: 4;
    opacity: 0; transition: opacity .3s;
}
.cs-chart-dot.animated {
    opacity: 1; transition-delay: calc(var(--i) * 0.2s + 1.5s);
}
.cs-chart-label {
    fill: rgba(255,255,255,.35); font-size: 11px;
    font-family: var(--font); text-anchor: middle;
}
.cs-chart-gridline {
    stroke: rgba(255,255,255,.05); stroke-width: 1; stroke-dasharray: 4 4;
}
.cs-chart-value-label {
    fill: #60a5fa; font-size: 10px; font-weight: 700;
    font-family: var(--font); text-anchor: middle;
    opacity: 0; transition: opacity .3s;
}
.cs-chart-value-label.animated {
    opacity: 1; transition-delay: calc(var(--i) * 0.2s + 1.8s);
}
.cs-chart-marker { stroke: #ef4444; stroke-width: 1; stroke-dasharray: 4 4; }
.cs-chart-marker-text {
    fill: #ef4444; font-size: 9px; font-weight: 600; font-family: var(--font);
}

/* Results Table */
.cs-results-table {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem;
}
.cs-rt-header {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: .875rem 1.5rem; background: var(--off);
    border-bottom: 1px solid var(--border);
}
.cs-rt-header span {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text3);
}
.cs-rt-row {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: .875rem 1.5rem; border-bottom: 1px solid var(--border);
    transition: background .2s; align-items: center;
}
.cs-rt-row:last-child { border-bottom: none; }
.cs-rt-row:hover { background: var(--off); }

.cs-rt-metric { font-size: .85rem; font-weight: 600; color: var(--text); }
.cs-rt-before { font-size: .82rem; color: var(--text3); font-family: var(--mono); }
.cs-rt-after { font-size: .82rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.cs-rt-change { font-size: .75rem; font-weight: 700; font-family: var(--mono); }
.cs-rt-change.up { color: var(--green); }
.cs-rt-change.down { color: var(--green); }
.cs-rt-change.new { color: var(--blue); }

/* Keyword Rankings Table */
.cs-kw-table {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 2.5rem;
}
.cs-kw-header {
    display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr;
    padding: .875rem 1.5rem; background: var(--off);
    border-bottom: 1px solid var(--border);
}
.cs-kw-header span {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text3);
}
.cs-kw-row {
    display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr;
    padding: .75rem 1.5rem; border-bottom: 1px solid var(--border);
    transition: background .2s; align-items: center;
}
.cs-kw-row:last-child { border-bottom: none; }
.cs-kw-row:hover { background: var(--off); }

.cs-kw-name { font-size: .82rem; font-weight: 600; color: var(--text); font-family: var(--mono); }
.cs-kw-before { font-size: .78rem; color: var(--text3); }
.cs-kw-after { font-size: .82rem; font-weight: 700; color: var(--green); }
.cs-kw-change-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .7rem; font-weight: 700; border-radius: 100px;
    padding: .2rem .6rem; background: rgba(22, 163, 74, .08);
    color: var(--green); border: 1px solid rgba(22, 163, 74, .2);
}

/* Donut Chart */
.cs-donut-wrap {
    display: grid; grid-template-columns: 200px 1fr;
    gap: 2rem; align-items: center;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 2rem;
}
.cs-donut-svg { width: 180px; height: 180px; transform: rotate(-90deg); }
.cs-donut-circle {
    fill: none; stroke-width: 22; stroke-linecap: round;
    transition: stroke-dasharray 1.5s var(--ease);
}
.cs-donut-legend { display: flex; flex-direction: column; gap: .875rem; }
.cs-donut-item { display: flex; align-items: center; gap: .75rem; }
.cs-donut-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.cs-donut-label { font-size: .82rem; font-weight: 600; color: var(--text2); }
.cs-donut-count {
    font-size: .82rem; font-weight: 800; color: var(--text);
    margin-left: auto; font-family: var(--mono);
}

/* ================================================================
   SECTION 6 — TESTIMONIAL
   ================================================================ */
.cs-testimonial-sec { padding: 2.5rem 0; }

.cs-testimonial-card {
    background: var(--dark);
    border: 1.5px solid rgba(0,82,224,.2);
    border-radius: var(--radius); padding: 3rem;
    position: relative; overflow: hidden; text-align: center;
}
.cs-testimonial-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), #3b82f6, transparent);
}
.cs-tq-mark {
    font-size: 4rem; color: var(--blue); line-height: 1;
    margin-bottom: .5rem; opacity: .5; font-family: Georgia, serif;
}
.cs-tq-text {
    font-size: 1.15rem; font-weight: 500; color: rgba(255,255,255,.85);
    line-height: 1.85; max-width: 60ch; margin: 0 auto 2rem;
    font-style: italic;
}
.cs-tq-author {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.cs-tq-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(0, 82, 224, .2);
    border: 2px solid rgba(0, 82, 224, .3);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.cs-tq-avatar img {
    width: 100%; height: 100%; object-fit: contain;
    filter: brightness(0) invert(1); padding: 8px;
}
.cs-tq-name { font-size: .88rem; font-weight: 700; color: #fff; }
.cs-tq-role { font-size: .78rem; color: rgba(255,255,255,.4); }
.cs-tq-stars {
    display: flex; justify-content: center; gap: .15rem;
    margin-top: .75rem; color: var(--amber);
}
.cs-tq-stars svg { width: 16px; height: 16px; fill: currentColor; }

/* ================================================================
   SECTION 7 — TAKEAWAYS (White cards)
   ================================================================ */
.cs-takeaways-sec { padding: 2.5rem 0; }

.cs-takeaways-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}
.cs-takeaway-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 1.75rem 1.5rem;
    transition: all .3s var(--ease); position: relative;
}
.cs-takeaway-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: linear-gradient(90deg, var(--blue), var(--teal));
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s;
}
.cs-takeaway-card:hover {
    transform: translateY(-4px);
    border-color: var(--boff);
    box-shadow: 0 12px 32px rgba(0,82,224,.08);
}
.cs-takeaway-card:hover::before { transform: scaleX(1); }

.cs-tk-icon {
    width: 42px; height: 42px; border-radius: 11px;
    background: var(--off); border: 1px solid var(--boff);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; color: var(--blue);
}
.cs-tk-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.cs-takeaway-card h4 {
    font-size: .88rem; font-weight: 700; color: var(--text);
    margin-bottom: .5rem; line-height: 1.3;
}
.cs-takeaway-card p { font-size: .8rem; color: var(--text2); line-height: 1.65; }

/* ================================================================
   SECTION 8 — RELATED CASE STUDIES
   ================================================================ */
.cs-related-sec { padding: 2.5rem 0; }

.cs-related-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.cs-related-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 1.75rem;
    transition: all .3s var(--ease); display: flex; flex-direction: column;
}
.cs-related-card:hover {
    transform: translateY(-4px); border-color: var(--boff);
    box-shadow: 0 12px 32px rgba(0,82,224,.08);
}
.cs-related-card .cs-rc-cat {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--blue); margin-bottom: .5rem;
}
.cs-related-card h4 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin-bottom: .5rem; line-height: 1.3;
}
.cs-related-card p {
    font-size: .8rem; color: var(--text2); line-height: 1.55; flex: 1;
}
.cs-related-card .cs-rc-link {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .78rem; font-weight: 700; color: var(--blue);
    margin-top: 1rem; transition: gap .2s;
}
.cs-related-card:hover .cs-rc-link { gap: .7rem; }

.cs-rc-cta {
    background: var(--off); border: 1.5px solid var(--boff);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.cs-rc-cta h4 { margin-bottom: 1rem; }
.cs-rc-cta .cs-btn-sm {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--blue); color: #fff; font-size: .82rem; font-weight: 700;
    padding: .65rem 1.5rem; border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 82, 224, .3);
    transition: transform .15s, box-shadow .2s;
}
.cs-rc-cta .cs-btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 82, 224, .4);
}

/* ================================================================
   SECTION 9 — CTA BAND
   ================================================================ */
.cs-cta-sec { padding: 2.5rem 0 4rem; }

.cs-cta-card {
    background: linear-gradient(135deg, var(--blue) 0%, #3b82f6 100%);
    border-radius: var(--radius); padding: 3.5rem;
    text-align: center; position: relative; overflow: hidden;
}
.cs-cta-card::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 500px; height: 500px; border-radius: 50%;
    background: rgba(255,255,255,.08); pointer-events: none;
}
.cs-cta-card h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800;
    color: #fff; margin-bottom: .75rem; position: relative;
}
.cs-cta-card p {
    font-size: 1rem; color: rgba(255,255,255,.8);
    margin-bottom: 2rem; position: relative;
}
.cs-cta-btns {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; flex-wrap: wrap; position: relative;
}
.cs-cta-primary {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: var(--blue); font-size: .88rem; font-weight: 700;
    padding: .85rem 2rem; border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: transform .15s;
}
.cs-cta-primary:hover { transform: translateY(-2px); }
.cs-cta-secondary {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
    color: #fff; font-size: .88rem; font-weight: 700;
    padding: .85rem 2rem; border-radius: 12px; transition: background .2s;
}
.cs-cta-secondary:hover { background: rgba(255,255,255,.25); }
.cs-cta-trust {
    display: flex; align-items: center; justify-content: center;
    gap: 1.5rem; margin-top: 1.5rem; font-size: .75rem;
    color: rgba(255,255,255,.6); position: relative;
}
.cs-cta-trust span { display: flex; align-items: center; gap: .35rem; }

/* ================================================================
   TWO-COLUMN LAYOUT — Main + Sidebar
   ================================================================ */
.cs-body-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    /* NO align-items: start — sidebar must stretch to full main height for sticky to work */
}
.cs-main { min-width: 0; }

/* ── SIDEBAR — stretches full height, children can be sticky ── */
.cs-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    align-self: stretch; /* stretch to match main height */
}

/* TOC Card — scrolls normally with page */
.cs-toc-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,82,224,.04);
}
.cs-toc-title {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .14em; color: var(--text3); margin-bottom: 1rem;
    display: flex; align-items: center; gap: .5rem;
}
.cs-toc-title svg {
    width: 14px; height: 14px; stroke: var(--blue);
    fill: none; stroke-width: 2;
}
.cs-toc-list {
    list-style: none; display: flex; flex-direction: column; gap: 0;
}
.cs-toc-item {
    display: flex; align-items: flex-start; gap: .6rem;
    padding: .55rem .75rem; border-radius: 8px;
    transition: all .2s var(--ease); cursor: pointer;
    text-decoration: none; color: var(--text2);
    font-size: .78rem; font-weight: 500; line-height: 1.4;
    border-left: 2px solid transparent; margin-left: -2px;
}
.cs-toc-num {
    font-size: .68rem; font-weight: 800; color: var(--blue);
    min-width: 18px; font-family: var(--mono);
}
.cs-toc-item:hover {
    background: var(--off); color: var(--text);
}
.cs-toc-item.active {
    background: var(--off); color: var(--blue);
    font-weight: 700; border-left-color: var(--blue);
}
.cs-toc-item.active .cs-toc-num { color: var(--blue); }

/* ================================================================
   LEAD FORM — Sticky + Conversion-Focused
   ================================================================ */
.cs-lead-card {
    position: sticky;
    top: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,82,224,.12), 0 2px 8px rgba(0,0,0,.06);
    border: 1.5px solid rgba(0,82,224,.15);
    background: #fff;
}

/* Gradient header */
.cs-lead-header {
    background: linear-gradient(135deg, var(--dark) 0%, #0a1628 100%);
    padding: 1.25rem 1.5rem 1.1rem;
    position: relative; overflow: hidden;
}
.cs-lead-header::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,82,224,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,82,224,.06) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, #000 20%, transparent 80%);
    pointer-events: none;
}
.cs-lead-header::after {
    content: ''; position: absolute;
    top: -40%; right: -30%;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0,82,224,.25), transparent 70%);
    pointer-events: none;
}

.cs-lead-urgency {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .58rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: #fbbf24;
    background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.25);
    border-radius: 100px; padding: .2rem .7rem;
    margin-bottom: .75rem;
    animation: csPulse 3s ease-in-out infinite;
}
.cs-lead-urgency svg {
    width: 10px; height: 10px; fill: #fbbf24; stroke: none;
}

.cs-lead-title {
    font-size: 1.05rem; font-weight: 800; color: #fff;
    line-height: 1.2; margin-bottom: .35rem;
    position: relative;
}
.cs-lead-title em {
    font-style: normal;
    background: linear-gradient(120deg, #93c5fd, #60a5fa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cs-lead-sub {
    font-size: .72rem; color: rgba(255,255,255,.45);
    font-weight: 500; position: relative;
}

/* Benefits list */
.cs-lead-benefits {
    display: flex; flex-direction: column; gap: .45rem;
    padding: 1rem 1.5rem .5rem;
}
.cs-lead-benefit {
    display: flex; align-items: center; gap: .5rem;
    font-size: .72rem; font-weight: 600; color: var(--text2);
}
.cs-lead-benefit svg {
    width: 14px; height: 14px; flex-shrink: 0;
    stroke: var(--green); fill: none; stroke-width: 2.5;
}

/* Form body */
.cs-lead-body { padding: .5rem 1.5rem 1.25rem; }
.cs-lead-form { display: flex; flex-direction: column; gap: .6rem; }
.cs-lead-input {
    width: 100%; padding: .55rem .85rem;
    background: var(--off); border: 1.5px solid var(--border);
    border-radius: 10px; font-family: var(--font);
    font-size: .78rem; color: var(--text);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}
.cs-lead-input:focus {
    border-color: var(--blue); background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 82, 224, .08);
}
.cs-lead-input::placeholder { color: var(--text3); }
.cs-lead-textarea {
    resize: vertical; min-height: 60px; max-height: 120px;
    line-height: 1.5;
}

/* CTA Button — pulsing glow */
@keyframes csCtaGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(0,82,224,.35); }
    50%      { box-shadow: 0 4px 28px rgba(0,82,224,.55), 0 0 40px rgba(0,82,224,.15); }
}
.cs-lead-btn {
    width: 100%; padding: .75rem;
    background: linear-gradient(135deg, var(--blue) 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff; border: none; border-radius: 10px;
    font-family: var(--font); font-size: .85rem; font-weight: 800;
    cursor: pointer; transition: transform .15s;
    animation: csCtaGlow 3s ease-in-out infinite;
    letter-spacing: .02em;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.cs-lead-btn:hover {
    transform: translateY(-2px) scale(1.01);
}
.cs-lead-btn svg {
    width: 16px; height: 16px; stroke: currentColor;
    fill: none; stroke-width: 2.5;
    transition: transform .2s;
}
.cs-lead-btn:hover svg { transform: translateX(3px); }

/* Trust footer */
.cs-lead-footer {
    padding: .75rem 1.5rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--off);
}
.cs-lead-rating {
    display: flex; align-items: center; justify-content: center;
    gap: .35rem; margin-bottom: .4rem;
}
.cs-lead-stars { display: flex; gap: .1rem; color: #f59e0b; }
.cs-lead-stars svg { width: 12px; height: 12px; fill: currentColor; }
.cs-lead-rating-text {
    font-size: .65rem; font-weight: 700; color: var(--text);
}

.cs-lead-trust-row {
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; flex-wrap: wrap;
}
.cs-lead-trust-item {
    display: flex; align-items: center; gap: .3rem;
    font-size: .6rem; font-weight: 600; color: var(--text3);
}
.cs-lead-trust-item svg {
    width: 10px; height: 10px; stroke: var(--green);
    fill: none; stroke-width: 2.5;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .cs-body-grid { grid-template-columns: 1fr 300px; gap: 1.5rem; }
}
@media (max-width: 1024px) {
    .cs-body-grid { grid-template-columns: 1fr; }
    .cs-sidebar {
        display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
    }
    .cs-lead-card { position: static; }
    .cs-challenge-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-big-metrics { grid-template-columns: repeat(2, 1fr); }
    .cs-takeaways-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-related-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    .cs-overview-card { text-align: center; }
    .cs-ov-logo { margin: 0 auto 1.5rem; }
    .cs-ov-details { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cs-sidebar { grid-template-columns: 1fr; }
    .cs-hero { padding: 4rem 0 3rem; }
    .cs-hero h1 { font-size: 1.8rem; }
    .cs-hm-item { padding: .75rem 1rem; }
    .cs-hm-val { font-size: 1.5rem; }
    .cs-challenge-grid { grid-template-columns: 1fr; }
    .cs-big-metrics { grid-template-columns: 1fr 1fr; }
    .cs-takeaways-grid { grid-template-columns: 1fr; }
    .cs-related-grid { grid-template-columns: 1fr; }
    .cs-rt-header, .cs-rt-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
    .cs-kw-header, .cs-kw-row { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
    .cs-timeline { padding-left: 2rem; }
    .cs-phase-dot { left: -2rem; width: 26px; height: 26px; font-size: .6rem; }
    .cs-phase { padding-left: 1rem; }
    .cs-testimonial-card { padding: 2rem 1.5rem; }
    .cs-cta-card { padding: 2.5rem 1.5rem; }
    .cs-overview-card { padding: 1.75rem; }
}
@media (max-width: 480px) {
    .cs-ov-details { grid-template-columns: 1fr; }
    .cs-hero-metrics { flex-direction: column; gap: 0; }
    .cs-hm-item::after { display: none; }
    .cs-hm-item {
        display: flex; align-items: center; gap: 1rem;
        width: 100%; padding: .5rem 0;
    }
    .cs-hm-val { font-size: 1.3rem; }
    .cs-big-metrics { grid-template-columns: 1fr; }
    .cs-rt-header, .cs-rt-row { grid-template-columns: 1fr 1fr; gap: .25rem; }
    .cs-rt-header span:nth-child(1),
    .cs-rt-row .cs-rt-metric { grid-column: 1 / -1; }
    .cs-kw-header, .cs-kw-row { grid-template-columns: 1fr; gap: .2rem; }
    .cs-kw-name { grid-column: 1 / -1; margin-bottom: .25rem; }
}

