/* amaxcon.com arcade home page. Same neon palette as the game
   (style.css), kept separate so either can change on its own. */

:root {
    --cyan: #42f5f2;
    --pink: #ff3f9f;
    --yellow: #ffe66d;
    --background: #050713;
    --panel: rgba(9, 14, 38, 0.86);
    --text: #d8e6ff;
    --muted: #8fa3c9;
    --font-display: "Press Start 2P", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: dark;
}

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

html {
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    color: var(--text);
    font: 16px/1.55 var(--font-body);
    background-color: var(--background);
    /* A static starfield and two nebula glows, drawn with gradients so
       the page needs no image downloads beyond the tiles. */
    background-image:
        radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 33% 72%, #cfe 50%, transparent 51%),
        radial-gradient(1px 1px at 58% 44%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 88% 66%, #fde 50%, transparent 51%),
        radial-gradient(1px 1px at 6% 88%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 46% 92%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 68% 82%, #cff 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 40%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 94% 34%, #fff 50%, transparent 51%),
        radial-gradient(ellipse 60% 45% at 12% 8%, rgba(150, 40, 170, 0.32), transparent 70%),
        radial-gradient(ellipse 55% 40% at 92% 96%, rgba(30, 110, 150, 0.28), transparent 70%);
    background-attachment: fixed;
}

/* Faint scanlines, like the game's CRT overlay. */
.crt {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.025) 0 1px,
        transparent 1px 3px
    );
}

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

/* ---------- Masthead ---------- */

.masthead {
    text-align: center;
    padding: clamp(40px, 9vh, 96px) 0 clamp(28px, 6vh, 56px);
}

.kicker {
    margin: 0 0 14px;
    font: 11px/1 var(--font-display);
    letter-spacing: 0.3em;
    color: var(--yellow);
    animation: blink 1.6s steps(1) infinite;
}

.logo {
    margin: 0;
    font: 700 clamp(40px, 11vw, 96px)/1 var(--font-display);
    letter-spacing: 0.06em;
    color: #fff;
    text-shadow: 0 0 6px rgba(66, 245, 242, 0.9), 0 0 28px rgba(66, 245, 242, 0.45);
}

.logo span {
    color: var(--pink);
    text-shadow: 0 0 6px rgba(255, 63, 159, 0.9), 0 0 28px rgba(255, 63, 159, 0.45);
}

.subtitle {
    margin: 18px 0 0;
    font: 12px/1.4 var(--font-display);
    letter-spacing: 0.24em;
    color: var(--cyan);
}

/* ---------- Tiles ---------- */

main {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* Fixed-width columns, centred, so one or two tiles sit in the
       middle of the page instead of hugging the left edge. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 340px));
    justify-content: center;
    gap: 24px;
}

.tile {
    min-width: 0;
}

.tile-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
    background: var(--panel);
    border: 2px solid rgba(66, 245, 242, 0.35);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tile-link:hover,
.tile-link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--pink);
    box-shadow: 0 0 0 1px var(--pink), 0 0 26px rgba(255, 63, 159, 0.4);
}

.tile-link:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.tile-art {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 2px solid rgba(66, 245, 242, 0.2);
    background: #0a0d22;
}

.tile-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.tile-link:hover .tile-art img,
.tile-link:focus-visible .tile-art img {
    transform: scale(1.05);
}

.tile-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    padding: 18px 18px 20px;
}

.tile-title {
    display: block;
    font: 15px/1.3 var(--font-display);
    letter-spacing: 0.05em;
    color: #fff;
}

.tile-title span {
    color: var(--pink);
}

.tile-blurb {
    display: block;
    font-size: 14.5px;
    color: var(--text);
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 7px;
    font: 9px/1 var(--font-display);
    letter-spacing: 0.08em;
    color: var(--cyan);
    border: 1px solid rgba(66, 245, 242, 0.4);
    border-radius: 3px;
}

.tile-play {
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 14px;
    font: 11px/1 var(--font-display);
    letter-spacing: 0.12em;
    color: #fff;
    border: 2px solid var(--pink);
    background: rgba(255, 63, 159, 0.12);
    transition: background 160ms ease;
}

.tile-link:hover .tile-play,
.tile-link:focus-visible .tile-play {
    background: var(--pink);
}

/* Placeholder until the next game exists. */
.tile-soon-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    min-height: 240px;
    padding: 24px;
    text-align: center;
    border: 2px dashed rgba(143, 163, 201, 0.35);
    border-radius: 6px;
    color: var(--muted);
}

.tile-soon .tile-title {
    color: var(--muted);
}

.tile-soon .tile-blurb {
    color: var(--muted);
}

.soon-icon {
    font: 28px/1 var(--font-display);
    color: rgba(143, 163, 201, 0.6);
}

/* ---------- Footer ---------- */

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 20px;
    padding: 48px 0 max(28px, env(safe-area-inset-bottom));
    font-size: 13px;
    color: var(--muted);
}

.footer p {
    margin: 0;
}

.footer a {
    color: var(--cyan);
}

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

@media (prefers-reduced-motion: reduce) {
    .kicker { animation: none; }
    .tile-link,
    .tile-art img,
    .tile-play { transition: none; }
    .tile-link:hover,
    .tile-link:focus-visible { transform: none; }
    .tile-link:hover .tile-art img,
    .tile-link:focus-visible .tile-art img { transform: none; }
}
