/* mattrobey.co.uk: dark, pixel-flavoured, no external fonts or frameworks. */
:root {
  --bg: #0d1017;
  --bg-2: #141926;
  --card: #181e2d;
  --line: #262e44;
  --text: #e8ebf4;
  --muted: #9aa3b8;
  --accent: #7cf5c4;
  --accent-2: #ff7ad9;
  --warn: #ffd166;
  --radius: 14px;
  --pixel: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgb(124 245 196 / 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgb(255 122 217 / 0.07), transparent 60%),
    var(--bg);
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding-inline: 1.25rem; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: rgb(13 16 23 / 0.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
.brand { white-space: nowrap; font-family: var(--pixel); font-weight: 900; letter-spacing: 0.04em; color: var(--text); text-decoration: none; display: flex; gap: 0.5rem; align-items: center; }
.brand .logo { font-size: 1.4rem; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .nav { gap: 1rem; } .nav .wide-only { display: none; } }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding-block: 5rem 3.5rem; }
.eyebrow { font-family: var(--pixel); color: var(--accent); letter-spacing: 0.25em; text-transform: uppercase; font-size: 0.8rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.75rem); line-height: 1.02; margin: 0; letter-spacing: -0.03em; }
.hero h1 .glow { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .kicker { font-size: clamp(1.2rem, 3.4vw, 1.6rem); font-weight: 600; color: var(--text); opacity: 0.85; margin: 0.6rem 0 0; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 36rem; margin: 1.25rem 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.25rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 700; cursor: pointer; font-size: 1rem;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #062018; border-color: var(--accent); }
.btn.primary:hover { background: #a2ffd9; }

/* Pixel invader */
.invader { width: 132px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgb(124 245 196 / 0.45)); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
@media (max-width: 720px) { .hero-grid { grid-template-columns: 1fr; gap: 1.25rem; } .hero-art { order: -1; } .hero { padding-top: 2.5rem; } .invader { width: 88px; height: 64px; } }
@media (prefers-reduced-motion: no-preference) {
  .invader { animation: bob 2.4s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}

/* Sections */
section { padding-block: 2.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.section-head a { font-weight: 700; text-decoration: none; }

/* Game cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.game {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.game:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px rgb(0 0 0 / 0.35); }
.game .thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.game .thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.game .play-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgb(0 0 0 / 0.45); opacity: 0; transition: opacity 0.15s ease;
  font-family: var(--pixel); font-weight: 900; letter-spacing: 0.2em; color: var(--accent);
}
.game:hover .play-hint, .game:focus-visible .play-hint { opacity: 1; }
.game .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.game h3 { margin: 0; font-size: 1.15rem; }
.game p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-family: var(--pixel); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.2rem 0.5rem; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.tag.wip { color: var(--warn); border-color: rgb(255 209 102 / 0.4); }
.tag.ok { color: var(--accent); border-color: rgb(124 245 196 / 0.4); }

/* Contact */
.links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.links .btn span[aria-hidden] { font-size: 1.2rem; }

footer { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
footer .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.note { color: var(--muted); font-size: 0.92rem; }
noscript .note { display: block; margin-top: 1rem; }
