:root {
  --bg: #090b0c;
  --panel: rgba(16, 19, 21, .78);
  --panel-strong: rgba(22, 25, 28, .92);
  --text: #f4f2e9;
  --muted: #a5aca4;
  --acid: #7cff4d;
  --pink: #ff4cc8;
  --amber: #f4b84a;
  --blue: #42d4ff;
  --line: rgba(244, 242, 233, .14);
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --radius: 8px;
}

@font-face {
  font-family: "Gagalin";
  src: url("../fonts/Gagalin-Regular.woff2") format("woff2"),
       url("../fonts/Gagalin-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 255, 77, .1), transparent 26rem),
    radial-gradient(circle at 82% 8%, rgba(255, 76, 200, .11), transparent 28rem),
    linear-gradient(145deg, #090b0c 0%, #101317 48%, #070808 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1120px, calc(100% - 28px));
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 12, .72);
  box-shadow: 0 14px 46px rgba(0, 0, 0, .26);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  transition: background .2s ease, border-color .2s ease;
}

.site-header[data-compact="true"] {
  border-color: rgba(124, 255, 77, .26);
  background: rgba(9, 11, 12, .9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: #121416;
}

.brand span {
  font-family: "Gagalin", Impact, sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  text-decoration: none;
}

.site-nav a {
  padding: 8px 12px;
  color: var(--muted);
  font-size: .92rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  outline: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 116px 0 44px;
}

.hero {
  display: grid;
  min-height: 100svh;
  align-items: center;
  gap: 52px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .74fr);
  padding-top: 104px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--acid);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Gagalin", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: .95;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(4.5rem, 14vw, 10.5rem);
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.18;
}

.hero-text {
  max-width: 620px;
  color: #d8d6cb;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 10px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(124, 255, 77, .55);
  background: rgba(124, 255, 77, .13);
  outline: 0;
  transform: translateY(-2px);
}

.button.primary {
  border-color: rgba(124, 255, 77, .78);
  color: #081008;
  background: var(--acid);
}

.button.ghost {
  border-color: rgba(255, 76, 200, .48);
}

.button.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: .9rem;
}

.button.disabled {
  color: var(--muted);
  pointer-events: none;
}

.signal-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(22, 25, 28, .88), rgba(9, 11, 12, .68));
  box-shadow: var(--shadow);
}

.signal-panel::before {
  position: absolute;
  inset: -2px;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 35%, rgba(124, 255, 77, .34) 45%, transparent 52% 100%);
  transform: translateX(-56%);
  animation: scan 7s ease-in-out infinite;
}

.signal-orbit {
  position: relative;
  display: grid;
  aspect-ratio: 1 / .94;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 50% 45%, rgba(244, 242, 233, .12), transparent 17rem),
    linear-gradient(135deg, rgba(124, 255, 77, .1), transparent 38%);
}

.signal-orbit::before,
.signal-orbit::after {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 242, 233, .13);
  content: "";
}

.signal-orbit::before {
  transform: rotate(8deg);
}

.signal-orbit::after {
  width: 58%;
  border-color: rgba(255, 76, 200, .28);
  transform: rotate(-18deg);
}

.signal-orbit img {
  position: relative;
  z-index: 1;
  width: min(230px, 70%);
  border: 1px solid rgba(244, 242, 233, .18);
  border-radius: 50%;
  background: rgba(244, 242, 233, .9);
  padding: 10px;
  filter: drop-shadow(0 20px 45px rgba(124, 255, 77, .18));
}

.signal-panel dl {
  position: relative;
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.signal-panel div {
  padding: 16px;
}

.signal-panel div + div {
  border-left: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.split-section,
.gallery-section,
.news-section,
.about-section {
  padding-top: 92px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

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

.game-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .22);
  grid-template-columns: 180px minmax(0, 1fr);
}

.game-card.featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr);
}

.game-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.game-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.game-body p:not(.tag) {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  border: 1px solid rgba(244, 184, 74, .42);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--amber);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  gap: 8px;
  grid-auto-flow: dense;
  grid-auto-rows: 150px;
  grid-template-columns: repeat(6, 1fr);
}

.art-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: #141719;
  cursor: zoom-in;
}

.art-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, .34), transparent 45%);
  opacity: 0;
  transition: opacity .18s ease;
}

.art-tile:hover::after,
.art-tile:focus-visible::after {
  opacity: 1;
}

.art-tile:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.art-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.art-tile:hover img,
.art-tile:focus-visible img {
  filter: saturate(1.16) contrast(1.05);
  transform: scale(1.055);
}

.art-tile.wide {
  grid-column: span 2;
}

.art-tile.tall {
  grid-row: span 2;
}

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

.timeline article,
.about-copy,
.tool-stack {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .18);
}

.timeline article {
  padding: 24px;
}

.timeline time {
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline p {
  color: var(--muted);
}

.timeline a,
.mail-link,
.site-footer a {
  color: var(--acid);
  font-weight: 800;
  text-underline-offset: 4px;
}

.about-section {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .65fr);
}

.about-copy {
  padding: 30px;
}

.about-copy p:not(.eyebrow) {
  max-width: 700px;
  color: #d8d6cb;
  font-size: 1.08rem;
}

.tool-stack {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 10px;
  padding: 24px;
}

.tool-stack span {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 8px 11px;
  color: #e8e5d9;
  background: rgba(255, 255, 255, .06);
  font-weight: 800;
}

.site-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 44px 0 34px;
  color: var(--muted);
}

.site-footer span {
  font-family: "Gagalin", Impact, sans-serif;
  color: var(--text);
  font-size: 1.3rem;
}

.lightbox {
  width: min(92vw, 1040px);
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(9, 11, 12, .96);
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  border-radius: 4px;
  object-fit: contain;
}

.lightbox-close {
  display: block;
  min-height: 36px;
  margin: 0 0 10px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
}

@keyframes scan {
  0%, 48% {
    transform: translateX(-64%);
  }
  66%, 100% {
    transform: translateX(64%);
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    width: min(280px, calc(100vw - 28px));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(9, 11, 12, .96);
    box-shadow: var(--shadow);
  }

  .site-nav[data-open="true"] {
    display: grid;
  }

  .site-nav a {
    justify-content: flex-start;
  }

  .hero,
  .about-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 20px;
    padding-top: 114px;
  }

  .signal-panel {
    align-self: start;
  }

  .game-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .game-card,
  .game-card.featured {
    grid-template-columns: 1fr;
  }

  .game-card img {
    min-height: 210px;
    max-height: 330px;
  }

  .gallery-grid {
    grid-auto-rows: 136px;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .brand span {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section {
    width: min(100% - 24px, 1120px);
    padding-bottom: 30px;
  }

  h1 {
    font-size: clamp(4rem, 23vw, 6rem);
  }

  .hero-actions {
    display: grid;
  }

  .signal-panel dl {
    grid-template-columns: 1fr;
  }

  .signal-panel div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .gallery-grid {
    grid-auto-rows: 120px;
    grid-template-columns: repeat(2, 1fr);
  }

  .art-tile.wide {
    grid-column: span 1;
  }

  .about-copy,
  .timeline article,
  .game-body {
    padding: 18px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
