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

html {
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* ============================================================
   SCROLL CONTAINER — реальный скролл с CSS snap
   ============================================================ */
.scroll-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  /* Нет scroll-behavior: smooth здесь — скролл плавный за счёт snap */

  /* Скрываем полосу прокрутки */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   СЛАЙДЫ
   ============================================================ */
.slide {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

/* Фоновое изображение — анимируется при появлении */
.slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  /* Начальное состояние: чуть увеличено, прозрачное */
  transform: scale(1.06);
  opacity: 0.6;
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.7s ease;
  will-change: transform, opacity;
}

/* Когда слайд виден — анимируем в нормальный размер */
.slide.is-visible .slide__bg {
  transform: scale(1);
  opacity: 1;
}

/* ============================================================
   СЛАЙД 4 — SVG-ОВЕРЛЕЙ
   ============================================================ */
.jk-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Rect — полностью прозрачный, без рамки. Только cursor меняется. */
.jk-rect {
  fill: transparent;
  cursor: pointer;
}

/* ============================================================
   МОБИЛЬНЫЕ КНОПКИ ДЛЯ СЛАЙДА 4
   ============================================================ */
.jk-mobile-nav {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 12px 16px 24px;
  background: linear-gradient(to top, rgba(20, 15, 10, 0.95) 0%, transparent 100%);
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.jk-mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  background: rgba(230, 115, 0, 0.15);
  border: 1px solid rgba(230, 115, 0, 0.5);
  border-radius: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  transition: background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.jk-mobile-btn:active {
  background: rgba(230, 115, 0, 0.35);
}

/* ============================================================
   ДОТ-НАВИГАЦИЯ
   ============================================================ */
.dot-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s, transform 0.25s, border-color 0.25s;
}

.dot.active {
  background: #ffffff;
  transform: scale(1.4);
  border-color: #ffffff;
}

.dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   АДАПТИВ — МОБИЛКА (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .dot-nav {
    right: auto;
    top: auto;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 8px;
  }

  /* Полное изображение (contain), без обрезки */
  .slide__bg {
    background-size: contain;
  }

  /* Слайд 4: SVG-зоны поверх contained-изображения (портрет) */
  .slide--interactive .jk-overlay {
    position: absolute;
    inset: unset;
    width: 100%;
    height: 56.25vw; /* = vw * (810/1440) — высота = ширина * 9/16 */
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Кнопки не нужны — используем SVG-зоны */
  .jk-mobile-nav {
    display: none;
  }
}

/* Ландшафт ≤768px: изображение вписывается по высоте */
@media (max-width: 768px) and (min-aspect-ratio: 16/9) {
  .slide--interactive .jk-overlay {
    inset: unset;
    height: 100dvh;
    width: calc(100dvh * 1440 / 810);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ============================================================
   ПОДСТРАНИЦЫ (lake/, sky-garden/, etc.)
   ============================================================ */
.subpage {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1f10 60%, #1a1208 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: #ffffff;
  padding: 40px 24px;
  text-align: center;
}

.subpage__label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.subpage__title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #ffffff;
}

.subpage__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border: 2px solid rgba(230, 115, 0, 0.6);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.subpage__back:hover {
  background: rgba(230, 115, 0, 0.15);
  border-color: #e67300;
  color: #ffffff;
}
