/* ===== Variables ===== */
:root {
  --bg-dark: #0a0e1a;
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(20, 30, 55, 0.85);
  --neon-cyan: #00e5ff;
  --neon-purple: #a855f7;
  --neon-pink: #ff6b9d;
  --neon-blue: #3b82f6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1a1040 40%, #0d2137 70%, #0a0e1a 100%);
  --gradient-btn: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  --gradient-btn-hover: linear-gradient(135deg, #33ecff, #c084fc);
  --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --border-subtle: rgba(0, 229, 255, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: 56px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-btn-hover);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--primary span,
.btn--primary {
  position: relative;
  z-index: 1;
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1.0625rem;
}

.btn--card {
  padding: 10px 24px;
  font-size: 0.9375rem;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--neon-cyan);
  border-radius: 50px;
  margin-top: auto;
  align-self: flex-start;
  transition: var(--transition);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
}

.logo__icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

.logo__accent {
  color: var(--neon-cyan);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-btn);
  transition: width var(--transition);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--accent {
  color: var(--neon-cyan);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 20px 24px;
  background: rgba(10, 14, 26, 0.98);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu__link {
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color var(--transition);
}

.mobile-menu__link:hover {
  color: var(--neon-cyan);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero__glow--1 {
  width: 500px;
  height: 500px;
  background: rgba(0, 229, 255, 0.12);
  top: -10%;
  right: -5%;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: rgba(168, 85, 247, 0.15);
  bottom: -5%;
  left: -5%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 40px 20px 80px;
}

.hero__title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 50%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__scroll-dot {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(0, 229, 255, 0.4);
  border-radius: 12px;
  position: relative;
}

.hero__scroll-dot::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 2px;
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== Fade-in on load ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in--delay-1 { animation-delay: 0.2s; }
.fade-in--delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }

/* ===== Catalog ===== */
.catalog {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0f1729 50%, var(--bg-dark) 100%);
}

.catalog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0.3;
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.game-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.game-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.game-card__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(168, 85, 247, 0.05));
  opacity: 0;
  transition: opacity var(--transition);
}

.game-card__link:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  background: var(--bg-card-hover);
}

.game-card__link:hover::before {
  opacity: 1;
}

.game-card__link:hover .btn--card {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
}

.game-card__icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 229, 255, 0.2));
  transition: transform var(--transition);
}

.game-card__link:hover .game-card__icon {
  transform: scale(1.08) rotate(-3deg);
}

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

.game-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.game-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.65;
  flex: 1;
}

/* ===== Advantages ===== */
.advantages {
  background: var(--bg-dark);
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.advantage-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: var(--transition);
}

.advantage-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
}

.advantage-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--neon-cyan);
}

.advantage-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.advantage-card__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ===== CTA ===== */
.cta {
  padding: 80px 0;
}

.cta__box {
  text-align: center;
  padding: 64px 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.cta__box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
  animation: cta-pulse 6s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.cta__title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  background: linear-gradient(135deg, var(--text-primary), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta__text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  position: relative;
  line-height: 1.7;
}

.cta__box .btn {
  position: relative;
}

/* ===== Contacts ===== */
.contacts {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0c1222 100%);
}

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: var(--transition);
  text-align: center;
}

a.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.contact-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px;
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
}

.contact-card__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-card--max {
  border-color: rgba(255, 107, 157, 0.3);
}

.contact-card--max .contact-card__icon {
  background: rgba(255, 107, 157, 0.15);
  color: var(--neon-pink);
}

.contact-card--max:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.2);
}

.contact-card--tg {
  border-color: rgba(59, 130, 246, 0.3);
}

.contact-card--tg .contact-card__icon {
  background: rgba(59, 130, 246, 0.15);
  color: var(--neon-blue);
}

.contact-card--tg:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.contact-card--vk {
  border-color: rgba(0, 119, 255, 0.3);
}

.contact-card--vk .contact-card__icon {
  background: rgba(0, 119, 255, 0.15);
  color: #0077ff;
}

.contact-card--vk:hover {
  border-color: #0077ff;
  box-shadow: 0 8px 24px rgba(0, 119, 255, 0.2);
}

.contact-card--email {
  border-color: rgba(0, 229, 255, 0.3);
}

.contact-card--email .contact-card__icon {
  background: rgba(0, 229, 255, 0.15);
  color: var(--neon-cyan);
}

.contact-card__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px dashed rgba(0, 229, 255, 0.3);
  color: var(--neon-cyan);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.contact-card__email:hover {
  background: rgba(0, 229, 255, 0.15);
  border-style: solid;
}

.contact-card__copy-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.contact-card__copy-icon svg {
  width: 16px;
  height: 16px;
}

.contact-card__copied {
  font-size: 0.8125rem;
  color: #4ade80;
  opacity: 0;
  transform: translateY(4px);
  transition: var(--transition);
}

.contact-card__copied.is-shown {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Footer ===== */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-subtle);
  background: #060a14;
}

.footer__inner {
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--neon-cyan);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer__sep {
  color: var(--text-muted);
}

.footer__disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto 20px;
}

.footer__disclaimer a {
  color: var(--neon-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__disclaimer a:hover {
  color: var(--text-primary);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .section {
    padding: 72px 0;
  }

  .section__header {
    margin-bottom: 40px;
  }

  .game-card__link {
    padding: 24px;
  }

  .cta__box {
    padding: 48px 24px;
  }

  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .hero__glow--1 {
    width: 300px;
    height: 300px;
  }

  .hero__glow--2 {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 64px;
  }

  .catalog__grid {
    grid-template-columns: 1fr;
  }

  .advantages__grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__glow,
  .hero__scroll-dot::after,
  .cta__box::before {
    animation: none;
  }
}
