:root { color-scheme: light; font-family: Nunito, Arial, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #211628; }
a { -webkit-tap-highlight-color: transparent; }

.hero {
  position: relative;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  isolation: isolate;
  background: #211628;
  color: #fff;
}
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-art img { object-fit: cover; object-position: center; }
@media (min-width: 701px) and (max-aspect-ratio: 1/1) {
  .hero-art img { object-position: center 68%; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(25, 11, 32, .08), transparent 55%, rgba(25, 11, 32, .08));
}
.hero-copy {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 33%;
  width: min(47vw, 600px);
  transform: translate(-50%, -50%);
  animation: bob 2s ease-in-out infinite;
}
.hero-copy h1 { margin: 0; }
.hero-copy h1 img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 16px rgba(18, 8, 27, .45)); }
.hero-copy p {
  margin: 0;
  color: #f0eaf2;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  text-align: center;
  letter-spacing: .04em;
  text-shadow: 0 2px 9px #1d1029;
}
.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: clamp(22px, 4vh, 48px);
  left: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #bec1c7;
  background: #101010;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .32);
  text-decoration: none;
  transform: translateX(-50%);
  animation: bob 2s ease-in-out infinite;
}
.scroll-cue svg { display: block; }
.scroll-cue:hover { color: #e4e5e8; background: #1e1e1e; }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 8px; } }

.gallery { position: relative; z-index: 1; width: 100%; background: #211628; }
.game-grid { display: grid; width: 100%; grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr)); grid-auto-rows: var(--cell-size, 25vw); gap: 0; }
.game-tile { position: relative; display: block; min-width: 0; min-height: 0; aspect-ratio: 1; overflow: hidden; background: #eee9df; container-type: inline-size; }
.game-cover { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .45s ease; }
.tile-trigger { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.game-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; overflow: auto; padding: 14px; color: #fff; background: linear-gradient(180deg, rgba(19, 11, 30, .82), rgba(19, 11, 30, .94)); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s; }
.game-overlay > .game-info { opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .3s ease; }
.game-info { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; text-align: center; }
.game-icon { display: block; width: clamp(44px, 19cqw, 72px); height: clamp(44px, 19cqw, 72px); flex: none; border-radius: 21%; object-fit: cover; box-shadow: 0 4px 16px rgba(0,0,0,.34); }
.game-info h2 { margin: 11px 0 0; font-size: clamp(17px, 7.5cqw, 27px); font-weight: 900; line-height: 1.08; text-wrap: balance; }
.game-info p { margin: 4px 0 13px; color: #f3eaff; font-size: clamp(12px, 4.5cqw, 16px); font-weight: 800; line-height: 1.2; text-wrap: balance; }
.store-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; width: 100%; }
.store-link { display: inline-flex; align-items: center; justify-content: center; height: 44px; flex: none; border-radius: 7px; transition: transform .2s ease; }
.store-link:hover { transform: translateY(-3px); }
.store-link img { display: block; width: auto; height: 40px; max-width: 100%; object-fit: contain; }
.store-link--play img { height: 51px; }
.game-tile:focus-within { z-index: 3; }
.tile-trigger:focus-visible, .store-link:focus-visible, .dialog-close:focus-visible, .scroll-cue:focus-visible, .contact-link:focus-visible, .site-footer a:focus-visible { outline: 4px solid #ffe252; outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) {
  .game-tile:hover .game-cover, .game-tile:focus-within .game-cover { transform: scale(1.07); filter: saturate(1.13); }
  .game-tile:hover .game-overlay, .game-tile:focus-within .game-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
  .game-tile:hover .game-overlay > .game-info, .game-tile:focus-within .game-overlay > .game-info { opacity: 1; transform: translateY(0); }
}
@container (max-width: 290px) {
  .game-overlay { padding: 8px; }
  .game-info h2 { margin-top: 7px; }
  .game-info p { margin-bottom: 7px; }
  .store-links { flex-direction: column; gap: 1px; }
}
@container (min-width: 500px) {
  .game-icon { width: 96px; height: 96px; }
  .game-info h2 { margin-top: 17px; font-size: 36px; }
  .game-info p { margin: 8px 0 20px; font-size: 21px; }
  .store-links { gap: 12px; }
  .store-link { height: 54px; }
  .store-link img { height: 48px; }
  .store-link--play img { height: 60px; }
}
.game-dialog { position: fixed; width: min(420px, calc(100vw - 32px)); max-height: min(90vh, 640px); padding: 36px 22px 26px; overflow: auto; border: 2px solid rgba(255,255,255,.28); border-radius: 24px; color: #fff; background: linear-gradient(160deg, #3e2870, #211628 68%); box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.game-dialog::backdrop { background: rgba(16, 8, 27, .72); backdrop-filter: blur(7px); }
.game-dialog .game-icon { width: 86px; height: 86px; }
.game-dialog .game-info h2 { margin-top: 18px; font-size: clamp(23px, 6vw, 29px); }
.game-dialog .game-info p { margin: 8px 0 22px; font-size: 16px; }
.game-dialog .store-links { gap: 6px 12px; }
.game-dialog .store-link { height: 52px; }
.game-dialog .store-link img { height: 44px; }
.game-dialog .store-link--play img { height: 56px; }
.dialog-close { position: absolute; top: 8px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.13); font: 28px/1 Arial, sans-serif; cursor: pointer; }
.dialog-close:hover { background: rgba(255,255,255,.25); }
.contact { display: grid; place-items: center; min-height: 380px; padding: 72px 20px 80px; color: #fff; background: radial-gradient(circle at 50% 0, #4a3166 0, #281b37 45%, #211628 100%); text-align: center; }
.contact-inner { width: min(100%, 720px); }
.contact h2 { margin: 0; font-size: clamp(32px, 4.4vw, 56px); font-weight: 900; line-height: 1.1; }
.contact p { margin: 10px 0 32px; color: #ddd2e8; font-size: clamp(13px, 1.3vw, 16px); font-weight: 700; }
.contact-link { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 70px; max-width: 100%; padding: 12px 22px; border: 2px solid rgba(255,255,255,.85); border-radius: 20px; color: #fff; background: rgba(255,255,255,.08); box-shadow: 0 14px 30px rgba(12,6,20,.2); font-size: clamp(15px, 1.8vw, 20px); font-weight: 900; text-decoration: none; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.contact-link svg { flex: none; color: #ffe25d; }
.contact-link:hover { transform: translateY(-5px); background: rgba(255,255,255,.15); box-shadow: 0 19px 36px rgba(12,6,20,.32); }
.contact-arrow { color: #ffe25d; font-size: 25px; line-height: 1; }
.site-footer { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 16px clamp(22px, 3vw, 48px); background: #f8f7f2; color: #302a3c; font-size: 13px; font-weight: 900; }
.site-footer a { margin-left: 20px; padding-left: 20px; border-left: 1px solid #aaa4ad; color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .hero { min-height: 0; }
  .hero-art img { object-position: center; }
  .hero-copy { width: min(86vw, 480px); }
  .hero-copy p { margin-top: -4px; font-size: clamp(14px, 3.6vw, 18px); }
  .scroll-cue { bottom: 22px; }
  .contact { min-height: 310px; padding: 58px 20px 64px; }
  .contact p { margin-bottom: 28px; }
  .contact-link { gap: 10px; min-height: 62px; padding: 10px 15px; border-radius: 16px; }
  .contact-link svg { width: 23px; height: 23px; }
  .contact-arrow { font-size: 20px; }
}
@media (max-width: 420px) {
  .hero-copy { width: 86vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .scroll-cue { animation: none; }
  .game-cover, .game-overlay, .game-overlay > .game-info, .store-link, .contact-link { transition: none; }
}
