/* ============================================================ 
   CASE STUDY DETAIL "ENGINEERING DEEP DIVE" v1.0
   Design: Snow Surface x Indigo Narrative
   Hierarchy: H1 (48px) | H2 (36px) | H3 (28px) 
   ============================================================ */

.case-detail-body {
    background: #F8F9FA;
    color: #1F1F1F;
}

/* --- SUPREME DETAIL HERO --- */
.cs-hero {
    position: relative;
    padding: calc(var(--header-height) + 40px) 0 40px;
    background: #FFFFFF;
    overflow: hidden;
}

.cs-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cs-hero__mesh {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.cs-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 17, 26, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 17, 26, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    z-index: 2;
}

/* Registry Navigation & Metadata Strip */
.cs-meta-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
}

.cs-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5F6368;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.cs-meta-divider {
    width: 6px;
    height: 6px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
}

.cs-hero__badge {
    display: inline-flex;
    align-items: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.cs-hero__title {
    font-size: 3rem;
    /* 48px exactly */
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin-bottom: 24px;
    color: #1F1F1F;
    max-width: 960px;
}

.cs-hero__desc {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #3C4043;
    max-width: 800px;
    margin-bottom: 0;
}

/* --- QUICK IMPACT DASHBOARD --- */
.cs-dashboard {
    display: flex;
    gap: 24px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cs-dash-card {
    background: #F8F9FA;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 24px 32px;
    flex: 1;
    min-width: 200px;
}

.cs-dash-card__val {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.cs-dash-card__label {
    font-size: 0.75rem;
    color: #5F6368;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* --- NARRATIVE ARCHITECTURE --- */
.cs-content-section {
    padding: 60px 0;
    background: #FFFFFF;
}

.cs-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 80px;
}

.cs-body-copy {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1F1F1F;
}

.cs-body-copy h2 {
    font-size: 2.25rem;
    /* 36px standard */
    font-weight: 600;
    color: #1F1F1F;
    margin: 60px 0 24px;
    letter-spacing: -0.03em;
}

.cs-body-copy h2:first-child {
    margin-top: 0;
}

.cs-body-copy p {
    margin-bottom: 32px;
}

.cs-body-copy ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.cs-body-copy li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 24px;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #3C4043;
}

.cs-body-copy li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 2px;
    /* Small technical square */
    opacity: 0.9;
}

.cs-body-copy li strong {
    color: #1F1F1F;
    font-weight: 600;
}

.cs-body-copy ol {
    counter-reset: engineering-counter;
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.cs-body-copy ol li {
    counter-increment: engineering-counter;
    position: relative;
    padding-left: 40px;
}

.cs-body-copy ol li::before {
    content: counter(engineering-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: var(--cin-accent-soft, #EEF2FF);
    color: var(--color-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
}

/* --- SIDEBAR REGISTRY --- */
.cs-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-module {
    background: #F8F9FA;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 40px;
    padding: 40px;
    margin-bottom: 32px;
}

.sidebar-module__title {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5F6368;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: block;
}

.sidebar-module--cta {
    border-radius: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #4F46E5 100%);
    color: #FFFFFF;
    text-align: center;
    padding: 48px 32px;
    border: none;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.sidebar-module--cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.sidebar-cta__title {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.sidebar-cta__desc {
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 32px;
}

.btn-sidebar-white {
    background: #FFFFFF;
    color: var(--color-primary);
    width: 100%;
    padding: 16px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-sidebar-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-sidebar-white svg {
    transition: transform 0.3s ease;
}

.btn-sidebar-white:hover svg {
    transform: translateX(4px);
}

.sidebar-item {
    margin-bottom: 24px;
}

.sidebar-item__val {
    font-weight: 600;
    color: #1F1F1F;
    display: block;
}

.tech-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    font-size: 0.8125rem;
    color: #1F1F1F;
    margin: 0 8px 8px 0;
    font-weight: 500;
}

/* --- TESTIMONIAL POD --- */
.cs-testimonial-pod {
    background: #F8F9FA;
    border: 1px solid var(--color-primary);
    border-radius: 40px;
    padding: 60px;
    margin-top: 80px;
    position: relative;
}

.cs-testimonial-pod::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 10rem;
    color: var(--color-primary);
    opacity: 0.05;
    font-family: serif;
}

.cs-quote-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #1F1F1F;
    font-style: italic;
    margin-bottom: 40px;
}

.cs-quote-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-role {
    font-size: 0.875rem;
    color: #5F6368;
}

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

    .cs-sidebar {
        position: static;
    }

    .cs-hero__title {
        font-size: 2.25rem;
    }
}