:root {
  color-scheme: dark;
  --bg: #070b14;
  --surface: #11192b;
  --surface-alt: #0d1423;
  --surface-highlight: #1d2740;
  --text: #e7ecff;
  --text-muted: #9aa4c4;
  --primary: #4ce0ff;
  --primary-dark: #2fb0d2;
  --accent: #5e45ff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 24px 60px -35px rgba(0, 0, 0, 0.8);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(94, 69, 255, 0.22), transparent 55%), var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--primary-dark);
}

.hero {
  padding: clamp(5.5rem, 8vw, 7rem) 1.5rem clamp(4rem, 6vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -18%;
  background-image: url('assets/games/header_background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: saturate(0.45) brightness(0.45);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.3) 0%, rgba(7, 11, 20, 0.85) 70%, rgba(7, 11, 20, 1) 100%),
    radial-gradient(circle at 80% 0%, rgba(76, 224, 255, 0.28), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 1100px;
  display: grid;
  gap: 3rem;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.hero__banner {
  width: min(100%, 460px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}


.section-heading {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.games {
  padding: 2.8rem 1.5rem 3.8rem;
}

.games__grid {
  display: grid;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-areas:
    "media"
    "content";
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.game-card--clickable {
  cursor: pointer;
}

.game-card--clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 6px;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px -50px rgba(76, 224, 255, 0.8);
  border-color: rgba(76, 224, 255, 0.35);
}

.game-card__media {
  grid-area: media;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.game-card__image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.game-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card__image img,
.game-card:focus-within .game-card__image img {
  transform: scale(1.05);
}

.game-card__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  justify-content: flex-start;
}

.game-card__title {
  font-size: 1.6rem;
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.game-card__description {
  margin: 0;
  color: var(--text-muted);
}

.game-card__description + .game-card__description {
  margin-top: 0.75rem;
}

.game-card__stores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.3rem, 3.3rem));
  gap: 0.4rem;
  width: auto;
  margin: 0 auto;
  justify-content: center;
  justify-items: center;
  align-self: center;
  max-width: calc(3.3rem * 5 + 0.4rem * 4);
}

.game-card__stores[data-columns='6'] {
  grid-template-columns: repeat(6, 3.3rem);
}

.game-card__gallery {
  grid-area: gallery;
  display: grid;
  gap: 0.75rem;
  width: min(100%, 360px);
  justify-self: center;
}

.game-card__gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 18px 45px -28px rgba(0, 0, 0, 0.7);
}

.game-card__store {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: calc(var(--radius-sm) - 4px);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
  padding: 0.25rem;
}

.game-card__store:hover,
.game-card__store:focus-visible {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: rgba(76, 224, 255, 0.25);
}

.game-card__store img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(var(--radius-sm) - 6px);
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.games__noscript {
  color: var(--text-muted);
  text-align: center;
}

.studio {
  padding: 5rem 1.5rem 4rem;
  background: var(--surface-alt);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.studio .section-heading {
  display: grid;
  gap: 1.5rem;
}

.studio__socials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.studio__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.studio__socials a:hover,
.studio__socials a:focus-visible {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 14px 30px -18px rgba(76, 224, 255, 0.6);
}

.studio__socials img {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
  filter: invert(1);
}

.studio__content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  justify-content: center;
  padding-top: 2rem;
}

.studio__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.studio__links--inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
}

.studio__links--inline li {
  margin: 0;
}

.studio__links a {
  font-weight: 500;
}

.site-footer {
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background-color: #05080f;
  background-image:
    linear-gradient(180deg, rgba(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 1) 100%),
    url('assets/games/header_background.png');
  background-size: 100% 100%, cover;
  background-position: center, center bottom;
  background-repeat: no-repeat;
  background-attachment: scroll, fixed;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 720px) {
  .hero__inner {
    grid-template-columns: auto 1fr;
  }

  .games__grid {
    grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  }

  .game-card {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .game-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: "media content";
    align-items: start;
  }

  .game-card__content {
    padding-right: 0.5rem;
    align-self: flex-start;
    justify-content: flex-start;
  }
}

.game-card--featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: "media content gallery";
  align-items: stretch;
  gap: 1.75rem;
}

.game-card--featured .game-card__media {
  align-items: flex-start;
  justify-content: flex-start;
}

.game-card--featured .game-card__stores {
  justify-content: flex-start;
  justify-items: flex-start;
  align-self: flex-start;
}

.game-card--featured .game-card__gallery {
  align-self: stretch;
}

@media (max-width: 1023px) {
  .game-card--featured {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "content"
      "gallery";
  }

  .game-card--featured .game-card__media {
    align-items: center;
    justify-content: center;
  }

  .game-card--featured .game-card__stores {
    justify-content: center;
    justify-items: center;
    align-self: center;
  }

  .game-card--featured .game-card__gallery {
    justify-self: center;
    max-width: min(100%, 480px);
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 4rem 1.1rem 2.6rem;
  }

  .hero__inner {
    gap: 1.5rem;
  }

  .games {
    padding: 2.4rem 1.1rem 3.2rem;
  }

  .game-card__stores {
    grid-template-columns: repeat(auto-fit, minmax(3.1rem, 3.1rem));
    justify-content: center;
    width: auto;
    max-width: calc(3.1rem * 5 + 0.35rem * 4);
    gap: 0.35rem;
  }

  .game-card--featured .game-card__stores {
    justify-content: center;
  }
}

@media (max-width: 719px) {
  .game-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.4rem;
  }

  .game-card__content {
    display: contents;
  }

  .game-card__title {
    order: 1;
    text-align: center;
  }

  .game-card__media {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .game-card__image {
    width: 100%;
    max-width: 420px;
  }

  .game-card__stores {
    order: 3;
  }

  .game-card__description {
    order: 4;
    text-align: left;
  }

  .game-card__gallery {
    order: 5;
  }
}
