/* ═══════════════════════════════════════════════════════════════
   SELF-SERVICE PORTAL — Case Study Page
   ═══════════════════════════════════════════════════════════════ */

.project-hero {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 24px;
    width: 100%;
    position: relative;
    z-index: 10;
    margin-bottom: 16px;
    padding-top: 90px;
}

.project-hero-top {
    width: 100%;
    aspect-ratio: 3840 / 1200;
    border-radius: 12px;
    overflow: hidden;
    background: #242424;
}

.project-hero-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-intro {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-intro h1 {
    font-size: 56px;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(250, 249, 246, 0.8);
    line-height: 1.6;
    max-width: 720px;
}

.hero-overview {
    width: 100%;
    display: grid;
    grid-template-columns: .7fr 1fr;
    gap: 40px;
    align-items: start;
}

.hero-overview .hero-subtitle {
    max-width: none;
}

.hero-meta {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding-left: 0;
    list-style: none;
}

.hero-meta-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    background: rgba(23, 23, 23, 0.70);
    border: 1px solid rgba(250, 249, 246, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.hero-meta-number {
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    color: #FAF9F6;
}

.hero-meta-label {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: rgba(250, 249, 246, 0.85);
}

.section {
    display: grid;
    grid-template-columns: .7fr 1fr;
    column-gap: 40px;
    row-gap: 16px;
    align-items: start;
}

.section-content-column {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.section-head {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    font-size: 32px;
    font-weight: 500;
}

.section .section-head {
    position: sticky;
    top: var(--section-sticky-top, 55px);
    z-index: 20;
    isolation: isolate;
    background: #121212;
    padding: 8px 0;
    grid-column: 1 / -1;
}

.section .section-head::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--section-sticky-top, 55px) * -1);
    height: var(--section-sticky-top, 55px);
    background: #121212;
    z-index: -1;
    pointer-events: none;
}

.section .section-head::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100vw;
    transform: translateX(-50%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.section .section-head.sticky-active::after {
    opacity: 1;
}

.section-copy {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(250, 249, 246, 0.85);
}

.section-subhead {
    font-size: 20px;
    font-weight: 600;
    color: rgba(250, 249, 246, 0.85);
    margin-top: 0;
}

.panel {
    background: rgba(23, 23, 23, 0.70);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.panel p,
.panel li,
.panel td,
.panel th,
.panel h3,
blockquote {
    color: rgba(250, 249, 246, 0.85);
}

.panel p,
.panel li,
.panel td,
.panel th {
    font-size: 14px;
    line-height: 1.6;
}

.panel h3 {
    font-size: 20px;
    font-weight: 600;
}

.bullet-list,
.ordered-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 18px;
}

blockquote {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 14px;
    font-style: italic;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.data-table th {
    color: #FAF9F6;
    font-weight: 600;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

#execution .stats-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
    gap: 12px;
}

.stat-block {
    background: rgba(250, 249, 246, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#execution .stat-block {
    background: rgba(23, 23, 23, 0.70);
    border-radius: 12px;
    border: 1px solid rgba(250, 249, 246, 0.08);
    padding: 12px;
    width: fit-content;
    max-width: 100%;
}

.stat-number {
    font-size: 48px;
    line-height: 1;
    font-weight: 600;
    color: #FAF9F6;
}

#execution .stat-number {
    font-size: 24px;
    font-weight: 500;
}

.stat-label {
    font-size: 14px;
    color: rgba(250, 249, 246, 0.8);
}

#execution .stat-label {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    color: rgba(250, 249, 246, 0.85);
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    width: 100%;
}

.discovery-column {
    background: rgba(250, 249, 246, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
    height: fit-content;
}

#discoveries-affinity .discovery-grid {
    gap: 24px;
}

#discoveries-affinity .discovery-column {
    background: rgba(23, 23, 23, 0.70);
    border: 1px solid rgba(250, 249, 246, 0.08);
    border-radius: 12px;
    padding: 12px;
}

#discoveries-affinity .discovery-column h3 {
    font-size: 14px;
}

#discoveries-affinity .discovery-column .bullet-list li,
#discoveries-affinity .discovery-column blockquote {
    font-size: 13px;
}

.discovery-column h3 {
    margin-bottom: 8px;
    font-size: 17px;
}

.discovery-column blockquote {
    margin: 12px 0 0;
}

.solution-screens {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.showcase-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.solution-screen {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.solution-caption {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(250, 249, 246, 0.78);
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
    width: 100%;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
    width: 100%;
}

.point-card {
    background: rgba(23, 23, 23, 0.70);
    border-radius: 12px;
    border: 1px solid rgba(250, 249, 246, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: fit-content;
}

.point-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: rgba(250, 249, 246, 0.85);
}

.point-number {
    font-size: 22px;
    line-height: 1;
    font-weight: 600;
    color: #FAF9F6;
}

@media (max-width: 1024px) {
    .discovery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .project-hero-top {
        min-height: 220px;
    }

    .project-hero-top img {
        height: 220px;
        object-fit: cover;
        object-position: left center;
    }

    .section {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .section-content-column {
        grid-column: auto;
    }

    .hero-overview {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-meta {
        flex-direction: column;
    }

    .hero-intro h1 {
        font-size: 36px;
    }

    .section-head {
        font-size: 28px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .points-grid {
        grid-template-columns: 1fr;
    }

    .objectives-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 36px;
    }

    #execution .stat-number {
        font-size: 24px;
    }

    #execution .stats-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    #execution .stat-block {
        flex: 1 1 0;
        width: auto;
    }
}
