@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #070a14;
  --surface: rgba(255, 255, 255, .04);
  --border: rgba(255, 255, 255, .09);
  --text: #e9ecf8;
  --muted: #8f97b5;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --pink: #f472b6;

  --display: "Outfit", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.0625rem/1.6 var(--body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
}
.skip:focus { top: 16px; }

/* Background --------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.glow {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .38;
  animation: drift 26s ease-in-out infinite alternate;
}
.g1 { background: var(--violet); top: -18vmax; left: -10vmax; }
.g2 { background: var(--cyan); top: -10vmax; right: -16vmax; opacity: .22; animation-duration: 32s; animation-delay: -8s; }
.g3 { background: var(--pink); bottom: -26vmax; left: 30vw; opacity: .18; animation-duration: 38s; animation-delay: -16s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.12); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}

/* Retro grid floor fading into the horizon. */
.floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: -10vh;
  height: 60vh;
  background-image:
    linear-gradient(rgba(124, 92, 255, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, .35) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: 50% 0;
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 60%, transparent);
  animation: roll 3s linear infinite;
  opacity: .5;
}
@keyframes roll { to { background-position: 0 64px, 0 0; } }

/* Nav ---------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: linear-gradient(to bottom, rgba(7, 10, 20, .85), rgba(7, 10, 20, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 1.15rem/1 var(--display);
  text-decoration: none;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}
.nav-link:hover { color: var(--text); }

/* Hero --------------------------------------------------------------------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 14vh, 160px) var(--gutter) clamp(72px, 14vh, 150px);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 7px 16px 7px 12px;
  font-size: .9rem;
  font-weight: 600;
  color: #cfd5ee;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { to { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }

.title {
  margin: 0;
  font: 800 clamp(3rem, 9.5vw, 7.2rem)/.98 var(--display);
  letter-spacing: -.035em;
  background: linear-gradient(180deg, #fff 30%, #b7bfdc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.shine {
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink), var(--violet));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 300% 0; } }

.lede {
  max-width: 36rem;
  margin: 28px auto 0;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--muted);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font: 600 1.05rem/1 var(--display);
  text-decoration: none;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #5b8cff);
  box-shadow: 0 10px 40px -10px rgba(124, 92, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px -10px rgba(124, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* Games -------------------------------------------------------------------- */

.games {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(64px, 10vw, 120px);
  scroll-margin-top: 72px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font: 700 clamp(1.8rem, 3.5vw, 2.4rem)/1.1 var(--display);
  letter-spacing: -.02em;
}
.count { margin: 0; color: var(--muted); }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.card {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s;
}
.card:not(.card-soon):hover,
.card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, .55);
  box-shadow: 0 24px 60px -20px rgba(124, 92, 255, .55);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
}

.cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin: 8px 8px 0;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .35), transparent 45%),
    linear-gradient(135deg, var(--c1, var(--violet)), var(--c2, var(--cyan)));
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.card:hover .cover img { transform: scale(1.05); }
.cover-letter {
  font: 800 5rem/1 var(--display);
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 18px 20px 20px;
}
.card-title { font: 700 1.35rem/1.2 var(--display); }
.card-blurb { color: var(--muted); font-size: .98rem; line-height: 1.5; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.chip {
  padding: 4px 11px;
  font-size: .82rem;
  font-weight: 600;
  color: #cfd5ee;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip-new { color: #0b2a20; background: #34d399; border-color: transparent; }

.play {
  margin-left: auto;
  font-weight: 700;
  color: var(--cyan);
}

/* Placeholder cards while there are no games yet. */
.card-soon .cover { opacity: .55; }
.card-soon .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 2.8s ease-in-out infinite;
}
.card-soon:nth-child(2) .cover::after { animation-delay: .3s; }
.card-soon:nth-child(3) .cover::after { animation-delay: .6s; }
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }

.bar {
  display: block;
  height: 10px;
  width: 85%;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
}
.bar-title { height: 16px; width: 55%; margin-bottom: 6px; background: rgba(255, 255, 255, .14); }
.bar-short { width: 60%; }
.card-soon > .chip {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(7, 10, 20, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-soon .card-body { padding-bottom: 28px; }

.note { color: var(--muted); }

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .95rem;
}
.foot p { margin: 0; }

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