body.case-study-lightbox-open {
    overflow: hidden;
}

.case-study-lightbox {
    position: fixed;
    inset: 0;
    width: min(1180px, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: visible;
    color: var(--text-main);
    background: transparent;
    border: 0;
}

.case-study-lightbox::backdrop {
    background: rgba(0, 0, 0, .58);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.case-study-lightbox__panel {
    position: relative;
    max-height: calc(100dvh - 2rem);
    padding: clamp(1.25rem, 2.5vw, 2.25rem);
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(23, 31, 35, .98), rgba(8, 12, 14, .98));
    border: 1px solid rgba(205, 226, 232, .22);
    border-radius: 30px;
    box-shadow: 0 34px 100px rgba(0, 0, 0, .72);
}

.case-study-lightbox__close {
    position: absolute;
    z-index: 4;
    top: 1rem;
    right: 1rem;
    width: 46px;
    height: 46px;
    color: #10171a;
    background: #edf5f6;
    border: 0;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.case-study-lightbox__heading {
    max-width: 820px;
    padding-right: 4rem;
    margin-bottom: 1.5rem;
}

.case-study-lightbox__heading span,
.case-study-lightbox__detail span {
    color: #bed0d5;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.case-study-lightbox__heading h2 {
    margin: .4rem 0 .6rem;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.case-study-lightbox__heading p,
.case-study-lightbox__detail p {
    color: var(--text-muted);
}

.case-study-lightbox__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
    align-items: start;
}

.case-study-preview {
    position: relative;
    overflow: hidden;
    background: #f6f3eb;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
}

.case-study-preview__bar {
    min-height: 44px;
    padding: 0 .85rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #5d676b;
    background: #e7e5df;
    font-size: .7rem;
}

.case-study-preview__dots {
    display: flex;
    gap: .38rem;
}

.case-study-preview__dots i {
    width: 8px;
    height: 8px;
    background: #a8afb1;
    border-radius: 50%;
}

.case-study-preview__address {
    letter-spacing: .05em;
}

.case-study-preview__devices {
    margin-left: auto;
    display: flex;
    gap: .25rem;
    padding: .2rem;
    background: #d4d6d1;
    border-radius: 999px;
}

.case-study-preview__devices button {
    padding: .34rem .58rem;
    color: #56605c;
    background: transparent;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.case-study-preview__devices button[aria-pressed="true"] {
    color: #142018;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .14);
}

.case-study-preview__screen {
    height: min(58vh, 610px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #111719;
}

.case-study-preview__screen iframe {
    display: block;
    max-width: none;
    flex: 0 0 auto;
    background: #fff;
    border: 0;
    transform-origin: top center;
}

.case-study-preview__interaction {
    display: none;
}

.case-study-preview__hero {
    position: relative;
    min-height: 420px;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    color: #fff;
}

.case-study-preview__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-study-preview__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 18, 12, .08), rgba(8, 18, 12, .86));
}

.case-study-preview__brand,
.case-study-preview__hero h3,
.case-study-preview__hero p {
    position: relative;
    z-index: 1;
}

.case-study-preview__brand {
    position: absolute;
    top: 1.35rem;
    left: 1.5rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.case-study-preview__brand b {
    color: #f5bf24;
}

.case-study-preview__hero h3 {
    max-width: 560px;
    margin-bottom: .65rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 400;
    line-height: .94;
}

.case-study-preview__hero p {
    max-width: 470px;
    color: rgba(255, 255, 255, .82);
}

.case-study-preview__services {
    padding: clamp(1.5rem, 4vw, 3rem);
    color: #17211b;
    background: #f3f0e7;
}

.case-study-preview__services small {
    color: #6c756d;
    font-weight: 800;
    letter-spacing: .14em;
}

.case-study-preview__services h4 {
    max-width: 540px;
    margin: .55rem 0 1.25rem;
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    line-height: 1;
}

.case-study-preview__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.case-study-preview__cards span {
    min-height: 110px;
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: linear-gradient(145deg, #526f59, #1b3423);
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.case-study-preview__hint {
    padding: .55rem 1rem;
    color: #59645d;
    background: #e3e8e1;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
}

.case-study-lightbox__details {
    display: grid;
    gap: 1rem;
}

.case-study-lightbox__detail {
    padding: 1.15rem 1.2rem;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
}

.case-study-lightbox__detail h3 {
    margin: .35rem 0 .45rem;
    font-size: 1.15rem;
}

.case-study-lightbox__services {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
}

.case-study-lightbox__services li {
    padding: .42rem .7rem;
    color: #dce8ea;
    background: rgba(190, 211, 216, .09);
    border: 1px solid rgba(190, 211, 216, .16);
    border-radius: 999px;
    font-size: .76rem;
}

.case-study-lightbox__actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.case-study-lightbox__actions a {
    padding: .8rem 1.15rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 800;
    text-decoration: none;
}

.case-study-lightbox__primary {
    color: #091114;
    background: linear-gradient(135deg, #f0fafb, #9aadb3);
}

.case-study-lightbox__secondary {
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, .2);
}

@media (max-width: 820px) {
    .case-study-lightbox {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .case-study-lightbox__panel {
        max-height: calc(100dvh - 1rem);
        border-radius: 22px;
    }

    .case-study-lightbox__layout {
        grid-template-columns: 1fr;
    }

    .case-study-preview__screen {
        height: min(48dvh, 420px);
    }

    .case-study-preview__screen iframe {
        pointer-events: none;
    }

    .case-study-preview.is-interactive .case-study-preview__screen iframe {
        pointer-events: auto;
    }

    .case-study-preview__interaction {
        position: absolute;
        z-index: 3;
        top: 3.25rem;
        right: .65rem;
        display: block;
        padding: .55rem .72rem;
        color: #102018;
        background: rgba(255, 255, 255, .94);
        border: 1px solid rgba(16, 32, 24, .2);
        border-radius: 999px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
        font-size: .72rem;
        font-weight: 850;
        cursor: pointer;
    }

    .case-study-preview__interaction[aria-pressed="true"] {
        color: #fff;
        background: #1c3425;
    }

    .case-study-preview__hero {
        min-height: 350px;
    }
}

@media (max-width: 520px) {
    .case-study-lightbox__panel {
        padding: 1rem;
    }

    .case-study-lightbox__heading {
        padding-right: 3.25rem;
    }

    .case-study-lightbox__heading h2 {
        font-size: 2rem;
    }

    .case-study-preview__address {
        display: none;
    }

    .case-study-preview__hero {
        min-height: 310px;
        padding: 1.25rem;
    }

    .case-study-preview__brand {
        top: 1rem;
        left: 1.25rem;
    }

    .case-study-preview__cards {
        grid-template-columns: 1fr;
    }

    .case-study-preview__cards span {
        min-height: 76px;
    }

    .case-study-lightbox__actions {
        flex-direction: column;
    }

    .case-study-lightbox__actions a {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-study-preview__screen {
        scroll-behavior: auto;
    }
}
