:root {
    --bg: #050505;
    --ink: #f7f2ee;
    --muted: #b7b0aa;
    --soft: #7d7771;
    --red: #f53152;
    --cyan: #52dfff;
    --amber: #ffb13b;
    --green: #57f287;
    --panel: rgba(13, 13, 15, 0.82);
    --panel-strong: #101013;
    --line: rgba(255, 255, 255, 0.14);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
    --font-heading: "Oswald", Impact, sans-serif;
    --font-body: "Inter", Arial, sans-serif;
    --font-mono: "VT323", monospace;
    --radius: 8px;
    --speed: 220ms;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 5px),
        #050505;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.95;
    text-transform: uppercase;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 200;
    transform: translateY(-150%);
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    background: var(--ink);
    color: #050505;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-hero {
    position: relative;
    isolation: isolate;
    min-height: 86svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.topbar {
    position: absolute;
    top: 0.85rem;
    left: 50%;
    z-index: 120;
    width: min(1180px, calc(100% - 32px));
    margin: 0;
    padding: 0.62rem 0.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.34);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    transform: translateX(-50%);
    transition: background var(--speed), border-color var(--speed), box-shadow var(--speed);
}

.topbar.is-stuck {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 120;
    width: min(1180px, calc(100% - 32px));
    margin: 0;
    background: rgba(0, 0, 0, 0.72);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
}

.brand img,
.footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(245, 49, 82, 0.38);
}

.footer-brand img {
    width: 34px;
    height: 34px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.nav-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    transition: background var(--speed), color var(--speed), transform var(--speed);
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: var(--ink);
    transform: translateY(-1px);
}

.hero-gallery {
    position: absolute;
    inset: 0;
    z-index: -3;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1.15fr 0.95fr 1.05fr;
    min-height: 100%;
    background: #000;
}

.hero-gallery::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.3) 42%, rgba(0, 0, 0, 0.8)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.78)),
        linear-gradient(115deg, rgba(245, 49, 82, 0.24), transparent 36%, rgba(82, 223, 255, 0.14) 70%, transparent);
}

.shot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    filter: saturate(1.22) contrast(1.1) brightness(0.76);
    transform: scale(1.04);
    animation: image-drift 14s ease-in-out infinite alternate;
}

.shot-b,
.shot-d {
    animation-duration: 17s;
}

.shot-c {
    animation-duration: 19s;
}

.hero-noise {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.36;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
        repeating-linear-gradient(0deg, transparent 0, transparent 7px, rgba(255, 255, 255, 0.05) 8px);
    mix-blend-mode: screen;
    animation: signal-slide 4s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(850px, calc(100% - 40px));
    margin: auto auto 2rem;
    padding: 5rem 0 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 1.35rem;
    line-height: 1;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 18px currentColor;
}

.hero-content h1 {
    max-width: 760px;
    font-size: 6rem;
    text-shadow: 0 0 28px rgba(245, 49, 82, 0.55), 0 12px 40px rgba(0, 0, 0, 0.85);
}

.hero-copy {
    max-width: 690px;
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: 1.18rem;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.btn,
.store-links a,
.social-links a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 900;
    text-transform: uppercase;
    transition:
        border-color var(--speed),
        background var(--speed),
        color var(--speed),
        box-shadow var(--speed),
        transform var(--speed);
}

.btn {
    padding: 0 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.9rem;
}

.btn:hover,
.btn:focus-visible,
.store-links a:hover,
.store-links a:focus-visible,
.social-links a:hover,
.social-links a:focus-visible {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--red);
    color: #090909;
    border-color: var(--red);
    box-shadow: 0 0 32px rgba(245, 49, 82, 0.38);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
}

.btn-ghost {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: var(--cyan);
    box-shadow: 0 0 28px rgba(82, 223, 255, 0.25);
}

.hero-status {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 40px));
    margin: 0 auto 1.2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-status div {
    min-width: 0;
    padding: 1rem;
    border-right: 1px solid var(--line);
}

.hero-status div:last-child {
    border-right: 0;
}

.hero-status strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.55rem;
    line-height: 1;
    text-transform: uppercase;
}

.hero-status span {
    display: block;
    margin-top: 0.3rem;
    color: var(--soft);
    font-size: 0.88rem;
    font-weight: 800;
}

.games-section,
.studio-section,
.community-section {
    position: relative;
    padding: 6rem 0;
}

.games-section {
    background:
        linear-gradient(180deg, #050505, #0d0909 38%, #060606),
        #050505;
    padding-top: 3rem;
}

.section-head {
    max-width: 760px;
}

.section-head h2 {
    font-size: 3.5rem;
}

.section-head p:not(.eyebrow) {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 1.08rem;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.4rem;
}

.game-card {
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    grid-column: span 6;
    display: grid;
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.15fr);
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel-strong);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
    transform-style: preserve-3d;
    transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.game-card.featured {
    grid-column: span 12;
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
    min-height: 430px;
}

.game-card:hover,
.game-card:focus-within {
    --lift: -6px;
    border-color: color-mix(in srgb, var(--accent), white 16%);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 38px color-mix(in srgb, var(--accent), transparent 72%);
}

.game-poster {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: #111;
}

.game-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.42)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.32), transparent 48%);
}

.game-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.04);
    transition: transform 420ms ease, filter 420ms ease;
}

.game-card:hover .game-poster img,
.game-card:focus-within .game-poster img {
    transform: scale(1.06);
    filter: saturate(1.28) contrast(1.12);
}

.game-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}

.game-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 3px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 22px var(--accent);
}

.game-label {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    line-height: 1;
    text-transform: uppercase;
}

.game-content h3 {
    font-size: 2.55rem;
}

.game-content p:not(.game-label) {
    color: var(--muted);
    font-weight: 600;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.game-tags span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0 0.7rem;
    color: #d7d1cc;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.3rem;
}

.store-links a {
    min-width: 116px;
    padding: 0 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.78rem;
}

.store-links a:first-child {
    border-color: color-mix(in srgb, var(--accent), white 12%);
    background: var(--accent);
    color: #080808;
    box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 62%);
}

.game-summary {
    max-width: 720px;
    margin: 1.2rem auto 0;
    color: #ddd8d2;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    text-transform: none;
}

.game-facts,
.game-page-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.game-facts span,
.game-page-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0 0.75rem;
    background: rgba(0, 0, 0, 0.42);
    color: #f7f2ee;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.game-page-nav {
    margin-top: 1.5rem;
}

.game-page-nav a:hover,
.game-page-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.13);
    border-color: var(--cyan);
    color: #fff;
}

.studio-section {
    background:
        linear-gradient(180deg, #050505, #080d0f 52%, #050505),
        #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-layout,
.community-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 2rem;
    align-items: start;
}

.studio-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.studio-points div {
    min-height: 250px;
    padding: 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        rgba(0, 0, 0, 0.35);
}

.studio-points span {
    display: inline-block;
    margin-bottom: 1.7rem;
    color: var(--amber);
    font-family: var(--font-mono);
    font-size: 1.6rem;
}

.studio-points h3 {
    margin-bottom: 0.85rem;
    font-size: 1.75rem;
}

.studio-points p {
    color: var(--muted);
    font-weight: 600;
}

.community-section {
    background:
        linear-gradient(180deg, rgba(245, 49, 82, 0.08), rgba(0, 0, 0, 0)),
        #050505;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.social-links a {
    min-height: 124px;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    font-size: 0.95rem;
}

.social-links a:hover,
.social-links a:focus-visible {
    border-color: var(--cyan);
    background: rgba(82, 223, 255, 0.1);
    box-shadow: 0 0 32px rgba(82, 223, 255, 0.18);
}

.social-links img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(1) brightness(1.5);
    transition: filter var(--speed), transform var(--speed);
}

.social-links a:hover img,
.social-links a:focus-visible img {
    filter: none;
    transform: scale(1.08);
}

.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--line);
    background: #030303;
}

.footer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
}

.site-footer p {
    margin-top: 0.8rem;
    color: var(--soft);
    font-weight: 700;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.85rem;
    max-width: 520px;
}

.legal-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

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

.copyright {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
}

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

@keyframes image-drift {
    from {
        transform: scale(1.04) translateY(0);
    }

    to {
        transform: scale(1.1) translateY(-14px);
    }
}

@keyframes signal-slide {
    from {
        transform: translateY(-12px);
    }

    to {
        transform: translateY(12px);
    }
}

@media (max-width: 980px) {
    .site-hero {
        min-height: 86svh;
    }

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

    .shot-d,
    .shot-e {
        display: none;
    }

    .hero-content h1 {
        font-size: 4.4rem;
    }

    .section-head h2 {
        font-size: 2.85rem;
    }

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

    .game-card,
    .game-card.featured {
        grid-column: auto;
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .game-poster {
        aspect-ratio: 16 / 10;
    }

    .studio-layout,
    .community-layout {
        grid-template-columns: 1fr;
    }

    .studio-points {
        grid-template-columns: 1fr;
    }

    .studio-points div {
        min-height: 0;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .topbar {
        width: min(100% - 24px, 1180px);
        align-items: flex-start;
    }

    .topbar.is-stuck {
        top: 0.5rem;
        width: min(100% - 24px, 1180px);
    }

    .brand span {
        display: none;
    }

    .nav-links {
        max-width: calc(100% - 62px);
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
    }

    .site-hero {
        min-height: 84svh;
    }

    .hero-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .shot-c {
        display: none;
    }

    .hero-content {
        width: min(100% - 28px, 850px);
        margin-bottom: 1rem;
        padding-top: 3rem;
    }

    .eyebrow {
        font-size: 1.15rem;
    }

    .hero-content h1 {
        font-size: 3.15rem;
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-actions,
    .store-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .btn,
    .store-links a {
        width: 100%;
    }

    .hero-status {
        width: min(100% - 28px, 760px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-status div {
        border-right: 1px solid var(--line);
        border-bottom: 0;
        padding: 0.65rem;
    }

    .hero-status div:last-child {
        border-right: 0;
    }

    .hero-status strong {
        font-size: 1.1rem;
    }

    .hero-status span {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .games-section,
    .studio-section,
    .community-section {
        padding: 4rem 0;
    }

    .games-section {
        padding-top: 2.4rem;
    }

    .section-head h2 {
        font-size: 2.35rem;
    }

    .game-content {
        padding: 1.25rem;
    }

    .game-content h3 {
        font-size: 2.2rem;
    }

    .game-poster {
        aspect-ratio: 1 / 1;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .social-links a {
        min-height: 84px;
        flex-direction: row;
    }

    .footer-layout {
        grid-template-columns: 1fr;
    }

    .legal-links {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
