/* ==========================================================================
   Prestige Marmot
   Night sky, burrow browns and a crown of gold. Pixel details used sparingly:
   the display type, the buttons, the mascot and the ground line.
   ========================================================================== */

@font-face {
    font-family: "Pixelify Sans";
    src: url("../fonts/pixelify-sans-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Pixelify Sans";
    src: url("../fonts/pixelify-sans-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk-var.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --night:    #120f1f;
    --night-2:  #18142a;
    --night-3:  #231d3b;
    --line:     #2e2750;
    --line-2:   #3f3669;
    --cream:    #f6ead2;
    --text:     #ddd3c2;
    --muted:    #9c93b6;
    --gold:     #f2c14e;
    --gold-2:   #a86f20;
    --accent:   var(--gold);

    --px: 4px;
    --wrap: 1120px;
    --font-pixel: "Pixelify Sans", ui-monospace, monospace;
    --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }

h1, h2, h3 {
    color: var(--cream);
    margin: 0 0 .5em;
    line-height: 1.15;
}
h1, h2 { font-family: var(--font-pixel); font-weight: 700; letter-spacing: .005em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 1em; }

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

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.gold  { color: var(--gold); }

.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: absolute; left: 16px; top: -100px; z-index: 100;
    background: var(--gold); color: var(--night); padding: 8px 14px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.icon { width: 1em; height: 1em; flex: none; shape-rendering: crispEdges; vertical-align: -.12em; }

/* --- Buttons and links ----------------------------------------------------- */
.btn {
    --fill: var(--gold);
    --edge: var(--gold-2);
    --ink: var(--night);
    display: inline-flex;
    align-items: center;
    gap: .55em;
    padding: .7em 1.2em .75em;
    background: var(--fill);
    color: var(--ink);
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    box-shadow: inset 0 calc(var(--px) * -1) 0 var(--edge);
    clip-path: polygon(
        0 var(--px), var(--px) var(--px), var(--px) 0,
        calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
        100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
        var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px))
    );
}
.btn:hover { color: var(--ink); filter: brightness(1.07); }
.btn:active { box-shadow: none; transform: translateY(2px); }
.btn--accent { --fill: var(--accent); --edge: color-mix(in srgb, var(--accent) 55%, #000); }
.btn--small { font-size: .9rem; padding: .5em .9em .55em; }

.text-link {
    font-family: var(--font-pixel);
    font-size: 1rem;
    color: var(--cream);
    text-decoration: none;
    border-bottom: 2px solid var(--line-2);
    padding-bottom: 1px;
}
.text-link:hover { color: var(--accent); border-color: currentColor; }

/* --- Header ---------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgb(18 15 31 / .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand__mark { width: 36px; height: 45px; image-rendering: pixelated; margin-top: -4px; }
.brand__name {
    font-family: var(--font-pixel); font-weight: 700; font-size: 1.15rem; line-height: 1;
    display: flex; flex-direction: column; gap: 2px; text-transform: uppercase; letter-spacing: .06em;
}
.brand__name span { color: var(--gold); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    font-family: var(--font-pixel); font-size: 1rem; color: var(--text);
    text-decoration: none; padding: 6px 12px; display: inline-flex; align-items: center; gap: .45em;
}
.site-nav a:hover { color: var(--cream); }
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav__contact { margin-left: 8px; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
    .nav-toggle {
        display: grid; place-items: center; width: 44px; height: 44px;
        background: transparent; border: 1px solid var(--line-2); cursor: pointer;
    }
    .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
        display: block; width: 18px; height: 2px; background: var(--cream); position: relative; content: "";
    }
    .nav-toggle__bars::before { position: absolute; top: -6px; }
    .nav-toggle__bars::after  { position: absolute; top: 6px; }
    .site-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--night-2); border-bottom: 1px solid var(--line);
        padding: 8px 16px 16px; display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
    .site-nav a:last-child { border-bottom: 0; }
    .site-nav__contact { margin-left: 0; }
}

/* --- Night sky and ground -------------------------------------------------- */
.stars {
    position: absolute; inset: 0; pointer-events: none; opacity: .55;
    background-image:
        linear-gradient(var(--cream), var(--cream)),
        linear-gradient(var(--muted), var(--muted)),
        linear-gradient(var(--cream), var(--cream)),
        linear-gradient(#fff0a0, #fff0a0),
        linear-gradient(var(--muted), var(--muted));
    background-size: 2px 2px;
    background-repeat: no-repeat;
    background-position: 8% 22%, 31% 64%, 47% 12%, 63% 38%, 92% 18%;
}
.stars::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--muted), var(--muted)),
        linear-gradient(var(--cream), var(--cream)),
        linear-gradient(var(--muted), var(--muted)),
        linear-gradient(var(--cream), var(--cream));
    background-size: 2px 2px;
    background-repeat: no-repeat;
    background-position: 18% 82%, 74% 72%, 85% 52%, 39% 34%;
}

.ground {
    height: 20px;
    background:
        linear-gradient(90deg,
            #3f7d3a 0 8px, #4d9145 8px 20px, #3f7d3a 20px 28px, #356b32 28px 40px) 0 0 / 40px 4px repeat-x,
        linear-gradient(90deg,
            #4d9145 0 4px, transparent 4px 24px, #3f7d3a 24px 28px, transparent 28px 40px) 0 4px / 40px 4px repeat-x,
        linear-gradient(90deg,
            #5a3a26 0 12px, #4c3020 12px 28px, #5a3a26 28px 40px) 0 8px / 40px 4px repeat-x,
        #3d281b;
}

/* --- Home: hero ------------------------------------------------------------ */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, #0f0c1b 0%, #1b1533 100%);
}
.hero__inner {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: end; gap: 48px;
    padding-top: clamp(56px, 9vw, 120px);
}
.hero__copy { padding-bottom: clamp(56px, 8vw, 104px); }
.hero__title { font-size: clamp(2.6rem, 6.2vw, 4.6rem); margin-bottom: .4em; }
.hero__title span { white-space: nowrap; }
.hero__lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); max-width: 40ch; color: var(--text); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 1.8em; }

.hero__mascot {
    width: clamp(200px, 26vw, 288px);
    image-rendering: pixelated;
    margin-bottom: -4px;           /* rock sits on the grass line */
}

@media (max-width: 760px) {
    .hero__inner { grid-template-columns: 1fr; gap: 0; }
    .hero__copy { padding-bottom: 32px; }
    .hero__mascot { width: 168px; justify-self: end; margin-right: 8px; }
}

/* --- Home: featured game --------------------------------------------------- */
.featured { padding: clamp(64px, 9vw, 112px) 0; border-bottom: 1px solid var(--line); }
.featured__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.featured__media img { width: 100%; box-shadow: 0 0 0 1px var(--line-2), 0 24px 48px -24px rgb(0 0 0 / .8); }
.featured__title { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: .2em; }
.featured__title a { color: inherit; text-decoration: none; }
.featured__title a:hover { color: var(--accent); }
.featured__tagline { font-family: var(--font-pixel); color: var(--accent); font-size: 1.2rem; margin-bottom: 1.2em; }
@media (max-width: 860px) { .featured__inner { grid-template-columns: 1fr; } }

.meta { font-size: .9rem; color: var(--muted); margin-bottom: .9em; }
.status { color: var(--accent); font-weight: 600; }
.status::before {
    content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
    background: currentColor; vertical-align: 1px;
}

/* --- Generic sections ------------------------------------------------------ */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--alt { background: var(--night-2); border-block: 1px solid var(--line); }
.section--rule { border-top: 1px solid var(--line); }
.section__title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: .8em; }
.section__intro { color: var(--muted); max-width: 60ch; margin-top: -.4em; margin-bottom: 32px; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px clamp(32px, 6vw, 96px); }
.about__intro { font-size: 1.3rem; line-height: 1.5; color: var(--cream); }
.about__body p:last-child { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(32px, 6vw, 96px); }
.columns > div + div { border-left: 1px solid var(--line); padding-left: clamp(32px, 6vw, 96px); margin-left: calc(clamp(32px, 6vw, 96px) * -1); }
.columns p { max-width: 46ch; }
.links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 1.4em; }
@media (max-width: 760px) {
    .columns { grid-template-columns: 1fr; }
    .columns > div + div { border-left: 0; padding-left: 0; margin-left: 0; border-top: 1px solid var(--line); padding-top: 40px; }
}

/* --- Sub-page header ------------------------------------------------------- */
.page-head {
    position: relative; overflow: hidden;
    padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 56px);
    background: linear-gradient(180deg, #0f0c1b, var(--night));
    border-bottom: 1px solid var(--line);
}
.page-head .wrap { position: relative; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin: 0; }
.page-head--game { isolation: isolate; }
.page-head--game::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--bg) center / cover; opacity: .22;
}
.page-head--game::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgb(18 15 31 / .5), var(--night));
}
.crumb { font-size: .9rem; margin-bottom: 1.2em; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--cream); }

/* --- Game cards ------------------------------------------------------------ */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 40px 32px; }
.game-card { display: flex; flex-direction: column; gap: 4px; }
.game-card__media { display: block; aspect-ratio: 460 / 215; overflow: hidden; margin-bottom: 16px; box-shadow: 0 0 0 1px var(--line-2); }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.game-card:hover .game-card__media img { transform: scale(1.03); }
.game-card__title { font-family: var(--font-pixel); font-size: 1.5rem; margin: 0; }
.game-card__title a { color: var(--cream); text-decoration: none; }
.game-card__title a:hover { color: var(--accent); }
.game-card__tagline { color: var(--muted); margin: 0 0 8px; }
.game-card__links { display: flex; gap: 20px; margin-top: 6px; }

/* --- Game page ------------------------------------------------------------- */
.game-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: clamp(48px, 7vw, 96px) 0;
    border-bottom: 1px solid var(--line);
}
.game-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: var(--bg) center / cover no-repeat;
}
.game-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgb(18 15 31 / .97) 25%, rgb(18 15 31 / .8) 60%, rgb(18 15 31 / .65));
}
.game-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 56px); align-items: center; }
.game-hero__title { font-size: clamp(2.5rem, 5.5vw, 4.2rem); margin-bottom: .15em; }
.game-hero__logo img { max-width: 420px; }
.game-hero__tagline { font-family: var(--font-pixel); color: var(--accent); font-size: 1.35rem; }
.game-hero__summary { max-width: 50ch; }
.game-hero__dev { margin: 1.8em 0 0; font-size: .9rem; color: var(--muted); }
.game-hero__dev strong { color: var(--cream); font-weight: 600; }
@media (max-width: 900px) { .game-hero__inner { grid-template-columns: 1fr; } }

.trailer { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.trailer img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer__play {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: none; border: 0; cursor: pointer; color: var(--cream);
    font-family: var(--font-pixel); font-size: 1.1rem;
}
.trailer__play .icon { width: 64px; height: 64px; padding: 16px; color: var(--night); background: var(--accent); }
.trailer__play:hover .icon { filter: brightness(1.1); }
.trailer__note { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--muted); margin: 0; }
.trailer__soon {
    position: absolute; left: 16px; bottom: 14px; margin: 0;
    font-family: var(--font-pixel); font-size: .95rem; color: var(--cream);
    background: rgb(18 15 31 / .85); padding: 4px 10px;
}

.game-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .game-layout { grid-template-columns: 1fr; } }

.prose { max-width: 66ch; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; margin-bottom: .35em; }
.prose blockquote { margin: 1.2em 0; padding-left: 18px; border-left: 2px solid var(--accent); color: var(--cream); }
.prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.game-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.aside-title { font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 24px 0 0; }
.aside-title:first-child { margin-top: 0; }
@media (max-width: 900px) { .game-aside { position: static; } }

.factsheet { margin: 0; border-top: 1px solid var(--line); }
.factsheet div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.factsheet dt { color: var(--muted); font-size: .9rem; }
.factsheet dd { margin: 0; font-size: .95rem; color: var(--cream); overflow-wrap: anywhere; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 24px; margin-bottom: .5em; }
.checklist li::before {
    content: ""; position: absolute; left: 2px; top: .62em;
    width: 8px; height: 8px; background: var(--accent);
}

.downloads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.downloads a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--cream);
}
.downloads a:hover { color: var(--accent); }
.downloads small { margin-left: auto; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 8px; font-size: .85rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.gallery figcaption a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.gallery__item { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--night-3); box-shadow: 0 0 0 1px var(--line-2); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery--press .gallery__item img { object-fit: contain; }

.lightbox {
    border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgb(10 8 18 / .92); }
.lightbox img { max-height: 88vh; width: auto; }
.lightbox__close {
    position: absolute; top: -44px; right: 0; width: 36px; height: 36px;
    background: transparent; color: var(--cream); border: 1px solid var(--line-2); cursor: pointer;
    font-size: 1.4rem; line-height: 1;
}

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; }
.quote { margin: 0; }
.quote blockquote { margin: 0 0 12px; font-size: 1.2rem; line-height: 1.5; color: var(--cream); }
.quote figcaption { color: var(--accent); font-size: .9rem; }

.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: .2em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { margin: 0; }

/* --- Press ----------------------------------------------------------------- */
.press-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.press-list li { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); }
.press-list img { width: 160px; box-shadow: 0 0 0 1px var(--line-2); }
.press-list h3 { margin: 0; font-family: var(--font-pixel); font-size: 1.35rem; }
.press-list p { margin: 0; }
.press-list .text-link { margin-left: auto; }

.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.logo-grid figure { margin: 0; }
.logo-grid__preview {
    aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 28px;
    background: var(--night-2); box-shadow: 0 0 0 1px var(--line);
}
.logo-grid__preview img { max-height: 100%; image-rendering: pixelated; }
.logo-grid figcaption { margin-top: 10px; font-size: .9rem; }
.logo-grid figcaption a { text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }

/* --- Developers ------------------------------------------------------------ */
.notice { border-left: 2px solid var(--gold); padding: 4px 0 4px 20px; margin-bottom: 48px; max-width: 70ch; }
.notice p { margin: 0; }
.notice--open { border-color: #4d9145; }

/* --- 404 ------------------------------------------------------------------- */
.page-404 { text-align: center; }
.page-404 .lead { margin-inline: auto; }
.page-404 .hero__actions { justify-content: center; }
.page-404__mascot { margin: 0 auto 28px; width: 128px; image-rendering: pixelated; transform: rotate(-6deg); }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: #0c0a15; margin-top: 0; }
.site-footer__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
    padding: 40px 0 28px;
}
.site-footer__brand { display: flex; gap: 14px; align-items: center; }
.site-footer__brand img { width: 40px; height: 50px; image-rendering: pixelated; }
.site-footer__brand p { margin: 0; line-height: 1.4; }
.site-footer__name { font-family: var(--font-pixel); font-size: 1.15rem; color: var(--cream); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: .95rem; }
.site-footer__links a { color: var(--text); text-decoration: none; }
.site-footer__links a:hover { color: var(--gold); }
.site-footer__legal { font-size: .8rem; padding-bottom: 28px; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 20px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
@media (max-width: 480px) { .factsheet div { grid-template-columns: 6em 1fr; } }
