/* ── Case Study shared styles ── */

/* NAV */
.cs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    background: rgba(14, 17, 23, .92);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    transition: box-shadow .3s;
}

.cs-nav.scrolled {
    box-shadow: 0 4px 32px rgba(0, 0, 0, .35);
    border-color: var(--border2);
}

.cs-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text3);
    transition: color .2s;
}

.cs-back:hover {
    color: var(--text);
}

.cs-nav-logo {
    font-family: var(--font-d);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .15rem;
}

.cs-logo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--indigo);
    box-shadow: 0 0 8px var(--indigo);
}

/* HERO */
.cs-hero {
    padding: 120px 2.5rem 80px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.cs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, .12) 0%, transparent 70%);
    pointer-events: none;
}

.cs-hero-inner {
    max-width: var(--max);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cs-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-m);
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 1.25rem;
}

.cs-breadcrumb span {
    color: var(--text2);
}

.cs-hero h1 {
    font-family: var(--font-d);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--text);
    max-width: 820px;
    margin-bottom: 2.5rem;
}

.cs-hero h1 em {
    font-style: italic;
}

.cs-kpis {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cs-kpi {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--rl);
    padding: 1.1rem 1.6rem;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.cs-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.cs-kpi-val {
    font-family: var(--font-d);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.cs-kpi-lbl {
    font-family: var(--font-m);
    font-size: .6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text3);
    margin-top: .35rem;
}

.cs-dash-wrap {
    border-radius: var(--rl);
    overflow: hidden;
    border: 1px solid var(--border2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.cs-dash-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* BODY LAYOUT */
.cs-body {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2.5rem;
}

.cs-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.cs-section:last-child {
    border-bottom: none;
}

.cs-section-label {
    font-family: var(--font-m);
    font-size: .62rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: .75rem;
}

.cs-section h2 {
    font-family: var(--font-d);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cs-section h2 em {
    font-style: italic;
}

.cs-section p {
    font-size: 1rem;
    color: var(--text2);
    line-height: 1.75;
    max-width: 680px;
}

/* TWO-COL GRID */
.cs-two {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: start;
}

.cs-two.flip {
    grid-template-columns: 360px 1fr;
}

/* QUICK FACTS CARD */
.cs-facts {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--rl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 80px;
}

.cs-fact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.cs-fact:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cs-fact:first-child {
    padding-top: 0;
}

.cs-fact-lbl {
    font-family: var(--font-m);
    font-size: .62rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text3);
    flex-shrink: 0;
}

.cs-fact-val {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* CHALLENGE BOXES */
.cs-problems {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: 1.5rem;
}

.cs-problem {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1rem 1.25rem;
}

.cs-problem-ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: .1rem;
    color: var(--red);
}

.cs-problem-ico svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cs-problem-txt {
    font-size: .88rem;
    color: var(--text2);
    line-height: 1.55;
}

.cs-problem-txt strong {
    color: var(--text);
    font-weight: 600;
}

/* STRATEGY STEPS */
.cs-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.cs-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.cs-step-num {
    font-family: var(--font-m);
    font-size: .7rem;
    font-weight: 700;
    color: var(--indigo);
    background: var(--indigo-dim);
    border: 1px solid var(--border-i);
    border-radius: 6px;
    padding: .3rem .55rem;
    flex-shrink: 0;
    margin-top: .15rem;
}

.cs-step-body {
    flex: 1;
}

.cs-step-t {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .25rem;
}

.cs-step-d {
    font-size: .85rem;
    color: var(--text2);
    line-height: 1.6;
}

/* FLOWS BUILT */
.cs-flows {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-top: 1.5rem;
}

.cs-flow {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    transition: border-color .2s;
}

.cs-flow:hover {
    border-color: var(--border-i);
}

.cs-flow-ico {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-flow-ico svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cs-flow-t {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .15rem;
}

.cs-flow-d {
    font-size: .76rem;
    color: var(--text3);
    line-height: 1.45;
}

/* RESULTS */
.cs-results-nums {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.cs-rnum {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--rl);
    padding: 1.4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cs-rnum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--indigo);
    opacity: .6;
}

.cs-rnum-val {
    font-family: var(--font-d);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: .35rem;
}

.cs-rnum-lbl {
    font-family: var(--font-m);
    font-size: .58rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text3);
}

.cs-rnum-delta {
    font-size: .75rem;
    font-weight: 600;
    margin-top: .4rem;
}

.cs-rnum-delta.up {
    color: var(--emerald);
}

.cs-rnum-delta.amb {
    color: var(--amber);
}

/* TIMELINE */
.cs-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.cs-timeline::before {
    content: '';
    position: absolute;
    left: .45rem;
    top: .5rem;
    bottom: .5rem;
    width: 1px;
    background: var(--border2);
}

.cs-tl-item {
    position: relative;
    padding: 0 0 1.75rem 1.5rem;
}

.cs-tl-item:last-child {
    padding-bottom: 0;
}

.cs-tl-dot {
    position: absolute;
    left: -1.55rem;
    top: .35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--indigo);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
    transform: translateX(-50%);
}

.cs-tl-week {
    font-family: var(--font-m);
    font-size: .6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--indigo-l);
    margin-bottom: .25rem;
}

.cs-tl-t {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .2rem;
}

.cs-tl-d {
    font-size: .82rem;
    color: var(--text2);
    line-height: 1.55;
}

/* BEFORE / AFTER PERFORMANCE SHOWCASE */
.cs-perf-sum {
    margin-top: 1.75rem;
    margin-bottom: 3rem;
}

.cs-ba-section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.cs-ba-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font-m);
    font-size: .6rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
    padding: .3rem .85rem;
    border-radius: 99px;
    margin-bottom: 1.25rem;
}

.cs-ba-pill.before {
    background: rgba(239, 68, 68, .1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .2);
}

.cs-ba-pill.after {
    background: rgba(16, 185, 129, .1);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, .2);
}

.cs-ba-ctx {
    border-radius: var(--r);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

.cs-ba-ctx.before {
    background: rgba(239, 68, 68, .04);
    border: 1px solid rgba(239, 68, 68, .15);
}

.cs-ba-ctx.after {
    background: rgba(16, 185, 129, .04);
    border: 1px solid rgba(16, 185, 129, .15);
}

.cs-ba-stat-val {
    font-family: var(--font-d);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.cs-ba-ctx.before .cs-ba-stat-val {
    color: #f87171;
}

.cs-ba-ctx.after .cs-ba-stat-val {
    color: var(--emerald);
}

.cs-ba-stat-lbl {
    font-size: .74rem;
    color: var(--text2);
    margin-top: .3rem;
    line-height: 1.4;
}

.cs-ba-note {
    grid-column: 1 / -1;
    font-size: .83rem;
    color: var(--text2);
    line-height: 1.7;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.cs-ba-shots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cs-ba-shot {
    border-radius: var(--rl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg2);
}

.cs-ba-shot img {
    width: 100%;
    height: auto;
    display: block;
}

.cs-ba-cap {
    padding: .6rem 1rem;
    font-size: .68rem;
    font-family: var(--font-m);
    color: var(--text3);
    letter-spacing: .07em;
    text-transform: uppercase;
    border-top: 1px solid var(--border);
}

/* METRIC-BY-METRIC SECTIONS */
.cs-metric-section {
    margin-top: 2.25rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--border);
}
.cs-metric-lbl {
    font-family: var(--font-m);
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text3);
    display: block;
    margin-bottom: .75rem;
}
.cs-metric-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.cs-metric-col .cs-ba-pill {
    margin-bottom: .6rem;
}
.cs-metric-stat-card {
    border-radius: var(--rl);
    border: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 1.5rem;
    text-align: center;
}
.cs-metric-stat-card .cs-metric-val {
    font-family: var(--font-d);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #f87171;
}
.cs-metric-stat-card .cs-metric-desc {
    font-size: .75rem;
    color: var(--text2);
    margin-top: .5rem;
    line-height: 1.6;
}

/* EMAIL SAMPLES */
.cs-samples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.cs-sample {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
    transition: border-color .2s, transform .2s;
}

.cs-sample:hover {
    border-color: var(--border-i);
    transform: translateY(-3px);
}

.cs-sample-img {
    background: var(--bg3);
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: .8rem;
    font-family: var(--font-m);
    letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
}

.cs-sample-cap {
    padding: .85rem 1rem;
    font-size: .78rem;
    color: var(--text2);
}

.cs-sample-cap strong {
    color: var(--text);
    display: block;
    font-size: .82rem;
    margin-bottom: .15rem;
}

/* TESTIMONIAL — new card style */
.cs-tcard {
    max-width: 680px;
    margin-top: 1.5rem;
}

a.t-source {
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s;
}

a.t-source:hover {
    opacity: .8;
}

/* TESTIMONIAL — legacy (kept for safety) */
.cs-testi {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--rl);
    padding: 2.5rem;
    position: relative;
    margin-top: 1.5rem;
}

.cs-testi-quote {
    font-family: Georgia, serif;
    font-size: 5rem;
    line-height: .7;
    color: var(--indigo);
    opacity: .2;
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    user-select: none;
}

.cs-testi-text {
    font-family: var(--font-d);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.7;
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.cs-testi-auth {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.cs-testi-av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--indigo-dim);
    border: 1.5px solid var(--border-i);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--indigo-l);
    flex-shrink: 0;
}

.cs-testi-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
}

.cs-testi-role {
    font-size: .74rem;
    color: var(--text3);
    margin-top: .1rem;
}

/* CTA */
.cs-cta-section {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 5rem 2.5rem;
    text-align: center;
}

.cs-cta-inner {
    max-width: 560px;
    margin: 0 auto;
}

.cs-cta-inner h2 {
    font-family: var(--font-d);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 1rem 0;
}

.cs-cta-inner h2 em {
    font-style: italic;
    color: var(--amber);
}

.cs-cta-inner p {
    color: var(--text2);
    font-size: .97rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cs-cta-btns {
    display: flex;
    gap: .85rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* MORE CASE STUDIES */
.cs-more-section {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 5rem 2.5rem;
}

.cs-more-inner {
    max-width: var(--max);
    margin: 0 auto;
}

.cs-more-head {
    text-align: center;
    margin-bottom: 3rem;
}

.cs-more-h {
    font-family: var(--font-d);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-top: 1rem;
}

.cs-more-h em {
    font-style: italic;
    color: var(--indigo-l);
}

.cs-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.cs-more-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--rl);
    padding: 1.75rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: border-color .2s, transform .2s;
}

.cs-more-card:hover {
    border-color: var(--border-i);
    transform: translateY(-3px);
}

.cs-more-meta {
    font-family: var(--font-m);
    font-size: .6rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--indigo-l);
}

.cs-more-title {
    font-family: var(--font-d);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    flex: 1;
}

.cs-more-stats {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.cs-more-stat {
    font-family: var(--font-m);
    font-size: .68rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .22rem .6rem;
    color: var(--text2);
}

.cs-more-stat.hi {
    color: var(--emerald);
    background: rgba(16, 185, 129, .08);
    border-color: rgba(16, 185, 129, .2);
}

.cs-more-cta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--indigo-l);
    margin-top: .5rem;
}

.cs-more-cta svg {
    transition: transform .2s;
}

.cs-more-card:hover .cs-more-cta svg {
    transform: translate(2px, -2px);
}

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

@media (max-width: 560px) {
    .cs-more-section {
        padding: 3.5rem 1.25rem;
    }

    .cs-more-grid {
        grid-template-columns: 1fr;
    }
}

/* FOOTER */
.cs-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cs-footer-copy {
    font-size: .76rem;
    color: var(--text3);
}

.cs-footer-back {
    font-size: .76rem;
    font-weight: 600;
    color: var(--indigo-l);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.cs-footer-back:hover {
    color: var(--text);
}

/* RESPONSIVE */
@media(max-width:900px) {

    .cs-two,
    .cs-two.flip {
        grid-template-columns: 1fr;
    }

    .cs-facts {
        position: static;
    }

    .cs-flows {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-results-nums {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-samples {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-ba-ctx {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:620px) {
    .cs-hero {
        padding: 90px 1.25rem 60px;
    }

    .cs-body {
        padding: 0 1.25rem;
    }

    .cs-nav {
        padding: 0 1.25rem;
    }

    .cs-kpis {
        gap: .65rem;
    }

    .cs-kpi {
        min-width: calc(50% - .35rem);
        padding: .9rem 1.1rem;
    }

    .cs-kpi-val {
        font-size: 1.5rem;
    }

    .cs-flows {
        grid-template-columns: 1fr;
    }

    .cs-results-nums {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-samples {
        grid-template-columns: 1fr;
    }

    .cs-ba-shots {
        grid-template-columns: 1fr;
    }

    .cs-metric-pair {
        grid-template-columns: 1fr;
    }

    .cs-ba-ctx {
        grid-template-columns: 1fr 1fr;
    }

    .cs-cta-section {
        padding: 4rem 1.25rem;
    }

    .cs-footer {
        padding: 1.25rem;
    }

    .cs-nav-logo {
        display: none;
    }
}