/* =========================================================
   SINGLE PROJECT CASE STUDY
   Page-specific styles only
   ========================================================= */

   :root {
    --case-bg: #0a0b0c;
    --case-panel: #101112;
    --case-border: rgba(255,255,255,.14);
    --case-border-soft: rgba(255,255,255,.09);
    --case-text: #f7f7f7;
    --case-muted: #a8a8a8;
    --case-soft: #c9c9c9;
}

.case-page {
    background:
        radial-gradient(circle at 80% 18%, rgba(255,255,255,.035), transparent 25%),
        linear-gradient(180deg, #0b0c0d 0%, #090a0b 100%);
    color: var(--case-text);
    overflow: hidden;
}

.case-container {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
}

/* Breadcrumb */
.case-breadcrumb-wrap {
    padding-top: 30px;
}

.case-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #d0d0d0;
    font-size: .78rem;
}

.case-breadcrumb a {
    color: #aaa;
    text-decoration: none;
    transition: color .2s ease;
}

.case-breadcrumb a:hover {
    color: #fff;
}

.case-breadcrumb span[aria-hidden="true"] {
    color: #686868;
    font-size: 1rem;
}

/* Hero */
.case-hero {
    padding: 100px 0 100px;
}

.case-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    align-items: center;
    gap: 48px;
}

.case-hero-copy {
    padding-left: 10px;
}

.case-pill {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0 17px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.075);
    color: #d7d7d7;
    font-size: .68rem;
    letter-spacing: 1.3px;
}

.case-hero h1 {
    margin: 19px 0 13px;
    font-size: clamp(3.4rem, 6vw, 4rem);
    line-height: .98;
    letter-spacing: -2.5px;
    font-weight: 700;
}

.case-hero-copy > p {
    max-width: 490px;
    margin: 0;
    color: #bdbdbd;
    font-size: .98rem;
    line-height: 1.8;
}

.case-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 27px;
}

.case-btn {
    min-height: 50px;
    padding: 0 25px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}

.case-btn:hover {
    transform: translateY(-2px);
}

.case-btn-light {
    background: #fff;
    border: 1px solid #fff;
    color: #101010;
}

.case-btn-light:hover {
    background: #eaeaea;
}

.case-btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,.28);
    color: #eee;
}

.case-btn-outline:hover {
    border-color: rgba(255,255,255,.58);
}

/* Hero device mockup */
.case-hero-visual {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px 10px 0;
}

.device-laptop {
    position: relative;
    width: min(100%, 650px);
    filter: drop-shadow(0 25px 35px rgba(0,0,0,.48));
}

.laptop-screen {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    padding: 10px;
    border: 2px solid #65686a;
    border-bottom-color: #2b2d2f;
    border-radius: 18px 18px 8px 8px;
    background: linear-gradient(145deg, #25282a, #090a0b 55%, #27292b);
    box-shadow: inset 0 0 0 2px #0a0a0a, 0 0 0 1px rgba(255,255,255,.08);
}

.laptop-screen::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #222;
    box-shadow: 0 0 5px rgba(80,160,255,.4);
}

.laptop-screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
}

.laptop-base {
    position: relative;
    width: 108%;
    height: 12px;
    margin-left: -4%;
    border-radius: 0 0 13px 13px;
    background: linear-gradient(180deg, #55595b 0%, #202224 50%, #080909 100%);
    box-shadow: 0 10px 18px rgba(0,0,0,.45);
}

.laptop-base::after {
    content: "";
    position: absolute;
    left: 35%;
    right: 35%;
    top: 2px;
    height: 3px;
    border-radius: 0 0 5px 5px;
    background: rgba(255,255,255,.15);
}

.device-phone {
    position: absolute;
    z-index: 3;
    right: -3px;
    bottom: 2px;
    width: 124px;
    padding: 7px;
    border: 2px solid #55595b;
    border-radius: 20px;
    background: #070809;
    box-shadow: 0 18px 32px rgba(0,0,0,.55);
}

.device-phone::before {
    content: "";
    position: absolute;
    z-index: 4;
    top: 5px;
    left: 50%;
    width: 34px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #050505;
}

.phone-screen {
    overflow: hidden;
    height: 225px;
    border-radius: 14px;
    background: #111;
}

.phone-screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Shared sections */
.case-section {
    padding: 42px 0;
}

.case-overview {
    border-top: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.04);
    padding-top: 60px;
    padding-bottom: 64px;
}

.case-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    align-items: center;
    min-height: 210px;
}

/* IMPORTANT: project info is intentionally on the LEFT */
.case-project-meta {
    padding: 5px 55px 5px 8px;
    border-right: 1px solid rgba(255,255,255,.14);
}

.case-meta-item {
    display: flex;
    align-items: center;
    gap: 17px;
}

.case-meta-item + .case-meta-item {
    margin-top: 25px;
}

.case-meta-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
}

.case-meta-icon svg {
    width: 30px;
    height: 30px;
}

.case-meta-item span {
    display: block;
    margin-bottom: 3px;
    color: #9b9b9b;
    font-size: .7rem;
}

.case-meta-item strong {
    display: block;
    color: #eee;
    font-size: .8rem;
    font-weight: 500;
}

.case-overview-copy {
    padding-left: 55px;
    max-width: 720px;
}

.case-section-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}

.case-section-heading h2 {
    margin: 0;
    color: #f5f5f5;
    font-size: clamp(1.35rem, 2.1vw, 1.65rem);
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -.3px;
}

.case-section-heading > span {
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,.65);
}

.case-overview-copy p {
    max-width: 650px;
    margin: 20px 0 0;
    color: #b9b9b9;
    font-size: .9rem;
    line-height: 1.9;
}

/* Screenshots */
.case-section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 20px;
}

.case-slider-controls {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.case-slider-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
    padding: 0;
}

.case-slider-btn:hover:not(:disabled) {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.case-slider-btn:disabled {
    opacity: .28;
    cursor: default;
}

.case-slider-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,.55);
    outline-offset: 3px;
}

.case-screenshot-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding: 0 0 12px;
}
.case-screenshot-viewport::-webkit-scrollbar { display: none; }
.case-shot {
    flex: 0 0 var(--shot-width, 590px);
    width: var(--shot-width, 590px);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}
.case-shot-image {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px;
    background: #121313;
    box-shadow: 0 16px 34px rgba(0,0,0,.26);
}
.case-shot-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .45s ease;
}
.case-shot:hover .case-shot-image img { transform: scale(1.018); }
.case-shot figcaption {
    padding-top: 11px;
    color: #eee;
    font-size: .78rem;
    font-weight: 600;
}

/* CTA */
.case-cta-section {
    padding-top: 48px;
    padding-bottom: 70px;
}

.case-cta {
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    padding: 30px 38px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 14px;
    background: linear-gradient(135deg, #101112, #0c0d0e);
}

.case-cta-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .8;
    background:
        radial-gradient(circle at -2% 112%, transparent 0 85px, rgba(255,255,255,.10) 86px 87px, transparent 88px 110px, rgba(255,255,255,.07) 111px 112px, transparent 113px 136px, rgba(255,255,255,.05) 137px 138px, transparent 139px),
        radial-gradient(circle at 102% -12%, transparent 0 85px, rgba(255,255,255,.08) 86px 87px, transparent 88px 110px, rgba(255,255,255,.06) 111px 112px, transparent 113px 136px, rgba(255,255,255,.04) 137px 138px, transparent 139px);
}

.case-cta-copy {
    position: relative;
    z-index: 1;
}

.case-cta-copy > span {
    display: block;
    margin-bottom: 9px;
    color: #bdbdbd;
    font-size: .61rem;
    letter-spacing: 3px;
}

.case-cta-copy h2 {
    margin: 0;
    color: #f5f5f5;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    font-weight: 600;
}

.case-cta-copy p {
    margin: 4px 0 0;
    color: #d2d2d2;
    font-size: .83rem;
}

.case-cta > .case-btn {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 158px;
}

/* Project navigation */
.case-project-nav-section {
    border-top: 1px solid rgba(255,255,255,.13);
    padding: 30px 0 52px;
}

.case-project-nav {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    gap: 20px;
}

.case-project-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #fff;
    text-decoration: none;
}

.case-project-next {
    align-items: flex-end;
    text-align: right;
}

.case-project-direction {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eee;
    font-size: 1.1rem;
}

.case-project-direction small {
    color: #a5a5a5;
    font-size: .73rem;
    font-weight: 400;
}

.case-project-link strong {
    font-size: .8rem;
    font-weight: 500;
}

.case-project-index {
    width: 32px;
    height: 32px;
    justify-self: center;
    display: grid;
    grid-template-columns: repeat(2, 7px);
    grid-template-rows: repeat(2, 7px);
    gap: 3px;
    place-content: center;
    text-decoration: none;
}

.case-project-index span {
    display: block;
    width: 7px;
    height: 7px;
    border: 1px solid #eee;
    border-radius: 2px;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s ease, transform .65s ease;
}

.reveal-delay-1 {
    transition-delay: .1s;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1100px) {
    .case-container {
        width: min(100% - 50px, 1000px);
    }

    .case-hero-grid {
        gap: 28px;
    }

    .case-hero-visual {
        min-height: 330px;
    }

    .device-phone {
        width: 108px;
    }

    .phone-screen {
        height: 205px;
    }
}

@media (max-width: 900px) {

    .case-hero {
        padding-top: 75px;
        padding-bottom: 55px;
    }


    .case-hero-grid {
        /* grid-template-columns: 1fr; */
        display: flex;
        flex-direction: column-reverse;
    }

    .case-hero-copy {
        max-width: 700px;
        padding-left: 0;
        text-align: center;
    }

    .case-hero-visual {
        max-width: 720px;
        width: 90%;
        margin: 0 auto;
        min-height: 360px;
    }

    .case-overview-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .case-meta-item {
        display: flex;
        align-items: center;
        gap: 14px;
        flex-direction: column;
        text-align: center;
    }

    .case-project-meta {
        display: flex;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 0 32px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.14);
        justify-content: space-around;
    }

    .case-meta-item + .case-meta-item {
        margin-top: 0;
    }

    .case-overview-copy {
        padding-left: 0;
    }
}

@media (max-width: 767px) {
    .case-container {
        width: min(100% - 34px, 680px);
    }

    .case-breadcrumb-wrap {
        padding-top: 22px;
    }

    .case-hero h1 {
        font-size: clamp(2.3rem, 13vw, 2.5rem);
        letter-spacing: -1.8px;
    }

    .case-hero-copy > p {
        font-size: .87rem;
        line-height: 1.75;
    }

    .case-actions {
        gap: 10px;
    }

    .case-btn {
        min-height: 46px;
        padding: 0 20px;
        font-size: .72rem;
    }

    .case-hero-visual {
        min-height: 255px;
        padding-right: 6px;
    }

    .laptop-screen {
        padding: 6px;
        border-radius: 11px 11px 5px 5px;
    }

    .laptop-base {
        height: 8px;
    }

    .device-phone {
        right: -2px;
        bottom: 0;
        width: 76px;
        padding: 4px;
        border-radius: 13px;
    }

    .phone-screen {
        height: 145px;
        border-radius: 9px;
    }

    .case-section {
        padding: 34px 0;
    }

    .case-overview {
        padding-top: 42px;
        padding-bottom: 45px;
    }

    .case-project-meta {
        /* grid-template-columns: 1fr;
        gap: 17px;
        padding-bottom: 26px; */
    }

    .case-meta-item + .case-meta-item {
        margin-top: 0;
    }

    .case-meta-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .case-meta-icon svg {
        width: 27px;
        height: 27px;
    }

    .case-overview-copy p {
        font-size: .82rem;
        line-height: 1.8;
    }

    .case-section-top {
        align-items: flex-end;
        margin-bottom: 18px;
    }

    .case-section-note {
        max-width: 520px;
        font-size: .72rem;
    }

    .case-slider-btn {
        width: 34px;
        height: 34px;
        font-size: 1.15rem;
    }

    .case-screenshot-track {
        gap: 13px;
    }

    .case-shot figcaption {
        padding-top: 9px;
        font-size: .72rem;
    }

    .case-cta-section {
        padding-top: 30px;
        padding-bottom: 46px;
    }

    .case-cta {
        align-items: flex-start;
        flex-direction: column;
        padding: 27px 23px;
        gap: 20px;
    }

    .case-cta-copy h2 {
        font-size: 1.38rem;
    }

    .case-cta-copy p {
        max-width: 430px;
        font-size: .76rem;
        line-height: 1.55;
    }

    .case-cta > .case-btn {
        width: 100%;
    }

    .case-project-nav-section {
        padding-bottom: 36px;
    }

    .case-project-nav {
        grid-template-columns: 1fr 42px 1fr;
        gap: 12px;
    }

    .case-project-direction {
        font-size: .9rem;
        gap: 7px;
    }

    .case-project-direction small {
        font-size: .61rem;
    }

    .case-project-link strong {
        font-size: .72rem;
    }
}

@media (max-width: 480px) {
    .case-container {
        width: calc(100% - 28px);
    }

    .case-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .case-btn {
        width: 100%;
    }

    .case-hero-visual {
        min-height: 205px;
    }

    .device-phone {
        width: 65px;
    }

    .phone-screen {
        height: 124px;
    }

    .case-section-heading {
        gap: 11px;
    }

    .case-section-note {
        margin-top: 7px;
        font-size: .68rem;
        line-height: 1.55;
    }

    .case-section-heading > span {
        width: 26px;
    }

    .case-section-heading h2 {
        font-size: 1.22rem;
    }

    .case-slider-controls {
        gap: 6px;
    }

    .case-slider-btn {
        width: 31px;
        height: 31px;
    }

    .case-project-nav {
        grid-template-columns: 1fr 30px 1fr;
    }
}
