/* gametalkies.com — minimal, retro, classy. Same tokens as the GameTalkies app. */

@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("/assets/fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url("/assets/fonts/unbounded-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("/assets/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("/assets/fonts/geist-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("/assets/fonts/geist-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --ground: #0a0a0b;
  --surface-1: #121214;
  --surface-2: #1a1a1d;
  --line: #26262a;
  --text-1: #f4f4f1;
  --text-2: #b4b4b9;
  --text-3: #8a8a91;
  --volt: #d7ff3d;

  --snake: #5ee6a8;
  --bricks: #ff8a5b;
  --sudoku: #8fa3ff;
  --pong: #57d3ff;
  --tetrix: #e58bff;
  --invaders: #ff6b6b;
  --paratroopers: #ff7eb3;
  --gorillas: #ffb547;
  --chardonnay: #f2d16b;
  --hey: #f7c400;

  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;

  --radius: 18px;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text-1);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* A whisper of CRT: scanlines over everything, barely there. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--volt); color: var(--ground); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.kicker {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.kicker .dot { display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: 1px; background: var(--volt); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1; }
h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; }
h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; color: var(--text-2); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 46ch; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: color-mix(in srgb, var(--ground) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand canvas, .brand .mark { height: 18px; width: auto; image-rendering: pixelated; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font: 500 14px/1 var(--body);
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text-1); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text-1); }
.nav a[aria-current="page"]::before { content: "▸ "; color: var(--volt); }
.header-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--text-1); padding: 10px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--body);
  border: 1px solid var(--line);
  color: var(--text-1);
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.btn:hover { border-color: #3a3a40; background: var(--surface-2); transform: translateY(-1px); }
.btn.primary { background: var(--volt); border-color: var(--volt); color: #0a0a0b; }
.btn.primary:hover { box-shadow: 0 0 0 6px color-mix(in srgb, var(--volt) 16%, transparent); background: var(--volt); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(80px, 12vw, 150px); overflow: hidden; isolation: isolate; }
.hero .wrap { display: grid; gap: 34px; }
.hero-matrix { width: 100%; max-width: 980px; height: auto; aspect-ratio: 117 / 13; }
.press-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.22em;
  color: var(--volt);
  text-transform: uppercase;
}
.press-start i { width: 8px; height: 8px; background: var(--volt); animation: blink 1.6s steps(2, jump-none) infinite; }
.tagline { font: 500 clamp(22px, 3.2vw, 36px)/1.25 var(--display); letter-spacing: -0.03em; min-height: 2.6em; max-width: 22ch; }
.tagline .cursor { display: inline-block; width: 0.55em; height: 0.9em; margin-left: 4px; vertical-align: -0.08em; background: var(--volt); animation: blink 1.1s steps(2, jump-none) infinite; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; font: 400 13px/1 var(--mono); color: var(--text-3); }
.hero-meta b { color: var(--text-1); font-weight: 500; }

/* The synthwave floor: a perspective grid drifting toward you, faded into the dark. */
.grid-floor {
  position: absolute;
  inset: auto -20% -2px -20%;
  height: 46%;
  z-index: -1;
  perspective: 340px;
  mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent);
  opacity: 0.55;
}
.grid-floor::before {
  content: "";
  position: absolute;
  inset: 0 0 -60% 0;
  transform: rotateX(62deg);
  transform-origin: top;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--volt) 28%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--volt) 28%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: floor 9s linear infinite;
}
.sun {
  position: absolute;
  right: 7%;
  top: 46%;
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: -1;
  background: linear-gradient(to bottom, #ffb547 0%, #ff7eb3 60%, #e58bff 100%);
  mask-image: repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 13px);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 13px);
  opacity: 0.16;
  filter: blur(0.3px);
}

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(72px, 10vw, 130px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }

/* Reveal: a short pixel-stepped fade, once. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s steps(6, end), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- game cards ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.game {
  --tint: var(--volt);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 230px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s, background 0.35s;
  overflow: hidden;
}
.game::after {
  /* the tint, rising like a CRT warming up */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--tint);
  transform: scaleX(0.12);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.game:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); background: color-mix(in srgb, var(--tint) 5%, var(--surface-1)); }
.game:hover::after { transform: scaleX(1); }
.game .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--tint);
  color: #0a0a0b;
}
.game .icon svg { width: 24px; height: 24px; }
.game .meta { font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.game h3 { margin: 8px 0 8px; }
.game p { font-size: 15px; }
.game .vintage { font: 400 12px/1.4 var(--mono); color: var(--text-3); }
.game .vintage b { color: color-mix(in srgb, var(--tint) 80%, var(--text-1)); font-weight: 500; }

/* ---------- apps ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.app-card {
  --tint: var(--volt);
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tint) 14%, transparent), transparent 55%),
    var(--surface-1);
  overflow: hidden;
}
.app-card h3 { font-size: clamp(22px, 2.4vw, 28px); }
.app-card .domain { font: 400 13px/1 var(--mono); color: var(--tint); }
.app-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text-2); font-size: 15px; }
.app-card li::before { content: "▪"; color: var(--tint); margin-right: 10px; }
.app-card .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- rows / feature blocks ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.panel {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  padding: clamp(24px, 4vw, 44px);
}
.stack { display: grid; gap: 18px; }

/* Phone mock for the download page / teaser */
.phone {
  width: min(280px, 72vw);
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  border: 1px solid #2c2c31;
  background: linear-gradient(160deg, #141416, #0b0b0c);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 6px #0a0a0b;
  display: grid;
  place-items: center;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.phone::before { content: ""; position: absolute; top: 14px; width: 84px; height: 22px; border-radius: 99px; background: #050505; }
.phone img { width: 46%; filter: drop-shadow(0 12px 30px rgba(247, 196, 0, 0.25)); animation: wave 4.8s ease-in-out infinite; transform-origin: 70% 90%; }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 22px 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-1);
  transition: border-color 0.2s, transform 0.2s;
}
.store:hover { border-color: #3a3a40; transform: translateY(-1px); }
.store svg { width: 26px; height: 26px; }
.store small { display: block; font: 500 11px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.store strong { display: block; font: 600 17px/1.2 var(--body); }
.store.soon { opacity: 0.6; pointer-events: none; }
.store.soon small { color: var(--volt); }

/* ---------- contact ---------- */
.mail {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font: 500 clamp(24px, 4vw, 44px)/1.1 var(--display);
  letter-spacing: -0.03em;
  word-break: break-all;
}
.mail:hover { color: var(--volt); }
.copy { font: 500 13px/1 var(--mono); }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.topic { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-1); display: grid; gap: 8px; transition: border-color 0.2s; }
.topic:hover { border-color: #3a3a40; }
.topic b { font-weight: 600; }
.topic span { color: var(--text-3); font-size: 14px; }

/* ---------- marquee of credits ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 16px 0; mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: ticker 60s linear infinite; font: 400 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.ticker-track span::before { content: "◆"; color: var(--volt); margin-right: 14px; font-size: 9px; vertical-align: 2px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--text-3); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { margin: 0 0 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--text-1); }
.fine { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 12px/1.4 var(--mono); }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: clamp(56px, 9vw, 110px) 0 clamp(36px, 5vw, 64px); display: grid; gap: 22px; }
.page-head h1 { font-size: clamp(38px, 6vw, 72px); }

/* game detail list */
.game-rows { display: grid; gap: 14px; }
.game-row {
  --tint: var(--volt);
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  scroll-margin-top: 90px;
}
.game-row .icon { width: 64px; height: 64px; border-radius: 16px; background: var(--tint); color: #0a0a0b; display: grid; place-items: center; }
.game-row .icon svg { width: 32px; height: 32px; }
.game-row h3 { font-size: 24px; margin-bottom: 6px; }
.game-row .meta { font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.game-row p + p { margin-top: 8px; }
.game-row .credit { font: 400 13px/1.5 var(--mono); color: var(--text-3); }

/* ---------- motion ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes floor { to { background-position: 0 64px, 0 64px; } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-9deg); } 80% { transform: rotate(7deg); } 90% { transform: rotate(-4deg); } }

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

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .sun { top: auto; bottom: 14%; }
  .game-row { grid-template-columns: 52px 1fr; }
  .game-row .icon { width: 52px; height: 52px; }
  .game-row .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 12px var(--gutter) 22px;
    background: var(--ground);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 4px; font-size: 17px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .header-cta { display: none; }
  .sun { opacity: 0.1; }
}
