.case-page {
    background:
        linear-gradient(180deg, rgba(244, 247, 251, 0.98), rgba(237, 243, 248, 0.96)),
        repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 120px);
}

html[data-theme="dark"] .case-page {
    background:
        linear-gradient(180deg, rgba(8, 13, 18, 0.99), rgba(13, 21, 29, 0.98)),
        repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.08) 0 1px, transparent 1px 120px);
}

.case-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
    gap: 44px;
    align-items: center;
    min-height: calc(100vh - 82px);
    padding: 56px clamp(18px, 5vw, 72px) 72px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(7, 13, 19, 0.96), rgba(13, 58, 61, 0.94) 54%, rgba(73, 46, 29, 0.9)),
        url("../images/jornada/fundo-game.webp") center / cover;
    overflow: hidden;
}

.case-hero-content,
.case-hero-visual {
    position: relative;
    z-index: 1;
}

.case-logo {
    width: min(420px, 100%);
    margin: 0 0 22px;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.28));
}

.case-hero h1 {
    max-width: 760px;
    margin: 10px 0 18px;
    color: #ffffff;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 4.85rem;
    line-height: 0.96;
}

.case-lead {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.16rem;
}

.case-actions,
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.case-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 780px;
    margin: 36px 0 0;
}

.case-facts div {
    min-height: 96px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.case-facts dt {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.case-facts dd {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
}

.case-hero-visual {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 14px;
}

.case-screen {
    position: relative;
    overflow: hidden;
    background: #f2c27a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
    animation: ambientFloat 8s ease-in-out 1000ms infinite;
}

.case-screen::after {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.26);
    content: "";
    pointer-events: none;
}

.case-screen img {
    width: 100%;
    height: auto;
    aspect-ratio: 2048 / 1365;
    object-fit: contain;
    transition: transform 360ms ease;
}

.case-screen:hover img {
    transform: scale(1.018);
}

.game-loop {
    width: min(440px, calc(100% - 26px));
    margin: 0 0 0 auto;
    padding: 18px 20px;
    color: #111827;
    background: #ffffff;
    border-left: 6px solid var(--amber);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-loop:hover {
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
    transform: translateY(-3px);
}

.game-loop span {
    display: block;
    color: var(--teal);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.game-loop strong {
    display: block;
    margin-top: 6px;
    font-size: 1.08rem;
    line-height: 1.2;
}

.case-band,
.case-section,
.presentation-section,
.result-section {
    padding: 86px clamp(18px, 5vw, 72px);
}

.case-band {
    background: var(--surface);
}

.case-section {
    background: var(--page);
}

.presentation-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 243, 248, 0.9)),
        repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.06) 0 1px, transparent 1px 110px);
}

html[data-theme="dark"] .presentation-section {
    background:
        linear-gradient(180deg, rgba(13, 21, 29, 0.96), rgba(17, 27, 36, 0.92)),
        repeating-linear-gradient(90deg, rgba(20, 184, 166, 0.07) 0 1px, transparent 1px 110px);
}

.case-section-heading {
    max-width: 820px;
    margin: 0 auto 34px;
    text-align: center;
}

.case-section-heading.align-left {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
}

.case-section-heading h2,
.gallery-copy h2,
.result-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: 3rem;
    line-height: 1.04;
}

.case-section-heading p:not(.eyebrow),
.gallery-copy p,
.result-panel p {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
}

.overview-grid,
.process-grid,
.artifact-grid {
    display: grid;
    gap: 18px;
}

.overview-grid {
    grid-template-columns: repeat(3, 1fr);
}

.case-card,
.process-step,
.artifact-card,
.solution-card,
.team-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(26, 41, 58, 0.08);
}

.case-card {
    min-height: 260px;
    padding: 28px;
    border-top: 5px solid var(--teal);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.case-card:nth-child(2) {
    border-top-color: var(--coral);
}

.case-card:nth-child(3) {
    border-top-color: var(--violet);
}

.case-card:hover,
.solution-card:hover,
.process-step:hover,
.artifact-card:hover {
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 18px 42px rgba(26, 41, 58, 0.13);
    transform: translateY(-5px);
}

.case-card i,
.solution-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #ffffff;
    background: var(--teal);
    font-size: 1.42rem;
    transition: transform 180ms ease;
}

.case-card:hover i,
.solution-card:hover .solution-icon {
    transform: rotate(-4deg) scale(1.06);
}

.case-card:nth-child(2) i {
    background: var(--coral);
}

.case-card:nth-child(3) i {
    background: var(--violet);
}

.case-card h3,
.solution-card h3,
.process-step h3,
.artifact-card h3,
.team-panel h3 {
    margin: 22px 0 10px;
    color: var(--ink);
    font-size: 1.22rem;
    line-height: 1.22;
}

.case-card p,
.process-step p,
.artifact-card p {
    margin: 0;
    color: var(--muted);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
    gap: 44px;
    align-items: start;
    background: var(--surface-2);
}

.solution-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.solution-card {
    padding: 28px;
    border-left: 6px solid var(--amber);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.solution-card:nth-child(2) {
    border-left-color: var(--teal);
}

.solution-card ul,
.team-panel ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 18px 0 0;
    color: var(--muted);
    list-style: none;
}

.solution-card li,
.team-panel li {
    position: relative;
    padding-left: 20px;
}

.solution-card li::before,
.team-panel li::before {
    position: absolute;
    top: 0.76em;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--teal);
    content: "";
    transform: translateY(-50%);
}

.case-gallery {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 28px;
    align-items: end;
    min-height: 520px;
    padding: 86px clamp(18px, 5vw, 72px);
    overflow: hidden;
    color: #111827;
    background: #efc77b;
}

.gallery-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-gallery::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 250, 238, 0.94), rgba(255, 250, 238, 0.74) 45%, rgba(255, 250, 238, 0.24));
    content: "";
}

.gallery-copy,
.gallery-character {
    position: relative;
    z-index: 1;
}

.gallery-copy {
    max-width: 720px;
}

.gallery-copy h2 {
    color: #111827;
}

.gallery-copy p {
    color: #374151;
}

.gallery-character {
    justify-self: end;
    width: min(280px, 100%);
    filter: drop-shadow(0 20px 24px rgba(40, 30, 20, 0.22));
}

.process-grid {
    grid-template-columns: repeat(5, 1fr);
}

.process-step {
    min-height: 260px;
    padding: 24px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.process-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: var(--dark);
    font-weight: 900;
    transition: transform 180ms ease;
}

.process-step:hover span {
    transform: translateY(-2px) scale(1.05);
}

.process-step:nth-child(2) span {
    background: var(--teal);
}

.process-step:nth-child(3) span {
    background: var(--coral);
}

.process-step:nth-child(4) span {
    background: var(--amber);
}

.process-step:nth-child(5) span {
    background: var(--violet);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 980px;
    margin: 0 auto;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 900;
}

.artifact-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 34px;
}

.artifact-card {
    padding: 26px;
    border-bottom: 5px solid var(--teal);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.artifact-card:nth-child(2) {
    border-bottom-color: var(--coral);
}

.artifact-card:nth-child(3) {
    border-bottom-color: var(--amber);
}

.presentation-panel {
    max-width: 1120px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(20, 31, 45, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.presentation-panel:hover {
    border-color: rgba(20, 184, 166, 0.42);
    box-shadow: 0 26px 64px rgba(20, 31, 45, 0.18);
    transform: translateY(-4px);
}

.presentation-panel iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 360px;
    border: 0;
}

.presentation-actions {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.result-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    gap: 24px;
    align-items: stretch;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(7, 13, 19, 0.98), rgba(18, 66, 68, 0.96) 60%, rgba(79, 70, 229, 0.72)),
        var(--dark);
}

.result-panel,
.team-panel {
    padding: 34px;
}

.result-panel {
    border-left: 6px solid var(--coral);
}

.result-panel h2,
.result-panel p,
.team-panel h3,
.team-panel li {
    color: #ffffff;
}

.result-panel p,
.team-panel ul {
    color: rgba(255, 255, 255, 0.78);
}

.team-panel {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.team-panel h3 {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .case-hero {
        grid-template-columns: 1fr;
    }

    .case-hero-visual {
        max-width: 860px;
    }

    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 920px) {
    .case-hero h1 {
        font-size: 3.7rem;
    }

    .case-section-heading h2,
    .gallery-copy h2,
    .result-panel h2 {
        font-size: 2.5rem;
    }

    .overview-grid,
    .artifact-grid,
    .split-layout,
    .result-section {
        grid-template-columns: 1fr;
    }

    .solution-columns {
        grid-template-columns: 1fr;
    }

    .case-gallery {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .gallery-character {
        justify-self: start;
        width: 220px;
    }
}

@media (max-width: 700px) {
    .case-hero {
        min-height: auto;
        padding-top: 44px;
    }

    .case-hero h1 {
        font-size: 2.72rem;
    }

    .case-lead {
        font-size: 1rem;
    }

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

    .case-facts,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .case-facts div,
    .process-step {
        min-height: auto;
    }

    .game-loop {
        width: 100%;
        margin: 12px 0 0;
    }

    .case-section-heading h2,
    .gallery-copy h2,
    .result-panel h2 {
        font-size: 2.1rem;
    }

    .case-band,
    .case-section,
    .presentation-section,
    .result-section,
    .case-gallery {
        padding-top: 68px;
        padding-bottom: 68px;
    }

    .presentation-panel iframe {
        min-height: 230px;
    }
}
