:root {
    --accent: #9b7cff;
    --accent-bright: #c7b9ff;
    --ink: #f7f3ff;
    --muted: #aaa4ba;
    --surface: #13101d;
    --surface-strong: #191527;
    --line: rgba(190, 169, 255, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    background: #090711;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a {
    color: var(--accent-bright);
}

a:hover {
    color: #fff;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.65rem 1rem;
    color: #fff;
    background: #171122;
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    transform: translateY(-150%);
}

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 7, 17, 0.88);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.navbar-brand span,
.text-accent {
    color: var(--accent);
}

.navbar .nav-link {
    color: rgba(247, 243, 255, 0.72);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
    color: #fff;
}

.fw-black {
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.eyebrow {
    color: #b9a8ff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 720px;
}

.hero-media,
.hero-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media {
    z-index: -2;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.78) contrast(1.08);
}

.hero-scrim {
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(9, 7, 17, 0.98) 0%, rgba(9, 7, 17, 0.85) 45%, rgba(9, 7, 17, 0.25) 100%),
        linear-gradient(0deg, #090711 0%, transparent 32%);
}

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

.min-vh-hero {
    min-height: 640px;
}

.hero-lead {
    max-width: 48rem;
    color: rgba(247, 243, 255, 0.78);
    font-size: clamp(1.12rem, 2vw, 1.45rem);
    line-height: 1.55;
}

.btn {
    border-radius: 0.65rem;
    font-weight: 700;
}

.btn-primary {
    --bs-btn-bg: #7656e8;
    --bs-btn-border-color: #7656e8;
    --bs-btn-hover-bg: #896bf0;
    --bs-btn-hover-border-color: #896bf0;
    --bs-btn-active-bg: #6745db;
    --bs-btn-active-border-color: #6745db;
}

.signal-strip {
    border-block: 1px solid var(--line);
    background: #0e0b17;
}

.signal-number,
.signal-label {
    display: block;
}

.signal-number {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1;
}

.signal-label {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.section-space {
    padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-tinted {
    border-block: 1px solid var(--line);
    background:
        radial-gradient(circle at 90% 10%, rgba(118, 86, 232, 0.16), transparent 35%),
        #0e0b17;
}

.feature-card,
.update-card,
.media-card,
.studio-card,
.loop-card,
.partnership-card,
.partnership-panel,
.empty-state,
.hero-video-card {
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(28, 23, 43, 0.98), rgba(16, 14, 24, 0.98));
}

.feature-card,
.update-card {
    transition: transform 180ms ease, border-color 180ms ease;
}

.feature-card:hover,
.update-card:hover {
    border-color: rgba(155, 124, 255, 0.68);
    transform: translateY(-4px);
}

.feature-icon,
.skill-glyph {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1.25rem;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(199, 185, 255, 0.4);
    border-radius: 0.75rem;
    background: rgba(118, 86, 232, 0.18);
    font-size: 1.35rem;
}

.media-card {
    overflow: hidden;
}

.media-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--line);
    background: #000;
    object-fit: cover;
}

.step-number {
    color: var(--accent-bright);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.studio-card {
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(155, 124, 255, 0.22), transparent 38%),
        linear-gradient(145deg, #191527, #100e18);
}

.partnership-panel {
    background: rgba(9, 7, 17, 0.65);
}

.update-card {
    color: inherit;
}

.narrow {
    max-width: 820px;
}

.post-body {
    color: rgba(247, 243, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.post-divider {
    width: 5rem;
    height: 2px;
    margin-block: 3rem;
    background: var(--accent);
}

.back-link {
    text-decoration: none;
}

.game-hero {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(77, 48, 139, 0.36), transparent 38%);
}

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

.game-tags span {
    padding: 0.4rem 0.7rem;
    color: #c8c0d8;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(18, 15, 28, 0.8);
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-video-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.36);
}

.hero-video-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-caption {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.35rem 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(9, 7, 17, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
}

.loop-list {
    display: grid;
    gap: 0;
    padding: 0;
    list-style: none;
    counter-reset: loop;
}

.loop-list li {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.42fr) 1fr;
    gap: 1rem;
    padding-block: 1.1rem;
    border-bottom: 1px solid var(--line);
    counter-increment: loop;
}

.loop-list li:last-child {
    border-bottom: 0;
}

.loop-list strong::before {
    content: "0" counter(loop) " · ";
    color: var(--accent-bright);
}

.loop-list span {
    color: var(--muted);
}

.game-frame-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #000;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.4);
}

.game-frame-shell iframe {
    border: 0;
}

.game-frame-shell:fullscreen,
.game-frame-shell:-webkit-full-screen,
.game-frame-shell.game-pseudo-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    aspect-ratio: auto !important;
    border: 0;
    border-radius: 0;
    background: #000;
}

.game-frame-shell.game-pseudo-fullscreen {
    position: fixed !important;
    inset: 0;
    z-index: 2147483646;
}

.game-frame-shell:fullscreen iframe,
.game-frame-shell:-webkit-full-screen iframe,
.game-frame-shell.game-pseudo-fullscreen iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.game-fullscreen-exit {
    display: none;
    position: absolute;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: auto !important;
    left: auto !important;
    z-index: 2147483647;
    width: auto !important;
    height: auto !important;
    max-width: max-content;
    aspect-ratio: auto !important;
    padding: 0.5rem 0.75rem;
    opacity: 0.88;
}

.game-frame-shell:fullscreen .game-fullscreen-exit,
.game-frame-shell:-webkit-full-screen .game-fullscreen-exit,
.game-frame-shell.game-pseudo-fullscreen .game-fullscreen-exit {
    display: block;
}

body.game-fullscreen-active {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.scroll-target {
    scroll-margin-top: 5rem;
}

.project-facts {
    border-top: 1px solid var(--line);
}

.project-facts > div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
}

.project-facts span {
    color: var(--muted);
    font-size: 0.82rem;
}

.support-item {
    height: 100%;
    padding: 0.9rem 1rem;
    color: #ded6ef;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: rgba(9, 7, 17, 0.55);
}

.support-item::before {
    content: "✓";
    margin-right: 0.55rem;
    color: var(--accent-bright);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #07050c;
}

.site-footer a {
    color: #aaa4ba;
    text-decoration: none;
}

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

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

    .hero-scrim {
        background:
            linear-gradient(90deg, rgba(9, 7, 17, 0.94), rgba(9, 7, 17, 0.64)),
            linear-gradient(0deg, #090711 0%, transparent 38%);
    }

    .min-vh-hero {
        min-height: 570px;
    }
}

@media (max-width: 767.98px) {
    .display-1 {
        font-size: clamp(3.1rem, 16vw, 5rem);
    }

    .hero {
        min-height: 620px;
    }

    .hero-media {
        object-position: 62% center;
    }

    .hero-scrim {
        background: linear-gradient(0deg, #090711 0%, rgba(9, 7, 17, 0.82) 70%, rgba(9, 7, 17, 0.48) 100%);
    }

    .signal-strip .row > div:not(:first-child) {
        text-align: center;
    }

    .loop-list li,
    .project-facts > div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .game-frame-shell {
        border-radius: 0.65rem;
    }

    main > section > .container > .row {
        margin-right: 0;
        margin-left: 0;
    }
}

@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;
    }
}
