/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-pattern: url("../images/pattern.png");
  --pattern-tile: 640px;
  /* Плашки: играть сейчас, точки слайдера, карточки особенностей, статистика трейлера */
  --plate-bg: radial-gradient(64.01% 62.75% at 36.9% 39.14%, #ffe10f 0%, #ff8f0f 100%), #e8d9ce;
  --plate-border: rgba(61, 40, 16, 0.28);
  --plate-text: #2a1810;
  --plate-text-muted: rgba(42, 24, 16, 0.82);
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  /* Без тёмной подложки: только плитка паттерна, как в файле (не dim через opacity/color) */
  background-color: transparent;
  background-image: var(--bg-pattern);
  background-repeat: repeat;
  background-size: var(--pattern-tile) var(--pattern-tile);
  background-position: 0 0;
  /* fixed даёт «прибитый» фон на десктопе; на iOS/Android часто не рисуется — там ниже scroll */
  background-attachment: fixed;
}

@media (max-width: 1024px) {
  html {
    background-attachment: scroll;
    /* ~2 плитки паттерна на ширину вьюпорта */
    background-size: 50vw 50vw;
  }
}

body {
  position: relative;
  z-index: 1;
  font: 900 18px / 130% 'Nunito Sans', 'Noto Sans', sans-serif;
  color: #fff;
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ===== ЗАГОЛОВКИ (Nunito Sans + обводка) ===== */
h1,
h2,
h3 {
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  font-size: 50px;
  line-height: 150%;
  margin: 0;
  text-shadow:
    0 6px 0 #000,
    0 -2px 0 #000,
    0 2px 0 #000,
    -2px 0 0 #000,
    2px 0 0 #000,
    -2px -2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    2px 2px 0 #000;
}

h3 {
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 150%;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

body > section,
footer.footer {
  position: relative;
}

.trailer .trailer__bg {
  z-index: 0;
}

.trailer > .container {
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  margin-bottom: 0;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-video,
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg-video {
  z-index: 0;
  pointer-events: none;
}

.hero__bg-img {
  z-index: 1;
  transition: opacity 0.8s ease;
}

.hero--video-ready .hero__bg-img {
  opacity: 0;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* Полупрозрачный тёмный градиент поверх background-hero */
  background:
    linear-gradient(
      to bottom,
      rgba(12, 6, 2, 0.55) 0%,
      rgba(8, 4, 2, 0.35) 42%,
      rgba(6, 3, 1, 0.5) 72%,
      rgba(4, 2, 0, 0.72) 100%
    ),
    radial-gradient(
      ellipse 120% 80% at 50% 40%,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.35) 100%
    );
  z-index: 1;
  pointer-events: none;
}

.nav {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.nav__logo-img {
  height: clamp(140px, 22vw, 200px);
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 24px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 769px) {
  .hero__content {
    padding: 64px 24px 120px;
  }
}

.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.6;
  max-width: 700px;
  text-align: center;
}

/* h1 внутри абзаца для SEO: визуально как остальной текст */
.hero__title-inline {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  text-shadow: none;
}

.hero__stores {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.hero__store-link {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.hero__store-link:hover {
  transform: scale(1.04);
  opacity: 0.92;
}

.hero__store-link:focus-visible {
  outline: 3px solid #ffdf20;
  outline-offset: 4px;
}

.hero__store-img {
  display: block;
  height: clamp(48px, 12vw, 60px);
  width: auto;
  max-width: min(100%, 220px);
}

.hero__wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  line-height: 0;
  font-size: 0;
  display: block;
}

.hero__wave svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 40px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  border: 3px solid #ffdf20;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.btn__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn--green {
  background: linear-gradient(to bottom, #05df72, #00a63e);
}

.btn--purple {
  background: linear-gradient(to bottom, #ad46ff, #8200db);
  border-color: #dab2ff;
}

.btn--large {
  padding: 28px 56px;
  font-size: 26px;
  border-radius: 24px;
  border-width: 5px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
}

.btn--large .btn__icon {
  width: 32px;
  height: 32px;
}

/* ===== SECTION TITLES (plain text style) ===== */
.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 50px);
}

.section-subtitle {
  font-size: 18px;
  color: rgba(255, 210, 48, 0.8);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== SCREENSHOTS ===== */
.screenshots {
  background: transparent;
  padding: 60px 0 80px;
  position: relative;
  overflow-x: clip;
}

.screenshots .container .section-title {
  margin-bottom: 28px;
}

/* Карусель на всю ширину вьюпорта (вне .container) */
.screenshots__carousel-wrap {
  width: 100vw;
  max-width: 100%;
  margin-left: calc(50% - 50vw);
  position: relative;
}

.carousel {
  position: relative;
  margin-top: 0;
  overflow: hidden;
  /* чуть больше снизу: box-shadow слайдов не обрезается краем блока */
  padding: 20px 0 40px;
}

.carousel__track {
  display: flex;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel__slide {
  flex-shrink: 0;
  width: 64%;
  margin: 0 1%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: transform 0.5s;
  opacity: 1;
  transform: scale(0.88);
}

.carousel__slide--active {
  transform: scale(1);
  z-index: 2;
}

.carousel__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 10;
  transition: background 0.2s;
}

.carousel__arrow:hover {
  background: rgba(255, 255, 255, 0.38);
}

.carousel__arrow svg {
  width: 28px;
  height: 28px;
}

.carousel__arrow--prev {
  left: 16px;
}

.carousel__arrow--next {
  right: 16px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.carousel__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--plate-bg);
  border: 2px solid var(--plate-border);
  cursor: pointer;
  transition: transform 0.2s;
}

.carousel__dot--active {
  transform: scale(1.25);
}

/* ===== GAME STATS (1v1 / 7+ / 2D) — после скриншотов ===== */
.game-stats {
  background: transparent;
  padding: 72px 0 56px;
  position: relative;
}

.game-stats .trailer__stats {
  margin-top: 0;
}

/* ===== TRAILER ===== */
.trailer {
  background: transparent;
  padding: 100px 0;
  position: relative;
}

.trailer__bg {
  display: none;
}

.trailer__title {
  text-align: center;
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 50px);
}

.trailer__subtitle {
  font-size: 18px;
  color: rgba(255, 210, 48, 0.8);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.trailer__video-wrap {
  max-width: 860px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.trailer__video-inner {
  position: relative;
  aspect-ratio: 16 / 9;
  background: transparent;
}

.trailer__video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.trailer__video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.08) 0%,
    transparent 40%
  );
  transition: opacity 0.3s;
  pointer-events: none;
}

.trailer__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(to right, #9ae630, #6fcc00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  z-index: 3;
}

.trailer__play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.trailer__play-btn svg {
  width: 36px;
  height: 36px;
  color: #fff;
  margin-left: 4px;
}

.trailer__stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 40px);
  margin-top: 48px;
}

.trailer__stat {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px clamp(16px, 3vw, 32px);
  text-align: center;
  min-width: clamp(140px, 18vw, 200px);
  box-shadow: none;
}

.trailer__stat-value {
  display: block;
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  text-shadow:
    0 6px 0 #000,
    0 -2px 0 #000,
    0 2px 0 #000,
    -2px 0 0 #000,
    2px 0 0 #000,
    -2px -2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    2px 2px 0 #000;
}

.trailer__stat-label {
  display: block;
  font-size: clamp(17px, 2.5vw, 24px);
  font-weight: 700;
  color: #000000;
  margin-top: 10px;
  line-height: 1.35;
  text-shadow: none;
}

/* Декор wolfskelet: слева снизу у связки «трейлер + CTA» */
.trailer-cta-decor-wrap {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.trailer-cta-decor-wrap .trailer,
.trailer-cta-decor-wrap .cta {
  position: relative;
  z-index: 1;
}

.trailer-cta-decor {
  position: absolute;
  left: clamp(-72px, -7vw, -8px);
  bottom: -10px;
  width: min(68vw, 593px);
  max-width: 593px;
  height: auto;
  max-height: min(90vh, 1120px);
  object-fit: contain;
  object-position: left bottom;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* ===== CTA ===== */
.cta {
  background: transparent;
  padding: 60px 0 80px;
}

.cta__inner {
  text-align: center;
  padding: 40px 0;
}

.cta__title {
  font-size: clamp(28px, 4vw, 50px);
  margin: 0 0 32px;
  line-height: 1.25;
}

/* ===== FOOTER ===== */
.footer {
  background: #000000;
  border-top: none;
  padding: 48px 0;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

.footer__logo-text {
  font-size: clamp(15px, 3.8vw, 22px);
  font-weight: 900;
  color: #f5f0e8;
  text-align: center;
  line-height: 1.3;
}

.footer__copy {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  align-self: stretch;
  margin: 0;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__link {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer__link:hover {
  color: #ffffff;
  opacity: 1;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .trailer__stats {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .trailer__stat {
    min-width: auto;
    width: 100%;
    max-width: 320px;
  }

  .trailer__stat-value {
    font-size: clamp(44px, 12vw, 64px);
  }

  .trailer__stat-label {
    font-size: clamp(16px, 4.2vw, 22px);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 480px;
    /* иначе волна при translateY обрезается и остаётся тёмная щель до следующего блока */
    overflow: visible;
  }

  .hero__wave {
    transform: translateY(6px);
  }

  .hero__wave svg {
    height: 56px;
  }

  .nav {
    padding: 10px 0;
  }

  .nav__logo-img {
    height: clamp(100px, 28vw, 140px);
  }

  .hero__content {
    padding-bottom: 72px;
    gap: 16px;
  }

  /* Плотнее расстояние между секциями */
  .screenshots {
    padding: 32px 0 44px;
  }

  .screenshots .container .section-title {
    margin-bottom: 16px;
  }

  .carousel {
    padding: 12px 0 36px;
  }

  .carousel__dots {
    margin-top: 12px;
  }

  .game-stats {
    padding: 32px 0 24px;
  }

  .trailer__stats {
    gap: 20px;
  }

  .trailer {
    padding: 40px 0 44px;
  }

  .trailer__title {
    margin-bottom: 12px;
  }

  .cta {
    padding: 28px 0 40px;
  }

  .cta__inner {
    padding: 16px 0;
  }

  .cta__title {
    margin-bottom: 20px;
  }

  .footer {
    padding: 28px 0;
  }

  .btn {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
  }

  .btn--large {
    padding: 20px 36px;
    font-size: 20px;
    border-radius: 16px;
  }

  .carousel__slide {
    width: 80%;
    margin: 0 1.5%;
  }

  .section-header {
    padding: 16px 24px;
  }

  .trailer__play-btn {
    width: 60px;
    height: 60px;
  }

  .trailer__play-btn svg {
    width: 28px;
    height: 28px;
  }

  .footer__links {
    flex-direction: column;
    gap: 12px;
  }

  /* Планшеты / узкие окна: не ×2, чтобы не заезжать на трейлер и кнопки */
  .trailer-cta-decor {
    width: min(36vw, 200px);
    max-width: none;
    max-height: min(32vh, 240px);
    left: clamp(-16px, -3vw, -4px);
  }
}

@media (max-width: 640px) {
  /* Одинаковый прямоугольник для Google и RuStore (пропорции бейджа 480×142) */
  .hero__store-link {
    position: relative;
    display: block;
    width: min(100%, 220px);
    aspect-ratio: 480 / 142;
  }

  .hero__store-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero__stores {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 12px;
  }

  .hero__store-link {
    width: min(100%, 200px);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .carousel__arrow {
    width: 36px;
    height: 36px;
  }

  .carousel__arrow svg {
    width: 20px;
    height: 20px;
  }

  .carousel__arrow--prev {
    left: 8px;
  }

  .carousel__arrow--next {
    right: 8px;
  }

  /* skeletwolf: компактный акцент снизу слева, не перекрывает CTA (z-index у блоков выше) */
  .trailer-cta-decor {
    width: min(34vw, 124px);
    max-width: none;
    max-height: min(22vh, 132px);
    left: clamp(-10px, -2vw, 0px);
    bottom: -8px;
  }
}


/* ===== Декор «трейлер + CTA»: выезд персонажей и параллакс ===== */
.fl-layer {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  will-change: transform, opacity;
  opacity: 0;
  /* --px задаёт скрипт параллакса (только по горизонтали), --sx — стартовый сдвиг выезда */
  transform: translate3d(var(--sx, -60%), 0, 0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.9s ease;
}
.fl-layer--wolf  { --sx: -60%; transition-delay: 0s; }
.fl-layer--kust  { --sx: -40%; transition-delay: 0.18s; }
.fl-layer--bones { --sx: 50%;  transition-delay: 0.3s; }

/* волк: позиция из .trailer-cta-decor выше; куст у его лап, кости справа снизу */
.fl-layer--kust {
  left: clamp(120px, 30vw, 330px);
  bottom: -14px;
  width: min(22vw, 190px);
  height: auto;
}
.fl-layer--bones {
  right: clamp(-30px, -2vw, 0px);
  bottom: 6px;
  width: min(26vw, 230px);
  height: auto;
  opacity: 0;
}

/* выехали: остаёмся на месте, дальше только параллакс */
.trailer-cta-decor-wrap.is-in .fl-layer {
  opacity: 1;
  transform: translate3d(var(--px, 0px), 0, 0);
}
.trailer-cta-decor-wrap.is-in .fl-layer--bones { opacity: 0.85; }
/* после выезда убираем переход, чтобы параллакс шёл без запаздывания за скроллом */
.trailer-cta-decor-wrap.is-settled .fl-layer { transition: opacity 0.9s ease; }

@media (max-width: 768px) {
  .fl-layer--kust, .fl-layer--bones { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fl-layer { transition: none; opacity: 1; transform: none; }
}


/* ===== Спокойные анимации: только движение и прозрачность, без теней ===== */

/* Первый экран: заголовок, текст и кнопки появляются по очереди при загрузке */
@keyframes flRise {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero__content > * {
  animation: flRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__content > :nth-child(1) { animation-delay: 0.10s; }
.hero__content > :nth-child(2) { animation-delay: 0.25s; }
.hero__content > :nth-child(3) { animation-delay: 0.40s; }
.hero__content > :nth-child(4) { animation-delay: 0.55s; }

/* Появление блоков при прокрутке */
.fl-reveal {
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: opacity;
}
.fl-reveal.is-in { opacity: 1; }
/* статистика 1v1 / 7+ / 2D выходит по очереди */
.trailer__stat.fl-reveal:nth-child(2) { transition-delay: 0.12s; }
.trailer__stat.fl-reveal:nth-child(3) { transition-delay: 0.24s; }

/* Кнопки сторов и стрелки карусели: лёгкий отклик движением */
.hero__store-link { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.hero__store-link:hover { transform: translateY(-3px); }
.hero__store-link:active { transform: translateY(0) scale(0.98); }
.carousel__arrow { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s; }
.carousel__arrow:hover { transform: translateY(-50%) scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .hero__content > * { animation: none; }
  .fl-reveal { opacity: 1; transform: none; transition: none; }
  .hero__store-link, .carousel__arrow { transition: none; }
}

/* ПК: точка остановки волка на 100px левее, чтобы не налезал на текст CTA */
@media (min-width: 1025px) {
  .trailer-cta-decor { left: calc(clamp(-72px, -7vw, -8px) - 50px); }
}

/* Кости: обёртка обрезает выезд справа, чтобы документ не становился шире окна (иначе при F5 страница сдвигается) */
.fl-bones-clip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(40vw, 420px);
  height: 320px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.fl-bones-clip .fl-layer--bones { right: clamp(-30px, -2vw, 0px); bottom: 6px; }
@media (max-width: 768px) { .fl-bones-clip { display: none; } }
