body {
  margin: 0;
  background-color: #19181B;
  background-size: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  background-attachment: fixed;
}

/* ==== Inter font (local) ==== */
/* @font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
} */

/* Improve text rendering consistency */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  font-optical-sizing: auto;
}

/* Когда страница в прелоаде — блокируем прокрутку и клики под оверлеем */
body.preloading {
  overflow: hidden;
}

/* Слоистые фоны поверх страницы */
.layer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Курсорный свет — самый нижний слой из динамических */
.cursor-light {
  position: fixed;
  left: 0;
  top: 0;
  width: min(50vw, 700px);
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10; /* ниже логотипа(20), текста(21) и стола(30) */
  opacity: 0.9;
  filter: blur(1px);
  will-change: left, top, transform;
}

/* Боковые подсветки у нижнего края (самые нижние) */
.side-light {
  position: fixed;
  bottom: -15vh;
  width: auto;
  max-width: 70vw;
  /* height: 80vh; */
  height: 100vh;
  pointer-events: none;
  z-index: 9; /* ниже cursor-light(10) и ниже стола(30) */
  filter: blur(1px);
}

.side-light--left {
  left: -10vw;
}

.side-light--right {
  right: -10vw;
}

/* Верхний слой — стол, перекрывает остальные */
.layer--table {
  bottom: 0;
  z-index: 30;
  width: 100vw;
  height: 100%;
  background: url('/img/assets/table.png') no-repeat center bottom;
  background-size: auto 70vh;
}

/* Нижние слои — будут выезжать из-под стола */
.layer--logo {
  bottom: 20%;
  z-index: 20; /* ниже, чем стол */
  width: 100vw;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto 46vh;
  transform: translate(-50%, 30%);
  transition: transform 2s ease;
  background-image: url('/img/assets/bg-logo.png');
}

.layer--text {
  bottom: 41%;
  z-index: 21; /* ниже, чем стол */
  width: 100vw;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto 6vh;
  transform: translate(-50%, 0%);
  transition: transform 2s ease;
  background-image: url('/img/assets/bg-text-fixed.svg');
}

/* Текстовый слой фраз */
.layer--phrase-txt {
  bottom: 68%; /* вплотную под .layer--text */
  z-index: 21;
  transform: translate(-50%, -30%);
  opacity: 0;
  transition: opacity 0.5s ease;
  height: 1em;
  text-align: center;
}

.layer--phrase-txt-mobile {
  bottom: 77%;
  z-index: 40;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  height: 1em;
  text-align: center;
}

.layer--phrase-txt.is-on { opacity: 1; }
.layer--phrase-txt-mobile.is-on { opacity: 1; }

.layer--phrase-txt #phrase,
.layer--phrase-txt-mobile #phrase-mobile {
  display: inline-block;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 300;
  font-size: 1.5vh;
  letter-spacing: 0.02em;
  /* color: #dddddd; */
  color: #fff;
  white-space: nowrap;
  line-height: 1.3;
}

/* Фразы под текстом логотипа */
.layer--phrase {
  bottom: 39%;
  z-index: 21;
  width: 100vw;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto 1.5vh; /* чуть меньше основного текста */
  transform: translate(-50%, -30%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.layer--phrase.is-on {
  opacity: 1;
}

.layer--mm { background-image: url('/img/assets/make-money.svg'); }
.layer--rich { background-image: url('/img/assets/rich.svg'); }

/* Активное состояние — выезд вверх */
.layer--logo.is-in,
.layer--text.is-in {
  transform: translate(-50%, -30%);
}

/* SVG-оверлей с hit-area книги */
.layer--book-hit {
  bottom: 0;
  z-index: 31; /* выше стола */
  width: auto;
  height: 70vh; /* синхронно со столом */
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none; /* события ловит только сам полигон */
}

/* Слой кругов под столом */
.layer--circles {
  bottom: 0;
  z-index: 19; /* ниже стола (30) и ниже текста(21) */
  width: auto;
  height: 70vh; /* синхронно со столом */
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.circle {
  transform: translateY(150px);
  opacity: 0;
}

.circle-anim {
  animation: show-circle 1s ease forwards;
}

@keyframes show-circle {
  0% {
    transform: translateY(150px);
    opacity: 0;
  }
  50% {
    transform: translateY(-50px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Зоны подсветки КП и ноутбука */
.layer--book-hit .book-area,
.layer--book-hit .laptop-area {
  fill: rgba(255, 0, 0, 0);
  stroke: transparent;
  pointer-events: auto;
  cursor: pointer;
  transition: fill 0.4s;
}

/* Эффект подсветки КП */
.layer--book-hit .book-area:hover {
  fill: #DAB49C31;
}

/* Эффект подсветки ноутбука */
.layer--book-hit .laptop-area:hover {
  fill: #6b84d421;
}

.name-tooltip {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.02em;
  fill: #B99999;
  opacity: 0;
  transition: 0.4s ease;;
}

/* Текст над КП */
.layer--book-hit .book-phrase {
  transform: translateX(-10vh);
}

/* Текст над ноутбуком */
.layer--book-hit .laptop-phrase {
  transform: translateX(10vh);
}

/* Стиль и позиция отсчёта возле ноутбука */
.layer--book-hit .laptop-countdown {
  font-size: 18px;
  fill: #ffffff;
  /* transform: translateX(10vh); */
  transform: translateY(10vh);
}

/* Эффект появления текста над КП при наведении на КП */
.layer--book-hit .book-area:hover ~ .book-phrase {
  opacity: 1;
  transform: translateX(0);
}

/* Эффект появления текста над ноутбуком при наведении на ноутбук */
.layer--book-hit .laptop-area:hover ~ .laptop-phrase {
  opacity: 1;
  transform: translateX(0);
}

/* Показываем отсчёт вместе с подписью над ноутбуком */
.layer--book-hit .laptop-area:hover ~ .laptop-countdown {
  opacity: 1;
  /* transform: translateX(0); */
  transform: translateY(0vh);
}

#book-container {
  perspective: 2000px;
}

#book {
  /* width: 600px;
  height: 848px; */
  z-index: 35;
  transform: translate(-36%, 15%) rotate(-30deg) scale(0);
  opacity: 0;
}

.close-btn {
  position: absolute;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0 10px 10px 10px;
  top: 20px;
  right: 20px;
  z-index: 36;
  background: linear-gradient(180deg, rgb(226, 182, 132) 0%, #968179);
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  font-size: 40px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  border-radius: 5px;
  will-change: transform;
  transition: background-color 0.4s ease, transform 0.2s ease;
  box-shadow: 2px 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: btn-shown 0.4s;
}

.close-btn:hover {
  transform: scale(1.1);
}

.close-btn:active {
  transform: scale(0.8);
}

@keyframes btn-shown {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.download-btn {
  position: absolute;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 10px 10px 10px 10px;
  top: 80px;
  right: 20px;
  z-index: 36;
  background: linear-gradient(180deg, rgb(226, 182, 132) 0%, #968179);
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  font-size: 40px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  border-radius: 5px;
  will-change: transform;
  transition: background-color 0.4s ease, transform 0.2s ease;
  box-shadow: 2px 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: btn-shown 0.4s;
}

.download-btn:hover {
  transform: scale(1.1);
}

.download-btn:active {
  transform: scale(0.8);
}

.zoom-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 36;
  display: none;
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.zoom-btn {
  width: 50px;
  height: 50px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 5px;
  background: linear-gradient(180deg, rgb(226, 182, 132) 0%, #968179);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 27px;
  box-shadow: 2px 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.return-zoom {
    font-size: 14px;
}

.zoom-btn:hover { transform: scale(1.08); }
.zoom-btn:active { transform: scale(0.9); }

/* ===== Навигационные кнопки листания при зуме ===== */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 5px;
  background: linear-gradient(180deg, rgb(226, 182, 132) 0%, #968179);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 50px;
  line-height: 1;
  box-shadow: 2px 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  z-index: 36;
  padding-bottom: 15px;
}

.nav-btn:hover { transform: translateY(-50%) scale(1.08); }
.nav-btn:active { transform: translateY(-50%) scale(0.9); }

.nav-prev { left: 20px; }
.nav-next { right: 20px; }

.my-page {
  background: white;
  display: block;
  font-size: 24px;
  color: #ffffff;
  border: 1px solid #3b3b3b;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 1) 0%,
    rgba(189, 189, 189, 1) 100%
  );
  will-change: transform;

  border-radius: 5px;
  position: relative;
}

.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ===================== PRELOADER ===================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(31, 29, 29);
}

.preloader__content {
  position: relative;
  z-index: 1;
  width: min(420px, 80vw);
  padding: 45px 40px 25px 40px;
  border-radius: 10px;
  background: rgba(30, 30, 32, 0.9);
  box-shadow: 0 5px 10px rgba(0,0,0,0.5);
  user-select: none;
}

.preloader__bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}

.preloader__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #E2B684 0%, #968179 100%);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.preloader__text {
  margin-top: 10px;
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ddd;
}

.preloader__warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  visibility: hidden;
  margin-top: 10px;
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: #ce4f4f;
}

.preloader__warning-icon {
  width: 20px;
  height: 20px;
}

.preloader__title {
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #ddd;
}

.preloader__attention {
  text-align: center;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #968179;
}

.preloader__btn {
  position: fixed;
  display: none;
  bottom: 8vh;
  background-color: #968179;
  border: none;
  padding: 10px 20px;
  box-shadow: 2px 2px 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  color: #fff;
}

.preloader__link {
  color: #968179;
  text-decoration: none;
}

/* ===================== TOP BRAND ===================== */
.brand-top__logo {
  position: fixed;
  display: none;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  pointer-events: none;
  background: url('/img/assets/bg-logo.png') no-repeat center center;
  background-size: contain;
  height: 30vh;
  width: 100%;
}

.brand-top__text {
  position: fixed;
  display: none;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  pointer-events: none;
  width: 60%;
  height: 200px;
  background: url('/img/assets/bg-text-fixed.svg') no-repeat left center;
  background-size: contain;
}
