@font-face {
  font-family: "Paytone One";
  src: url("fonts/paytone-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

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

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

:root {
  --ink: #07131c;
  --deep: #0c2230;
  --panel: #132c3c;
  --panel-2: #0f2432;
  --foam: #f6ecd4;
  --foam-dim: #cbbd9a;
  --gold: #f0c14b;
  --gold-soft: #ffe08a;
  --gold-deep: #b8861c;
  --crimson: #c6272c;
  --crimson-hot: #e23b3b;
  --line: rgba(240, 193, 75, 0.42);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--ink);
  color: var(--foam);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.4;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(240, 193, 75, 0.16), transparent 60%),
    radial-gradient(circle at 12% 18%, rgba(31, 138, 122, 0.16), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(198, 39, 44, 0.12), transparent 24%),
    linear-gradient(180deg, #08151f 0%, #0a1c28 55%, #07141c 100%);
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 12%, #f6ecd4 70%, transparent),
    radial-gradient(1px 1px at 18% 28%, #ffe08a 70%, transparent),
    radial-gradient(1.4px 1.4px at 27% 8%, #f6ecd4 70%, transparent),
    radial-gradient(1px 1px at 41% 16%, #fff 70%, transparent),
    radial-gradient(1.2px 1.2px at 58% 6%, #ffe08a 70%, transparent),
    radial-gradient(1px 1px at 72% 14%, #f6ecd4 70%, transparent),
    radial-gradient(1.5px 1.5px at 83% 22%, #fff 70%, transparent),
    radial-gradient(1px 1px at 93% 9%, #ffe08a 70%, transparent),
    radial-gradient(1.2px 1.2px at 64% 30%, #f6ecd4 70%, transparent),
    radial-gradient(1px 1px at 4% 42%, #ffe08a 70%, transparent);
  opacity: 0.7;
}

.waves {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 140px;
  z-index: 0;
  pointer-events: none;
}

.wave-a,
.wave-b,
.wave-c {
  animation: drift 16s ease-in-out infinite;
}

.wave-b { animation-duration: 22s; animation-direction: reverse; }
.wave-c { animation-duration: 28s; }

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-40px); }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vh, 2rem) clamp(1rem, 3vw, 2.5rem) 0.8rem;
}

.hero {
  text-align: center;
  flex: 0 0 auto;
  margin-bottom: clamp(0.8rem, 2.2vh, 1.6rem);
}

.mark {
  width: clamp(72px, 10vh, 110px);
  height: clamp(72px, 10vh, 110px);
  margin: 0 auto 0.35rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.mark img,
.mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 1.3vw, 0.85rem);
  color: var(--gold);
}

h1 {
  margin: 0.1rem 0 0.25rem;
  font-family: "Paytone One", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 0.95;
  color: var(--gold-soft);
  text-shadow:
    0 3px 0 var(--gold-deep),
    0 10px 24px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--foam-dim);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
}

.games {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  align-content: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 2px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-7px);
  border-color: var(--gold);
  box-shadow: 0 20px 44px rgba(240, 193, 75, 0.18), var(--shadow);
}

.card:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
}

.art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(240, 193, 75, 0.18);
  background-repeat: no-repeat;
  background-position: center;
}

.art picture,
.art img {
  width: 100%;
  height: 100%;
  display: block;
}

.art img {
  object-fit: contain;
}

.art-djvm {
  background-color: #241d2c;
}

.art-quick-six {
  background: linear-gradient(180deg, #f2a04a 0%, #d2642e 38%, #4a1d28 100%);
}

.art-sketch-up {
  background: linear-gradient(180deg, #7ed0d8 0%, #3a8fb8 55%, #2a6f9a 100%);
}

.art-excalibur {
  background: linear-gradient(180deg, #1a2a4a 0%, #0c1a28 100%);
}

.body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1.05rem;
  flex: 0 0 auto;
}

h2 {
  margin: 0;
  font-family: "Paytone One", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 1.85vw, 1.7rem);
  line-height: 1.15;
  color: var(--gold-soft);
}

.tagline {
  margin: 0 0 0.55rem;
  color: var(--foam-dim);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  flex: 0 0 auto;
  text-wrap: pretty;
}

.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--crimson-hot) 0%, var(--crimson) 100%);
  color: #fff8e8;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.92rem;
  box-shadow: 0 4px 0 #7c1518, 0 8px 16px rgba(0, 0, 0, 0.25);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.card:hover .play,
.card:focus-visible .play {
  filter: brightness(1.08);
}

footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 0.9rem 0 0.4rem;
  color: var(--foam-dim);
  font-size: 0.92rem;
}

footer p {
  margin: 0;
}

/* Tablet: 2x2 */
@media (max-width: 1100px) {
  .games {
    grid-template-columns: repeat(2, 1fr);
  }

  h1 {
    font-size: clamp(2.6rem, 10vw, 4.4rem);
  }

  .page {
    min-height: auto;
  }
}

/* Phone: stacked */
@media (max-width: 640px) {
  .games {
    grid-template-columns: 1fr;
    gap: 1rem;
    flex: 0 0 auto;
  }

  .page {
    padding: 1rem 0.9rem 1.2rem;
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .art {
    aspect-ratio: 4 / 3;
  }

  h1 {
    font-size: 2.7rem;
  }

  .play {
    min-height: 3rem;
  }
}

/* Keep the four cards on one TV-sized screen without scrolling */
@media (min-width: 1101px) and (min-height: 800px) {
  .page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .games {
    align-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave-a,
  .wave-b,
  .wave-c,
  .card,
  .play {
    animation: none;
    transition: none;
  }

  .card:hover,
  .card:focus-visible {
    transform: none;
  }
}
