:root {
  color-scheme: dark;
  --black: #050505;
  --ink: #0b0b0b;
  --paper: #f4f0e7;
  --muted: rgba(244, 240, 231, 0.68);
  --line: rgba(255, 255, 255, 0.16);
}

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

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--paper);
  color: var(--black);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: relative;
  z-index: 20;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(18px, 3vw, 44px);
  background: #050505;
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: start;
  color: var(--paper);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 1;
  text-decoration: none;
}

.brand span {
  position: relative;
  top: -0.7em;
  margin-left: 5px;
  color: #ff3b30;
  font-size: 0.3em;
  letter-spacing: 0;
}

.topbar-label,
.topbar nav {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-label {
  margin: 0;
  color: rgba(244, 240, 231, 0.58);
}

.topbar nav {
  justify-self: end;
  display: flex;
  gap: clamp(18px, 2.6vw, 36px);
}

.topbar nav a {
  color: rgba(244, 240, 231, 0.82);
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: #fff;
}

.game-select {
  min-height: 640px;
  height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  background: #151515;
}

.game-panel {
  --accent: #fff;
  position: relative;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #101010;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

.game-panel:nth-child(even) {
  border-right: 0;
}

.game-panel:nth-child(n + 3) {
  border-bottom: 0;
}

.game-panel::before {
  content: '';
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  transition: transform 360ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.game-panel::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.12) 62%);
  pointer-events: none;
}

.game-panel--ufo {
  --accent: #91f2d5;
}

.game-panel--neon {
  --accent: #18e9ed;
}

.game-panel--pizza {
  --accent: #ffd000;
}

.game-panel--hlb {
  --accent: #ff4dac;
}

.game-panel__media,
.game-panel__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-panel__media {
  z-index: 1;
  overflow: hidden;
}

.game-panel__art {
  object-fit: cover;
  transition:
    transform 700ms cubic-bezier(0.2, 0.72, 0.2, 1),
    filter 450ms ease;
}

.game-panel--ufo .game-panel__art {
  object-position: center 42%;
  filter: brightness(0.62) saturate(0.8) contrast(1.1);
}

.game-panel--neon .game-panel__art {
  object-position: center 54%;
  filter: brightness(0.75) saturate(1.08) contrast(1.1);
}

.game-panel--pizza .game-panel__art {
  object-position: center 34%;
  filter: brightness(0.7) saturate(1.05) contrast(1.08);
}

.game-panel--hlb .game-panel__art {
  object-position: center 45%;
  filter: brightness(0.68) saturate(1.1) contrast(1.12);
}

.game-panel__gameplay {
  position: absolute;
  z-index: 2;
  top: -10%;
  right: clamp(12px, 5vw, 80px);
  width: auto;
  height: 126%;
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.62);
  opacity: 0.9;
  transition:
    transform 700ms cubic-bezier(0.2, 0.72, 0.2, 1),
    opacity 400ms ease;
}

.game-panel__top {
  position: absolute;
  z-index: 4;
  top: clamp(16px, 2vw, 26px);
  right: clamp(16px, 2vw, 28px);
  left: clamp(16px, 2vw, 28px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.game-icon {
  width: clamp(54px, 5.2vw, 78px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 22%;
  background: #050505;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  transition: transform 350ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.game-status,
.game-genre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.58rem, 0.75vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.game-status {
  padding: 7px 9px;
  background: rgba(5, 5, 5, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(8px);
}

.game-panel__meta {
  position: absolute;
  z-index: 4;
  right: clamp(18px, 2.6vw, 40px);
  bottom: clamp(18px, 2vw, 30px);
  left: clamp(18px, 2.6vw, 40px);
  transition: transform 350ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.game-genre {
  margin: 0 0 7px;
  color: var(--accent);
}

.game-panel h2 {
  max-width: 12ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 4.6vw, 5.4rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.82;
  text-wrap: balance;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.52);
  word-spacing: 0.08em;
}

.game-panel--pizza h2,
.game-panel--hlb h2 {
  font-size: clamp(2.15rem, 4vw, 4.8rem);
}

.game-hook {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.78rem, 1.1vw, 1rem);
  font-weight: 650;
  letter-spacing: 0.015em;
}

.game-panel:hover::before,
.game-panel:focus-visible::before {
  transform: scaleX(1);
}

.game-panel:hover .game-panel__art,
.game-panel:focus-visible .game-panel__art {
  transform: scale(1.045);
  filter: brightness(0.84) saturate(1.15) contrast(1.08);
}

.game-panel--ufo:hover .game-panel__art,
.game-panel--ufo:focus-visible .game-panel__art {
  filter: brightness(0.7) saturate(0.95) contrast(1.12);
}

.game-panel:hover .game-panel__gameplay,
.game-panel:focus-visible .game-panel__gameplay {
  transform: rotate(0deg) scale(1.035);
  opacity: 1;
}

.game-panel:hover .game-panel__meta,
.game-panel:focus-visible .game-panel__meta {
  transform: translateY(-4px);
}

.game-panel:hover .game-icon,
.game-panel:focus-visible .game-icon {
  transform: translateY(-3px) rotate(-2deg);
}

.game-panel:focus-visible {
  z-index: 8;
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(22px, 5vw, 78px);
  border-top: 1px solid var(--line);
  color: rgba(244, 240, 231, 0.56);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 24px;
}

footer a {
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
}

@media (max-width: 800px) {
  .topbar {
    height: 64px;
    grid-template-columns: 1fr auto;
  }

  .topbar-label {
    display: none;
  }

  .game-select {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .game-panel {
    min-height: 68svh;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .game-panel:nth-child(n + 3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .game-panel:last-child {
    border-bottom: 0;
  }

  .game-panel h2,
  .game-panel--pizza h2,
  .game-panel--hlb h2 {
    max-width: 9ch;
    font-size: clamp(3.2rem, 14vw, 6.5rem);
  }

  .game-panel__gameplay {
    top: -5%;
    right: 6%;
    height: 112%;
  }

  .game-hook {
    font-size: 0.92rem;
  }
}

@media (max-width: 500px) {
  .topbar nav {
    gap: 14px;
    font-size: 0.62rem;
  }

  .game-panel {
    min-height: 620px;
  }

  .game-panel__top {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .game-icon {
    width: 62px;
  }

  .game-status {
    font-size: 0.54rem;
  }

  .game-panel__meta {
    right: 18px;
    bottom: 24px;
    left: 18px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
