:root {
  --blue: #3224e9;
  --cyan: #00c7ff;
  --header-blue: #0e89c9;
  --ink: #1d1b3a;
  --muted: #5d5b7a;
  --bg: #ffffff;
  --bg-soft: #f4f6ff;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(50, 36, 233, 0.12);
  --max: 1170px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; font-weight: 800; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo img { height: 44px; width: auto; }

.nav { display: flex; gap: 36px; }
.nav a {
  position: relative;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--blue); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: none; cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 3px; margin: 5px 0;
  background: var(--ink); border-radius: 3px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, var(--blue) 0%, #2a5cf0 50%, var(--cyan) 100%);
  padding: 120px 0 140px;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.hero::before { width: 520px; height: 520px; right: -140px; top: -180px; }
.hero::after { width: 320px; height: 320px; left: -120px; bottom: -160px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.hero p { font-size: 19px; max-width: 640px; opacity: 0.95; margin: 0; }
.hero .container { position: relative; z-index: 1; }

.page-hero {
  color: #fff;
  text-align: center;
  padding: 90px 0;
  background: linear-gradient(120deg, var(--blue), var(--cyan));
  background-size: cover;
  background-position: center;
}
.page-hero h1 { font-size: clamp(36px, 5vw, 54px); margin: 0; }
.page-hero p { margin: 8px 0 0; font-size: 18px; opacity: 0.9; }

/* ---------- Home blocks ---------- */
.blocks { padding: 100px 0 60px; }
.block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
  margin-bottom: 100px;
}
.block:nth-child(even) .block-image { order: 2; }
.block-image img { width: 100%; max-height: 380px; object-fit: contain; }
.block h2 { font-size: 38px; }
.block p { color: var(--muted); font-size: 17px; }
.title-line { display: flex; gap: 6px; margin: 0 0 20px; }
.title-line span { height: 4px; border-radius: 4px; background: var(--blue); }
.title-line span:nth-child(1) { width: 40px; }
.title-line span:nth-child(2) { width: 10px; background: var(--cyan); }
.title-line span:nth-child(3) { width: 6px; background: var(--cyan); }

.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 40px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 8px 24px rgba(50, 36, 233, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(50, 36, 233, 0.38); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 auto 100px;
}
.stat {
  text-align: center;
  padding: 36px 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.stat strong {
  display: block;
  font-size: 46px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--muted); font-weight: 600; }

/* ---------- Games ---------- */
.section { padding: 90px 0; }
.section-title { text-align: center; font-size: 36px; margin-bottom: 50px; }
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  transition: transform 0.25s;
}
.game-card:hover { transform: translateY(-6px); }
.game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.4s; }
.game-card:hover img { transform: scale(1.05); }
.game-card .info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 60px 24px 22px;
  color: #fff;
  background: linear-gradient(transparent, rgba(10, 8, 50, 0.85));
}
.game-card h3 { margin: 0; font-size: 22px; }
.game-card .meta { font-size: 14px; opacity: 0.85; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  background: rgba(10, 8, 40, 0.7);
}
.modal.open { display: flex; }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  animation: pop 0.25s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(20px); } }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  font-size: 24px; line-height: 1;
  cursor: pointer;
}
.modal-banner { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.modal-body { padding: 32px; }
.modal-body p { color: var(--muted); }
.game-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.game-stats div { background: var(--bg-soft); border-radius: 12px; padding: 10px 16px; font-size: 14px; }
.game-stats b { display: block; font-size: 16px; color: var(--ink); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.shots img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stores img { height: 48px; width: auto; }

/* ---------- Jobs ---------- */
.job {
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 34px;
  margin-bottom: 24px;
}
.job h2 { font-size: 28px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.job-tags span {
  font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  background: #fff; color: var(--blue);
}
.job p, .job li { color: var(--muted); }
.job-details { display: none; }
.job.open .job-details { display: block; }
.job h3 { font-size: 18px; margin: 24px 0 8px; }
.job-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn-outline {
  background: none;
  color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.btn-outline:hover { box-shadow: inset 0 0 0 2px var(--blue); }

/* ---------- About / team ---------- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-intro p { color: var(--muted); font-size: 17px; }
.about-intro img { border-radius: var(--radius); box-shadow: var(--shadow); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}
.member { text-align: center; }
.member img {
  width: 100%;
  aspect-ratio: 420 / 460;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 14px;
}
.member h3 { font-size: 18px; margin: 0; }
.member span { color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(120deg, #1a1280, var(--blue));
  padding: 70px 0 0;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 60px;
}
.footer-grid img { height: 44px; width: auto; margin-bottom: 18px; }
.footer-grid h4 { color: #fff; font-size: 20px; margin: 0 0 18px; }
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 30px; font-size: 15px; }
.contacts b { display: block; color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}
.socials a:hover { background: var(--cyan); }
.socials svg { width: 17px; height: 17px; fill: #fff; }
.copyright {
  margin-top: 50px;
  padding: 22px 0;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s, transform 0.7s; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 84px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
  }
  .nav a { padding: 16px 20px; border-top: 1px solid #eee; }
  .nav a::after { display: none; }
  .nav-open .nav { max-height: 300px; }

  .block, .about-intro, .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .block:nth-child(even) .block-image { order: 0; }
  .block { margin-bottom: 70px; }
  .block-image img { max-height: 260px; }
  .stats { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 100px; }
}

@media (max-width: 560px) {
  .contacts { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .modal-body, .job { padding: 22px; }
}
