@font-face {
  font-family: Bungee;
  src: url("/fonts/bungee.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #120a07;
  --bg-mid: #2a140e;
  --cabinet: #7a2218;
  --cabinet-edge: #3f100c;
  --gold: #f0c14b;
  --gold-deep: #c9921a;
  --gold-hi: #ffe7a3;
  --cream: #f7ecd8;
  --cream-dim: #c9b89a;
  --ink: #2a1608;
  --card: rgba(22, 12, 8, 0.86);
  --line: #d4a84a;
  --play: #f0c14b;
  --play-hover: #ffe083;
  --safe-x: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --safe-b: max(28px, calc(env(safe-area-inset-bottom) + 16px));
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: Nunito, "Segoe UI", system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

html {
  background:
    radial-gradient(1200px 640px at 50% -8%, #5a2418 0%, #2a120c 38%, #120a07 78%);
}

body {
  min-height: 100dvh;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(240, 193, 75, 0.08), transparent 42%),
    radial-gradient(circle at 80% 100%, rgba(140, 40, 24, 0.18), transparent 45%),
    repeating-linear-gradient(
      180deg,
      transparent 0 3px,
      rgba(0, 0, 0, 0.08) 3px 4px
    );
  background-attachment: fixed;
}

a { color: inherit; }

.wrap {
  width: min(1100px, calc(100% - (var(--safe-x) * 2)));
  margin: 0 auto;
  padding: 20px 0 var(--safe-b);
}

/* ----- Marquee ----- */
.marquee {
  position: relative;
  margin: 8px 0 28px;
  padding: 22px 18px 26px;
  text-align: center;
  background:
    linear-gradient(180deg, #9a2c20 0%, #6a1b14 42%, #4a120e 100%);
  border: 3px solid var(--gold);
  border-radius: 22px;
  box-shadow:
    0 0 0 4px #3a100c,
    0 0 0 6px rgba(212, 168, 74, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 160, 0.25);
}

.lights {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 0 6px 14px;
}

.lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 45%, #a36a10);
  box-shadow: 0 0 8px rgba(240, 193, 75, 0.7);
  flex: 0 0 10px;
}

.lights span:nth-child(3n) { background: radial-gradient(circle at 35% 30%, #ffe0e0, #ff6b5a 50%, #8a1c14); box-shadow: 0 0 8px rgba(255, 107, 90, 0.55); }
.lights span:nth-child(3n+1) { background: radial-gradient(circle at 35% 30%, #fff6c8, var(--gold) 45%, #a36a10); }
.lights span:nth-child(3n+2) { background: radial-gradient(circle at 35% 30%, #e8fff0, #7dffb0 50%, #1d6a3c); box-shadow: 0 0 8px rgba(125, 255, 176, 0.4); }

@media (prefers-reduced-motion: no-preference) {
  .lights span { animation: twinkle 2.4s ease-in-out infinite; }
  .lights span:nth-child(2n) { animation-delay: -0.8s; }
  .lights span:nth-child(3n) { animation-delay: -1.4s; }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.55; filter: brightness(0.75); }
}

.kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-hi);
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
}

h1 {
  margin: 0;
  font-family: Bungee, Impact, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 8.4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6d0 0%, #ffe08a 28%, #f0c14b 55%, #c9921a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #3a0f0a) drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}

.tagline {
  margin: 12px 0 0;
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.tagline em {
  font-style: normal;
  color: var(--gold);
  font-weight: 800;
}

/* ----- Grid ----- */
.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 760px) {
  .games { grid-template-columns: 1fr 1fr; gap: 24px; }
  .marquee { padding: 26px 28px 30px; margin-bottom: 34px; }
  .lights span { width: 12px; height: 12px; flex-basis: 12px; }
}

/* ----- Cards ----- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 230, 160, 0.12);
  backdrop-filter: blur(6px);
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0a0604;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card:hover .thumb img,
.card:focus-within .thumb img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: no-preference) {
  .thumb img { transition: transform 0.45s ease; }
}

.body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  flex: 1;
}

.card h2 {
  margin: 0;
  font-family: Bungee, Impact, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  line-height: 1.2;
  color: var(--gold-hi);
  text-shadow: 0 2px 0 #2a0e08;
}

.card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--cream-dim);
  flex: 1;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--play-hover) 0%, var(--play) 55%, var(--gold-deep) 100%);
  color: var(--ink);
  font-family: Bungee, Impact, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow:
    0 2px 0 #8a5a0c,
    0 6px 16px rgba(0,0,0,0.35);
  -webkit-tap-highlight-color: transparent;
}

.play:hover,
.play:focus-visible {
  background: linear-gradient(180deg, #fff3c0 0%, #ffe08a 60%, #f0c14b 100%);
}

.play:active { transform: translateY(1px); box-shadow: 0 1px 0 #8a5a0c; }

.board {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.board:hover, .board:focus-visible { color: var(--gold-hi); text-decoration: underline; }

a:focus-visible, .play:focus-visible, .board:focus-visible, .thumb:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
}

footer {
  margin-top: 48px;
  text-align: center;
  color: var(--cream-dim);
  font-weight: 700;
  font-size: 0.92rem;
}

footer p { margin: 0; }

/* ----- Beyond the games ----- */
.more-h {
  margin: 40px 0 16px;
  text-align: center;
  font-family: Bungee, Impact, "Arial Black", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
}
