@font-face {
    font-family: "PixelMix";
    src: url("../assets/fonts/pixelmix.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* The site is light-only — opt out of any UA dark-mode restyling. */
    color-scheme: light;

    --paper: #F7F7F4;
    --white: #FFFFFF;
    --ink: #101010;
    --charcoal: #242424;
    --muted: #4f4f4f;
    --line: rgba(16, 16, 16, 0.18);
    --soft-line: rgba(16, 16, 16, 0.1);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.13);
    --shadow-color: rgba(16, 16, 16, 0.1);

    /* Surface tokens kept separate from the base palette. */
    --header-bg: rgba(247, 247, 244, 0.92);
    --footer-bg: #101010;
    --footer-fg: #ffffff;

    /* Ambient background layers. */
    --sky-top: #fbfbf9;
    --sky-bottom: #f1f0ea;
    --glow: rgba(72, 191, 227, 0.12);
    --vignette: rgba(16, 16, 16, 0.05);
    --grid-dot: rgba(16, 16, 16, 0.1);
    --grid-line-strong: rgba(0, 0, 0, 0.035);
    --hero-panel-a: rgba(255, 255, 255, 0.86);
    --hero-panel-b: rgba(247, 247, 244, 0.68);
    --mote-border: rgba(16, 16, 16, 0.08);

    --tiktok: #ff0050;
    --steam: #171a21;
    --discord: #5865f2;
    --instagram: #e4405f;
    --youtube: #ff0000;
    --pixel-coral: #FF6B6B;
    --pixel-sky: #48BFE3;
    --pixel-mint: #72EFDD;
    --pixel-gold: #FFD166;
    --pixel-lavender: #9B5DE5;
    --pixel-leaf: #80ED99;

    --font-pixel: "PixelMix", monospace;
    --content: 1120px;
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    /* Global text-scale lever: shrinks the whole type scale to 75% (−25%).
       Every font-size in this sheet is in rem, so this only affects text —
       layout (all px) is untouched. Fluid clamp() vw coefficients are reduced
       to match; px body sizes below track it as rem. */
    font-size: 75%;
    font-synthesis: none;
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
}

body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    color: var(--ink);
    font-family: var(--font-pixel);
    font-size: 1.125rem;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(120% 78% at 50% -12%, var(--glow) 0%, transparent 58%),
        linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
    background-attachment: fixed;
}

/* Drifting pixel-dot grid — smooth translate loop (one tile) rather than a
   stepped background-position hop, so it reads as a calm parallax texture. */
body::before {
    content: "";
    position: fixed;
    inset: -8%;
    z-index: -3;
    pointer-events: none;
    background: radial-gradient(var(--grid-dot) 1.5px, transparent 1.6px);
    background-size: 26px 26px;
    opacity: 0.5;
    animation: grid-drift 60s linear infinite;
}

/* Soft vignette to focus the center and add depth. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(125% 95% at 50% 38%, transparent 52%, var(--vignette) 100%);
}

/* Sparse field of brand-colored pixels that gently float + twinkle. Placed
   toward the edges so they never sit behind body copy. */
.pixel-field {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.pixel-field span {
    position: absolute;
    width: var(--s, 14px);
    height: var(--s, 14px);
    background: var(--c, var(--pixel-sky));
    border: 2px solid var(--mote-border);
    opacity: 0;
    animation: mote-float var(--d, 13s) ease-in-out var(--delay, 0s) infinite;
    will-change: transform, opacity;
}

.pixel-field span:nth-child(1)  { top: 12%; left: 6%;  --c: var(--pixel-coral);    --s: 20px; --d: 14s; --delay: -1s;  --o: 0.22; }
.pixel-field span:nth-child(2)  { top: 24%; left: 92%; --c: var(--pixel-sky);      --s: 16px; --d: 16s; --delay: -4s;  --o: 0.2; }
.pixel-field span:nth-child(3)  { top: 68%; left: 4%;  --c: var(--pixel-gold);     --s: 14px; --d: 12s; --delay: -7s;  --o: 0.22; }
.pixel-field span:nth-child(4)  { top: 82%; left: 89%; --c: var(--pixel-lavender); --s: 24px; --d: 18s; --delay: -2s;  --o: 0.18; }
.pixel-field span:nth-child(5)  { top: 44%; left: 96%; --c: var(--pixel-mint);     --s: 12px; --d: 11s; --delay: -5s;  --o: 0.24; }
.pixel-field span:nth-child(6)  { top: 88%; left: 12%; --c: var(--pixel-leaf);     --s: 12px; --d: 15s; --delay: -9s;  --o: 0.2; }
.pixel-field span:nth-child(7)  { top: 6%;  left: 78%; --c: var(--pixel-gold);     --s: 10px; --d: 13s; --delay: -3s;  --o: 0.2; }
.pixel-field span:nth-child(8)  { top: 58%; left: 90%; --c: var(--pixel-coral);    --s: 12px; --d: 17s; --delay: -6s;  --o: 0.18; }
.pixel-field span:nth-child(9)  { top: 16%; left: 2%;  --c: var(--pixel-sky);      --s: 12px; --d: 12s; --delay: -8s;  --o: 0.2; }
.pixel-field span:nth-child(10) { top: 74%; left: 96%; --c: var(--pixel-gold);     --s: 14px; --d: 19s; --delay: -1.5s; --o: 0.18; }

a {
    color: inherit;
}

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

button {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--content));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    transform: translateY(-140%);
    padding: 10px 14px;
    border: 2px solid var(--white);
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    transition: transform 160ms var(--ease-out);
}

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

/* Shared visible focus ring for keyboard/switch users. Gold on the dark
   surfaces so it always contrasts. Bespoke .social-link focus is left alone. */
.button:focus-visible,
.button-link:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible,
.footer-links a:focus-visible,
.brand:focus-visible,
.faq-question:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.button:focus-visible,
.footer-links a:focus-visible {
    outline-color: var(--pixel-gold);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--soft-line);
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transition: box-shadow 180ms ease, border-color 180ms ease;
}

.nav {
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}

.brand {
    flex: 0 0 auto;
    font-size: 2.42rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transform: translateY(-2px);
    transition: transform 140ms var(--ease-out), text-shadow 140ms ease;
}

.brand:hover {
    transform: translateY(-4px);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.09);
}

/* Hamburger toggle — visible below 900px, hidden on desktop. */
.nav-toggle {
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid var(--ink);
    border-radius: 3px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--charcoal);
    transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}

.nav-toggle:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--charcoal);
}

.nav-toggle > span,
.nav-toggle > span::before,
.nav-toggle > span::after {
    position: absolute;
    left: 50%;
    width: 22px;
    height: 3px;
    background: currentColor;
    transition: transform 260ms var(--ease-out), opacity 160ms ease;
}

.nav-toggle > span {
    top: 50%;
    transform: translate(-50%, -50%);
}

.nav-toggle > span::before,
.nav-toggle > span::after {
    content: "";
    left: 0;
}

.nav-toggle > span::before {
    top: -7px;
}

.nav-toggle > span::after {
    top: 7px;
}

.site-header.is-nav-open .nav-toggle > span {
    background: transparent;
}

.site-header.is-nav-open .nav-toggle > span::before {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle > span::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav panel: a dropdown on mobile (links + full-width Steam CTA), a plain
   right-aligned row on desktop. */
.nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    visibility: hidden;
    display: grid;
    grid-template-rows: 0fr;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--soft-line);
    box-shadow: var(--shadow);
    transition: grid-template-rows 300ms var(--ease-out), visibility 0s 300ms;
}

.site-header.is-nav-open .nav-panel {
    visibility: visible;
    grid-template-rows: 1fr;
    transition: grid-template-rows 300ms var(--ease-out), visibility 0s 0s;
}

.nav-panel-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: min(100% - 32px, var(--content));
    margin-inline: auto;
    padding: 8px 0 18px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    color: var(--muted);
    font-weight: 700;
}

.nav-links a,
.footer-links a,
.button-link {
    text-decoration: none;
    transition: color 160ms ease, opacity 160ms ease;
}

.nav-links a {
    padding: 15px 6px;
    border-bottom: 1px solid var(--soft-line);
    font-size: 1.16rem;
}

.nav-panel .button-small {
    width: 100%;
    min-height: 54px;
    margin-top: 16px;
    font-size: 0.82rem;
    white-space: nowrap;
    transform: none;
}

.nav-links a:hover,
.footer-links a:hover,
.button-link:hover {
    color: var(--ink);
    opacity: 0.72;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 26px;
    border: 2px solid var(--ink);
    border-radius: 3px;
    background: var(--ink);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    box-shadow: 5px 5px 0 var(--charcoal);
    transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), background 120ms ease;
}

.button:hover {
    background: var(--charcoal);
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--ink);
}

.button:active {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--ink);
}

.button-small {
    min-height: 44px;
    padding-inline: 18px;
    font-size: 0.76rem;
    white-space: nowrap;
    box-shadow: 4px 4px 0 var(--charcoal);
}

.button-link {
    display: inline-flex;
    align-items: center;
    min-height: 58px;
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
    transition: color 120ms ease, transform 120ms var(--ease-out), text-decoration-thickness 120ms ease;
}

.button-link:hover {
    transform: translateY(-2px);
    text-decoration-thickness: 4px;
}

/* Outlined pixel button — a white card with a neutral gray hard shadow, so it
   reads as secondary (grayscale) next to the solid dark CTA it sits beside (the
   Changelog nav link). Placed after .button/.button-small so it wins the
   shared props. */
.button-ghost {
    background: var(--white);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--muted);
}

.button-ghost:hover {
    background: var(--white);
    color: var(--ink);
    box-shadow: 7px 7px 0 var(--muted);
}

.button-ghost:active {
    box-shadow: 1px 1px 0 var(--muted);
}

/* A button:true nav item lives inside .nav-links, so reset the plain-link
   padding/border/size it would otherwise inherit there. */
.nav-links a.button {
    padding: 0 20px;
    border-bottom: 0;
    font-size: 0.82rem;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 78svh;
    display: grid;
    align-items: center;
    padding: 104px 0 94px;
    border-bottom: 1px solid var(--soft-line);
    background:
        linear-gradient(90deg, var(--grid-line-strong) 2px, transparent 2px),
        linear-gradient(180deg, var(--grid-line-strong) 2px, transparent 2px),
        radial-gradient(var(--grid-dot) 1px, transparent 1.5px);
    background-size: 128px 128px, 128px 128px, 18px 18px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, transparent 0 14%, var(--hero-panel-a) 14% 86%, transparent 86% 100%),
        var(--hero-panel-b);
}

.hero-inner {
    position: relative;
    isolation: isolate;
    min-width: 0;
    max-width: 1040px;
    text-align: center;
    z-index: 1;
}

.hero-inner::before,
.hero-inner::after {
    content: "";
    position: absolute;
    width: 52px;
    height: 52px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.hero-inner::before {
    left: max(16px, calc(50% - 560px));
    top: 18%;
    background: var(--pixel-sky);
    box-shadow: 24px 24px 0 var(--pixel-coral), 48px 0 0 var(--pixel-gold);
}

.hero-inner::after {
    right: max(16px, calc(50% - 560px));
    bottom: 14%;
    background: var(--pixel-lavender);
    box-shadow: -24px -24px 0 var(--pixel-mint), -48px 0 0 var(--pixel-leaf);
}

.section-label {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: 0;
}

h1 {
    max-width: 1100px;
    margin: 0 auto;
    /* Lines are white-space:nowrap; the longest ("Draw your character.") is
       ~14.4em, so 6.2vw (capped) keeps every line inside the container from
       ~320px up to desktop without overflow. */
    font-size: clamp(1.5rem, 4.65vw, 4.4rem);
    font-weight: 700;
    line-height: 1.02;
    text-shadow: 4px 4px 0 var(--shadow-color);
}

h1 span {
    display: block;
    white-space: nowrap;
}

h2 {
    font-size: 3.4rem;
    font-weight: 700;
}

.hero-copy {
    max-width: 680px;
    margin: 28px auto 0;
    color: var(--muted);
    font-size: 1.16rem;
    line-height: 1.7;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.hero-tags li {
    padding: 8px 14px 7px;
    border: 2px solid var(--ink);
    background: var(--white);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 var(--shadow-color);
}

.pixel-world {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.pixel-room,
.pixel-door,
.pixel-avatar {
    position: absolute;
    display: block;
    image-rendering: pixelated;
    /* Depth parallax: pointer (--px/--py) + scroll (--sy) set on .hero by JS.
       Layers move opposite the cursor and lag on scroll, scaled by per-layer
       --depth/--depth-s. Uses transform so the existing translate:/animation
       float composes underneath without conflict. */
    transform:
        translate3d(
            calc(0px - var(--px, 0) * var(--depth, 0px)),
            calc(var(--sy, 0px) * var(--depth-s, 0) - var(--py, 0) * var(--depth, 0px)),
            0
        )
        rotate(var(--rot, 0deg));
}

.pixel-room {
    --depth: 5px;
    --depth-s: 0.18;
    width: 176px;
    height: 128px;
    border: 3px solid rgba(16, 16, 16, 0.22);
    background:
        linear-gradient(90deg, rgba(16, 16, 16, 0.12) 2px, transparent 2px),
        linear-gradient(180deg, rgba(16, 16, 16, 0.12) 2px, transparent 2px),
        rgba(255, 255, 255, 0.34);
    background-size: 22px 22px;
    opacity: 0.6;
    animation: room-float 9s ease-in-out infinite;
}

.pixel-room::before,
.pixel-room::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--pixel-gold);
    box-shadow: 22px 0 0 var(--pixel-coral), 44px 0 0 var(--pixel-sky);
}

.pixel-room::before {
    left: 18px;
    top: 18px;
}

.pixel-room::after {
    right: 18px;
    bottom: 18px;
    background: var(--pixel-mint);
    box-shadow: -22px 0 0 var(--pixel-lavender), -44px 0 0 var(--pixel-leaf);
}

.room-one {
    --rot: -2deg;
    left: 5%;
    top: 19%;
}

.room-two {
    --rot: 2deg;
    right: 4%;
    top: 27%;
    animation-delay: -3s;
}

.room-three {
    --rot: 1deg;
    left: 38%;
    bottom: 4%;
    animation-delay: -5s;
}

.pixel-door {
    --depth: 12px;
    --depth-s: 0.42;
    width: 28px;
    height: 46px;
    border: 3px solid rgba(16, 16, 16, 0.28);
    background: var(--pixel-lavender);
    opacity: 0.5;
    animation: door-glow 6s ease-in-out infinite;
}

.door-one {
    left: 16%;
    top: 58%;
}

.door-two {
    right: 18%;
    bottom: 23%;
    background: var(--pixel-mint);
    animation-delay: -3s;
}

.pixel-avatar {
    --depth: 20px;
    --depth-s: 0.8;
    width: 20px;
    height: 20px;
    background: var(--pixel-coral);
    box-shadow:
        0 20px 0 var(--pixel-coral),
        20px 20px 0 var(--pixel-sky),
        -20px 20px 0 var(--pixel-gold),
        0 40px 0 var(--ink);
    opacity: 0.55;
    animation: avatar-bob 3.6s ease-in-out infinite;
}

.avatar-one {
    left: 27%;
    bottom: 24%;
}

.avatar-two {
    right: 27%;
    top: 21%;
    background: var(--pixel-leaf);
    box-shadow:
        0 20px 0 var(--pixel-leaf),
        20px 20px 0 var(--pixel-lavender),
        -20px 20px 0 var(--pixel-mint),
        0 40px 0 var(--ink);
    animation-delay: -1.4s;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 28px;
    margin-top: 28px;
}

.about-section,
.social-section,
.faq-section {
    padding: 100px 0;
}

.about-section {
    border-bottom: 1px solid var(--soft-line);
    scroll-margin-top: -100px;
}

.about-heading {
    max-width: 960px;
    margin-top: 18px;
    font-size: clamp(2.2rem, 3.45vw, 3.75rem);
    line-height: 1.08;
    text-wrap: balance;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 52px;
}

.feature-card {
    position: relative;
    /* Floor only — cards equalize to their tallest sibling via grid stretch.
       Sized to the 75% type scale so short cards don't leave dead space. */
    min-height: 210px;
    padding: 24px 22px 26px;
    border: 2px solid var(--ink);
    background: var(--white);
    box-shadow: 7px 7px 0 var(--charcoal);
    transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

/* Press feedback on touch (base, ungated) mirrors the button/social language. */
.feature-card:active {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--charcoal);
}

@media (hover: hover) and (pointer: fine) {
    .feature-card:hover {
        transform: translate(-3px, -3px);
        box-shadow: 10px 10px 0 var(--charcoal);
    }

    .feature-card:hover .feature-pixel {
        animation: pixel-wake 240ms var(--ease-out) 1;
    }
}

.feature-pixel {
    display: block;
    width: 26px;
    height: 26px;
    margin-bottom: 18px;
    border: 2px solid var(--ink);
}

.feature-pixel-coral {
    background: var(--pixel-coral);
}

.feature-pixel-sky {
    background: var(--pixel-sky);
}

.feature-pixel-mint {
    background: var(--pixel-mint);
}

.feature-pixel-lavender {
    background: var(--pixel-lavender);
}

.feature-card h3 {
    font-size: 1.72rem;
    line-height: 1.2;
}

.feature-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

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

.social-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.social-link {
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    border: 2px solid var(--ink);
    background: var(--white);
    color: var(--brand-color, var(--ink));
    text-decoration: none;
    transition: border-color 120ms ease, color 120ms ease, background 120ms ease, transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}

.social-list li:nth-child(1) .social-link {
    --brand-color: var(--tiktok);
}

.social-list li:nth-child(2) .social-link {
    --brand-color: var(--steam);
}

.social-list li:nth-child(3) .social-link {
    --brand-color: var(--discord);
}

.social-list li:nth-child(4) .social-link {
    --brand-color: var(--instagram);
}

.social-list li:nth-child(5) .social-link {
    --brand-color: var(--youtube);
}

.social-link:hover,
.social-link:focus-visible {
    border-color: var(--brand-color, var(--ink));
    background: var(--white);
    color: var(--brand-color, var(--ink));
    transform: translate(-5px, -5px);
    box-shadow: 10px 10px 0 var(--brand-color, var(--charcoal));
    outline: none;
}

.social-link:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 var(--brand-color, var(--charcoal));
}

.social-link .social-icon {
    display: block;
    width: 66px;
    height: 66px;
    overflow: visible;
    transition: transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .social-link:hover .social-icon,
    .social-link:focus-visible .social-icon {
        transform: scale(1.08);
    }
}

.faq-section {
    border-top: 1px solid var(--soft-line);
    scroll-margin-top: -100px;
}

.faq-container {
    max-width: 900px;
    text-align: center;
}

.faq-title {
    font-size: clamp(3.2rem, 5.25vw, 5rem);
}

.faq-list {
    margin-top: 30px;
    border-top: 2px solid var(--ink);
    text-align: left;
}

.faq-item {
    border-bottom: 2px solid var(--ink);
}

.faq-question {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 26px 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    font-size: 1.38rem;
    font-weight: 700;
}

.faq-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--ink);
    color: var(--ink);
    font-size: 0;
    font-weight: 700;
    line-height: 1;
    transition: transform 200ms var(--ease-out), background 160ms ease, color 160ms ease;
}

.faq-toggle::before,
.faq-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 4px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform 220ms var(--ease-out);
}

.faq-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-question:hover .faq-toggle {
    transform: rotate(90deg);
}

@keyframes grid-drift {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(26px, 26px, 0);
    }
}

@keyframes mote-float {
    0%,
    100% {
        transform: translateY(0);
        opacity: var(--o, 0.2);
    }
    50% {
        transform: translateY(-16px);
        opacity: calc(var(--o, 0.2) * 1.7);
    }
}

@keyframes room-float {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -9px;
    }
}

@keyframes door-glow {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.62;
    }
}

@keyframes avatar-bob {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -12px;
    }
}

/* One-shot "wake up" nudge for a feature card's pixel chip on hover. */
@keyframes pixel-wake {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(0, -3px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* A feature card arrives flat, then its hard shadow snaps in a beat later. */
@keyframes card-land {
    0% {
        box-shadow: 0 0 0 var(--charcoal);
    }
    100% {
        box-shadow: 7px 7px 0 var(--charcoal);
    }
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 240ms var(--ease-out);
}

.faq-answer > div {
    overflow: hidden;
}

.faq-answer p {
    margin: 0;
    padding: 0 60px 26px 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0;
    translate: 0 6px;
    transition: opacity 220ms ease, translate 220ms var(--ease-out);
}

.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-item.is-open .faq-answer p {
    opacity: 1;
    translate: 0 0;
    transition-delay: 120ms;
}

.faq-item.is-open .faq-toggle {
    background: var(--ink);
    color: var(--white);
}

.faq-item.is-open .faq-toggle::after {
    transform: translate(-50%, -50%) scaleX(0);
}

.site-footer {
    position: relative;
    padding: 42px 0 max(48px, calc(env(safe-area-inset-bottom) + 24px));
    border-top: 2px solid var(--ink);
    background: var(--footer-bg);
    color: var(--footer-fg);
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 6px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 8px;
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
}

.footer-version {
    position: absolute;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    line-height: 1;
}

/* ------------------------------------------------------------------ *
 * Loading screen. Shown only while scripting is on AND boot.js has set
 * html.is-loading; hidden by default so no-JS visitors never see it.
 * ------------------------------------------------------------------ */
.page-loader {
    display: none;
}

@media (scripting: enabled) {
    html.is-loading {
        overflow: hidden;
    }

    html.is-loading .page-loader,
    html.is-loaded .page-loader {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 2000;
        align-items: center;
        justify-content: center;
        background:
            radial-gradient(120% 78% at 50% -12%, var(--glow) 0%, transparent 58%),
            linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
    }

    html.is-loaded .page-loader {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 520ms ease, visibility 0s 520ms;
    }

    /* Hold the hero intro until the loader clears, then let JS reveal it. */
    html.is-loading .hero-inner.reveal {
        opacity: 0;
    }
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.loader-word {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--ink);
    text-shadow: 4px 4px 0 var(--shadow-color);
    animation: loader-pulse 1.6s ease-in-out infinite;
}

.loader-bar {
    position: relative;
    width: 180px;
    height: 14px;
    border: 2px solid var(--ink);
    background: var(--white);
    overflow: hidden;
}

.loader-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 42%;
    background: var(--pixel-sky);
    animation: loader-slide 1.1s ease-in-out infinite;
}

@keyframes loader-slide {
    0% {
        transform: translateX(-130%);
    }
    100% {
        transform: translateX(340%);
    }
}

@keyframes loader-pulse {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Default: everything visible. Hidden/animated states live inside the
   scripting + motion query below, so no-JS and reduced-motion visitors always
   see the full page with zero motion and no layout shift. */
.reveal {
    opacity: 1;
}

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    /* Section blocks fade in as they enter (the hero block is revealed by JS
       once the loader clears, so its headline + child stagger carry the intro). */
    .reveal:not(.hero-inner) {
        opacity: 0;
        transition: opacity 560ms ease;
    }

    .reveal.is-visible:not(.hero-inner) {
        opacity: 1;
    }

    /* Level-stream: each child rises + fades on a tight stagger (--i set by JS).
       Movement uses translate: so transform: stays free for hover/parallax. */
    .reveal .feature-card,
    .reveal .social-list > li,
    .reveal .faq-item,
    .hero-inner.reveal .hero-copy,
    .hero-inner.reveal .hero-tags,
    .hero-inner.reveal .hero-actions {
        opacity: 0;
        translate: 0 16px;
        transition: opacity 420ms ease, translate 420ms var(--ease-out);
        transition-delay: calc(var(--i, 0) * 70ms);
    }

    .reveal.is-visible .feature-card,
    .reveal.is-visible .social-list > li,
    .reveal.is-visible .faq-item,
    .hero-inner.reveal.is-visible .hero-copy,
    .hero-inner.reveal.is-visible .hero-tags,
    .hero-inner.reveal.is-visible .hero-actions {
        opacity: 1;
        translate: 0 0;
    }

    /* The feature card's hard shadow "lands" a beat after the card arrives. */
    .reveal.is-visible .feature-card {
        animation: card-land 320ms var(--ease-out) calc(var(--i, 0) * 70ms + 240ms) 1 backwards;
    }

    /* Keep parallax + mote layers on their own compositor layer. */
    .pixel-room,
    .pixel-door,
    .pixel-avatar {
        will-change: transform;
    }

    /* Stop the hero's ambient float/bob loops while the pixel world is
       off-screen (toggled by JS). Keeps the page calm and cheap once scrolled. */
    .pixel-world.is-paused .pixel-room,
    .pixel-world.is-paused .pixel-door,
    .pixel-world.is-paused .pixel-avatar {
        animation-play-state: paused;
    }
}

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

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

    .pixel-field span {
        opacity: var(--o, 0.2);
    }
}

@media (min-width: 580px) {
    .container {
        width: min(100% - 48px, var(--content));
    }

    h2 {
        font-size: 3.5rem;
    }

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

    /* Go two-up as soon as there's room, so cards are never stranded full-width
       (which left them looking empty at the smaller type scale). */
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 760px) {
    h2 {
        font-size: 3.75rem;
    }

    .hero {
        padding: 100px 0 88px;
    }
}

/* Desktop nav: hide the hamburger, lay the panel out as a static right-aligned
   row (links + compact Steam CTA). */
@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .nav-panel {
        position: static;
        visibility: visible;
        display: block;
        background: none;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        transition: none;
    }

    .nav-panel-inner {
        overflow: visible;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .nav-links {
        flex-direction: row;
        align-items: center;
        gap: 30px;
        font-size: 1.42rem;
    }

    .nav-links a {
        padding: 0;
        border-bottom: 0;
        font-size: 1.42rem;
    }

    .nav-panel .button-small {
        width: auto;
        min-height: 44px;
        margin-top: 0;
        font-size: 0.76rem;
    }
}

@media (min-width: 1080px) {
    .brand {
        font-size: 2.58rem;
    }

    h2 {
        font-size: 4.15rem;
    }

    .hero {
        min-height: 80svh;
        padding: 82px 0 76px;
    }

    .about-section,
    .social-section,
    .faq-section {
        padding: 116px 0;
    }

    .feature-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 899px) {
    /* A few motes get busy on narrow screens — thin them out. */
    .pixel-field span:nth-child(n + 6) {
        display: none;
    }
}

@media (max-width: 579px) {
    html {
        scroll-padding-top: 86px;
    }

    body {
        overflow-x: clip;
        font-size: 1.0625rem;
    }

    .container {
        width: min(100% - 24px, var(--content));
    }

    .nav {
        min-height: 70px;
        gap: 10px;
    }

    .brand {
        font-size: 1.6rem;
    }

    .nav-panel-inner {
        width: min(100% - 24px, var(--content));
    }

    .hero {
        min-height: auto;
        padding: 78px 0 74px;
    }

    h1 {
        max-width: 360px;
        /* Longest line ("Draw your character.") is ~14.4em; 6vw keeps it inside
           the container from ~300px up while reading noticeably bigger than the
           old 4.5vw. */
        font-size: clamp(1.5rem, 6vw, 2.1rem);
        line-height: 1.12;
        text-shadow: 3px 3px 0 var(--shadow-color);
    }

    h2 {
        font-size: 2.34rem;
    }

    .hero-copy {
        max-width: 420px;
        margin-top: 26px;
        font-size: 1.02rem;
        line-height: 1.72;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions {
        gap: 14px;
    }

    .hero-actions .button,
    .hero-actions .button-link {
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
    }

    /* Slimmer solid CTA on mobile — the old 58px tall, heavy-shadowed block
       overpowered the hero. */
    .hero-actions .button {
        min-height: 48px;
        box-shadow: 4px 4px 0 var(--charcoal);
    }

    .hero-actions .button:active {
        box-shadow: 1px 1px 0 var(--ink);
    }

    .hero-actions .button-link {
        min-height: 40px;
        justify-content: center;
    }

    .about-section,
    .social-section,
    .faq-section {
        padding: 72px 0;
        content-visibility: auto;
        contain-intrinsic-size: 1px 620px;
    }

    .faq-section {
        scroll-margin-top: -70px;
    }

    .about-heading {
        font-size: 1.98rem;
        line-height: 1.16;
    }

    .about-section {
        scroll-margin-top: -70px;
    }

    .feature-grid {
        margin-top: 38px;
    }

    .feature-card {
        min-height: 0;
    }

    .section-label {
        font-size: 0.86rem;
    }

    .social-list {
        gap: 12px;
    }

    .social-link {
        width: 96px;
        height: 96px;
    }

    .pixel-world {
        opacity: 0.6;
    }

    .pixel-room {
        width: 118px;
        height: 88px;
    }

    .room-one {
        left: -16%;
        top: 17%;
    }

    .room-two {
        right: -20%;
        top: 34%;
    }

    .room-three,
    .door-one,
    .door-two,
    .avatar-two {
        display: none;
    }

    .social-link .social-icon {
        width: 54px;
        height: 54px;
    }

    .faq-question {
        font-size: 1.08rem;
        line-height: 1.5;
    }

    .faq-answer p {
        padding-right: 0;
        font-size: 1.02rem;
    }

    .loader-word {
        font-size: 2.1rem;
    }

    .footer-version {
        left: max(12px, env(safe-area-inset-left));
        bottom: max(12px, env(safe-area-inset-bottom));
        font-size: 0.62rem;
    }
}

/* ------------------------------------------------------------------ *
 * Changelog page (changelog/index.html). Reuses the shell/background/loader;
 * lays each version out as a timeline entry with a colored pixel badge.
 * ------------------------------------------------------------------ */
.page-head {
    padding: 128px 0 36px;
    text-align: center;
}

.page-title {
    font-size: clamp(2.6rem, 8.25vw, 5rem);
    text-shadow: 4px 4px 0 var(--shadow-color);
}

.page-lead {
    max-width: 560px;
    margin: 20px auto 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.changelog-section {
    padding: 20px 0 96px;
}

.changelog-container {
    max-width: 840px;
}

.changelog-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.changelog-entry {
    position: relative;
    padding-bottom: 40px;
}

.changelog-entry:last-child {
    padding-bottom: 0;
}

.changelog-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px 8px;
    border: 2px solid var(--ink);
    background: var(--white);
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 var(--badge-accent, var(--charcoal));
}

.changelog-entry:nth-child(6n + 1) { --badge-accent: var(--pixel-coral); }
.changelog-entry:nth-child(6n + 2) { --badge-accent: var(--pixel-sky); }
.changelog-entry:nth-child(6n + 3) { --badge-accent: var(--pixel-mint); }
.changelog-entry:nth-child(6n + 4) { --badge-accent: var(--pixel-gold); }
.changelog-entry:nth-child(6n + 5) { --badge-accent: var(--pixel-lavender); }
.changelog-entry:nth-child(6n + 6) { --badge-accent: var(--pixel-leaf); }

.changelog-date {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.changelog-body {
    margin-top: 20px;
    border-left: 3px solid var(--badge-accent, var(--soft-line));
    padding-left: 22px;
}

.changelog-body > :first-child {
    margin-top: 0;
}

.changelog-body h3 {
    font-size: 1.28rem;
    margin: 22px 0 8px;
}

.changelog-body h4 {
    font-size: 1.04rem;
    margin: 16px 0 6px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.changelog-body h5 {
    margin: 14px 0 6px;
    font-size: 0.94rem;
}

.changelog-body p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.66;
}

.changelog-body ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.changelog-body li {
    position: relative;
    margin: 8px 0;
    padding-left: 24px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.changelog-body li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.6em;
    width: 9px;
    height: 9px;
    background: var(--badge-accent, var(--ink));
    border: 2px solid var(--ink);
}

.changelog-body code {
    padding: 1px 6px;
    border: 1px solid var(--soft-line);
    background: var(--white);
    font-size: 0.86em;
}

.changelog-body a {
    color: var(--ink);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.changelog-body hr {
    margin: 22px 0;
    border: 0;
    border-top: 2px dashed var(--soft-line);
}

.changelog-empty {
    color: var(--muted);
    text-align: center;
}

/* Entries are visible by default and animate in via a pure-CSS keyframe (fill
   backwards), so they can never get stuck hidden and need no scroll/JS reveal.
   JS only sets --i for the stagger. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    .changelog-entry {
        animation: changelog-entry-in 520ms var(--ease-out) backwards;
        animation-delay: calc(var(--i, 0) * 80ms);
    }
}

@keyframes changelog-entry-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 720px) {
    .changelog-entry {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 30px;
        align-items: start;
    }

    .changelog-meta {
        position: sticky;
        top: 104px;
        text-align: right;
    }

    .changelog-body {
        margin-top: 4px;
    }
}

@media (max-width: 579px) {
    .page-head {
        padding: 104px 0 24px;
    }

    .page-title {
        font-size: clamp(2.2rem, 11.25vw, 3rem);
    }

    .changelog-section {
        padding: 12px 0 72px;
    }
}

/* The site is intentionally light-only; there is no dark-mode variant. */
