/* =========================
   ROOT: ВСЕ ПАРАМЕТРЫ СЦЕНЫ
========================= */
:root {
  /* БАЗОВЫЙ РАЗМЕР СЦЕНЫ */
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* ФОН (ОДИН И ТОТ ЖЕ ДЛЯ ОБЕИХ СТРАНИЦ) */
  --bg-image: url("bg_mason.png");

  /* ТИТУЛЬНАЯ КАРТИНКА */
  --title-top: 50px;
  --title-left: 50%;      /* по центру по горизонтали */
  --title-width: 1000px;

  /* ЛОГО СПРАВА ОТ ТАЙТЛА */
  --logo-top: 40px;
  --logo-left: 81%;
  --logo-width: 170px;

  /* РЯД СОЦИАЛОК */
  --socials-top: 30px;
  --socials-left: 40px;
  --social-icon-size: 60px;
  --social-gap: 18px;

  /* CA БАННЕР */
  --ca-banner-top: 240px;
  --ca-banner-left: 50%;
  --ca-banner-width: 860px;
  --ca-banner-height: 60px;

  /* ЦЕНТРАЛЬНАЯ МОНЕТА (СТРАНИЦА 1) */
  --token-logo-top: 700px;
  --token-logo-left: 50%;
  --token-logo-width: 700px;

  /* СТРЕЛКА ВНИЗ */
  --arrow-down-right: 80px;
  --arrow-down-bottom: 90px;
  --arrow-down-width: 80px;

  /* КНОПКА PLAY (СТРАНИЦА 2) */
  --play-btn-top: 50%;
  --play-btn-left: 50%;
  --play-btn-width: 230px;

  /* ТЕКСТ "HOW TO IDENTIFY MASONS ?" */
  --typing-text-top: 38%;
  --typing-text-left: 50%;
  --typing-text-max-width: 1000px;
  --typing-text-font-size: 72px;

  /* РУКОПОЖАТИЯ */
  --handshake-top: 55%;
  --handshake-left: 50%;
  --handshake-width: 700px;

  /* МОНЕТЫ-ДОЖДЬ */
  --coin-size: 80px;

  /* КАСТОМНЫЙ КУРСОР */
  --cursor-size: 52px;

  /* ТОСТЕР */
  --toast-font-size: 26px;
}

/* =========================
   БАЗА
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Jockey One", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #000;
  overflow-y: auto;
  overflow-x: hidden;

  /* ОТКЛЮЧАЕМ ДЕФОЛТНЫЙ КУРСОР */
  cursor: none;
}

/* На всякий случай — для кликабельных элементов тоже */
a,
button {
  cursor: none;
}

/* ОБЩАЯ СЦЕНА */
.scene {
  width: var(--scene-width);
  margin: 0 auto;
}

/* КАЖДАЯ СТРАНИЦА */
.page {
  position: relative;
  width: var(--scene-width);
  height: var(--scene-height);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* =========================
   СОЦИАЛКИ (ЛЕВАЯ ВЕРХНЯЯ КОЛОНКА)
========================= */

.socials {
  position: absolute;
  top: var(--socials-top);
  left: var(--socials-left);
  display: flex;
  flex-direction: row;
  column-gap: var(--social-gap);
  z-index: 20;
}

.social-btn {
  display: inline-flex;
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  outline: none;
  border: none;
  padding: 0;
  background: none;
  transform-origin: center;
  transition: transform 0.15s ease-out;
}

.social-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Если в env нет ссылки — делаем кнопку "пассивной" */
.social-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* 4 РАЗНЫЕ АНИМАЦИИ ХОВЕРА */
.social-btn.social-1:hover {
  animation: social-bounce 0.6s ease-out infinite;
}

.social-btn.social-2:hover {
  animation: social-rotate 0.8s ease-in-out infinite;
}

.social-btn.social-3:hover {
  animation: social-wiggle 0.4s ease-in-out infinite;
}

.social-btn.social-4:hover {
  animation: social-float 0.9s ease-in-out infinite;
}

@keyframes social-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  70% {
    transform: translateY(3px);
  }
}

@keyframes social-rotate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(8deg) scale(1.05);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes social-wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(6deg);
  }
}

@keyframes social-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.03);
  }
}

/* =========================
   ТАЙТЛ + ЛОГО
========================= */

.title-wrapper {
  position: absolute;
  top: var(--title-top);
  left: var(--title-left);
  transform: translateX(-50%);
  width: var(--title-width);
  z-index: 10;
}

.title-image {
  width: 100%;
  display: block;
}

.logo-wrapper {
  position: absolute;
  top: var(--logo-top);
  left: var(--logo-left);
  transform: translateX(-50%);
  width: var(--logo-width);
  z-index: 11;
}

.logo-image {
  width: 100%;
  display: block;
}

/* =========================
   CA БАННЕР
========================= */

.ca-banner {
  position: absolute;
  top: var(--ca-banner-top);
  left: var(--ca-banner-left);
  transform: translateX(-50%);
  width: var(--ca-banner-width);
  height: var(--ca-banner-height);
  border-radius: 999px;
  border: 3px solid #000;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Jockey One", system-ui, sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  color: #000;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.35);
  z-index: 15;
  opacity: 1;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    opacity 0.12s ease-out;
}

.ca-banner.hidden {
  opacity: 0;
  pointer-events: none;
}

.ca-banner:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
}

.ca-label {
  font-weight: 700;
}

.ca-address {
  font-size: 24px;
  word-break: break-all;
}

/* =========================
   ЦЕНТРАЛЬНАЯ МОНЕТА
========================= */

.token-logo-wrapper {
  position: absolute;
  top: var(--token-logo-top);
  left: var(--token-logo-left);
  transform: translate(-50%, -50%);
  width: var(--token-logo-width);
  z-index: 9;
  animation: coin-pulse 2.3s ease-in-out infinite;
}

.token-logo {
  width: 100%;
  display: block;
}

@keyframes coin-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

/* =========================
   СТРЕЛКА ВНИЗ
========================= */

.scroll-down-btn {
  position: absolute;
  right: var(--arrow-down-right);
  bottom: var(--arrow-down-bottom);
  width: var(--arrow-down-width);
  height: auto;
  padding: 0;
  border: none;
  background: none;
  outline: none;
  z-index: 10;
  animation: arrow-bounce 1.2s ease-in-out infinite;
}

.scroll-down-btn img {
  width: 100%;
  display: block;
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  70% {
    transform: translateY(-4px);
  }
}

/* =========================
   СТРАНИЦА 2: PLAY / ТЕКСТ
========================= */

.play-btn {
  position: absolute;
  top: var(--play-btn-top);
  left: var(--play-btn-left);
  transform: translate(-50%, -50%);
  width: var(--play-btn-width);
  padding: 0;
  border: none;
  background: none;
  outline: none;
  z-index: 15;
  animation: play-attract 1.4s ease-in-out infinite;
}

.play-btn img {
  width: 100%;
  display: block;
}

.play-btn.hidden {
  display: none;
}

@keyframes play-attract {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
  }
}

/* ТЕКСТ С ТАЙПИНГОМ */
.typing-text {
  position: absolute;
  top: var(--typing-text-top);
  left: var(--typing-text-left);
  transform: translate(-50%, -50%);
  max-width: var(--typing-text-max-width);
  text-align: center;
  font-family: "Jockey One", system-ui, sans-serif;
  font-size: var(--typing-text-font-size);
  color: #000;
  letter-spacing: 2px;
  text-shadow: 2px 2px #fff;
  opacity: 0;
  z-index: 16;
  pointer-events: none;
}

.typing-text.visible {
  opacity: 1;
}

.typing-text.fade-out {
  transition: opacity 0.4s ease-out;
  opacity: 0;
}

/* РУКОПОЖАТИЯ */
.handshake-wrapper {
  position: absolute;
  top: var(--handshake-top);
  left: var(--handshake-left);
  transform: translate(-50%, -50%);
  width: var(--handshake-width);
  z-index: 14;
}

.handshake-image {
  width: 100%;
  display: none;
}

.handshake-image.visible {
  display: block;
  animation: handshake-pop 0.4s ease-out;
}

@keyframes handshake-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================
   МОНЕТНЫЙ ДОЖДЬ
========================= */

.coin {
  position: absolute;
  top: -100px;
  width: var(--coin-size);
  height: auto;
  pointer-events: none;
  animation-name: coin-fall;
  animation-timing-function: linear;
}

@keyframes coin-fall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(calc(var(--scene-height) + 200px)) rotate(360deg);
  }
}

/* =========================
   ТОСТЕР "COPIED"
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%) translateY(120%);
  padding: 10px 26px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-family: "Jockey One", system-ui, sans-serif;
  font-size: var(--toast-font-size);
  letter-spacing: 2px;
  opacity: 0;
  z-index: 100;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   КАСТОМНЫЙ КУРСОР
========================= */

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.custom-cursor img {
  width: 100%;
  height: 100%;
  display: block;
}
