/* =============================================================================
   games.css — Editorial games page
   ========================================================================== */

body {
    overflow-x: hidden;
}

.games-page {
    position: relative;
    padding: 92px 0 96px;
}

.games-hero {
    position: relative;
    max-width: none;
    margin: 0 auto 30px;
    padding: 34px 5vw 8px;
}

.games-hero__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.games-hero__kicker {
    margin: 0 0 14px;
    color: #8fb8ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.games-hero__title {
    margin: 0;
    color: #f5f5f7;
    font-size: clamp(38px, 6vw, 74px);
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 0.96;
}

.games-hero__subtitle {
    max-width: 620px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
}

.games-hero__glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(14px);
    pointer-events: none;
}

.games-hero__glow--left {
    top: 0;
    left: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(41, 151, 255, .18) 0%, rgba(41, 151, 255, 0) 70%);
}

.games-hero__glow--right {
    top: 100px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 159, 10, .14) 0%, rgba(255, 159, 10, 0) 72%);
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: none;
    margin: 0 auto;
}

.game-feature + .game-feature {
    padding-top: 44px;
}

.game-feature + .game-feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 5vw;
    right: 5vw;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .16) 18%, rgba(255, 255, 255, .16) 82%, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.game-feature {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 580px) max-content;
    justify-content: center;
    gap: clamp(8px, 1vw, 14px);
    align-items: center;
    padding: 40px 5vw;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

.game-feature::before {
    display: none;
}

.game-feature--reverse {
    grid-template-columns: max-content minmax(0, 580px);
}

.game-feature--reverse::before {
    left: auto;
    right: -12vw;
}

.game-feature--reverse .game-feature__media {
    order: 2;
}

.game-feature--reverse .game-feature__content {
    order: 1;
}

.game-feature__media,
.game-feature__content {
    position: relative;
    z-index: 1;
}

.game-feature__content {
    width: min(100%, 580px);
    justify-self: end;
}

.game-feature--reverse .game-feature__content {
    justify-self: start;
}

.game-feature__media {
    display: flex;
    width: max-content;
    justify-self: start;
    justify-content: center;
}

.game-feature--reverse .game-feature__media {
    justify-self: end;
}

.game-phone {
    position: relative;
    width: fit-content;
    max-width: min(320px, 42vw);
    transform: rotate(-1.5deg);
    filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .34));
}

.game-phone.is-focusable-phone {
    cursor: zoom-in;
}

.game-feature--reverse .game-phone {
    transform: rotate(1.5deg);
}

.game-phone__shell {
    position: relative;
    padding: 7px;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .04) 30%, rgba(0, 0, 0, .42) 80%),
        linear-gradient(135deg, color-mix(in srgb, var(--game-accent) 16%, #3b3b3f), #070708 74%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .16),
        inset -5px 0 10px rgba(0, 0, 0, .34),
        inset 4px 0 8px rgba(255, 255, 255, .07),
        12px 14px 24px rgba(0, 0, 0, .30);
}

.game-phone__shell::after {
    display: none;
}

.game-phone__bezel {
    position: relative;
    width: fit-content;
    height: fit-content;
    overflow: hidden;
    border-radius: 24px;
    background: #050506;
    box-shadow:
        inset 0 0 0 2px rgba(0, 0, 0, .88),
        inset 0 0 0 4px rgba(255, 255, 255, .045);
}

.game-phone__side {
    position: absolute;
    z-index: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(0, 0, 0, .55));
}

.game-phone__side--volume {
    top: 24%;
    left: -2px;
    height: 52px;
}

.game-phone__side--power {
    top: 31%;
    right: -2px;
    height: 62px;
}

.game-phone__shine {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    background:
        linear-gradient(106deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 24%),
        linear-gradient(18deg, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .04));
    mix-blend-mode: screen;
    pointer-events: none;
}

.game-feature__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(306px, calc(42vw - 14px));
    max-height: 434px;
    object-fit: contain;
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
        linear-gradient(160deg, color-mix(in srgb, var(--game-accent) 20%, #101010), #171717);
}

.game-phone__screen {
    border-radius: 21px;
}

.game-feature__image.is-placeholder {
    object-fit: contain;
}

.game-feature__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
}

.game-feature__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 27px;
    padding: 0 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--game-accent) 14%, rgba(255, 255, 255, .04));
    color: var(--game-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.game-feature__icon {
    color: var(--game-accent);
    font-size: 17px;
}

.game-feature__title {
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 700;
    letter-spacing: -1.7px;
    line-height: 1.02;
}

.game-feature__description {
    max-width: 580px;
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 17px;
    line-height: 1.65;
}

.game-feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.game-feature__meta-item {
    min-width: 124px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.game-feature__meta-label {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .45);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.game-feature__meta-value {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.4px;
}

.reveal-on-scroll {
    opacity: 1;
    transform: none;
}

.js-reveal-ready .reveal-on-scroll {
    opacity: 0;
    transform: translateY(48px) scale(.985);
    transition:
        opacity .75s cubic-bezier(.22, 1, .36, 1),
        transform .75s cubic-bezier(.22, 1, .36, 1);
}

.js-reveal-ready .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.phone-focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 620;
    background: rgba(0, 0, 0, .74);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
}

.phone-focus-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.phone-focus-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(18, 18, 20, .72);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.phone-focus-card {
    position: fixed;
    margin: 0;
    z-index: 1;
    transition:
        left .44s cubic-bezier(.22, .8, .2, 1),
        top .44s cubic-bezier(.22, .8, .2, 1),
        width .44s cubic-bezier(.22, .8, .2, 1),
        height .44s cubic-bezier(.22, .8, .2, 1),
        box-shadow .3s ease;
}

.phone-focus-card.is-open {
    box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
}

.phone-focus-clone {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    transform: none !important;
    filter: none !important;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .2);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 30%, rgba(0, 0, 0, .74) 65%, rgba(255, 255, 255, .08)),
        #111216;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .12),
        inset 0 0 0 2px rgba(0, 0, 0, .35),
        inset -7px 0 14px rgba(255, 255, 255, .05),
        inset 7px 0 16px rgba(0, 0, 0, .55);
}

.phone-focus-clone .game-phone__side,
.phone-focus-clone .game-phone__shine {
    display: none;
}

.phone-focus-clone .game-phone__shell {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: inherit;
    background: none;
    box-shadow: none;
}

.phone-focus-clone .game-phone__bezel {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
}

.phone-focus-clone .game-phone__screen {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: calc(28px - 2px);
}

@media (prefers-reduced-motion: reduce) {
    .phone-focus-overlay,
    .phone-focus-card {
        transition: none !important;
    }
}

@media (max-width: 920px) {
    .games-page {
        padding: 84px 0 88px;
    }

    .games-hero {
        margin-bottom: 28px;
        padding: 24px 18px 6px;
    }

    .game-feature,
    .game-feature--reverse {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 24px 18px;
    }

    .game-feature + .game-feature {
        padding-top: 42px;
    }

    .game-feature + .game-feature::after {
        left: 18px;
        right: 18px;
    }

    .game-feature::before,
    .game-feature--reverse::before {
        left: 50%;
        right: auto;
        width: 72vw;
        height: 72vw;
        transform: translate(-50%, -50%);
    }

    .game-feature--reverse .game-feature__media,
    .game-feature--reverse .game-feature__content {
        order: initial;
    }

    .game-feature__description {
        max-width: none;
    }

    .game-feature__content,
    .game-feature--reverse .game-feature__content {
        width: 100%;
        justify-self: stretch;
    }

    .game-feature__media,
    .game-feature--reverse .game-feature__media {
        width: auto;
        justify-self: center;
        justify-content: center;
        order: -1;
        margin-bottom: 2px;
    }

    .game-phone,
    .game-feature--reverse .game-phone {
        margin-inline: auto;
    }

    .game-phone,
    .game-feature--reverse .game-phone {
        max-width: min(256px, 68vw);
        transform: rotate(-1deg);
    }

    .game-feature__image {
        max-width: min(242px, calc(68vw - 14px));
        max-height: 342px;
    }
}

@media (max-width: 640px) {
    .games-hero__title {
        letter-spacing: -2px;
    }

    .game-phone,
    .game-feature--reverse .game-phone {
        max-width: min(226px, 72vw);
    }

    .game-feature__image {
        max-width: min(212px, calc(72vw - 14px));
        max-height: 300px;
    }

    .game-feature__meta {
        gap: 8px;
    }

    .game-feature__meta-item {
        flex: 1 1 100%;
    }
}
