/* ================== НАСТРОЙКИ ПОЗИЦИЙ ================== */
:root {
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* Фоны */
  --bg-1: url("bg_shrekjak_1.png");
  --bg-2: url("bg_shrekjak_2.png");

  /* Соц. иконки + звук */
  --socials-top: 30px;
  --socials-left: 30px;
  --socials-gap: 12px;
  --social-size: 52px;
  --sound-size: 52px;
  --sound-offset-x: 10px;
  --sound-offset-y: 0px;

  /* Логотип */
  --title-top: 22%;
  --title-left: 50%;
  --title-width: 900px;

  /* Персонаж снизу */
  --char-bottom: -0%;
  --char-left: 50%;
  --char-width: 650px;

  /* Зона вони */
  --smell-width: 500px;
  --smell-height: 320px;
  --smell-bottom: 300px;
  --smell-left: 50%;

  /* ABOUT */
  --about-title-top: 60px;
  --about-title-left: 50%;
  --about-title-width: 500px;

  /* Ряд картинок */
  --about-row-top: 55%;
  --about-row-left: 50%;
  --about-row-gap: 36px;
  --about-base-height: 170px;
  --about-wojak-h: 170px;
  --about-plus-h: 110px;
  --about-shrek-h: 180px;
  --about-eq-h: 110px;
  --about-shrekjak-h: 190px;

  /* Контракт */
  --contract-bottom: 70px;
  --contract-left: 50%;
  --contract-width: 640px;
  --contract-height: 90px;
  --contract-radius: 24px;

  /* Toast */
  --toast-bottom: 40px;
  --toast-right: 40px;
  --toast-font-size: 24px;
}

/* ================== БАЗА ================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Kirang Haerang", cursive;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

img {
  display: block;
  max-width: 100%;
}

/* Вся страница (2 экрана по 100vh) */
.page {
  width: 100%;
  min-height: 100vh;
}

/* Экран */
.screen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Фон */
.screen-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

.screen-bg-1 {
  background-image: var(--bg-1);
}

.screen-bg-2 {
  background-image: var(--bg-2);
}

/* ================== СТРАНИЦА 1 ================== */

/* Левый верхний блок — всё в одну строку */
.top-left {
  position: absolute;
  top: var(--socials-top);
  left: var(--socials-left);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--socials-gap);
  z-index: 10;
}

/* Соц. иконки: в линию */
.socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--socials-gap);
}

.social-btn {
  width: var(--social-size);
  height: var(--social-size);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.social-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.social-btn:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8));
}

.social-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.sound-btn {
  margin-left: var(--sound-offset-x);
  margin-top: var(--sound-offset-y);
  width: var(--sound-size);
  height: var(--sound-size);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.sound-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sound-btn.on {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.9));
}

/* Логотип */
.title-logo {
  position: absolute;
  top: var(--title-top);
  left: var(--title-left);
  width: var(--title-width);
  transform: translateX(-50%);
  z-index: 3;
}

/* Персонаж снизу */
.main-char {
  position: absolute;
  bottom: var(--char-bottom);
  left: var(--char-left);
  width: var(--char-width);
  transform: translateX(-50%);
  z-index: 2;
}

/* Вонь */
.smell-zone {
  position: absolute;
  bottom: var(--smell-bottom);
  left: var(--smell-left);
  width: var(--smell-width);
  height: var(--smell-height);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.smell {
  position: absolute;
  bottom: 0;
  width: 120px;
  height: 180px;
  background: radial-gradient(circle at 30% 20%, rgba(190, 255, 140, 0.9), rgba(100, 180, 40, 0.4), rgba(0, 0, 0, 0));
  opacity: 0.55;
  filter: blur(2px);
  animation: smell-rise 4.5s linear infinite;
}

.smell:nth-child(1) {
  left: 5%;
  animation-duration: 4.2s;
  animation-delay: 0s;
}

.smell:nth-child(2) {
  left: 30%;
  animation-duration: 5s;
  animation-delay: 0.6s;
}

.smell:nth-child(3) {
  left: 55%;
  animation-duration: 4.8s;
  animation-delay: 1.2s;
}

.smell:nth-child(4) {
  left: 75%;
  animation-duration: 5.4s;
  animation-delay: 1.8s;
}

@keyframes smell-rise {
  0% {
    transform: translateY(0) scale(0.9);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  50% {
    transform: translateY(-35%) scale(1.05);
    opacity: 0.75;
  }
  100% {
    transform: translateY(-80%) scale(1.1);
    opacity: 0;
  }
}

/* ================== СТРАНИЦА 2 ================== */

/* ABOUT */
.about-title {
  position: absolute;
  top: var(--about-title-top);
  left: var(--about-title-left);
  width: var(--about-title-width);
  transform: translateX(-50%);
  z-index: 3;
}

/* Ряд из 5 картинок */
.about-row {
  position: absolute;
  top: var(--about-row-top);
  left: var(--about-row-left);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--about-row-gap);
  z-index: 2;
}

.about-img {
  height: var(--about-base-height);
  object-fit: contain;
}

.about-wojak {
  height: var(--about-wojak-h);
}

.about-plus {
  height: var(--about-plus-h);
}

.about-shrek {
  height: var(--about-shrek-h);
}

.about-eq {
  height: var(--about-eq-h);
}

.about-shrekjak {
  height: var(--about-shrekjak-h);
}

/* Контракт */
.contract-wrapper {
  position: absolute;
  bottom: var(--contract-bottom);
  left: var(--contract-left);
  transform: translateX(-50%);
  width: var(--contract-width);
  height: var(--contract-height);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.contract-wrapper.hidden {
  display: none;
}

.contract-frame {
  width: 100%;
  height: 100%;
  border-radius: var(--contract-radius);
  border: 3px solid #f4ff8a;
  background: rgba(12, 40, 8, 0.95);
  color: #f4ff8a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  font-size: 24px;
  letter-spacing: 1px;
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contract-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 0 22px rgba(217, 255, 118, 0.9);
  background: rgba(22, 70, 10, 1);
}

/* ================== TOAST ================== */

.toast {
  position: fixed;
  bottom: var(--toast-bottom);
  right: var(--toast-right);
  padding: 10px 22px;
  border-radius: 18px;
  border: 2px solid #f4ff8a;
  background: rgba(20, 20, 20, 0.95);
  color: #f4ff8a;
  font-size: var(--toast-font-size);
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================== АДАПТИВ ================== */

@media (max-width: 1024px) {
  :root {
    --title-width: 70vw;
    --char-width: 65vw;

    --about-title-width: 60vw;
    --about-base-height: 18vw;
    --about-row-gap: 3vw;

    --contract-width: 80vw;
  }
}
