:root {
  --bg: #0b0c10;
  --surface: #14161d;
  --line: #262a35;
  --text: #eceef3;
  --muted: #9097a8;
  --accent: #7cf0c5;
  --gold: #d4a64a;
  --gold-hi: #f0cf7a;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  /* A faint dot grid, like a keyboard plate. */
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

a { color: inherit; }

main, .top, footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 700;
}
.brand-name { margin-left: 10px; letter-spacing: 0.01em; }
.top nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}
.top nav a:hover { color: var(--text); }

/* Keycaps */
.key {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  color: var(--text);
  background: linear-gradient(180deg, #2a2e3a, #1b1e27);
  border: 1px solid #3a3f4d;
  border-radius: 6px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.45), 0 2px 0 #08090c;
}

/* Hero */
.hero { padding: clamp(56px, 12vh, 140px) 0 clamp(48px, 10vh, 110px); }
.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero .row { display: block; }
.hero .row:first-child { color: var(--muted); }
.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.8em;
  margin-left: 0.06em;
  margin-right: -0.14em; /* takes no room, so letters don't shift as it moves */
  vertical-align: -0.04em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero h1.typing .ch { visibility: hidden; }
.hero h1.typing .ch.on { visibility: visible; }
/* The caret stays solid while typing, then blinks once the title is done. */
.hero h1.typing .caret { animation: none; }
.lede {
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--muted);
}

/* Games */
.games { padding-bottom: 96px; }
.games h2 {
  margin: 0 0 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.game {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 360px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  transition: border-color 0.3s, transform 0.3s;
}
.game:hover { border-color: rgba(212, 166, 74, 0.6); transform: translateY(-3px); }

.game-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 12, 16, 0.92) 0%, rgba(11, 12, 16, 0.55) 55%, rgba(11, 12, 16, 0.25) 100%),
    url("assets/background.webp") center 35% / cover no-repeat;
  transition: transform 0.6s ease;
}
.game:hover .game-art { transform: scale(1.04); }

.game-logo {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-hi) 30%, var(--gold) 55%, #8a6420 80%, #c99a3e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.9));
}
.game-sub {
  margin: 6px 0 0;
  font-family: "Cinzel", serif;
  font-weight: 800;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c2b8a2;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
}
.tags li {
  padding: 4px 12px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(11, 12, 16, 0.5);
}
.tags .soon { border-color: var(--gold); color: var(--gold-hi); }

.fan {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0 24px 0 0;
}
.fan li {
  --w: clamp(84px, 11vw, 130px);
  width: var(--w);
  margin: 0 calc(var(--w) * -0.14);
  transform-origin: 50% 120%;
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.fan li:nth-child(1) { transform: rotate(-12deg) translateY(12px); }
.fan li:nth-child(2) { transform: rotate(-4deg); }
.fan li:nth-child(3) { transform: rotate(4deg); }
.fan li:nth-child(4) { transform: rotate(12deg) translateY(12px); }
.game:hover .fan li:nth-child(1) { transform: rotate(-18deg) translate(-10px, 8px); }
.game:hover .fan li:nth-child(2) { transform: rotate(-6deg) translateY(-8px); }
.game:hover .fan li:nth-child(3) { transform: rotate(6deg) translateY(-8px); }
.game:hover .fan li:nth-child(4) { transform: rotate(18deg) translate(10px, 8px); }
.fan img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

.arrow {
  position: absolute;
  right: 22px;
  bottom: 16px;
  font-size: 1.4rem;
  color: var(--gold-hi);
  transition: transform 0.3s;
}
.game:hover .arrow { transform: translateX(4px); }

footer {
  padding-top: 28px;
  padding-bottom: 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .game { grid-template-columns: 1fr; gap: 36px; min-height: 0; }
  .game-art {
    background:
      linear-gradient(180deg, rgba(11, 12, 16, 0.85) 0%, rgba(11, 12, 16, 0.45) 60%, rgba(11, 12, 16, 0.8) 100%),
      url("assets/background.webp") center 35% / cover no-repeat;
  }
  .fan { justify-content: center; padding: 0 0 12px; }
  .fan li { --w: clamp(72px, 22vw, 110px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .game, .game-art, .fan li, .arrow { transition: none; }
}
