@charset "UTF-8";

/* Poppins (SIL Open Font License 1.1) — self-hosted latin subsets. */
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ==========================================================================
   Evercastle — landing page
   Layout: full-bleed key art, four content sections, decorative footer.
   The design scales fluidly from 1920px desktop down to 320px phones.
   ========================================================================== */

:root {
    --navy-950: #0b0f2e;
    --navy-900: #141a46;
    --navy-800: #1d2357;
    --navy-700: #2d2d63;
    --navy-600: #373776;
    --navy-500: #2d367c;
    --indigo: #4b57b8;
    --ink: #f5f6ff;
    --ink-soft: #dfe2ff;
    --gold: #ffe27a;
    --gold-strong: #ffd24a;
    --header-h: clamp(70px, 7.1vw, 108px);
    --gutter: clamp(16px, 3vw, 44px);
    --container: 1180px;
    --container-narrow: 1080px;
    --font-sans: "Poppins", "Nunito Sans", "Segoe UI", system-ui, -apple-system,
        "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--navy-900);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--gold-strong);
    color: #23224f;
}

:focus-visible {
    outline: 2px solid var(--gold-strong);
    outline-offset: 3px;
    border-radius: 6px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 300;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    background: var(--gold-strong);
    color: #23224f;
    font-weight: 600;
    text-decoration: none;
    transform: translate(-50%, -180%);
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translate(-50%, 0);
}

#main:focus {
    outline: none;
}

.container {
    width: min(calc(100% - var(--gutter) * 2), var(--container));
    margin-inline: auto;
}

/* The Heroes / Gameplay / Socials compositions are authored for 1440px.
   Above that they keep their pixel size and only the whole stage centers,
   so no artwork is upscaled / blurred. Below it the stage is fluid. */
.heroes-stage,
.gameplay-stage,
.socials-stage {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
}

section {
    position: relative;
}

section[id] {
    scroll-margin-top: calc(var(--header-h) + 8px);
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    height: var(--header-h);
    padding-inline: var(--gutter);
    background: linear-gradient(
        180deg,
        rgba(8, 12, 42, 0.72) 0%,
        rgba(8, 12, 42, 0.28) 62%,
        rgba(8, 12, 42, 0) 100%
    );
    transition: background-color 0.25s ease, box-shadow 0.25s ease,
        backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(14, 18, 51, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(4, 6, 24, 0.4);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 1700px;
    margin-inline: auto;
}

.brand {
    grid-column: 1;
    justify-self: start;
    line-height: 0;
    border-radius: 8px;
}

.brand img {
    width: clamp(128px, 10.5vw, 204px);
    height: auto;
}

.primary-nav {
    grid-column: 2;
    justify-self: center;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(18px, 7vw, 118px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-nav a {
    position: relative;
    display: inline-block;
    padding: 0.55rem 0.1rem;
    font-size: clamp(15px, 1.72vw, 26px);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    transition: color 0.2s ease;
}

.primary-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.3rem;
    width: clamp(52px, 6vw, 100px);
    height: 12px;
    background: url("../live/webpage_img_xz_.webp") center / contain no-repeat;
    opacity: 0;
    transform: translateX(-50%) scaleX(0.2);
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--gold);
}

.primary-nav a.is-active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.nav-toggle {
    display: none;
    grid-column: 3;
    justify-self: end;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.nav-toggle__lines {
    display: block;
    width: 24px;
}

.nav-toggle__lines i {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle__lines i:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle__lines i:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .nav-toggle__lines i:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: clamp(540px, 47.7vw, 960px);
    min-height: 540px;
    overflow: hidden;
    scroll-margin-top: 0;
    background: #101940;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero__shade-top {
    position: absolute;
    inset: 0 0 auto;
    z-index: -1;
    height: calc(var(--header-h) + 54px);
    background: linear-gradient(
        180deg,
        rgba(7, 11, 38, 0.6) 0%,
        rgba(7, 11, 38, 0.18) 55%,
        rgba(7, 11, 38, 0) 100%
    );
    pointer-events: none;
}

.hero__shade-bottom {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 34%;
    background: linear-gradient(
        180deg,
        rgba(9, 12, 40, 0) 0%,
        rgba(9, 12, 40, 0.28) 62%,
        rgba(9, 12, 40, 0.52) 100%
    );
    pointer-events: none;
}

.hero-aside {
    position: absolute;
    top: calc(var(--header-h) + clamp(2px, 1vw, 16px));
    right: var(--gutter);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(6px, 0.8vw, 12px);
    width: clamp(170px, 22vw, 410px);
}

.hero-socials {
    display: flex;
    align-items: center;
    gap: clamp(5px, 0.45vw, 9px);
}

.hero-socials a {
    display: block;
    line-height: 0;
    border-radius: 7px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hero-socials img {
    width: clamp(18px, 1.7vw, 30px);
    height: auto;
    border-radius: 7px;
}

.hero-socials a:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

/* Inline trailer ------------------------------------------------------- */

.video-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 383 / 210;
    padding: clamp(3px, 0.35vw, 5px);
    border-radius: 10px;
    background: linear-gradient(
        145deg,
        #8a5b1d 0%,
        #f8d878 18%,
        #b07a2b 38%,
        #ffe9a6 55%,
        #a3691f 78%,
        #ffe28a 100%
    );
    box-shadow: 0 12px 28px rgba(4, 6, 24, 0.5),
        inset 0 0 0 1px rgba(255, 236, 170, 0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-poster__inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #050722;
    box-shadow: inset 0 0 0 1px rgba(43, 28, 4, 0.55);
}

.video-poster__trigger {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.video-poster__trigger:focus-visible {
    outline: 2px solid var(--gold-strong);
    outline-offset: -4px;
    border-radius: 5px;
}

.video-poster__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.video-poster__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 29%;
    max-width: 92px;
    height: auto;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 6px 14px rgba(10, 8, 0, 0.35));
    transition: transform 0.2s ease;
}

.video-poster__video {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    background: #050722;
}

.video-poster.is-playing .video-poster__trigger {
    display: none;
}

.video-poster.is-playing .video-poster__video {
    display: block;
    animation: trailer-fade 0.25s ease both;
}

@keyframes trailer-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-poster__close {
    position: absolute;
    top: clamp(3px, 0.4vw, 6px);
    right: clamp(3px, 0.4vw, 6px);
    z-index: 3;
    display: none;
    place-items: center;
    width: clamp(22px, 1.8vw, 28px);
    height: clamp(22px, 1.8vw, 28px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(7, 9, 28, 0.74);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.video-poster.is-playing .video-poster__close {
    display: grid;
}

.video-poster__close svg {
    width: 58%;
    height: 58%;
}

.video-poster__close:hover {
    background: var(--gold-strong);
    color: #23224f;
}

.video-poster__close::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
}

.video-poster:not(.is-playing):hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(4, 6, 24, 0.55),
        0 0 22px rgba(255, 210, 74, 0.28),
        inset 0 0 0 1px rgba(255, 236, 170, 0.65);
}

.video-poster:not(.is-playing):hover .video-poster__play {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Download block ------------------------------------------------------- */

.hero-download {
    --dl-icon: clamp(38px, 6.6vw, 127px);
    --dl-badge: clamp(22px, 3.1vw, 60px);
    --dl-apk: clamp(30px, 5.6vw, 108px);
    position: absolute;
    left: 50%;
    bottom: clamp(10px, 1.8%, 24px);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1vw, 18px);
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 2px clamp(6px, 0.8vw, 12px);
    border: clamp(10px, 1.1vw, 20px) solid transparent;
    border-image-source: url("../live/webpage_img_di01.webp");
    border-image-slice: 32 fill;
    border-image-width: 1;
    border-image-repeat: stretch;
    transform: translateX(-50%);
}

.dl-meta {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 12px);
}

.dl-meta img {
    width: auto;
    height: var(--dl-icon);
}

.dl-stores {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.5vw, 8px);
}

.dl-stores img {
    width: auto;
    height: var(--dl-badge);
}

.dl-stores a {
    display: block;
    line-height: 0;
    border-radius: 8px;
}

.dl-stores a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.dl-apk {
    width: auto;
    height: var(--dl-apk);
}

/* ==========================================================================
   Shared section titles
   ========================================================================== */

.section-title {
    margin: 0 0 clamp(16px, 2.4vw, 34px);
    line-height: 0;
}

.section-title img {
    width: clamp(180px, 21.5vw, 380px);
    height: auto;
}

.section-title--center {
    text-align: center;
}

.section-title--center img {
    margin-inline: auto;
}

/* ==========================================================================
   Heroes
   ========================================================================== */

.heroes {
    padding: clamp(34px, 4vw, 64px) 0 clamp(30px, 3vw, 50px);
    background: var(--navy-700) url("../live/webpage_img_juese.webp") center top /
        cover no-repeat;
    overflow: hidden;
}

.heroes .container {
    width: 73.8%;
    max-width: 1480px;
    margin-left: 15.4%;
    margin-right: auto;
}

.heroes .section-title {
    margin-bottom: clamp(6px, 1vw, 16px);
}

/* Align the visible "H" (not the swoosh's transparent edge) with the copy. */
.heroes .section-title img {
    transform: translateX(-20.65%);
}

.hero-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: start;
    gap: clamp(14px, 3vw, 44px);
}

.hero-copy {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-copy h3 {
    margin: 0 0 clamp(8px, 1vw, 16px);
    font-size: clamp(32px, 4.7vw, 68px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: #f8f9ff;
    text-shadow: 0 8px 26px rgba(9, 9, 44, 0.35);
    text-wrap: balance;
}

.hero-copy p {
    margin: 0;
    font-size: clamp(15px, 1.5vw, 22px);
    line-height: 1.7;
    color: var(--ink-soft);
    text-wrap: pretty;
}

.hero-portrait {
    position: relative;
    justify-self: end;
    width: min(100%, 720px);
    margin-top: clamp(-44px, -3vw, -16px);
}

.hero-portrait::before {
    content: "";
    position: absolute;
    inset: 6% 2% 2%;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 48%,
        rgba(112, 94, 255, 0.32) 0%,
        rgba(80, 70, 200, 0.12) 54%,
        rgba(80, 70, 200, 0) 72%
    );
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
}

.hero-portrait img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    object-fit: contain;
    translate: var(--portrait-x, 0) 0;
    filter: drop-shadow(0 26px 38px rgba(7, 8, 30, 0.45));
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.hero-showcase.is-switching .hero-copy,
.hero-showcase.is-switching .hero-portrait img {
    opacity: 0;
    transform: translateY(10px);
}

/* Hero picker ---------------------------------------------------------- */

.hero-selector-wrap {
    position: relative;
    z-index: 2;
    width: 83%;
    max-width: 1480px;
    margin-left: 6.3%;
    margin-right: auto;
    margin-top: clamp(4px, 1vw, 16px);
}

.hero-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(6px, 1vw, 18px);
    margin-top: 0;
}

.hero-thumb {
    display: grid;
    place-items: end center;
    width: clamp(58px, 8vw, 145px);
    aspect-ratio: 146 / 151;
    padding: 0;
    border: 0;
    background: url("../live/webpage_img_jsk.webp") center / 100% 100% no-repeat;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hero-thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

.hero-thumb:hover {
    transform: translateY(-4px);
}

.hero-thumb.is-active {
    background-image: url("../live/webpage_img_xuanzhong.webp");
    transform: translateY(-4px);
    filter: drop-shadow(0 8px 16px rgba(8, 8, 36, 0.45));
}

.hero-thumb:focus-visible {
    outline-offset: 4px;
    border-radius: 16px;
}

/* ==========================================================================
   Gameplay
   ========================================================================== */

.gameplay {
    padding: clamp(42px, 5.4vw, 77.8px) 0 clamp(46px, 5.6vw, 80.6px);
    background: var(--navy-600) url("../live/webpage_img_di04.webp") center /
        cover no-repeat;
}

.gameplay .section-title img {
    transform: translateX(-6.58%);
}

.gameplay .container,
.socials .container {
    --container: var(--container-narrow);
}

.gameplay-cards {
    --card-gap: clamp(12px, 2vw, 28px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
    margin-top: clamp(18px, 2.6vw, 38px);
}

.game-card {
    position: relative;
    margin: 0;
    border-radius: clamp(16px, 2vw, 26px);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.game-card__art {
    width: 100%;
    height: auto;
}

.game-card__caption {
    position: absolute;
    left: 5.5%;
    right: 5.5%;
    bottom: 4.2%;
    padding: clamp(34px, 4.4vw, 58px) clamp(8px, 1.4vw, 18px)
        clamp(4px, 0.8vw, 10px);
    border-radius: clamp(12px, 1.6vw, 18px);
    background: linear-gradient(
        180deg,
        rgba(55, 60, 148, 0) 0%,
        rgba(52, 56, 142, 0.72) 42%,
        rgba(49, 53, 136, 0.94) 100%
    );
    text-align: center;
}

.game-card__title {
    margin: 0;
    font-size: clamp(17px, 1.6vw, 25px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(20, 14, 60, 0.55);
}

.game-card__desc {
    display: block;
    margin: 0.35em 0 0;
    font-size: clamp(11px, 0.88vw, 13.5px);
    line-height: 1.5;
    color: #f1f2ff;
    text-wrap: pretty;
}

/* Selected / unselected card states ------------------------------------ */

.game-card__select {
    position: absolute;
    inset: 0;
    z-index: 4;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
}

.game-card__select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -4px;
    border-radius: inherit;
}

.game-card.is-selected {
    z-index: 2;
    transform: translateY(-10px) scale(1.035);
    box-shadow: 0 28px 46px rgba(8, 9, 40, 0.48),
        0 0 32px rgba(112, 96, 255, 0.18);
}

.game-card.is-selected .game-card__caption {
    text-align: left;
}

.game-card:not(.is-selected) {
    z-index: 1;
    transform: translateY(8px) scale(0.985);
    filter: brightness(0.93) saturate(0.95);
}

.game-card:not(.is-selected) .game-card__caption {
    left: 6%;
    right: 6%;
    bottom: 4.5%;
    padding: clamp(28px, 3.5vw, 48px) clamp(8px, 1.2vw, 16px)
        clamp(10px, 1.4vw, 18px);
    background: linear-gradient(
        180deg,
        rgba(122, 133, 232, 0) 0%,
        rgba(122, 133, 232, 0.9) 24%,
        #7a85e6 48%,
        #6f7ae0 100%
    );
}

.game-card:not(.is-selected) .game-card__title {
    font-size: clamp(15px, 1.3vw, 21px);
}

.game-card:not(.is-selected) .game-card__desc {
    display: block;
    margin-top: 0.3em;
    font-size: clamp(10px, 0.82vw, 12.5px);
    line-height: 1.5;
}

@media (hover: hover) {
    .game-card:hover {
        box-shadow: 0 24px 40px rgba(8, 9, 40, 0.32);
    }

    .game-card.is-selected:hover {
        box-shadow: 0 30px 52px rgba(8, 9, 40, 0.5),
            0 0 36px rgba(112, 96, 255, 0.2);
    }

    .game-card:not(.is-selected):hover {
        filter: brightness(0.98) saturate(1);
    }
}

/* ==========================================================================
   Socials
   ========================================================================== */

.socials {
    padding: clamp(42px, 5.4vw, 77.8px) 0 clamp(180px, 20vw, 288px);
    background: var(--navy-700) url("../live/webpage_img_di05.webp") center bottom /
        cover no-repeat;
}

.follow-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    width: fit-content;
    margin: clamp(6px, 1.2vw, 16px) auto clamp(22px, 2.8vw, 40px);
    padding: clamp(8px, 1vw, 14px) clamp(20px, 2.8vw, 40px)
        clamp(10px, 1.2vw, 16px);
    border-radius: 14px;
    background: rgba(33, 30, 86, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 10px 24px rgba(8, 8, 34, 0.22);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.follow-card__label {
    width: clamp(150px, 14vw, 210px);
    height: auto;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 12px);
}

.social-icons a {
    display: block;
    line-height: 0;
    border-radius: 8px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-icons img {
    width: clamp(22px, 2.2vw, 32px);
    height: auto;
    border-radius: 7px;
}

.social-icons a:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1.6vw, 22px);
}

.social-grid figure {
    margin: 0;
    border-radius: clamp(8px, 1vw, 12px);
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(9, 10, 40, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.social-grid img {
    width: 100%;
    height: auto;
}

@media (hover: hover) {
    .social-grid figure:hover {
        transform: translateY(-4px) scale(1.012);
        box-shadow: 0 22px 38px rgba(9, 10, 40, 0.36);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(40px, 4.8vw, 68px) var(--gutter) clamp(34px, 4vw, 56px);
    background: var(--navy-500) url("../live/webpage_img_di06.webp") center top /
        cover no-repeat;
    text-align: center;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(
            120% 80% at 50% -10%,
            rgba(104, 116, 210, 0.18),
            transparent 60%
        ),
        linear-gradient(180deg, rgba(20, 24, 64, 0.12), rgba(20, 24, 64, 0.25));
    pointer-events: none;
}

.footer-inner {
    width: min(100%, 980px);
    margin-inline: auto;
}

.footer-logo {
    display: inline-block;
    line-height: 0;
    border-radius: 8px;
}

.footer-logo img {
    width: clamp(150px, 13vw, 234px);
    height: auto;
    margin-inline: auto;
}

.company-name {
    margin: clamp(10px, 1.4vw, 20px) 0 clamp(12px, 1.6vw, 22px);
    color: var(--gold);
    font-size: clamp(23px, 2.3vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.compliance {
    max-width: 900px;
    margin: 0 auto clamp(16px, 2vw, 26px);
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(12.5px, 1.12vw, 16px);
    line-height: 1.75;
    text-wrap: pretty;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 18px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal-links li {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 18px);
}

.legal-links li + li::before {
    content: "|";
    color: rgba(255, 255, 255, 0.45);
}

.legal-links a {
    color: #fff;
    font-size: clamp(15px, 1.5vw, 22px);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
    color: var(--gold);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .hero {
        height: clamp(540px, 52vw, 760px);
    }

    .hero-showcase {
        gap: 20px;
    }
}

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

    .game-card:last-child {
        grid-column: 1 / -1;
        width: calc(50% - var(--card-gap) / 2);
        justify-self: center;
    }
}

/* Tablet portrait & phones: portrait key art, collapsible navigation ---- */
@media (max-width: 820px) {
    :root {
        --header-h: 70px;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .nav-toggle {
        display: grid;
        grid-column: 2;
    }

    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 99;
        padding: 0.5rem var(--gutter) 1.1rem;
        background: rgba(13, 16, 47, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 24px 44px rgba(3, 5, 20, 0.5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease,
            visibility 0s linear 0.2s;
    }

    .site-header.nav-open .primary-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: opacity 0.2s ease, transform 0.2s ease,
            visibility 0s linear 0s;
    }

    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .primary-nav a {
        display: flex;
        align-items: center;
        min-height: 50px;
        padding: 0 0.4rem;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        text-shadow: none;
    }

    .primary-nav li:last-child a {
        border-bottom: 0;
    }

    .primary-nav a::after {
        display: none;
    }

    .primary-nav a.is-active {
        color: var(--gold);
    }

    .site-header.is-scrolled,
    .site-header.nav-open {
        background: rgba(13, 16, 47, 0.96);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    /* Hero uses the dedicated portrait artwork */
    .hero {
        height: min(100vh, 900px);
        height: min(100svh, 900px);
        min-height: 580px;
        align-items: flex-end;
    }

    .hero__media img {
        object-position: center 55%;
    }

    .hero-aside {
        top: calc(var(--header-h) + 10px);
        width: clamp(140px, 28vw, 240px);
    }

    .hero-socials img {
        width: clamp(19px, 2.6vw, 24px);
    }

    .hero-download {
        bottom: max(20px, env(safe-area-inset-bottom));
    }

    /* Heroes */
    .heroes .container {
        width: calc(100% - var(--gutter) * 2);
        max-width: 1120px;
        margin-inline: auto;
    }

    .hero-showcase {
        grid-template-columns: 1fr;
        gap: clamp(10px, 2.6vw, 20px);
    }

    .hero-copy {
        max-width: 640px;
    }

    .hero-copy h3 {
        font-size: clamp(29px, 5.6vw, 42px);
        margin-bottom: 0.55em;
    }

    .hero-copy p {
        font-size: clamp(14px, 2.1vw, 16px);
        line-height: 1.8;
    }

    .hero-portrait {
        justify-self: center;
        width: min(86vw, 420px);
        margin-top: clamp(2px, 1.4vw, 10px);
    }

    .hero-selector-wrap {
        width: calc(100% - var(--gutter) * 2);
        max-width: 1120px;
        margin: clamp(18px, 3vw, 28px) auto 0;
    }

    .hero-selector {
        justify-content: center;
        gap: 8px;
        margin-top: 0;
    }

    .hero-thumb {
        width: clamp(54px, 9vw, 78px);
    }

    /* Gameplay */
    .socials {
        padding-bottom: clamp(190px, 28vw, 280px);
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 68px;
    }

    .brand img {
        width: clamp(118px, 31vw, 128px);
    }

    .hero {
        height: min(100vh, 900px);
        height: min(100svh, 900px);
        min-height: 600px;
    }

    .hero__media img {
        object-position: center 55%;
    }

    .hero-aside {
        width: clamp(112px, 31vw, 150px);
        top: calc(var(--header-h) + 8px);
    }

    .hero-socials {
        gap: 5px;
    }

    .hero-socials img {
        width: 18px;
    }

    .hero-download {
        gap: 8px;
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .hero-download .dl-meta img:last-child {
        display: none;
    }

    .dl-meta {
        gap: 5px;
    }

    .dl-stores {
        gap: 4px;
    }

    .hero__shade-bottom {
        height: 40%;
    }

    .heroes {
        padding-top: 40px;
    }

    .hero-copy p {
        font-size: 14.5px;
        line-height: 1.75;
    }

    .hero-portrait {
        width: min(86vw, 420px);
    }

    .hero-selector {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        justify-items: center;
        gap: 8px;
    }

    .hero-thumb {
        width: 100%;
        max-width: 66px;
    }

    .hero-thumb:hover {
        transform: none;
    }

    .hero-thumb.is-active {
        transform: translateY(-2px);
    }

    .gameplay-cards {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin-inline: auto;
    }

    .game-card:last-child {
        grid-column: auto;
        width: 100%;
    }

    .game-card__title {
        font-size: 19px;
    }

    .game-card__desc {
        font-size: 12px;
    }

    .game-card__caption {
        padding-top: 42px;
    }

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

    .follow-card {
        margin-bottom: 18px;
        padding-inline: 22px;
    }

    .socials {
        padding-bottom: clamp(170px, 44vw, 250px);
    }

    .company-name {
        font-size: 24px;
    }

    .compliance {
        font-size: 12.5px;
        line-height: 1.7;
    }

    .legal-links {
        gap: 10px;
    }

    .legal-links li,
    .legal-links li + li::before {
        gap: 10px;
    }

    .legal-links a {
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .hero {
        min-height: 560px;
    }

    .hero-download {
        gap: 6px;
    }

    .hero-download .dl-meta img:last-child {
        display: none;
    }

    .hero-selector {
        gap: 7px;
    }

    .gameplay-cards {
        max-width: 360px;
    }

    .follow-card {
        padding-inline: 16px;
    }

    .site-footer {
        padding-inline: 18px;
    }
}

/* Short landscape viewports (phones / tablets on their side) ----------- */
@media (max-height: 560px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        height: 100svh;
        min-height: 440px;
    }

    .hero-aside {
        width: clamp(118px, 18vw, 180px);
        top: calc(var(--header-h) + 4px);
    }

    .hero__shade-top {
        height: calc(var(--header-h) + 20px);
    }

    .hero-download {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

@media (min-width: 821px) {
    /* Keep the whole Heroes composition proportional to the stage width.
       The stage is capped at 1440px, so above that nothing grows. */
    .heroes {
        background: var(--navy-700);
        padding: min(4vw, 57.6px) 0 min(3vw, 43.2px);
    }

    /* The existing Heroes background is anchored to the same capped stage
       as the content, so its sun/compass stays behind the portrait at every
       desktop width instead of being a separate image layer. */
    .heroes::before {
        content: "";
        position: absolute;
        inset: 0;
        left: 50%;
        width: min(100%, 1440px);
        transform: translateX(-50%);
        background: var(--navy-700) url("../live/webpage_img_juese.webp")
            center top / cover no-repeat;
        pointer-events: none;
        z-index: 0;
    }

    .heroes-stage {
        position: relative;
        z-index: 1;
        container-type: inline-size;
    }

    /* Align the portrait centre with the sun/compass centre in the
       existing background. 4.7cqw is the measured offset at 1440px. */
    .hero-portrait {
        translate: 4.7cqw 0;
    }

    .heroes .container {
        max-width: none;
    }

    .heroes .section-title {
        margin-bottom: 1cqw;
    }

    .heroes .section-title img {
        width: 21.5cqw;
    }

    .hero-showcase {
        gap: 3cqw;
    }

    .hero-copy h3 {
        margin-bottom: 1cqw;
        font-size: 4.7cqw;
    }

    .hero-copy p {
        font-size: 1.5cqw;
    }

    .hero-portrait {
        width: 100%;
        max-width: none;
        margin-top: -3cqw;
    }

    .hero-selector-wrap {
        max-width: none;
        margin-top: -6cqw;
        margin-left: auto;
        margin-right: 6.1%;
    }

    .hero-selector {
        gap: 1cqw;
        justify-content: flex-end;
    }

    .hero-thumb {
        width: 8cqw;
    }
}

@media (min-width: 821px) {
    /* The visible G of "Gameplay" lines up with the H of "Heroes".
       Both section containers start at 15.4%; each title image is shifted
       left by its own left transparent/glyph padding. */
    .gameplay .container {
        width: 73.8%;
        max-width: none;
        margin-left: 15.4%;
        margin-right: auto;
    }

    .gameplay .section-title img {
        width: 21.5cqw;
        transform: translateX(-6.58%);
    }

    .gameplay-stage,
    .socials-stage {
        container-type: inline-size;
    }

    .game-card__title {
        font-size: clamp(17px, 1.6cqw, 25px);
    }

    .game-card__desc {
        font-size: clamp(11px, 0.88cqw, 13.5px);
    }

    .game-card:not(.is-selected) .game-card__title {
        font-size: clamp(15px, 1.3cqw, 21px);
    }

    .game-card:not(.is-selected) .game-card__desc {
        font-size: clamp(10px, 0.82cqw, 12.5px);
    }

    /* Socials stays centered, but its outer edge now matches the 15.4%
       left edge of the Heroes copy and the Gameplay cards. */
    .socials .container {
        width: 69.2%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .socials .section-title img {
        width: 21.5cqw;
    }

    .follow-card__label {
        width: clamp(150px, 14cqw, 210px);
    }

    .social-icons img {
        width: clamp(22px, 2.2cqw, 32px);
    }

    .social-grid {
        gap: clamp(10px, 1.6cqw, 22px);
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
