/* =========================================================
   Chill Space Games — site styles
   Shared by every page. Add a new page → reuse these classes.
   ========================================================= */

/* =========================================================
   SELF-HOSTED FONTS — GDPR compliant (LG München I, Az. 3 O 17493/20)
   Files live in /fonts/. No requests to Google's CDN.
   ========================================================= */

/* DM Sans — variable, italic */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url('fonts/dmsans-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url('fonts/dmsans-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* DM Sans — variable, normal */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('fonts/dmsans-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('fonts/dmsans-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fraunces — variable, italic */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-italic-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fraunces — variable, normal */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-normal-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/fraunces-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Colors */
    --bg: #0a0d14;
    --bg-elev: #10141e;
    --bg-card: #131826;
    --border: #232a3d;
    --border-soft: #1a1f2e;
    --text: #f5f3ef;
    --text-muted: #9aa0b3;
    --text-subtle: #5d6376;
    --accent: #f5b942;
    --accent-hover: #ffc857;
    --accent-glow: rgba(245, 185, 66, 0.14);
    --steam-bg: #1b2838;
    --steam-hover: #2a3f5f;
    --meta-bg: #0081fb;
    --meta-hover: #006edc;

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* Layout */
    --container: 1080px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Subtle atmospheric glow at the top */
    background-image:
        radial-gradient(ellipse 70% 50% at 15% -5%, rgba(245, 185, 66, 0.06), transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 0%, rgba(89, 122, 195, 0.05), transparent 60%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

::selection { background: var(--accent); color: var(--bg); }

main { flex: 1; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 13, 20, 0.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.2s;
}

.brand:hover { opacity: 0.85; }

.brand-mark {
    width: 22px;
    height: 22px;
    color: var(--accent);
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.012em;
    font-variation-settings: 'opsz' 14;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: color 0.18s;
}

.nav-link:hover { color: var(--text); }

.nav-link.is-active { color: var(--text); }

.nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -2px;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s;
    margin-left: 0.4rem;
}

.lang-toggle:hover {
    color: var(--text);
    border-color: var(--text-subtle);
}

/* =========================================================
   INTRO
   ========================================================= */
.intro {
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.kicker {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.4rem;
    font-weight: 500;
}

.page-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.5rem, 6.5vw, 4.75rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 1.4rem;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
    max-width: 16ch;
}

.page-title em {
    font-style: italic;
    font-weight: 300;
    color: var(--text);
}

.lede {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--text-muted);
    max-width: 42ch;
    margin: 0;
    line-height: 1.55;
}

.lede em {
    font-style: italic;
    color: var(--text);
}

/* =========================================================
   GAMES SECTIONS
   ========================================================= */
.games-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    letter-spacing: -0.015em;
    margin: 0;
    font-variation-settings: 'opsz' 60;
}

.section-meta {
    font-size: 0.78rem;
    color: var(--text-subtle);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =========================================================
   GAME CARD
   ========================================================= */
.game-card {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    border-bottom: 1px solid var(--border-soft);
}

.game-card:last-child { border-bottom: 0; padding-bottom: clamp(2rem, 4vw, 3rem); }

.game-card--featured {
    /* Slight lift for the upcoming/featured game */
    padding-top: 0;
}

.game-card__capsule {
    display: block;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 460 / 215;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 1.5rem 0 1.5rem;
    border: 1px solid var(--border-soft);
}

.game-card__head { margin-bottom: 1.4rem; }

.status-pill {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    font-weight: 500;
}

.status-pill--upcoming {
    color: var(--accent);
    border-color: var(--accent-glow);
    background: var(--accent-glow);
}

.game-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: -0.022em;
    margin: 0 0 0.4rem;
    font-variation-settings: 'opsz' 110;
}

.game-card--featured .game-title {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    font-variation-settings: 'opsz' 144;
}

.game-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.game-description {
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1.02rem;
    margin: 0 0 2.25rem;
    line-height: 1.65;
}

/* Screenshot grid */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin-bottom: 2rem;
}

@media (max-width: 720px) {
    .screenshot-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}

.screenshot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.screenshot:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-glow);
}

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

.screenshot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.screenshot:hover img { transform: scale(1.05); }

/* =========================================================
   STORE BUTTONS
   ========================================================= */
.game-card__cta { margin-top: 0.5rem; }

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    background: var(--accent);
    color: #0a0d14;
    font-weight: 700;
    font-size: 0.96rem;
    letter-spacing: 0.01em;
    transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
    border: none;
}

.store-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 185, 66, 0.3);
}

.store-btn:active { transform: translateY(0); }

.store-btn__arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.store-btn:hover .store-btn__arrow { transform: translateX(3px); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border-soft);
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-col--brand .brand-mark {
    width: 28px;
    height: 28px;
    margin-bottom: 0.7rem;
}

.footer-tagline {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.92rem;
    max-width: 28ch;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin: 0 0 0.9rem;
    font-weight: 600;
}

.footer-col p,
.footer-col li {
    font-size: 0.93rem;
    color: var(--text-muted);
    margin: 0 0 0.4rem;
    line-height: 1.6;
}

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

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.18s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-subtle);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.footer-bottom p { margin: 0; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 2rem;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lightbox__image {
    max-width: 100%;
    max-height: 86vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    cursor: default;
    user-select: none;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lightbox__close:active,
.lightbox__nav:active { transform: scale(0.95); }

.lightbox__close {
    top: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
}

.lightbox__close svg { width: 20px; height: 20px; }

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox__nav:active { transform: translateY(-50%) scale(0.95); }

.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }

.lightbox__nav svg { width: 22px; height: 22px; }

.lightbox__counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .lightbox { padding: 1rem; }
    .lightbox__nav { width: 40px; height: 40px; }
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .screenshot, .screenshot img, .store-btn, .store-btn__arrow { transition: none !important; }
}

/* =========================================================
   UTILITY / GENERIC PAGE BODY (for About, future pages)
   ========================================================= */
.page-body {
    padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}

.page-body h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.015em;
}

.page-body h2:first-child { margin-top: 0; }

.page-body p {
    max-width: 62ch;
    color: var(--text-muted);
    margin: 0 0 1.1rem;
}

.page-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-glow);
    transition: border-color 0.2s;
}

.page-body a:hover { border-bottom-color: var(--accent); }

.policy-body {
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

.policy-body p { margin: 0 0 1rem; }

.policy-body ul {
    padding-left: 1.4rem;
    margin: 0.25rem 0 1rem;
}

.policy-body li { margin-bottom: 0.55rem; }

.policy-body em {
    font-style: italic;
    color: var(--text);
}

/* =========================================================
   BACK LINK (legal pages)
   ========================================================= */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 2.25rem;
    transition: color 0.18s;
}

.back-link:hover { color: var(--accent); }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid var(--border);
    margin-bottom: 2rem;
    position: relative;
    /* Person silhouette shown when no image is loaded */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='36' r='19' fill='%235d6376'/%3E%3Cellipse cx='50' cy='92' rx='33' ry='27' fill='%235d6376'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}

.about-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
   TECH LIST
   ========================================================= */
.tech-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
}

.tech-list li {
    color: var(--text-muted);
    font-size: 0.93rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tech-list li::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
