/* Content sits directly on the LCD and ink rendered behind it. */
@font-face {
    font-family: "Upheaval";
    src: url("fonts/upheaval.ttf") format("truetype");
    font-display: swap;
}

:root {
    color-scheme: light;
    --lcd-backing: #d1d6cc;
    --lcd-pixel: #c1c8bd;
    --lcd-cell: 6px;
    --lcd-grid:
        repeating-linear-gradient(90deg, transparent 0 4px, var(--lcd-backing) 4px var(--lcd-cell)),
        repeating-linear-gradient(0deg, var(--lcd-pixel) 0 4px, var(--lcd-backing) 4px var(--lcd-cell));
    --background: var(--lcd-backing);
    --surface: rgb(231 235 224 / 82%);
    --surface-raised: #dce2d6;
    --border: #8c9989;
    --border-strong: #536353;
    --text: #171e18;
    --muted: #2f3d31;
    --quiet: #425445;
    --accent: #394e3b;
    --accent-ink: #211803;
    --button-gold: #ffda75;
    --ink: #0b110e;
    --ink-reveal-text: #171e18;
    --header-text: #e2e9d8;
    --body-font: system-ui, "Segoe UI", sans-serif;
    --body-size: clamp(1.125rem, 1.5vw, 1.25rem);
    --heading-font: "Upheaval", var(--body-font);
    --page-width: 980px;
}

body {
    isolation: isolate;
    position: relative;
    background: var(--lcd-grid);
    font-family: var(--body-font);
    font-size: var(--body-size);
    line-height: 1.55;
}
.lcd-effect {
    position: fixed;
    z-index: -1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.site-header {
    min-height: 76px;
    padding: 0.75rem max(1.25rem, calc((100% - 1200px) / 2));
    border: 0;
    background: var(--ink);
}
.brand {
    flex-shrink: 0;
    gap: 0.75rem;
    color: var(--header-text);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}
.brand img { width: 44px; height: 44px; }
.language-switcher {
    position: relative;
    z-index: 2;
    color: var(--header-text);
    font: 600 1rem/1.25 var(--body-font);
    text-shadow: none;
}
.language-switcher summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    list-style: none;
    cursor: pointer;
}
.language-switcher summary::-webkit-details-marker { display: none; }
.language-globe {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 50%;
}
.language-globe::before, .language-globe::after {
    content: "";
    position: absolute;
}
.language-globe::before {
    inset: -2px 4px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}
.language-globe::after { inset: 50% 0 auto; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
.language-options {
    position: absolute;
    inset: calc(100% + 0.45rem) 0 auto auto;
    width: max-content;
    min-width: 9.25rem;
    max-width: calc(100vw - 2rem);
    max-height: min(65vh, 30rem);
    max-height: min(65dvh, 30rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem;
    border: 1px solid var(--border-strong);
    border-radius: 9px 7px 10px 8px;
    background: var(--ink);
    box-shadow: 0 7px 19px rgb(0 0 0 / 26%);
}
.language-options a {
    display: block;
    padding: 0.6rem 0.7rem;
    border-radius: 5px;
    text-decoration: none;
}
.language-options [aria-current="page"] { color: var(--button-gold); }
.language-options a:is(:hover, :focus-visible) { background: var(--lcd-grid); color: var(--ink); }
:focus-visible { outline: 2px solid #935000; outline-offset: 3px; }
.site-header :focus-visible, footer :focus-visible { outline-color: var(--button-gold); }

main { width: min(100% - 2.5rem, var(--page-width)); margin: 1.1rem auto 3rem; }
.game-card, .content-section, .final-cta {
    padding: 0.65rem clamp(1rem, 2.2vw, 1.9rem);
    border: 0;
    background: none;
}
.content-section, .final-cta { margin-top: calc(clamp(3.7rem, 6vw, 5.35rem) + 0.75rem); }
.video-frame { border: 0; }
.capsule {
    margin-bottom: 1.35rem;
    image-rendering: auto;
}
h1, h2, h3 { font-family: var(--heading-font); font-weight: normal; letter-spacing: 0.025em; }
h1 { color: var(--text); font-size: clamp(2.15rem, 4.6vw, 3.5rem); line-height: 1; }
h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.13; }
h3 { font-size: 1.15rem; }
.lead, .content-section > p, .final-cta p, .feature p, .steam-copy {
    font-size: var(--body-size);
}
.lead, .steam-copy { max-width: 710px; }
.steam-copy { overflow-wrap: break-word; }
.steam-copy h3 {
    font-size: clamp(1.15rem, 2.5vw, 1.6rem);
    line-height: 1.2;
}
.steam-copy h3:not(:first-child) { margin-top: 1.85rem; }
.steam-heading-eye {
    font-family: "Segoe UI Symbol", sans-serif;
    font-variant-emoji: text;
    font-size: 0.9em;
    letter-spacing: 0;
}
.links a, .button {
    background: var(--ink);
    color: var(--header-text);
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: 0.025em;
}
.links .primary, .button.primary {
    border-color: #725522;
    background: var(--button-gold);
    box-shadow: inset 0 1px 0 #fff0b0, 0 2px 0 #a0864f;
}
.links .primary:is(:hover, :focus-visible), .button.primary:is(:hover, :focus-visible) {
    border-color: #49330e;
    background: #ffe59a;
    color: var(--accent-ink);
}
.links a:not(.primary):is(:hover, :focus-visible), .button:not(.primary):is(:hover, :focus-visible) {
    border-color: var(--border-strong);
    background: #1e2b22;
    color: var(--header-text);
}
.lightbox {
    width: min(calc(100vw - 2.5rem), max(15rem, calc((100dvh - 8.75rem) * 1.7778)), 120rem);
    max-width: none;
    max-height: calc(100dvh - 1.5rem);
    margin: auto;
    padding: 0.55rem;
    overflow: auto;
    border: 1px solid #536353;
    border-radius: 14px 11px 16px 10px;
    background: var(--ink);
    color: var(--header-text);
    box-shadow: 0 0 0 4px rgb(11 17 14 / 82%), 0 18px 52px rgb(0 0 0 / 50%);
}
.lightbox::backdrop {
    background: rgb(8 13 10 / 80%);
    backdrop-filter: blur(3px);
}
.lightbox__bar {
    display: flex;
    justify-content: flex-end;
}
.lightbox__image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    image-rendering: pixelated;
    background: var(--ink);
}
.lightbox__navigation, .lightbox__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox__navigation { padding-top: 0.2rem; }
.lightbox__pagination { gap: 0.1rem; }
.lightbox__close, .lightbox__arrow, .lightbox__dot {
    display: grid;
    height: 44px;
    place-items: center;
    border: 0;
    background: none;
    color: #f6faef;
    cursor: pointer;
}
.lightbox__close, .lightbox__arrow { width: 44px; }
.lightbox__close::before, .lightbox__close::after {
    content: "";
    grid-area: 1 / 1;
    width: 1.15rem;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}
.lightbox__close::after { transform: rotate(-45deg); }
.lightbox__arrow::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}
.lightbox__arrow--previous::before { transform: rotate(-135deg); }
.lightbox__dot { width: clamp(1.15rem, 5.4vw, 1.55rem); }
.lightbox__dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0.7;
}
.lightbox__dot[aria-current]::before { background: currentColor; opacity: 1; }
.lightbox button:hover { color: var(--button-gold); }
.lightbox button:focus-visible { outline: 2px solid var(--button-gold); outline-offset: -3px; }
footer {
    border: 0;
    background: var(--ink);
    color: #becbb9;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.credits-page {
    display: flex;
    flex-direction: column;
}

.credits-page main { flex: 1; }
.credits-page .content-section p + p { margin-top: 0.75rem; }

.lcd-ink-ready :is(.site-header, footer) {
    background: none;
    text-shadow: 0 1px 2px #0b110e, 0 0 4px #0b110e;
}

:is(.brand, .language-switcher summary) {
    position: relative;
    isolation: isolate;
}
:is(.brand, .language-switcher summary)::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -0.16rem -0.45rem;
    border-radius: 22px 17px 27px 14px / 48% 53% 44% 55%;
    background: var(--lcd-grid);
    box-shadow: 0 0 0.35rem rgb(209 214 204 / 50%);
    opacity: 0;
    transform: scale(0.22);
    transform-origin: var(--ink-entry, center);
    transition: transform 180ms ease-in-out, opacity 160ms ease-in-out;
    pointer-events: none;
}
:is(.brand, .language-switcher summary) { transition: color 40ms 45ms; }
:is(.brand, .language-switcher summary):is(:hover, :focus-visible) {
    color: var(--ink-reveal-text);
    transition: color 40ms 70ms;
}
:is(.brand, .language-switcher summary):is(:hover, :focus-visible)::before {
    opacity: 1;
    transform: scale(1);
    transition: transform 230ms cubic-bezier(0.16, 1.38, 0.42, 1), opacity 130ms ease-out;
}
:is(.brand, .language-switcher summary):focus-visible::before { transform-origin: center; }
.gallery a, .game-card > a:has(> .capsule) {
    transition: box-shadow 230ms ease-out;
}
.game-card > a:has(> .capsule) { display: block; }
.gallery a:is(:hover, :focus-visible), .game-card > a:has(> .capsule):is(:hover, :focus-visible) {
    box-shadow: 0 0 0 4px var(--lcd-backing), 0 0 0 7px rgb(209 214 204 / 45%);
}

.lcd-ink-ready :is(.brand, .language-switcher summary)::before {
    content: none;
}
/* Keep the link and its label in the layout; the ink layer colors the visible glyphs. */
.lcd-ink-ready .brand > span {
    color: transparent;
    text-shadow: none;
    transition: none;
}
.lcd-ink-ready .language-globe { visibility: hidden; }
@media (forced-colors: active) {
    .lcd-ink-ready .brand > span {
        color: LinkText;
    }
    .lcd-ink-ready .language-globe { visibility: visible; color: LinkText; }
}

@media (max-width: 680px) {
    .site-header { gap: 0.55rem; padding: 0.65rem 0.85rem; flex-wrap: wrap; }
    main { width: calc(100% - 1.25rem); margin: 1.2rem auto 2rem; }
    .lightbox { width: min(calc(100vw - 0.9rem), max(15rem, calc((100dvh - 8.75rem) * 1.7778))); }
}
@media (prefers-reduced-motion: reduce) {
    :is(.brand, .language-switcher summary)::before {
        transition: none !important;
    }
}

