/* =========================
   ROOT НАСТРОЙКИ
========================= */

:root {
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* Цвета */
  --bg-gradient-top: #f4c9ff;
  --bg-gradient-bottom: #b594ff;
  --purple: #8562f0;
  --purple-soft: rgba(133, 98, 240, 0.25);
  --text-main: #05040a;

  /* NAV */
  --nav-top: 24px;
  --nav-left: 40px;
  --nav-gap: 26px;
  --nav-font-size: 16px;

  /* HERO */
  --hero-banner-top: 170px;
  --hero-banner-width: 900px;

  --hero-character-top: 350px;
  --hero-character-width: 360px;

  --hero-contract-top: 670px;
  --hero-contract-font-size: 18px;

  /* ABOUT */
  --about-inner-max-width: 1200px;
  --about-character-width: 380px;
  --about-character-top-offset: 40px;

  /* JOIN */
  --join-inner-max-width: 1200px;
  --join-character-width: 360px;

  /* Снежинки */
  --snowflake-size: 22px;

  /* Падающие персонажи */
  --falling-size: 180px;

  /* Cursor trail */
  --cursor-dot-size: 8px;
}

/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: radial-gradient(
    circle at top,
    rgba(255, 255, 255, 0.9),
    #000000 120%
  );
  overflow-x: hidden;
}

.page-wrapper {
  width: 100%;
  min-height: 100vh;
}

/* =========================
   SCREENS
========================= */

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 0 24px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    var(--bg-gradient-top) 0%,
    var(--bg-gradient-bottom) 100%
  );
}

/* HERO чуть более яркий */
.screen-hero {
  background: radial-gradient(
      circle at top,
      rgba(255, 255, 255, 0.92),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      #f7d6ff 0%,
      #cba3ff 45%,
      #b594ff 100%
    );
}

.screen-about,
.screen-join {
  background: linear-gradient(
    180deg,
    #f4c9ff 0%,
    #b594ff 100%
  );
}

/* =========================
   NAV
========================= */

.top-nav {
  position: absolute;
  top: var(--nav-top);
  left: var(--nav-left);
  display: flex;
  gap: var(--nav-gap);
  z-index: 40;
}

.nav-link {
  position: relative;
  background: transparent;
  border: none;
  padding: 4px 0;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--nav-font-size);
  letter-spacing: 0.16em;
  color: #000000;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: -4px -8px;
  border-radius: 999px;
  background: radial-gradient(
    circle at center,
    rgba(133, 98, 240, 0.7),
    transparent 60%
  );
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.18s ease;
  z-index: -1;
}

.nav-link:hover {
  transform: translateY(-2px);
  filter:
    drop-shadow(0 0 10px rgba(133, 98, 240, 0.9))
    drop-shadow(0 0 20px rgba(133, 98, 240, 0.8));
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:active {
  transform: translateY(0) scale(0.96);
}

.nav-label {
  position: relative;
}

/* =========================
   HERO
========================= */

.hero-banner-wrapper {
  position: absolute;
  top: var(--hero-banner-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--hero-banner-width);
  max-width: 92vw;
  filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.35));
  animation: hero-banner-breathe 6s ease-in-out infinite;
  z-index: 10;
}

.hero-banner-image {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes hero-banner-breathe {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.02);
  }
}

.hero-character-wrapper {
  position: absolute;
  top: var(--hero-character-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--hero-character-width);
  max-width: 60vw;
  z-index: 9;
  filter: drop-shadow(0 18px 45px rgba(0, 0, 0, 0.35));
}

.hero-character-image {
  width: 100%;
  height: auto;
  display: block;
}

/* CONTRACT */

.hero-contract-wrapper {
  position: absolute;
  top: var(--hero-contract-top);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: var(--hero-contract-font-size);
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
  cursor: default;
  z-index: 12;
}

.hero-contract-wrapper.hidden {
  display: none;
}

.hero-contract-label {
  color: #000000;
}

.hero-contract-text {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--purple);
  cursor: pointer;
  white-space: nowrap;
}

/* =========================
   ABOUT
========================= */

.about-inner {
  position: relative;
  width: 100%;
  max-width: var(--about-inner-max-width);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr);
  align-items: flex-start;
  gap: 40px;
}

.about-character-wrapper {
  width: var(--about-character-width);
  max-width: 70%;
  margin-top: var(--about-character-top-offset);
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.4));
}

.character-image {
  width: 100%;
  height: auto;
  display: block;
}

.about-text-block {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  padding: 30px 32px 32px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.section-title {
  margin: 0 0 14px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-subtitle {
  margin: 24px 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-paragraph {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.6;
}

.about-monad-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(133, 98, 240, 0.08);
  border: 1px solid rgba(133, 98, 240, 0.45);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-monad-mark img {
  width: 20px;
  height: 20px;
}

/* =========================
   JOIN SECTION
========================= */

.join-inner {
  position: relative;
  width: 100%;
  max-width: var(--join-inner-max-width);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.3fr);
  gap: 40px;
  align-items: center;
}

.join-character-image {
  width: var(--join-character-width);
  max-width: 100%;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.45));
}

.join-right .section-title {
  font-size: 34px;
}

.join-button {
  margin-top: 20px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  background: radial-gradient(
    circle at top left,
    #ffffff 0%,
    var(--purple) 100%
  );
  color: #000000;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow:
    0 0 16px rgba(133, 98, 240, 0.9),
    0 12px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(0);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.join-button img {
  width: 22px;
  height: 22px;
}

.join-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.6),
    transparent 60%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.join-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 22px rgba(133, 98, 240, 1),
    0 16px 40px rgba(0, 0, 0, 0.45);
}

.join-button:hover::before {
  animation: button-shine 0.6s ease-out;
}

.join-button:active {
  transform: translateY(0) scale(0.97);
}

@keyframes button-shine {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

.social-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.social-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.social-pill {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.social-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(133, 98, 240, 0.9);
  box-shadow: 0 0 12px rgba(133, 98, 240, 0.7);
}

.social-pill:active {
  transform: translateY(0) scale(0.96);
}

/* =========================
   СНЕЖИНКИ MONAD
========================= */

.snow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.snowflake {
  position: absolute;
  top: -10%;
  width: var(--snowflake-size);
  height: var(--snowflake-size);
  opacity: 0;
  animation-name: snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.snowflake img {
  width: 100%;
  height: 100%;
}

@keyframes snow-fall {
  0% {
    transform: translate3d(0, -10%, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(40px, 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

/* =========================
   ПАДАЮЩИЕ CHILLNAD
========================= */

.falling-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.falling-chill {
  position: absolute;
  top: -40%;
  width: var(--falling-size);
  opacity: 0;
  animation: falling-chill 6.5s linear forwards;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

.falling-chill img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes falling-chill {
  0% {
    transform: translate3d(0, -40%, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-60px, 120vh, 0) rotate(-20deg);
    opacity: 0;
  }
}

/* =========================
   ФРАЗЫ
========================= */

.phrases-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.floating-phrase {
  position: absolute;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #000000;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  animation: phrase-float 5s ease-in-out forwards;
}

@keyframes phrase-float {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  10% {
    opacity: 1;
  }
  60% {
    transform: translate3d(-20px, -30px, 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-40px, -60px, 0);
  }
}

/* =========================
   CURSOR TRAIL
========================= */

.cursor-dot {
  position: fixed;
  width: var(--cursor-dot-size);
  height: var(--cursor-dot-size);
  border-radius: 50%;
  background: rgba(133, 98, 240, 0.9);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cursor-fade 0.45s linear forwards;
  z-index: 200;
}

@keyframes cursor-fade {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}

/* =========================
   SCROLL ANIMATION
========================= */

[data-animate-on] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate-on].visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   GLITCH
========================= */

body.glitch {
  filter: saturate(1.2) hue-rotate(8deg);
}

body.glitch .screen-hero {
  animation: glitch-shift 0.2s steps(2, end);
}

@keyframes glitch-shift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-4px, 2px);
  }
  100% {
    transform: translate(3px, -3px);
  }
}

/* =========================
   TOAST
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(18px);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 300;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   ADAPTIVE
========================= */

@media (max-width: 1024px) {
  :root {
    --hero-banner-width: 760px;
    --hero-character-width: 300px;
    --hero-character-top: 370px;

    --about-character-width: 300px;
    --join-character-width: 300px;
  }

  .about-inner,
  .join-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-character-wrapper,
  .join-left {
    justify-self: center;
  }

  .about-text-block {
    text-align: left;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-left: 16px;
    --nav-top: 16px;
    --nav-gap: 14px;
    --nav-font-size: 11px;

    --hero-banner-top: 150px;
    --hero-banner-width: 520px;

    --hero-character-top: 320px;
    --hero-character-width: 250px;

    --hero-contract-top: 600px;
    --hero-contract-font-size: 13px;

    --snowflake-size: 18px;
    --falling-size: 150px;
  }

  .section-title {
    font-size: 26px;
  }

  .join-right .section-title {
    font-size: 28px;
  }

  .screen {
    padding-inline: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --hero-banner-width: 420px;
    --hero-character-width: 220px;

    --hero-contract-font-size: 11px;
    --nav-font-size: 10px;
  }

  .hero-contract-wrapper {
    padding-inline: 12px;
  }

  .section-title {
    font-size: 22px;
  }

  .section-paragraph {
    font-size: 14px;
  }
}
