:root {
  --ink: #232321;
  --teal-deep: #0b767f;
  --teal: #1798a9;
  --teal-dark: #0f6c78;
  --coral: #d66e61;
  --coral-soft: #f0a895;
  --cream: #f5efe4;
  --linen: #e9decb;
  --sand: #eac397;
  --white: #fffaf1;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: Avenir, "Trebuchet MS", system-ui, sans-serif;
}

button {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(320px, 960px);
  gap: 18px;
  width: min(1380px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0;
  align-items: center;
}

.brand-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  min-width: 0;
}

.logo-tile,
.copy-tile,
.stat-grid > div,
.game-frame {
  border: 3px solid #181817;
  box-shadow: 0 14px 32px var(--shadow);
}

.logo-tile {
  min-height: 170px;
  background: var(--teal-deep);
  display: grid;
  place-items: center;
  text-align: center;
}

.logo-tile span,
.overlay-mark {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 0.9;
  font-weight: 800;
  color: var(--sand);
  text-shadow: 1px 1px 0 rgba(255, 250, 241, 0.35);
}

.logo-tile small {
  display: block;
  margin-top: 10px;
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
}

.copy-tile {
  background: var(--linen);
  color: var(--teal-dark);
  min-height: 140px;
  display: grid;
  align-items: center;
  padding: 24px;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.45;
}

.copy-tile p {
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-grid > div {
  min-height: 92px;
  background: var(--coral);
  color: var(--cream);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-grid > div:nth-child(2),
.stat-grid > div:nth-child(3) {
  background: var(--sand);
  color: var(--ink);
}

.stat-grid span {
  font-size: 0.69rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stat-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1;
}

.game-card {
  min-width: 0;
}

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #151514;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: clamp(24px, 7vw, 80px);
  text-align: center;
  background:
    linear-gradient(rgba(35, 35, 33, 0.86), rgba(35, 35, 33, 0.92)),
    linear-gradient(90deg, transparent 0 9%, rgba(11, 118, 127, 0.42) 9% 32%, transparent 32% 38%, rgba(214, 110, 97, 0.38) 38% 62%, transparent 62% 68%, rgba(234, 195, 151, 0.34) 68% 91%, transparent 91% 100%),
    linear-gradient(0deg, transparent 0 12%, rgba(245, 239, 228, 0.16) 12% 31%, transparent 31% 100%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cream);
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 0.9;
}

.overlay p {
  max-width: 620px;
  margin: 0;
  color: var(--cream);
  line-height: 1.55;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
}

#primaryAction {
  min-width: 168px;
  min-height: 48px;
  border: 2px solid var(--cream);
  background: var(--coral);
  color: var(--white);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 6px 6px 0 #121210;
}

#primaryAction:hover,
#primaryAction:focus-visible {
  background: var(--teal);
  outline: none;
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--sand);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-strip span {
  border: 2px solid #181817;
  background: var(--teal-deep);
  padding: 9px 12px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
    align-content: start;
    padding: 18px 0 28px;
  }

  .brand-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .game-card {
    order: -1;
  }

  .logo-tile,
  .copy-tile {
    min-height: 122px;
  }

  .copy-tile {
    padding: 18px;
    text-align: left;
  }

  .stat-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 18px, 1380px);
    gap: 10px;
  }

  .brand-panel {
    gap: 9px;
  }

  .copy-tile {
    font-size: 0.78rem;
    padding: 12px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-grid > div {
    min-height: 72px;
    padding: 12px;
  }

  .control-strip {
    font-size: 0.62rem;
  }

  .control-strip span {
    padding: 8px;
  }
}
