:root {
  color-scheme: dark;
  --ink: #f5f8fd;
  --muted: #c0c8d4;
  --black: #000;
  --panel: #0b1018;
  --focus: #93d7ff;
  --glow: 45 157 255;
  --alloy: linear-gradient(155deg, #f5f9ff 0%, #798593 16%, #e0e7ed 29%, #303b49 49%, #121822 69%, #a9bdd0 89%, #d5e4f2 100%);
  --alloy-face: linear-gradient(#2d3744, #131b25 47%, #080e16 53%, #101924);
  --font: "Segoe UI", Arial, sans-serif;
  --edge: clamp(20px, 1.9vw, 36px);
  --rail: 1800px;
}

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

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 16px/1.45 var(--font);
}

h1, h2, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell {
  width: min(var(--rail), calc(100% - var(--edge) * 2));
  margin-inline: auto;
}

.chrome {
  border: 1px solid transparent;
  background: var(--alloy-face) padding-box, var(--alloy) border-box;
  box-shadow: inset 0 0 0 1px #d3ecff29, inset 0 -2px 3px #000b, 0 1px 5px #0009;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 46px;
  padding: .45em 1.1em;
  border-radius: 100px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .16s ease, color .16s ease;
}

.button-primary {
  background: linear-gradient(#fff 4%, #edf4fe 38%, #aabccc 95%) padding-box, var(--alloy) border-box;
  box-shadow: inset 0 0 0 1px #fff9, inset 0 -2px 3px #54718c66, 0 1px 6px #000b;
  color: #060d16;
}

.button:hover, .button:focus-visible,
.game-card:is(:hover, :focus-visible) .button {
  box-shadow: inset 0 0 0 1px #dcf3ffb3, 0 0 0 1px var(--focus), 0 0 13px rgb(var(--glow) / 69%);
}

.play-icon {
  width: .75em;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  flex: none;
}

.masthead {
  position: relative;
  z-index: 1;
  max-width: var(--rail);
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: clamp(54px, 4.1vw, 74px);
}

.wordmark {
  font-size: clamp(27px, 2.3vw, 41px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.08em;
  text-decoration: none;
}

.masthead nav {
  padding-left: 1.4rem;
  border-left: 1px solid #56627175;
}

.masthead .button { min-height: 32px; font-size: 14px; }

.gallery {
  position: relative;
  max-width: calc(var(--rail) + var(--edge) * 2);
  margin-inline: auto;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  z-index: -1;
  top: calc(-1 * clamp(54px, 4.1vw, 74px));
  right: 0;
  width: 75%;
  height: auto;
}

.hero {
  display: flex;
  align-items: center;
  min-height: clamp(430px, 31vw, 570px);
}

.hero-copy {
  max-width: min(100%, 630px);
  padding: 24px 0 54px;
}

.hero h1 {
  font-size: clamp(40px, 4.26vw, 78px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.075em;
  text-shadow: 0 2px 15px #000;
}

.hero h1 span {
  display: block;
  margin-bottom: .08em;
  font-size: 1.35em;
  line-height: .94;
}

.hero p {
  margin-block: 20px 23px;
  color: var(--muted);
  font-size: clamp(15px, 1.27vw, 21px);
  text-shadow: 0 2px 8px #000, 0 1px 4px #000;
}

.hero .button {
  min-height: clamp(44px, 3vw, 55px);
  padding-inline: 1.35em;
  font-size: clamp(16px, 1.2vw, 21px);
}

.library { padding-bottom: 28px; }

.library h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 2.1vw, 37px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.055em;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
  gap: clamp(12px, 1vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 158px;
  aspect-ratio: 1.96;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 13px;
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--alloy) border-box;
  text-decoration: none;
  transition: box-shadow .16s ease;
}

.game-card img, .game-card::before {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  border-radius: 10px;
}

.game-card img {
  z-index: -2;
  object-fit: cover;
}

.game-card::before {
  content: "";
  z-index: -1;
  background: linear-gradient(0deg, #000e, #0009 27%, transparent 63%);
}

.game-card:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 1px var(--focus), 0 0 15px rgb(var(--glow) / 55%);
}

.game-card-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding: clamp(10px, .85vw, 15px);
}

.game-title {
  max-width: 13ch;
  font-size: clamp(17px, 1.58vw, 28px);
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: -.045em;
  text-shadow: 0 1px 5px #000;
}

.game-card .button { min-height: 31px; font-size: clamp(12px, .83vw, 15px); }

.games > li { position: relative; }

.game-preview {
  position: absolute;
  z-index: 2;
  inset: auto 0 100%;
  padding-bottom: 9px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .16s ease, visibility .16s;
}

.games > li:hover .game-preview,
.games > li:has(.game-card:focus-visible) .game-preview {
  visibility: visible;
  opacity: 1;
}

.game-preview-panel {
  position: relative;
  border-radius: 9px;
  padding: 12px 14px;
  background: linear-gradient(155deg, #223140, #0b1018) padding-box, var(--alloy) border-box;
  box-shadow: 0 8px 24px #000a, 0 0 12px rgb(var(--glow) / 24%);
}

.game-preview-panel strong { font-size: 16px; }
.game-preview-panel p { margin-top: 3px; color: var(--muted); font-size: 14px; }

.footer {
  padding-block: 12px 18px;
  border-top: 1px solid #263442;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .button, .game-card, .game-preview { transition: none; }
}
