:root {
  --bg: #0e1116;
  --bg-2: #161b22;
  --ink: #f4efe6;
  --muted: #a39e94;
  --accent: #ff6a3d;
  --accent-2: #ffc857;
  --line: rgba(244, 239, 230, 0.12);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Syne", "Outfit", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 106, 61, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(255, 200, 87, 0.12), transparent 50%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.top, main, .foot, .lightbox { position: relative; z-index: 1; }

.top {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  backdrop-filter: blur(14px);
  background: rgba(14, 17, 22, 0.72);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.nav { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; justify-content: flex-end; }
.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding: 6vh 6vw 8vh;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: min(45vw, 480px);
  height: min(45vw, 480px);
  right: 2vw;
  top: 8vh;
  border-radius: 40% 60% 55% 45%;
  background: linear-gradient(140deg, rgba(255, 106, 61, 0.35), rgba(255, 200, 87, 0.08));
  filter: blur(8px);
  animation: morph 12s ease-in-out infinite;
  z-index: -1;
}

@keyframes morph {
  0%, 100% { border-radius: 40% 60% 55% 45%; transform: translateY(0) rotate(0deg); }
  50% { border-radius: 55% 45% 40% 60%; transform: translateY(18px) rotate(8deg); }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin: 0 0 0.75rem;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #1a0f0a;
}
.btn.ghost:hover { border-color: rgba(244, 239, 230, 0.35); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  gap: 1.5rem 2rem;
  margin-top: 2.5rem;
}
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}
.hero-stats span { color: var(--muted); font-size: 0.88rem; }

.hero-shot {
  margin: 0;
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--bg-2);
}
.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.hero-shot figcaption {
  padding: 0.85rem 1.1rem 1.05rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

section { padding: 7vh 6vw; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}
.section-head p { margin: 0; color: var(--muted); line-height: 1.6; }

.about-grid, .games-grid, .contact-grid, .studio-grid, .gallery-grid, .news-list {
  display: grid;
  gap: 1.25rem;
}
.about-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.studio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card, .game, .contacts article, .studio-card, .news-list article {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h3, .game h3, .contacts h3, .studio-card h3, .news-list h3 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  letter-spacing: -0.03em;
}
.card p, .game p, .contacts p, .news-list p { margin: 0; color: var(--muted); line-height: 1.55; }

.game { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.game.featured { grid-column: span 2; }
.game-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #12161d;
}
.game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.game:hover .game-media img { transform: scale(1.04); }
.game-media .badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0f0a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.game-media.placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255,106,61,.15), rgba(255,200,87,.08)),
    repeating-linear-gradient(-45deg, transparent, transparent 12px, rgba(255,255,255,.03) 12px, rgba(255,255,255,.03) 24px);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.game-body { padding: 1.25rem 1.35rem 1.5rem; }
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.plat { color: var(--muted); font-size: 0.85rem; }

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gallery-grid a {
  position: relative;
  display: block;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}
.gallery-grid a.wide { grid-column: span 2; }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-grid span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  background: linear-gradient(transparent, rgba(10,12,16,.85));
  font-size: 0.9rem;
}

.studio-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}
.platforms {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  color: var(--muted);
}
.platforms strong {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
}

.news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-list time {
  display: block;
  color: var(--accent-2);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.jobs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
}
.jobs-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.jobs-list li:last-child { border-bottom: 0; }
.jobs-list li span:first-child { color: var(--ink); font-weight: 600; }

.contacts a { color: var(--accent-2); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 6vw 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 8, 12, 0.88);
  display: grid;
  place-items: center;
  padding: 4vw;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  border-radius: 1rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(22, 27, 34, 0.9);
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero-shot { max-width: 640px; }
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game.featured { grid-column: span 1; }
  .gallery-grid a.wide { grid-column: span 1; }
}

@media (max-width: 900px) {
  .about-grid, .games-grid, .gallery-grid, .studio-grid, .news-list, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 6vw;
    top: 68px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem;
  }
  .nav-toggle { display: inline-block; }
}
