/* Arcade look: pixel fonts, flat colors, hard shadows (no blur). */
:root {
    --bg: #07060b;
    --fg: #f4f1ea;
    --muted: #9a958c;
    --line: #2a2733;
    --yellow: #ffd23f;
    --cyan: #3ee6ff;
    --pink: #ff4f9a;
    --pixel: "Press Start 2P", monospace;
    --retro: "VT323", monospace;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--retro);
    font-size: 22px;
    line-height: 1.25;
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 16px 64px;
}

/* Header */
.intro {
    max-width: 680px;
}

.eyebrow {
    margin: 0;
    color: var(--cyan);
    font: 10px/1.6 var(--pixel);
    text-transform: uppercase;
}

h1 {
    margin: 20px 0 0;
    color: var(--yellow);
    font: clamp(44px, 10vw, 80px)/1 var(--pixel);
    text-transform: uppercase;
    text-shadow: 6px 6px 0 var(--pink);
}

.lead {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 24px;
}

.press-start {
    margin: 20px 0 0;
    color: var(--fg);
    font: 11px/1.6 var(--pixel);
    text-transform: uppercase;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* The cabinet: a thick pixel border with a hard shadow, and the canvas
   inside keeps its 900x500 drawing size scaled to the width. */
.cabinet {
    margin-top: 32px;
    padding: 12px;
    background: #15131c;
    border: 4px solid var(--fg);
    box-shadow: 8px 8px 0 var(--cyan);
}

.screen {
    position: relative;
    background: #000;
    border: 4px solid #000;
}

/* Faint CRT scanlines over the game; clicks go through. */
.screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.18) 2px 4px);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 5;
    background: #000;
    image-rendering: pixelated;
}

.touch-note {
    display: none;
    margin: 20px 0 0;
    color: var(--pink);
    font: 10px/1.6 var(--pixel);
    text-align: center;
    text-transform: uppercase;
}

@media (hover: none) and (pointer: coarse) {
    .touch-note {
        display: block;
    }
}

/* Info cards */
.info {
    display: grid;
    gap: 24px;
    margin-top: 48px;
}

@media (min-width: 760px) {
    .info {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    --accent: var(--yellow);
    padding: 20px;
    background: #110f17;
    border: 4px solid var(--accent);
    box-shadow: 6px 6px 0 var(--line);
}

.card-cyan {
    --accent: var(--cyan);
}

.card-pink {
    --accent: var(--pink);
}

.card h2 {
    margin: 0 0 16px;
    color: var(--accent);
    font: 12px/1.6 var(--pixel);
    text-transform: uppercase;
}

.card p,
.card ul,
.card dl {
    margin: 0;
    color: var(--muted);
}

.card ul {
    padding: 0;
    list-style: none;
}

.card li + li {
    margin-top: 12px;
}

.card strong {
    display: block;
    color: var(--fg);
    font: 10px/1.8 var(--pixel);
    text-transform: uppercase;
}

.keys {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 16px;
    align-items: center;
}

.keys dt {
    display: flex;
    gap: 6px;
}

.keys dd {
    margin: 0;
}

kbd {
    display: inline-block;
    min-width: 30px;
    padding: 6px 7px 5px;
    background: var(--fg);
    color: var(--bg);
    font: 10px/1 var(--pixel);
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 4px 0 var(--muted);
}

/* Links */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin-top: 48px;
}

.links a {
    color: var(--fg);
    font: 10px/1.6 var(--pixel);
    text-decoration: none;
    text-transform: uppercase;
}

.links a::before {
    content: "▶ ";
    color: var(--pink);
}

.links a:hover,
.links a:focus-visible {
    color: var(--yellow);
}

a:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .press-start {
        animation: none;
    }
}

/* Eyebrow and the EN / ES switch (from ../i18n.js) in one row. */
.topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    justify-content: space-between;
}

.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
    font: 10px/1.6 var(--pixel);
    color: var(--muted);
}

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

.lang-switch a:hover,
.lang-switch a:focus-visible {
    color: var(--fg);
}

.lang-switch a[aria-current] {
    color: var(--yellow);
}
