/* ═══════════════════════════════════════════════════════════
   case_study_detail.css
   Assumes :root variables are already defined globally.
   ═══════════════════════════════════════════════════════════ */

/* ── Scroll Progress ────────────────────────────────────── */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 9999;
    transition: transform 0.1s linear;
}

/* ── Utility ─────────────────────────────────────────────── */
.cs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: clamp(1.25rem, 4vw, 5rem);
    padding-right: clamp(1.25rem, 4vw, 5rem);
}

/* ── Animations ──────────────────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible,
.fade-right.is-visible {
    opacity: 1;
    transform: none;
}

/* ── Section Label ───────────────────────────────────────── */
.cs-section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cs-section-label span {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

.cs-section-label--light span {
    color: rgba(255, 255, 255, 0.5);
}

.cs-label-bar {
    width: 4px;
    height: 28px;
    background: var(--yellow);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── Section Title ───────────────────────────────────────── */
.cs-section-title {
    font-family: var(--font-head);
    font-size: clamp(1.25rem, 3vw, 2.25rem);
    font-weight: 600;
    color: var(--text);
    margin: 0 0 1.5rem;
    line-height: 1.15;
}

.cs-section-title--light {
    color: #fff;
}

/* ── Body Text ───────────────────────────────────────────── */
.cs-body-text {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.6;
    letter-spacing: -0.015em;
    color: var(--muted);
}

.cs-body-text p+p {
    margin-top: 1rem;
}

/* ── Badge ───────────────────────────────────────────────── */
.cs-badge {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--yellow);
    border: 1px solid rgba(31, 168, 36, 0.3);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.75rem;
}

/* ── Tag Pills ───────────────────────────────────────────── */
.cs-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.cs-tag {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    transition: background 0.2s;
}

.cs-tag:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.cs-hero {
    background: var(--navy);
    /* min-height: 90svh; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* subtle dot grid overlay */
.cs-hero__bg-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.cs-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 8rem;
    padding-bottom: 4rem;
    position: relative;
    z-index: 2;
}

@media (min-width: 900px) {
    .cs-hero__inner {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 4rem;
    }
}

.cs-hero__title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.08;
    margin: 0 0 1rem;
}

.cs-hero__meta {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Hero Image */
.cs-hero__image {
    display: none;
}

@media (min-width: 900px) {
    .cs-hero__image {
        display: block;
    }
}

.cs-hero__image-frame {
    aspect-ratio: 4.5/5;
    /* aspect-ratio: auto; */
    border-radius: 1.25rem;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.cs-hero__image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.6);
    transition: filter 0.6s ease;
}

.cs-hero__image-frame:hover img {
    filter: grayscale(0);
}

/* Scroll hint */
.cs-hero__scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.4s;
    z-index: 3;
}

.cs-scroll-line {
    width: 1px;
    height: 3rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25));
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* ════════════════════════════════════════════════════════════
   AT A GLANCE
════════════════════════════════════════════════════════════ */
.cs-glance {
    background: var(--off-white);
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border);
}

.cs-glance__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE - AT A GLANCE VERTICAL STACK
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .cs-glance__grid {
        grid-template-columns: 1fr;  /* Single column - vertical stack */
        gap: 1rem;
    }
    
    .cs-glance__card {
        padding: 1.25rem;
    }
    
    .cs-glance__value {
        font-size: 1.5rem;
    }
    
    .cs-glance__label {
        font-size: 0.85rem;
    }
    
    .cs-glance__sub {
        font-size: 0.8rem;
    }
}

.cs-glance__card {
    background: var(--navy);
    border-radius: 0.75rem;
    padding: 1.5rem 1.25rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease calc(var(--delay, 0) * 80ms),
        transform 0.5s ease calc(var(--delay, 0) * 80ms),
        box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: space-between;
}

.cs-glance__card.is-visible {
    opacity: 1;
    transform: none;
}

.cs-glance__card:hover {
    box-shadow: 0 8px 32px rgba(10, 26, 58, 0.18);
    transform: translateY(-2px) !important;
}

.cs-glance__label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 0.5rem;
}

.cs-glance__value {
    font-family: var(--font-num, var(--font-head));
    font-size: clamp(1.5rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--yellow);
    margin: 0.35em 0;
    line-height: 1;
}

.cs-glance__sub {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0.35rem 0 0;
}

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
════════════════════════════════════════════════════════════ */
.cs-main {
    padding-bottom: 2rem;
}

.cs-section {
    padding: 4rem 0 2rem;
}

.cs-section+.cs-section {
    padding-top: 2rem;
}

.cs-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .cs-two-col {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
        align-items: start;
    }

    .cs-solution-wrap {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

/* ── Challenges ──────────────────────────────────────────── */
.cs-challenges-box {
    background: #f8f9fb;
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
}

.cs-challenge-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.cs-challenge-item {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease calc(var(--delay, 0)*90ms),
        transform 0.5s ease calc(var(--delay, 0)*90ms);
}

.cs-challenge-item.is-visible {
    opacity: 1;
    transform: none;
}

.cs-challenge-dot {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.cs-challenge-dot span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--navy);
    display: block;
}

.cs-challenge-label {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0.25rem 0 0.35rem;
}

.cs-challenge-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
    margin: 0;
}

/* ── Solution ────────────────────────────────────────────── */
.cs-two-col__narrow {}

.cs-solution-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-self: start;
}

.cs-solution-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy);
    border-radius: 0.6rem;
    padding: 1rem 1.25rem;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease calc(var(--delay, 0)*80ms),
        transform 0.5s ease calc(var(--delay, 0)*80ms),
        box-shadow 0.2s;
}

.cs-solution-card.is-visible {
    opacity: 1;
    transform: none;
}

.cs-solution-card:hover {
    box-shadow: 0 4px 18px rgba(10, 26, 58, 0.08);
}

.cs-solution-dot {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 1px solid var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.cs-solution-dot span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy);
    display: block;
}

.cs-solution-card p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

/* ── Solution Flow Image ─────────────────────────────────── */
.cs-flow-image {
    text-align: center;
}

.cs-flow-image__img {
    max-width: 100%;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(10, 26, 58, 0.07);
}

/* ════════════════════════════════════════════════════════════
   RESULTS
════════════════════════════════════════════════════════════ */
.cs-results {
    background: var(--navy);
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.cs-results__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

@media (min-width: 640px) {
    .cs-results__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.cs-result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease calc(var(--delay, 0)*90ms),
        transform 0.6s ease calc(var(--delay, 0)*90ms),
        background 0.2s;
}

.cs-result-card.is-visible {
    opacity: 1;
    transform: none;
}

.cs-result-card:hover {
    background: rgba(255, 255, 255, 0.09);
}

.cs-result-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--navy);
    transition: transform 0.2s;
}

.cs-result-card:hover .cs-result-icon {
    transform: scale(1.1);
}

.cs-result-card p {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    line-height: 1.65;
}

/* Decorative blobs */
.cs-blob {
    position: absolute;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.cs-blob--tr {
    top: -8rem;
    right: -8rem;
    background: rgba(31, 168, 36, 0.06);
}

.cs-blob--bl {
    bottom: -8rem;
    left: -8rem;
    background: rgba(31, 79, 168, 0.12);
}

/* ════════════════════════════════════════════════════════════
   FOOTER CTA
════════════════════════════════════════════════════════════ */
.cs-cta {
    padding: 5rem 0;
    text-align: center;
    padding-bottom: 0;
    border-top: 1px solid var(--border);
}

.cs-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cs-cta__label {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.cs-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--yellow);
    font-family: var(--font-ui);
    color: #000;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.9rem 2rem;
    border-radius: 0.6rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(255, 255, 205, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cs-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px rgba(255, 255, 164, 0.8);
}

