/*
 * AgenCitic Games – shared stylesheet.
 * Used by /games/ and /games/<slug>/privacy/ pages.
 * Same retro pixel/CRT look as the main page (index.html), with an amber
 * "arcade" accent that marks the Games brand.
 * Mobile-first: base styles target small screens, @media (min-width) adds desktop.
 * No third-party resources: the VT323 font (SIL OFL) is self-hosted.
 */

/* --- FONT (self-hosted, see static/fonts/OFL.txt) --- */
@font-face {
    font-family: 'VT323';
    src: url('../fonts/VT323-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- VARIABLES --- */
:root {
    /* Palette shared with the main page */
    --bg-color: #050a14;
    --bg-secondary: #0a0e17;
    --text-main: #e0e0e0;
    --text-muted: #8892b0;           /* ~5.9:1 on --bg-secondary */
    --accent-primary: #00f3ff;       /* Cyan */
    --accent-secondary: #bd00ff;     /* Neon purple – decorative only (shadows/borders) */
    --accent-action: #39ff14;        /* Toxic green */

    /* Games brand accent */
    --accent-games: #ffc233;         /* Arcade amber, ~12:1 on --bg-color */
    --accent-games-dim: #b8860b;

    /* UI */
    --border-width: 3px;
    --shadow-depth: 4px;
    --font-retro: 'VT323', ui-monospace, 'Courier New', monospace;
    --nav-height: 0px;               /* nav is not sticky on mobile */
}

/* --- RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-retro);
    font-size: 1.25rem;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- CRT EFFECT OVERLAY (same as main page) --- */
body::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
    background-size: 100% 2px, 3px 100%;
    z-index: 999;
    pointer-events: none;
}

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

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(2.25rem, 10vw, 4.5rem);
    color: var(--accent-games);
    text-shadow: 3px 3px 0 var(--accent-secondary);
}

h2 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    color: var(--accent-games);
    border-bottom: var(--border-width) solid var(--accent-games);
    display: inline-block;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.7rem;
    color: var(--accent-primary);
}

p + p { margin-top: 0.75rem; }

a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover { color: var(--accent-games); }

/* Visible focus for keyboard users */
:focus-visible {
    outline: 3px solid var(--accent-games);
    outline-offset: 3px;
}

/* --- UTILITIES --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 2000;
    background: var(--accent-games);
    color: var(--bg-color);
    padding: 8px 16px;
    font-size: 1.25rem;
    text-decoration: none;
}

.skip-link:focus { top: 8px; color: var(--bg-color); }

.muted { color: var(--text-muted); }

/* --- BUTTONS (same as main page, amber variant for Games) --- */
.btn {
    display: inline-block;
    max-width: 100%;
    background: var(--bg-color);
    border: var(--border-width) solid var(--accent-games);
    color: var(--accent-games);
    padding: 12px 22px;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    overflow-wrap: anywhere;
    cursor: pointer;
    box-shadow: var(--shadow-depth) var(--shadow-depth) 0 0 var(--text-muted);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover {
    background: var(--accent-games);
    color: var(--bg-color);
    box-shadow: var(--shadow-depth) var(--shadow-depth) 0 0 var(--accent-primary);
}

.btn:active {
    transform: translate(var(--shadow-depth), var(--shadow-depth));
    box-shadow: none;
}

.btn-secondary {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
}

.btn-plain-case { text-transform: none; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* --- PIXEL BOX (same as main page) --- */
.pixel-box {
    background: var(--bg-secondary);
    border: var(--border-width) solid var(--text-muted);
    padding: 20px;
    box-shadow: var(--shadow-depth) var(--shadow-depth) 0 0 #000;
    transition: transform 0.3s, border-color 0.3s;
}

.pixel-box:hover { border-color: var(--accent-games); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-top: 1.5rem;
}

/* --- NAV --- */
.site-nav {
    background: var(--bg-color);
    border-bottom: var(--border-width) solid var(--accent-games);
    padding: 12px 0;
    position: relative;
    z-index: 1000;
}

.nav-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-games);
    text-shadow: 2px 2px 0 var(--accent-secondary);
    text-decoration: none;
    white-space: nowrap;
}

a.logo:hover { color: var(--accent-games); }

.logo-sub { color: var(--accent-primary); }

/* Nav links stay visible on mobile (wrap onto a second row) */
.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    width: 100%;
}

.nav-links a {
    display: inline-block;
    padding: 4px 0;
    color: var(--text-main);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--accent-action);
    text-decoration: underline;
}

.nav-links .nav-home a { color: var(--accent-primary); }

.lang-switcher {
    display: flex;
    gap: 12px;
    border-left: 2px solid var(--text-muted);
    padding-left: 12px;
}

.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
}

.lang-switcher a.active,
.lang-switcher a[aria-current="true"] {
    color: var(--accent-games);
    text-decoration: underline;
}

/* --- HERO --- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 64px;
    text-align: center;
    border-bottom: var(--border-width) solid var(--text-muted);
}

.hero-video {
    display: none;             /* never shown (or downloaded) on mobile */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-kicker {
    display: inline-block;
    color: var(--accent-action);
    border: 2px solid var(--accent-action);
    padding: 2px 10px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-tagline {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.75);
    padding: 8px 12px;
    margin: 0 0 32px;
}

.hero .btn-row { justify-content: center; }

/* --- SECTIONS --- */
.section {
    padding: 56px 0;
    scroll-margin-top: var(--nav-height);
}

.section-alt { background-color: var(--bg-secondary); }

.section-intro {
    max-width: 70ch;
    color: var(--text-muted);
}

/* --- GAMES LIST --- */
.games-list {
    list-style: none;
}

.game-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 160px;
    object-fit: cover;
    border: var(--border-width) solid var(--accent-games);
    /* Smooth scaling: game artwork is not necessarily pixel art. */
    image-rendering: auto;
}

.game-art--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--accent-games);
    background:
        repeating-linear-gradient(45deg, var(--bg-color) 0 8px, var(--bg-secondary) 8px 16px);
}

.game-card h3 { margin-bottom: 0; }

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.badge {
    display: inline-block;
    background: var(--accent-games);
    color: var(--bg-color);
    padding: 2px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTACT / LEGAL --- */
.contact-box { margin-top: 1.5rem; }

.legal-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 1rem;
}

.legal-list dt {
    color: var(--text-muted);
    margin-top: 12px;
}

.legal-list dt:first-child { margin-top: 0; }

.legal-list dd {
    color: var(--text-main);
    font-size: 1.4rem;
    overflow-wrap: anywhere;
}

address { font-style: normal; }

/* --- PRIVACY POLICY PAGES (/games/<slug>/privacy/) --- */
.policy-container { max-width: 900px; }

.policy-lang-note {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.policy h1 {
    font-size: clamp(2rem, 8vw, 3.25rem);
    margin-bottom: 0.5rem;
}

.policy-meta {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.policy section { margin-top: 2rem; }

.policy h2 {
    display: block;
    font-size: clamp(1.6rem, 6vw, 2.1rem);
}

.policy p,
.policy li { max-width: 75ch; overflow-wrap: anywhere; }

.policy ul {
    padding-left: 1.5rem;
    margin-top: 0.75rem;
}

.policy li + li { margin-top: 0.4rem; }

.policy ul + p,
.policy dl + p { margin-top: 0.75rem; }

.policy strong { color: var(--accent-games); font-weight: normal; }

.pixel-box.policy:hover { border-color: var(--text-muted); transform: none; }

/* --- FOOTER (site-wide pattern) --- */
.site-footer {
    padding: 40px 0;
    text-align: center;
    border-top: var(--border-width) solid var(--accent-games);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin: 16px 0;
}

.footer-copy {
    font-size: 1rem;
    color: var(--text-muted);
}

/* --- DESKTOP --- */
@media (min-width: 768px) {
    :root { --nav-height: 72px; }

    .site-nav {
        position: sticky;
        top: 0;
    }

    .nav-links {
        width: auto;
        gap: 24px;
    }

    .hero { padding: 120px 0; }

    .hero-video { display: block; }

    .section { padding: 96px 0; }

    .pixel-box:hover { transform: translateY(-5px); }

    .legal-list {
        grid-template-columns: max-content 1fr;
        gap: 12px 32px;
    }

    .legal-list dt { margin-top: 0; }
}
