@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --panel: #141821;
  --panel-2: #1a1f2a;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef1f7;
  --muted: #9aa3b5;
  --faint: #6b7487;
  --accent: #7ee0ff;
  --accent-2: #8b7bff;
  --live: #4ade80;
  --dev: #fbbf24;
  --planned: #a5b4fc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -20px rgba(0,0,0,.6);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; stroke: none; }
.brand-name, .footer-brand { font: 500 18px/1 var(--display); letter-spacing: -.01em; }
.brand-name b, .footer-brand b { font-weight: 700; }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(760px, 92vh);
  display: grid; align-items: end;
  padding: 140px var(--gutter) 64px;
}
.hero-mosaic {
  position: absolute; inset: -10% -20% -10% 30%; z-index: -2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  transform: rotate(-8deg) translateY(-4%);
}
.hero-col { display: grid; gap: 14px; align-content: start; animation: drift 60s linear infinite; }
.hero-col:nth-child(2) { animation-direction: reverse; animation-duration: 75s; }
.hero-col:nth-child(3) { animation-duration: 90s; }
.hero-tile { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 10% 90%, rgba(11,13,18,.96) 30%, transparent 70%),
    linear-gradient(90deg, var(--bg) 22%, rgba(11,13,18,.82) 48%, rgba(11,13,18,.35) 75%, rgba(11,13,18,.55)),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%),
    linear-gradient(180deg, rgba(11,13,18,.85) 0%, transparent 25%);
}
.hero-copy { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.hero-copy > * { max-width: 640px; }
.hero-copy > h1 { max-width: 780px; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font: 600 13px/1 "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(42px, 7vw, 84px)/.98 var(--display); letter-spacing: -.035em; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 19px); color: #c3c9d6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 10px 30px -10px rgba(126,224,255,.55); }
.btn-primary:hover { background: #fff; box-shadow: 0 14px 40px -10px rgba(126,224,255,.75); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn svg { width: 18px; height: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 44px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: 13px; }
.stats dd { margin: 0; font: 700 30px/1.1 var(--display); letter-spacing: -.02em; }

/* ---------------------------------------------------------------- toolbar */
.toolbar {
  position: sticky; top: 0; z-index: 15;
  background: rgba(11,13,18,.78);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.toolbar-inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.28); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .n { margin-left: 6px; opacity: .55; font-variant-numeric: tabular-nums; }
.search {
  position: relative; flex: 1 1 260px; max-width: 360px;
  display: flex; align-items: center;
}
.search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 42px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
  color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .2s, background .2s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); background: rgba(255,255,255,.07); }

/* ---------------------------------------------------------------- sections */
.section { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 56px var(--gutter) 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font: 700 clamp(28px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -.025em; }
.section-head h2 .count { margin-left: 10px; font-size: .55em; color: var(--faint); font-weight: 500; vertical-align: middle; }
.section-head p { margin: 0; color: var(--muted); max-width: 520px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* ---------------------------------------------------------------- cards */
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -24px rgba(0,0,0,.85), 0 0 0 1px rgba(126,224,255,.08); }

.card-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.card:hover .card-art img { transform: scale(1.045); }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(16,19,26,.9)); pointer-events: none; }
.card.dim .card-art img { filter: saturate(.85) brightness(.9); }

.badge {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px;
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: rgba(11,13,18,.72); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.badge.live { color: var(--live); }
.badge.dev { color: var(--dev); }
.badge.planned { color: var(--planned); }
.badge span { color: var(--text); }

.card-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 18px 20px 20px; }
.card-genre { margin: 0; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.card h3 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -.015em; }
.card-blurb { margin: 0; color: var(--muted); font-size: 15px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }

.platforms { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.platforms li {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.platforms svg { width: 16px; height: 16px; stroke-width: 1.8; }

.card-actions { display: flex; gap: 8px; }
.act {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; white-space: nowrap; transition: background .2s, border-color .2s, color .2s;
}
.act:hover { background: rgba(255,255,255,.08); }
.act.go { background: var(--text); color: var(--bg); border-color: var(--text); }
.act.go:hover { background: #fff; }
.act svg { width: 15px; height: 15px; }
.act.go svg { stroke-width: 2.4; }
.act.muted { color: var(--faint); cursor: default; }
.act.muted:hover { background: transparent; }

/* Whole card clickable for live entries, without nesting links. */
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-hit:focus-visible { outline-offset: -3px; }
.card .card-actions, .card .badge { position: relative; z-index: 2; }
.card .badge { position: absolute; }

/* Generated art for entries without a picture. */
.gen-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.gen-art::before {
  content: ""; position: absolute; inset: -40%;
  background:
    radial-gradient(circle at 30% 30%, var(--c1), transparent 45%),
    radial-gradient(circle at 75% 65%, var(--c2), transparent 45%),
    conic-gradient(from 200deg at 50% 50%, #12151d, #1b2030, #12151d);
  filter: blur(10px); opacity: .9;
}
.gen-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.gen-art span { position: relative; z-index: 1; font: 700 clamp(40px, 6vw, 64px)/1 var(--display); letter-spacing: -.04em; color: rgba(255,255,255,.9); text-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* ---------------------------------------------------------------- empty, footer */
.empty { max-width: var(--wrap); margin: 64px auto; padding: 0 var(--gutter); text-align: center; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.footer {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 80px auto 0; padding: 36px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px;
  color: var(--faint); font-size: 14px;
}
.footer p { margin: 4px 0; }
.footer-brand { color: var(--text); margin-bottom: 8px !important; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.noscript { text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- detail dialog */
.detail {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line-2); border-radius: 22px;
  background: var(--panel); color: var(--text); overflow: auto;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.9);
}
.detail::backdrop { background: rgba(5,6,9,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.detail[open] { animation: pop .35s var(--ease); }
.detail[open]::backdrop { animation: fade .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.detail-close-form { position: sticky; top: 0; height: 0; z-index: 3; }
.detail-close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: rgba(11,13,18,.7); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.detail-close svg { width: 18px; height: 18px; }
.detail-art { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); }
.detail-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--panel)); }
.detail-body { padding: 4px 28px 28px; }
.detail-genre { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.detail h2 { margin: 0 0 12px; font: 700 32px/1.1 var(--display); letter-spacing: -.025em; }
.detail-body > p { color: #c3c9d6; margin: 0; }
.detail-highlights { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.detail-highlights li { position: relative; padding-left: 28px; color: var(--text); }
.detail-highlights li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(126,224,255,.45);
}
.detail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-foot .act { height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 640px) {
  .topnav { display: none; }
  .hero { min-height: 640px; padding-top: 110px; padding-bottom: 40px; }
  .hero-mosaic { inset: -20% -60% 30% -10%; opacity: .55; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 30%, rgba(11,13,18,.86) 62%, rgba(11,13,18,.7)); }
  .stats dd { font-size: 24px; }
  .search { max-width: none; }
  .card-body { padding: 16px 16px 18px; }
  .detail-body { padding: 4px 20px 22px; }
  .detail h2 { font-size: 26px; }
}

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