.case-body {
    min-height: 100dvh;
    color: #f6f7fb;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 77, 154, 0.1), transparent 28rem),
        radial-gradient(circle at 8% 35%, rgba(121, 242, 192, 0.07), transparent 24rem),
        #050609;
}

.case-body::before {
    z-index: 0;
    opacity: 0.2;
}

.case-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 68px;
    padding: 0 4vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 6, 9, 0.88);
    backdrop-filter: blur(18px);
}

.case-nav a {
    color: #79f2c0;
    font-family: "Intel One Mono", monospace;
    font-size: 0.86rem;
    text-decoration: none;
    transition: color 220ms ease;
}

.case-nav a:hover {
    color: #ff7ab8;
}

.case-nav-brand {
    color: rgba(246, 247, 251, 0.82);
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.case-main {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem) clamp(5rem, 10vw, 9rem);
}

.case-hero,
.case-section,
.case-next {
    margin: 0;
    padding: clamp(4rem, 9vw, 8rem) 0 0;
}

.case-hero {
    position: relative;
}

.case-hero::after {
    content: "";
    position: absolute;
    top: 3rem;
    right: 0;
    width: min(30vw, 420px);
    height: min(22vw, 300px);
    opacity: 0.2;
    pointer-events: none;
    background-image: radial-gradient(circle, #5db6ff 1px, transparent 1.2px);
    background-size: 8px 8px;
    mask-image: linear-gradient(225deg, #000, transparent 76%);
}

.case-title-wrap {
    position: relative;
    z-index: 1;
    max-width: 1080px;
}

.case-title {
    margin: 0;
    color: #f6f7fb;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.96;
    letter-spacing: -0.075em;
    text-wrap: balance;
}

.case-lede {
    max-width: 70ch;
    margin: 1.3rem 0 0;
    color: rgba(246, 247, 251, 0.74);
    font-family: "Intel One Mono", monospace;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.65;
}

.case-meta {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.5fr;
    gap: clamp(1.5rem, 4vw, 4rem);
    margin: clamp(2.5rem, 6vw, 4.5rem) 0;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(121, 242, 192, 0.32);
}

.case-meta div {
    min-width: 0;
}

.case-meta dt {
    margin-bottom: 0.55rem;
    color: #79f2c0;
    font-family: "Intel One Mono", monospace;
    font-size: 0.74rem;
}

.case-meta dd {
    margin: 0;
    color: rgba(246, 247, 251, 0.76);
    font-family: "Intel One Mono", monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

.case-hero-media {
    margin: 0;
}

.case-hero-media img,
.case-hero-media video {
    width: 100%;
    max-height: 780px;
    display: block;
    object-fit: contain;
    border: 1px solid rgba(121, 242, 192, 0.28);
    background: #07080c;
}

.case-hero-media-contain img {
    max-height: 720px;
    padding: clamp(1rem, 4vw, 3rem);
    box-sizing: border-box;
    object-fit: contain;
    background: linear-gradient(145deg, #08090d, #181124);
}

.case-hero-media figcaption,
.case-gallery figcaption {
    margin-top: 0.7rem;
    color: rgba(246, 247, 251, 0.58);
    font-family: "Intel One Mono", monospace;
    font-size: 0.76rem;
}

.case-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.5fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: start;
}

.case-section h2 {
    position: sticky;
    top: 108px;
    margin: 0;
    color: #f6f7fb;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

/* Galleries span the heading column, so their headings must scroll away first. */
.case-section:has(> .case-gallery) > h2 {
    position: static;
}

.case-copy {
    max-width: 76ch;
}

.case-copy p {
    margin: 0 0 1.2rem;
    color: rgba(246, 247, 251, 0.72);
    font-family: "Intel One Mono", monospace;
    font-size: clamp(0.94rem, 1.3vw, 1.06rem);
    line-height: 1.8;
}

.case-copy ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 2rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.case-copy li {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(246, 247, 251, 0.72);
    font-family: "Intel One Mono", monospace;
    font-size: 0.85rem;
    line-height: 1.55;
}

.case-gallery {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
    margin-top: clamp(1rem, 3vw, 2.5rem);
}

.case-gallery figure {
    margin: 0;
}

.case-gallery figure:first-child:last-child,
.case-gallery .case-gallery-wide {
    grid-column: 1 / -1;
}

.case-gallery img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    max-height: 680px;
    display: block;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #080a0f;
}

.case-gallery-mobile img {
    object-fit: contain;
    background: linear-gradient(145deg, #090a0e, #171122);
}

.case-platform-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.case-platform-gallery .case-gallery-mobile img {
    height: auto;
    min-height: 0;
    max-height: 760px;
}

.case-platform-gallery a {
    display: block;
}

.case-platform-gallery a:focus-visible {
    outline: 2px solid #79f2c0;
    outline-offset: 6px;
}

/* Framed phone mockups ship with transparent backgrounds, so they sit on the stage without a box. */
.case-phone-stage {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(0.5rem, 3vw, 3rem);
    max-height: 760px;
    padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 6vw, 6rem) 0;
    overflow: hidden;
    border: 1px solid rgba(121, 242, 192, 0.28);
    background: #07080c;
}

.case-hero-phones .case-phone-stage img {
    width: 100%;
    height: auto;
    max-height: none;
    border: 0;
    background: none;
}

.case-phone-stage img:nth-child(odd) {
    margin-top: clamp(2rem, 8vw, 7rem);
}

.case-phone-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.case-gallery.case-phone-gallery img {
    height: auto;
    min-height: 0;
    max-height: none;
    border: 0;
    background: none;
}

.case-phone-gallery a {
    display: block;
}

.case-phone-gallery a:focus-visible {
    outline: 2px solid #79f2c0;
    outline-offset: 6px;
}

.case-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.case-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(121, 242, 192, 0.42);
    color: #dffff4;
    font-family: "Intel One Mono", monospace;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.case-action:hover {
    color: #050609;
    background: #79f2c0;
    transform: translateY(-2px);
}

.case-next {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-top: clamp(4rem, 10vw, 9rem);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 77, 154, 0.38);
}

.case-next span {
    color: rgba(246, 247, 251, 0.56);
    font-family: "Intel One Mono", monospace;
    font-size: 0.78rem;
}

.case-next a {
    color: #ff7ab8;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.35rem, 3vw, 2.4rem);
    text-align: right;
    text-decoration: none;
}

@media (max-width: 760px) {
    .case-nav {
        padding-inline: 1rem;
    }

    .case-nav-brand {
        display: none;
    }

    .case-meta,
    .case-section,
    .case-gallery,
    .case-copy ul {
        grid-template-columns: 1fr;
    }

    .case-section h2 {
        position: static;
    }

    .case-gallery .case-gallery-wide {
        grid-column: auto;
    }

    .case-phone-stage {
        gap: 0;
        padding: 1.25rem 0 0;
    }

    .case-hero-phones .case-phone-stage img {
        width: 128%;
        margin-inline: -14%;
    }

    .case-hero-phones .case-phone-stage img:nth-child(2) {
        position: relative;
        z-index: 1;
    }

    .case-gallery.case-phone-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .case-gallery img {
        min-height: 0;
        height: auto;
    }

    .case-next {
        align-items: start;
        flex-direction: column;
    }

    .case-next a {
        text-align: left;
    }
}
