/* ===== Fonts ===== */
/* Science Gothic: Oblique Bold для заголовков, Bold/ExtraBold для кнопок и таймера */
@font-face {
  font-family: "ScienceGothic";
  src: url("../fonts/Science_Gothic/static/ScienceGothic-ObBd.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat/static/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat/static/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat/static/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ScienceGothic";
  src: url("../fonts/Science_Gothic/static/ScienceGothic-ExtraBold.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ScienceGothic";
  src: url("../fonts/Science_Gothic/static/ScienceGothic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== Utility ===== */
.is-hidden {
  display: none !important;
}

/* Заголовки Science Gothic: Oblique Bold */
.hero-text__subheading,
.hero-text__amount,
.hero-text__currency,
.hero-text__combo,
.popup__heading,
.popup__subheading,
.popup__subsubheading {
  font-style: italic;
  font-weight: 700;
}

/* ===== Reset & base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  /* базовые градиенты фона из макета */
  background: #060221 url("../assets/background_gradients.svg") center / cover no-repeat fixed;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Layout ===== */
.landing {
  min-height: 100vh;
  padding: 16px 20px;
  /* клипует декоративные круги фона, чтобы не появлялся скролл */
  overflow: hidden;
}

.landing__grid {
  display: grid;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  gap: 24px;
  --layout-width: min(100%, 520px);
  grid-template-areas:
    "hero-block"
    "bonuses"
    "claim"
    "telegram"
    "footer";
  justify-items: center;
}

.hero-block {
  grid-area: hero-block;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  /* зазор под язычок колеса (top: -8%) */
  gap: 16px;
}

.hero-block > .hero-text {
  position: relative;
  z-index: 2;
}

.hero-block > .wheel-section {
  position: relative;
  z-index: 0;
}

/* Все секции — выше декоративных кругов фона */
.landing__grid > * {
  position: relative;
  z-index: 1;
}

/* ===== Wheel ===== */
.wheel-section {
  order: 2;
  grid-area: wheel;
  width: var(--layout-width);
  display: flex;
  justify-content: center;
  /* воздух над колесом (выступающий язычок) на мобиле */
  margin-top: 28px;
}

.wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 1024;
  /* стакинг-контекст: круги фона (z:-1) остаются под слоями колеса */
  z-index: 0;
}

/* Декоративные круги, расходящиеся от центра колеса.
   Слой прибит к центру .wheel и сильно больше его — круги уходят за экран.
   Иерархия: фон страницы → круги → колесо и весь остальной контент */
.wheel__bg-circles {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1000%;
  aspect-ratio: 1;
  background: url("../assets/background_circles.svg") center / contain no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

/* Парящий приз слева от колеса: подарок + розовое свечение под ним */
@keyframes gift-float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }

  50% {
    transform: translate(-50%, calc(-50% - 14px));
  }
}

.floating-gift {
  position: absolute;
  /* X: отступ от левого края ЭКРАНА — задаётся здесь, применяет js/main.js.
     Y — к колесу. На <560px JS компенсирует сужение колеса, чтобы подарок не уплывал */
  --gift-screen-x: -250px;
  top: -30%;
  width: 100%;
  aspect-ratio: 862 / 820;
  pointer-events: none;
  /* поверх колеса (стрелки z:2, кнопка z:3, надпись z:4) */
  z-index: 5;
}

.floating-gift__bkg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-gift__gift {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: auto;
  animation: gift-float 3s ease-in-out infinite;
}

/* Вращающаяся часть: задник + текст.
   Разгон и торможение — без overshoot, колесо проскакивает цель на полсектора
   (js/main.js), а затем язычок «отпихивает» его назад (фаза bounce) */
.wheel__rotor {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 6.5s cubic-bezier(0.18, 0.55, 0.35, 1);
  will-change: transform;
}

/* Хвост bounce: медленный ease-in-out */
.wheel__rotor--bounce {
  transition: transform 1.7s cubic-bezier(0.45, 0, 0.35, 0.9);
}

.wheel__base {
  --wheel-base-scale: 1.2;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  aspect-ratio: 1040 / 1040;
  transform: translate(-50%, -50%) scale(var(--wheel-base-scale));
  transform-origin: center center;
  z-index: 0;
  overflow: visible;
}

.wheel__bkg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wheel__layer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.wheel__text {
  width: 100%;
}

/* Свечение выигравшего сектора (фазы 2–4, колесо статично) */
.wheel--select:not(.wheel--spinning) .wheel-sector--active {
  filter: url(#wheel-sector-inner-glow);
}

.wheel__arrows-wrap {
  width: 31.4%;
  pointer-events: auto;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.55, 0, 0.68, 0.19);
}


.wheel__arrows {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.wheel__action-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24.2%;
  z-index: 3;
  pointer-events: none;
}

.wheel__action {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.8, 0.5, 1);
}

/* Притапливание кнопки при нажатии (надпись притапливается вместе с ней) */
.wheel__action-wrap:active .wheel__action {
  transform: scale(0.88);
  transition: transform 0.08s ease-out;
}

.wheel__action-wrap:active .wheel__action-label {
  transform: translate(-50%, -50%) scale(0.88);
  transition: transform 0.08s ease-out;
}

/* Idle-анимации (когда колесо не крутится) */
@keyframes wheel-arrows-idle {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  50% {
    transform: translate(-50%, -50%) rotate(30deg);
  }
}

@keyframes wheel-action-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 60px #625cfd);
  }

  50% {
    filter: drop-shadow(0 0 100px #625cfd);
  }
}

.wheel__action-wrap .wheel__action {
  animation: wheel-action-glow 1s ease-in-out infinite;
}

@keyframes wheel-arrows-click {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes wheel-arrows-hide {
  from {
    transform: translate(-50%, -50%) scale(1);
  }

  to {
    transform: translate(-50%, -50%) scale(0);
  }
}

.wheel:not(.wheel--spinning) .wheel__arrows-wrap:not(.wheel__arrows-wrap--click-spin) {
  animation: wheel-arrows-idle 2.5s ease-in-out infinite;
}

.wheel__arrows-wrap.wheel__arrows-wrap--click-spin {
  animation: wheel-arrows-click 1.5s ease-in-out forwards;
}

/* Фаза 4: стрелочки плавно уменьшаются и прячутся под кнопку */
.wheel.wheel--locked .wheel__arrows-wrap.wheel__arrows-wrap {
  animation: wheel-arrows-hide 0.6s cubic-bezier(0.55, 0, 0.68, 0.19) forwards;
  pointer-events: none;
}

.wheel--locked .wheel__action-wrap {
  pointer-events: none;
}

.wheel--locked .wheel__action-wrap .wheel__action {
  cursor: default;
}

/* Надпись на кнопке действия: 80% ширины кнопки, перенос по словам */
.wheel__action-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 80%;
  display: block;
  text-align: center;
  font-family: "ScienceGothic", sans-serif;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: #1e1e1e;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  pointer-events: none;
  z-index: 4;
  transition: transform 0.4s cubic-bezier(0.34, 1.8, 0.5, 1);
}

@media (max-width: 767px) {
  .wheel__action-label {
    /* vw-шкала: на 320px ≈7px, на 390px ≈8.6px, на 430px ≈9.5px */
    font-size: clamp(6px, 2.1vw, 10px);
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .wheel__action-label {
    font-size: clamp(5px, 2vw, 8px);
  }
}

.wheel__pointer {
  position: absolute;
  top: -8%;
  left: 50%;
  /* --pointer-tilt задаёт js/main.js: отклонение при проходе разделителей */
  transform: translateX(-50%) rotate(var(--pointer-tilt, 0deg));
  /* «гвоздь» язычка в середине */
  transform-origin: 50% 50%;
  width: 16.1%;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.wheel__arrow {
  width: 100%;
  height: auto;
}

.wheel__pointer-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86.3%;
}

/* ===== Hero text ===== */
.hero-text {
  order: 1;
  grid-area: hero;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  width: 100%;
  max-width: 608px;
  flex-shrink: 0;
}

.hero-text__logo {
  width: 200px;
  height: auto;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Тексты между логотипом и колесом — фиксированная зона, ресайз внутри */
.hero-text__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 0;
}

/* Построчная смена текста между фазами: уезд влево, приезд справа.
   Задержку каскада задаёт js/main.js через --line-delay */
.hero-line {
  transition:
    transform 0.28s ease-in,
    opacity 0.28s ease-in;
  transition-delay: var(--line-delay, 0s);
}

.hero-line--out {
  transform: translateX(-48px);
  opacity: 0;
}

.hero-line--in {
  transition: none;
  transform: translateX(48px);
  opacity: 0;
}

.hero-line--in-active {
  transition:
    transform 0.34s ease-out,
    opacity 0.34s ease-out;
  transition-delay: var(--line-delay, 0s);
  transform: translateX(0);
  opacity: 1;
}

.hero-text__subheading {
  font-family: "ScienceGothic", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
  white-space: nowrap;
}

.hero-text__subheading-text,
.hero-text__combo-text {
  display: inline-grid;
}

.hero-text__subheading-base,
.hero-text__subheading-shine,
.hero-text__combo-base,
.hero-text__combo-shine,
.hero-text__amount-base,
.hero-text__amount-shine {
  grid-area: 1 / 1;
}

.hero-text__subheading-base {
  color: inherit;
}

/* Акцентный надзаголовок (фаза 4) */
.hero-text__subheading--accent {
  color: #fcd900;
  font-size: 30px;
}

.hero-text__heading {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  white-space: nowrap;
}

/* Shine: слева направо и обратно; старт слева (как в оригинале: 160% → -60%) */
@keyframes amount-shine {
  from {
    background-position: 160% 0;
  }

  to {
    background-position: -60% 0;
  }
}

.hero-text__amount {
  display: inline-grid;
  font-family: "ScienceGothic", sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero-text__amount-base {
  color: #fcd900;
}

.hero-text__amount-shine,
.hero-text__combo-shine {
  background: linear-gradient(
      118deg,
      transparent 0%,
      transparent 44%,
      #ffffff 48%,
      #43ffa8 52%,
      transparent 56%,
      transparent 100%
    )
    no-repeat;
  background-size: 320% 100%;
  background-position: 160% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: amount-shine 8s linear infinite alternate;
}

.hero-text__subheading-shine {
  opacity: 0;
}

.hero-text__subheading--accent .hero-text__subheading-shine {
  opacity: 1;
  background: linear-gradient(
      118deg,
      transparent 0%,
      transparent 44%,
      #ffffff 48%,
      #43ffa8 52%,
      transparent 56%,
      transparent 100%
    )
    no-repeat;
  background-size: 320% 100%;
  background-position: 160% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: amount-shine 8s linear infinite alternate;
}

.hero-text__currency {
  font-family: "ScienceGothic", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fcd900;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-text__hint {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #d6d9e8;
  line-height: 1.4;
}

/* Комбо-заголовок (фазы 2-3), показывается под хинтом */
.hero-text__combo {
  font-family: "ScienceGothic", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #fcd900;
  line-height: 1;
  margin-top: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-text__combo-base {
  color: inherit;
}

/* Таймер обратного отсчёта (фаза 4) */
.hero-text__timer {
  font-family: "ScienceGothic", sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #fcd900;
  line-height: 1;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

/* Пульс таймера на каждый тик */
@keyframes timer-tick {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

.hero-text__timer--tick {
  animation: timer-tick 0.35s ease-out;
}

/* ===== Bonuses ===== */
.bonuses {
  grid-area: bonuses;
  width: var(--layout-width);
  aspect-ratio: 608 / 208;
  background: url("../assets/bonuses_bkg_0.png") no-repeat center / 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Финальная подложка (фаза 4) */
.bonuses--final {
  background-image: url("../assets/bonuses_bkg_1.png");
}

.bonuses__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

.bonuses__slot {
  position: relative;
  flex-shrink: 0;
  z-index: 0;
  overflow: visible;
  isolation: isolate;
}

.bonuses__slot:has(.bonuses__flash.is-flashing) {
  z-index: 10;
}

.bonuses__card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bonuses__card[src*="bonus_card_gift"],
.bonuses__card[src*="bonus_card_aviator"] {
  filter: drop-shadow(0 0 30px #43ffa880);
}

/* Вспышка поверх карточки при смене приза */
@keyframes bonus-flash {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.bonuses__flash {
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  width: 130%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  mix-blend-mode: plus-lighter;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fff093 0%,
    #fff093 60%,
    rgba(255, 240, 147, 0.6) 82%,
    rgba(255, 240, 147, 0) 100%
  );
  filter: blur(20px);
  opacity: 0;
  pointer-events: none;
}

.bonuses__flash.is-flashing {
  animation: bonus-flash 0.6s ease-out forwards;
}

/* Пульсация карточки размером во время крутки колеса */
@keyframes bonus-slot-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.bonuses__slot--pulse {
  animation: bonus-slot-pulse 0.9s ease-in-out infinite;
  z-index: 1;
}

/* Пульсация змейкой на первой фазе: 1 -> 2 -> 3 по кругу */
@keyframes bonus-snake {
  0%,
  30%,
  100% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.1);
  }
}

.bonuses--snake .bonuses__slot {
  animation: bonus-snake 1.8s ease-in-out infinite;
}

.bonuses--snake .bonuses__slot:nth-child(2) {
  animation-delay: 0.6s;
}

.bonuses--snake .bonuses__slot:nth-child(3) {
  animation-delay: 1.2s;
}

@media (max-width: 767px) {
  .bonuses__inner {
    gap: calc(20 / 608 * 100%);
    padding: 0 calc(13 / 608 * 100%);
  }

  .bonuses__slot {
    width: calc(185 / 608 * 100%);
    aspect-ratio: 1;
  }
}

/* ===== Забрать первый бонус ===== */
.claim-first-btn {
  grid-area: claim;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.claim-first-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Забрать ультра-комбо (фаза 4) ===== */
@keyframes claim-ultra-pulse {
  0%,
  100% {
    scale: 1;
    box-shadow:
      0 0 20px rgba(67, 255, 168, 0.35),
      inset -5px 5px 10px rgba(255, 255, 255, 0.6),
      inset 6px -6px 8px rgba(0, 0, 0, 0.2);
  }

  50% {
    scale: 1.03;
    box-shadow:
      0 0 20px #43ffa8,
      inset -5px 5px 10px #ffffff,
      inset 6px -6px 8px rgba(0, 0, 0, 0.2);
  }
}

.claim-ultra-btn {
  grid-area: claim;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 60px;
  padding: 0 24px;
  border-radius: 16px;
  background: linear-gradient(to bottom, #43ffa8, #fcd900);
  font-family: "ScienceGothic", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: #1e1e1e;
  text-transform: uppercase;
  transform-origin: center;
  transition: filter 0.2s ease;
  animation: claim-ultra-pulse 2s ease-in-out infinite;
}

.claim-ultra-btn:hover {
  filter: brightness(1.08);
}

/* ===== Telegram ===== */
.telegram-btn {
  grid-area: telegram;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.telegram-btn img {
  width: 40px;
  height: auto;
}

/* ===== Footer ===== */
.footer {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 608px;
  padding-bottom: 24px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer__link {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #d6d9e8;
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: #ffffff;
}

.footer__copyright {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6b7080;
  text-align: center;
}

/* ===== Mobile: лого и колесо на месте, тексты — в фиксированной зоне ===== */
@media (max-width: 767px) {
  .hero-text__logo {
    width: 25vw;
    max-width: 120px; /* не больше этого */
  }

  .hero-text__body {
    /* 132px при ширине макета 520px; сужается вместе с экраном */
    height: clamp(88px, calc((100vw - 40px) * 132 / 520), 132px);
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 4px;
  }

  .hero-text__subheading {
    font-size: clamp(14px, 4vw, 22px);
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-text__subheading--accent {
    font-size: clamp(14px, 4.6vw, 26px);
    line-height: 1.1;
  }

  .hero-text__amount {
    font-size: clamp(34px, 10vw, 56px);
  }

  .hero-text__currency {
    font-size: clamp(14px, 3.7vw, 16px);
  }

  .hero-text__hint {
    font-size: clamp(11px, 3vw, 14px);
    line-height: 1.25;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    margin-top: 2px;
  }

  .hero-text__combo {
    font-size: clamp(20px, 7.5vw, 44px);
    margin-top: 4px;
    line-height: 1.1;
  }

  .hero-text__timer {
    font-size: clamp(14px, 4vw, 20px);
    margin-top: 8px;
    line-height: 1.1;
  }

  .claim-first-btn {
    font-size: clamp(12px, 3.8vw, 20px);
  }

  /* Фаза 4: мобильная подложка бонусов */
  .bonuses--final {
    background-image: url("../assets/bonuses_bkg_3.png");
  }

  /* Фаза 4: бонусы и всё ниже плавно поднимаются на 100px */
  .landing__grid > .bonuses,
  .landing__grid > .claim-first-btn,
  .landing__grid > .claim-ultra-btn,
  .landing__grid > .telegram-btn,
  .landing__grid > .footer {
    transition: transform 0.6s cubic-bezier(0.45, 0, 0.35, 1);
  }

  .landing__grid > .bonuses.bonuses--final,
  .landing__grid > .bonuses.bonuses--final ~ * {
    transform: translateY(-100px);
  }
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .landing {
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }

  /* Фиксированный дизайн-макет 1484px, масштабируется целиком через zoom
     (коэффициент --desktop-zoom считает js/main.js) */
  .landing__grid {
    width: 1484px;
    max-width: none;
    margin: 0;
    --layout-width: auto;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    grid-template-areas:
      "wheel hero"
      "wheel bonuses"
      "wheel claim"
      "wheel telegram"
      "wheel footer";
    gap: 24px 64px;
    align-items: center;
    justify-items: center;
    zoom: var(--desktop-zoom, 1);
  }

  .hero-block {
    display: contents;
  }

  .hero-text,
  .wheel-section {
    order: unset;
  }

  .wheel-section {
    justify-content: flex-start;
    justify-self: start;
    align-self: center;
    margin-left: 48px;
    margin-top: 0;
    width: auto;
  }

  .wheel {
    width: 760px;
  }

  /* десктоп: верх на уровне центра колеса, свой отступ от края экрана */
  .floating-gift {
    --gift-screen-x: -320px;
    top: 35%;
  }

  .hero-text {
    align-items: center;
    text-align: center;
    padding-top: 8px;
    min-height: 300px;
    height: auto;
  }

  .hero-text__body {
    flex: 1 1 0;
    justify-content: center;
  }

  .hero-text__heading {
    justify-content: center;
  }

  .hero-text__logo {
    width: 251px;
    margin-bottom: 24px;
  }

  .hero-text__subheading {
    font-size: 30px;
    margin-bottom: 12px;
  }

  .hero-text__subheading--accent {
    font-size: 42px;
  }

  .hero-text__amount {
    font-size: 66px;
  }

  .hero-text__currency {
    font-size: 19px;
  }

  .hero-text__hint {
    font-size: 18px;
  }

  .hero-text__combo {
    font-size: 52px;
    margin-top: 16px;
  }

  /* Все внутренние размеры — проценты от ширины фона (макет 608x208),
     чтобы блок масштабировался как единый элемент */
  .bonuses {
    width: 608px;
    max-width: 100%;
    aspect-ratio: 608 / 208;
    height: auto;
  }

  .bonuses__inner {
    gap: calc(20 / 608 * 100%);
    padding: 0 calc(13 / 608 * 100%);
  }

  .bonuses__slot {
    width: calc(185 / 608 * 100%);
    aspect-ratio: 1;
  }

  .telegram-btn {
    align-self: center;
  }

  .footer {
    align-items: center;
    padding-bottom: 0;
  }

  .footer__nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  .footer__link {
    font-size: 13px;
  }

  .footer__copyright {
    font-size: 12px;
    text-align: center;
  }
}

/* ===== Попапы ===== */
@keyframes popup-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 1, 11, 0.75);
  backdrop-filter: blur(4px);
}

.popup-overlay:not(.is-hidden) {
  animation: popup-overlay-in 0.15s ease-out both;
}

.popup-overlay:not(.is-hidden) .popup:not(.is-hidden) {
  animation: popup-in 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .popup-overlay:not(.is-hidden),
  .popup-overlay:not(.is-hidden) .popup:not(.is-hidden) {
    animation: none;
  }
}

.popup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: min(960px, 100%);
  max-height: min(760px, 100%);
  padding: 40px 24px 26px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a093b 0%, #060221 55%, #02010b 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(67, 255, 168, 0.12);
}

.popup__scroll {
  overflow-y: auto;
  width: 100%;
  padding: 0 24px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: #d6d9e8;
  scrollbar-color: #fcd900 rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.popup__divider {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70%;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    #43ffa8 50%,
    transparent 100%
  );
  pointer-events: none;
}

.popup__scroll::-webkit-scrollbar {
  width: 8px;
}

.popup__scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.popup__scroll::-webkit-scrollbar-thumb {
  background: #fcd900;
  border-radius: 4px;
}

.popup__heading {
  font-family: "ScienceGothic", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fcd900;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 24px;
}

.popup__subheading {
  font-family: "ScienceGothic", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fcd900;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 28px 0 12px;
}

.popup__subsubheading {
  font-family: "ScienceGothic", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 20px 0 10px;
}

.popup__scroll p {
  margin-bottom: 12px;
}

.popup__scroll strong {
  color: #ffffff;
}

.popup__scroll a {
  color: #43ffa8;
  text-decoration: underline;
}

.popup__scroll ul,
.popup__scroll ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

.popup__scroll li {
  margin-bottom: 8px;
}

.popup__responsible {
  margin-top: 20px;
  color: #6b7080;
}

.popup__ok-btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 48px;
  border-radius: 12px;
  background: #43ffa8;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1e1e1e;
  transition: filter 0.2s ease;
}

.popup__ok-btn:hover {
  filter: brightness(1.1);
}

@media (max-width: 767px) {
  .popup-overlay {
    padding: 12px;
  }

  .popup {
    padding: 24px 8px 18px;
    gap: 16px;
  }

  .popup__scroll {
    padding: 0 16px;
    font-size: 14px;
  }

  .popup__heading {
    font-size: 24px;
  }

  .popup__subheading {
    font-size: 18px;
  }
}

/* ===== Language switcher ===== */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  font-family: "Montserrat", sans-serif;
}

.lang-switcher__button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px 6px 10px;
  border-radius: 12px;
  background: rgba(6, 2, 33, 0.85);
  border: none;
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switcher__button:focus,
.lang-switcher__button:focus-visible {
  outline: none;
}

.lang-switcher__flag {
  display: block;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: none;
  outline: none;
  clip-path: circle(50% at 50% 50%);
}

.lang-switcher__code {
  min-width: 1.5em;
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  background: rgba(6, 2, 33, 0.95);
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.lang-switcher--open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  transition: background 0.12s;
}

.lang-switcher__menu .lang-switcher__flag {
  flex-shrink: 0;
}

.lang-switcher__menu a:hover,
.lang-switcher__menu a[aria-current="page"] {
  background: rgba(67, 255, 168, 0.12);
}

.lang-switcher__menu a[aria-current="page"] {
  color: #43ffa8;
}

.lang-switcher__menu-code {
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 1.8em;
}

.lang-switcher__menu-name {
  opacity: 0.75;
}

@media (max-width: 560px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
  }

  .lang-switcher__button {
    min-height: 36px;
    padding: 4px 10px 4px 8px;
    font-size: 12px;
  }
}
