:root {
  color-scheme: light;
  --ink: #222034;
  --paper: #fff7d6;
  --blue: #3f7cff;
  --aqua: #37d6c8;
  --yellow: #ffd447;
  --pink: #ff5f9f;
  --orange: #ff8a3d;
  --green: #6bd968;
  --purple: #8058ff;
  --shadow: #1c1b35;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 2px, transparent 2px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 2px, transparent 2px),
    linear-gradient(135deg, #49c7ff 0%, #7f6dff 48%, #ff68b5 100%);
  background-size: 34px 34px, 34px 34px, auto;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 212, 71, 0.86) 0 72px, transparent 74px),
    radial-gradient(circle at 88% 12%, rgba(55, 214, 200, 0.66) 0 92px, transparent 94px),
    radial-gradient(circle at 82% 86%, rgba(255, 138, 61, 0.58) 0 122px, transparent 124px);
  mix-blend-mode: screen;
}

.page-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-confetti span {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--shadow);
  border-radius: 5px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 rgba(28, 27, 53, 0.18);
  transform: rotate(16deg);
}

.page-confetti span:nth-child(1) {
  left: 5%;
  top: 44%;
  background: var(--pink);
}

.page-confetti span:nth-child(2) {
  left: 20%;
  top: 76%;
  background: var(--green);
  transform: rotate(34deg);
}

.page-confetti span:nth-child(3) {
  right: 8%;
  top: 34%;
  background: var(--yellow);
  transform: rotate(-21deg);
}

.page-confetti span:nth-child(4) {
  right: 22%;
  top: 70%;
  background: var(--aqua);
}

.page-confetti span:nth-child(5) {
  left: 46%;
  top: 12%;
  background: var(--orange);
  transform: rotate(43deg);
}

.page-confetti span:nth-child(6) {
  right: 38%;
  bottom: 8%;
  background: var(--purple);
  transform: rotate(-12deg);
}

.hub {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 260px;
  border: 5px solid var(--shadow);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 52px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 214, 0.96)),
    var(--paper);
  box-shadow: 12px 12px 0 var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 12px;
  border: 3px solid var(--shadow);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--shadow);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--blue);
  font-size: clamp(4.2rem, 13vw, 9.8rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow:
    4px 4px 0 var(--yellow),
    8px 8px 0 var(--shadow);
}

.intro {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--shadow);
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  font-weight: 950;
  line-height: 1.18;
}

.hero-badge {
  display: grid;
  place-items: center;
  width: clamp(120px, 18vw, 190px);
  aspect-ratio: 1;
  border: 5px solid var(--shadow);
  border-radius: 50%;
  color: var(--shadow);
  background: var(--green);
  box-shadow: 10px 10px 0 var(--shadow);
  transform: rotate(7deg);
}

.hero-badge span,
.hero-badge strong {
  display: block;
  line-height: 0.9;
}

.hero-badge span {
  font-size: clamp(3.7rem, 8vw, 6.2rem);
  font-weight: 1000;
}

.hero-badge strong {
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-transform: uppercase;
}

.games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
  align-items: stretch;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-height: 300px;
  border: 5px solid var(--shadow);
  border-radius: 22px;
  padding: 20px;
  color: var(--shadow);
  text-decoration: none;
  background: #ffffff;
  box-shadow: 10px 10px 0 var(--shadow);
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: auto -34px -44px auto;
  width: 140px;
  aspect-ratio: 1;
  border: 5px solid rgba(28, 27, 53, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.game-card:hover,
.game-card:focus-visible {
  transform: translate(-4px, -4px) rotate(-1deg);
  box-shadow: 16px 16px 0 var(--shadow);
  outline: none;
}

.game-card:nth-child(even):hover,
.game-card:nth-child(even):focus-visible {
  transform: translate(-4px, -4px) rotate(1deg);
}

.game-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  border: 5px solid var(--shadow);
  border-radius: 20px;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--shadow);
  font-size: 3.4rem;
  line-height: 1;
}

.game-art.bat {
  background: var(--aqua);
}

.game-art.garage {
  background: var(--pink);
}

.game-art.dash {
  background: var(--orange);
}

.game-art.sleep {
  background: var(--purple);
}

.game-art.pasture {
  background: var(--green);
}

.game-art.dread {
  background: #222034;
  color: #ffd447;
}

.game-info {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.game-info strong,
.game-info small,
.game-info b {
  display: block;
}

.game-info strong {
  color: var(--shadow);
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.game-info small {
  margin-top: 12px;
  color: #45415f;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.32;
}

.game-info b {
  justify-self: start;
  align-self: end;
  margin-top: 20px;
  border: 4px solid var(--shadow);
  border-radius: 999px;
  padding: 9px 18px;
  color: var(--shadow);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--shadow);
  font-size: 1rem;
  text-transform: uppercase;
}

.game-card:nth-child(1) {
  background: #ffc6df;
}

.game-card:nth-child(2) {
  background: #fff2ab;
}

.game-card:nth-child(3) {
  background: #bff8ff;
}

.game-card:nth-child(4) {
  background: #ffd0a8;
}

.game-card:nth-child(5) {
  background: #d8c7ff;
}

.game-card:nth-child(6) {
  background: #caffba;
}

.game-card:nth-child(7) {
  background: #c8e6df;
}

@media (max-width: 920px) {
  .games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .hub {
    width: min(100% - 22px, 1180px);
    padding: 22px 0 40px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
    box-shadow: 8px 8px 0 var(--shadow);
  }

  .hero-badge {
    width: 116px;
    justify-self: start;
    box-shadow: 7px 7px 0 var(--shadow);
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 6rem);
    text-shadow:
      3px 3px 0 var(--yellow),
      6px 6px 0 var(--shadow);
  }

  .intro {
    margin-top: 22px;
  }

  .games {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .game-card {
    min-height: 240px;
    box-shadow: 8px 8px 0 var(--shadow);
  }

  .game-card:hover,
  .game-card:focus-visible,
  .game-card:nth-child(even):hover,
  .game-card:nth-child(even):focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 var(--shadow);
  }
}
