:root {
    --black: #0F0F0F;
    --supergray: #1C1C1C;
    --gray: #2E2E2E;
    --paper: #F4F4F4;
    --white: #FFFFFF;

    --green: #C8F542;
    --purple: #8B5CF6;
    --orange: #FF6B35;

    --line-dark: rgba(255,255,255,.13);
    --line-light: rgba(15,15,15,.14);

    --max: 1320px;
    --pad: clamp(22px,4vw,54px);
    --ease: cubic-bezier(.2,.75,.2,1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--black);
    font-family: "Space Grotesk", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.wrap {
    width: min(var(--max), 100%);
    margin-inline: auto;
    padding-inline: var(--pad);
}

.skip-link {
    position: fixed;
    z-index: 9999;
    left: 18px;
    top: -80px;
    padding: 12px 16px;
    background: var(--green);
    color: var(--black);
    font-weight: 700;
}

.skip-link:focus {
    top: 18px;
}

.game-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 40px 40px;
}

.eyebrow,
.section-code {
    margin: 0;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.eyebrow {
    color: rgba(255,255,255,.54);
}

.section-code {
    color: var(--orange);
}

.section-code--light {
    color: var(--green);
}

.button {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 22px;
    border: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button--games {
    background: var(--orange);
    color: #111;
}

.button--games:hover,
.button--games:focus-visible {
    background: #ff8158;
}

.button--dark {
    background: var(--black);
    color: #fff;
}

.button--dark:hover,
.button--dark:focus-visible {
    background: var(--purple);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.text-link span {
    color: var(--green);
    transition: transform .2s ease;
}

.text-link:hover span {
    transform: translate(3px,-3px);
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--pad);
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(15,15,15,.90);
    backdrop-filter: blur(16px);
}

.site-brand {
    display: block;
    position: relative;
    z-index: 102;
}

.site-brand img {
    display: block;
    width: 118px;
    max-height: 54px;
    object-fit: contain;
    object-position: left center;
}

.menu-button {
    position: relative;
    z-index: 102;
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    gap: 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button:hover {
    background: rgba(255,255,255,.06);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    transition: transform .25s ease;
}

.menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(4.5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
}

.site-menu {
    position: fixed;
    z-index: 101;
    inset: 0;
    padding: 130px var(--pad) 60px;
    display: grid;
    align-content: center;
    gap: 0;
    background:
        radial-gradient(circle at 84% 20%, rgba(255,107,53,.16), transparent 28%),
        radial-gradient(circle at 74% 78%, rgba(139,92,246,.14), transparent 28%),
        var(--black);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
        opacity .25s ease,
        visibility .25s ease,
        transform .35s var(--ease);
}

.site-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-menu > a {
    width: min(930px,100%);
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 15px 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: clamp(34px,5vw,76px);
    line-height: .95;
    letter-spacing: -.055em;
    text-decoration: none;
}

.site-menu > a span {
    color: var(--orange);
    font-size: 9px;
    letter-spacing: .12em;
}

.site-menu > a:hover {
    color: var(--orange);
}

.site-menu__external {
    width: min(930px,100%);
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin-top: 38px;
    color: rgba(255,255,255,.56);
    font-size: 12px;
}

.site-menu__external > span {
    width: 100%;
    color: rgba(255,255,255,.28);
    font-size: 9px;
    letter-spacing: .12em;
}

.site-menu__external a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.56);
    text-decoration: none;
    transition: color .2s ease;
}

.site-menu__external a:hover,
.site-menu__external a:focus-visible {
    color: #fff;
}

.site-menu__external a b {
    display: inline-block;
    font-size: .92em;
    font-weight: 700;
    transition: transform .2s ease;
}

.site-menu__external a:hover b,
.site-menu__external a:focus-visible b {
    transform: translate(3px,-3px);
}

.site-menu__external .ecosystem-studio b {
    color: var(--green);
}

.site-menu__external .ecosystem-design b {
    color: var(--purple);
}

.site-menu__external .ecosystem-academia b {
    color: #3B82F6;
}

.site-menu__external .ecosystem-experience b {
    color: #FF2E63;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    min-height: max(760px,100svh);
    overflow: hidden;
    background: var(--black);
    color: #fff;
}

.hero__image,
.hero__shade {
    position: absolute;
    inset: 0;
}

.hero__image {
    background:
        url("../img/backgrounds/games-build-hero.webp")
        center center / cover no-repeat;
}

.hero__shade {
    background:
        linear-gradient(
            90deg,
            rgba(15,15,15,.96) 0%,
            rgba(15,15,15,.89) 23%,
            rgba(15,15,15,.66) 42%,
            rgba(15,15,15,.12) 67%,
            rgba(15,15,15,.12) 100%
        ),
        linear-gradient(0deg, rgba(15,15,15,.55), transparent 46%);
}

.hero__content {
    position: relative;
    z-index: 2;
    min-height: max(760px,100svh);
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 42px;
    padding-top: 150px;
    padding-bottom: 42px;
}

.hero__copy {
    max-width: 760px;
}

.hero h1 {
    margin: 22px 0 30px;
    font-size: clamp(62px,7.4vw,116px);
    line-height: .86;
    letter-spacing: -.07em;
}

.hero h1 span {
    color: var(--orange);
}

.hero__lead {
    max-width: 650px;
    margin: 0;
    color: rgba(255,255,255,.67);
    font-size: clamp(16px,1.2vw,19px);
    line-height: 1.7;
}

.hero__lead strong {
    color: #fff;
    font-weight: 500;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
}

.hero__status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line-dark);
}

.hero__status > div {
    display: grid;
    gap: 4px;
}

.hero__status strong {
    color: #fff;
    font-size: 9px;
    letter-spacing: .13em;
}

.hero__status small {
    color: rgba(255,255,255,.34);
    font-size: 8px;
    letter-spacing: .12em;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 7px rgba(200,245,66,.08);
}


/* =========================================================
   PRODUCTION
   ========================================================= */

.production {
    padding: clamp(100px,12vw,180px) 0;
    background: var(--paper);
}

.section-head {
    display: grid;
    grid-template-columns: .32fr 1fr;
    gap: clamp(40px,8vw,120px);
}

.section-head h2,
.build h2,
.cta h2,
.ending h2 {
    margin: 0;
    letter-spacing: -.065em;
}

.section-head h2 {
    max-width: 1000px;
    font-size: clamp(54px,7vw,104px);
    line-height: .9;
}

.section-head h2 span {
    color: var(--orange);
}

.section-head > div > p {
    max-width: 680px;
    margin: 34px 0 0;
    color: #666a63;
    font-size: 17px;
    line-height: 1.7;
}

.production__intro {
    display: grid;
    grid-template-columns: .32fr 1fr;
    gap: clamp(40px,8vw,120px);
    margin-top: 72px;
}

.production__intro::before {
    content: "";
}

.production__intro p {
    max-width: 720px;
    margin: 0;
    font-size: clamp(19px,2vw,28px);
    line-height: 1.5;
    letter-spacing: -.02em;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    margin-top: 70px;
    border-top: 1px solid var(--line-light);
    border-left: 1px solid var(--line-light);
}

.capability {
    min-height: 270px;
    padding: 28px;
    border-right: 1px solid var(--line-light);
    border-bottom: 1px solid var(--line-light);
    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}

.capability > span {
    color: var(--orange);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
}

.capability h3 {
    margin: 80px 0 15px;
    font-size: clamp(24px,2.3vw,34px);
    line-height: 1;
    letter-spacing: -.045em;
}

.capability p {
    max-width: 320px;
    margin: 0;
    color: #747770;
    line-height: 1.6;
}

.capability:hover {
    background: var(--black);
    color: #fff;
    transform: translateY(-4px);
}

.capability:hover p {
    color: rgba(255,255,255,.58);
}


/* =========================================================
   BUILD STATUS
   ========================================================= */

.build {
    position: relative;
    overflow: hidden;
    padding: clamp(100px,12vw,180px) 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(139,92,246,.15), transparent 28%),
        radial-gradient(circle at 18% 82%, rgba(200,245,66,.07), transparent 30%),
        var(--supergray);
    color: #fff;
}

.build__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: .9fr 1fr;
    gap: clamp(60px,9vw,140px);
    align-items: center;
}

.build h2 {
    margin-top: 18px;
    font-size: clamp(54px,6.4vw,96px);
    line-height: .9;
}

.build h2 span {
    color: var(--green);
}

.build__copy > p:not(.section-code) {
    max-width: 650px;
    margin: 30px 0 0;
    color: rgba(255,255,255,.58);
    line-height: 1.7;
}

.build__copy strong {
    color: #fff;
    font-weight: 500;
}

.build-panel {
    border: 1px solid var(--line-dark);
    background: rgba(15,15,15,.78);
    backdrop-filter: blur(14px);
}

.build-panel__top {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line-dark);
    color: rgba(255,255,255,.38);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
}

.build-panel__top b {
    color: var(--green);
}

.build-item {
    padding: 20px 18px;
    border-bottom: 1px solid var(--line-dark);
}

.build-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 13px;
}

.build-item span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.build-item strong {
    color: rgba(255,255,255,.42);
    font-size: 9px;
    font-weight: 500;
}

.build-bar {
    height: 4px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}

.build-bar i {
    display: block;
    width: var(--progress);
    height: 100%;
    background:
        linear-gradient(90deg,var(--orange),var(--purple),var(--green));
}

.build-panel__terminal {
    display: grid;
    gap: 8px;
    padding: 22px 18px;
    color: rgba(255,255,255,.43);
    font-family: Consolas, monospace;
    font-size: 10px;
}

.build-panel__terminal span:last-child {
    color: var(--green);
}

.terminal-cursor {
    animation: cursor 1s steps(2,end) infinite;
}

@keyframes cursor {
    50% { opacity: 0; }
}


/* =========================================================
   CTA
   ========================================================= */

.cta {
    padding: clamp(100px,12vw,180px) 0;
    background: var(--orange);
    color: #111;
}

.cta__grid {
    display: grid;
    grid-template-columns: 1fr .55fr;
    gap: clamp(60px,9vw,140px);
    align-items: end;
}

.cta .section-code {
    color: rgba(15,15,15,.54);
}

.cta h2 {
    margin-top: 18px;
    font-size: clamp(58px,7vw,108px);
    line-height: .88;
}

.cta h2 span {
    color: #fff;
}

.cta__content p {
    margin: 0 0 34px;
    font-size: 18px;
    line-height: 1.7;
}

.cta__content small {
    display: block;
    margin-top: 24px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .13em;
}


/* =========================================================
   ENDING
   ========================================================= */

.ending {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 85% 26%, rgba(255,107,53,.12), transparent 30%),
        radial-gradient(circle at 74% 75%, rgba(139,92,246,.13), transparent 30%),
        var(--black);
    color: #fff;
}

.ending__inner {
    position: relative;
    z-index: 1;
    padding-top: 90px;
    padding-bottom: 90px;
}

.ending__inner > p {
    color: var(--orange);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
}

.ending h2 {
    margin-top: 28px;
    font-size: clamp(56px,7.4vw,116px);
    line-height: .86;
}

.ending h2 span {
    color: var(--green);
}

.ending__links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 40px;
}

.ending__links a {
    color: rgba(255,255,255,.66);
    font-size: 13px;
    text-decoration: none;
}

.ending__links a:hover {
    color: var(--green);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--line-dark);
    background: var(--black);
    color: rgba(255,255,255,.36);
}

.site-footer__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    font-size: 10px;
}


/* =========================================================
   REVEAL
   ========================================================= */

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity .7s ease,
        transform .7s var(--ease);
}

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


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .capability-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .build__grid,
    .cta__grid {
        grid-template-columns: minmax(0,1fr);
    }

    .build-panel {
        max-width: 760px;
    }
}

@media (max-width: 680px) {
    :root {
        --pad: 22px;
    }

    .site-header {
        height: 76px;
    }

    .site-brand img {
        width: 104px;
    }

    .site-menu {
        padding-top: 110px;
    }

    .site-menu > a {
        grid-template-columns: 30px minmax(0,1fr);
        font-size: clamp(36px,11vw,54px);
    }

    .hero {
        min-height: 100svh;
    }

    .hero__image {
        background-position: 67% center;
    }

    .hero__shade {
        background:
            linear-gradient(
                90deg,
                rgba(15,15,15,.97) 0%,
                rgba(15,15,15,.88) 52%,
                rgba(15,15,15,.54) 76%,
                rgba(15,15,15,.35) 100%
            ),
            linear-gradient(0deg, rgba(15,15,15,.65), transparent 48%);
    }

    .hero__content {
        min-height: 100svh;
        padding-top: 128px;
        padding-bottom: 28px;
    }

    .hero h1 {
        font-size: clamp(52px,15vw,74px);
    }

    .hero__lead {
        max-width: 92%;
        font-size: 15px;
    }

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

    .section-head,
    .production__intro {
        grid-template-columns: minmax(0,1fr);
        gap: 24px;
    }

    .production__intro::before {
        display: none;
    }

    .section-head h2 {
        font-size: clamp(48px,14vw,68px);
    }

    .capability-grid {
        grid-template-columns: minmax(0,1fr);
        margin-top: 48px;
    }

    .capability {
        min-height: 210px;
    }

    .capability h3 {
        margin-top: 52px;
    }

    .build h2,
    .cta h2,
    .ending h2 {
        font-size: clamp(48px,14vw,70px);
    }

    .build-item > div:first-child {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .cta__grid {
        align-items: start;
    }

    .ending {
        min-height: 560px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-top: 22px;
        padding-bottom: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   MENU — CORREÇÃO DO OVERLAY
   ========================================================= */

/*
 * O header usa backdrop-filter. Em alguns navegadores isso faz
 * o menu fixed virar relativo ao próprio header, deixando o fundo
 * preso à altura da barra e o conteúdo "vazando" por cima da página.
 */
body.menu-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.site-menu {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: start;
    padding-top: max(126px, calc(env(safe-area-inset-top) + 112px));
    padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.site-menu > a,
.site-menu__external {
    width: min(930px, calc(100vw - (var(--pad) * 2)));
}

@media (max-width: 680px) {
    .site-menu {
        padding-top: max(106px, calc(env(safe-area-inset-top) + 94px));
        padding-bottom: max(34px, env(safe-area-inset-bottom));
    }

    .site-menu > a {
        padding: 13px 0;
        font-size: clamp(34px, 10vw, 50px);
    }

    .site-menu__external {
        margin-top: 28px;
        gap: 12px 18px;
    }
}
