:root {
  color-scheme: light;
  --ink: #18202c;
  --muted: #5c6674;
  --line: #d8dde5;
  --page: #f5f7fb;
  --panel: #ffffff;
  --blue: #2f6fed;
  --green: #2f9d72;
  --yellow: #f2b84b;
  --red: #e65d5d;
  --shadow: 0 22px 55px rgba(28, 38, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 111, 237, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(47, 157, 114, 0.12), transparent 32%),
    var(--page);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 36px;
  align-items: center;
  min-height: 48vh;
}

.intro-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.65rem, 8vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro-copy p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.pixel-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 12px;
  width: min(100%, 390px);
  aspect-ratio: 1;
  justify-self: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.tile {
  display: block;
  min-width: 0;
  border-radius: 6px;
  border: 1px solid rgba(24, 32, 44, 0.08);
}

.tile-a,
.tile-i {
  background: var(--blue);
}

.tile-b,
.tile-f {
  background: var(--yellow);
}

.tile-c,
.tile-g {
  background: var(--green);
}

.tile-d,
.tile-h {
  background: var(--red);
}

.tile-e {
  background:
    linear-gradient(90deg, transparent 44%, rgba(24, 32, 44, 0.18) 44% 56%, transparent 56%),
    linear-gradient(0deg, transparent 44%, rgba(24, 32, 44, 0.18) 44% 56%, transparent 56%),
    #ffffff;
}

.games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.game-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 35px rgba(28, 38, 55, 0.08);
}

.game-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
}

.game-card h2 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.game-card p {
  color: var(--muted);
  line-height: 1.55;
}

.game-card a {
  width: fit-content;
  margin-top: auto;
  padding: 10px 14px;
  border-radius: 8px;
  background: #edf1f7;
  color: #4d5867;
  font-weight: 700;
  text-decoration: none;
  pointer-events: none;
}

.game-card.playable a {
  background: var(--blue);
  color: #ffffff;
  pointer-events: auto;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding: 32px 0;
  }

  .intro,
  .games {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
  }

  .pixel-panel {
    justify-self: stretch;
    width: 100%;
    max-width: 360px;
  }

  .game-card {
    min-height: 190px;
  }
}
