/* ===== База: токены и масштаб =====
   1rem = 10px при ширине макета 1920px (значения из Figma ÷ 10 → rem) */
:root {
  --c-sky: #88adbe;
  --c-green: #658b10;
  --c-green-dark: #374f01;
  --c-header-bg: rgba(59, 84, 3, 0.33);
  --c-page: #8aa377;
  --font-body: 'Inter', Arial, sans-serif;
  --font-display: 'Ruslan Display', var(--font-body);
  --header-h: 8.8rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(100vw / 192);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

@media (min-width: 1920px) {
  html { font-size: 10px; }
}

body {
  font-family: var(--font-body);
  color: #fff;
  background: var(--c-page);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== Шапка ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--c-header-bg);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25rem 0 25rem;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 4.2rem;
}

.site-header__link {
  font-size: 3.6rem;
  color: #fff;
  white-space: nowrap;
}

.site-header__link:hover { opacity: 0.85; }

.site-header__socials {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-header__socials img {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
}

.site-header__burger {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 32px;
  position: relative;
  cursor: pointer;
}

.site-header__burger span,
.site-header__burger::before,
.site-header__burger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.site-header__burger::before { top: 4px; }
.site-header__burger span { top: 50%; translate: 0 -50%; }
.site-header__burger::after { bottom: 4px; }

/* ===== Кнопка «Забронировать» ===== */
.btn-book {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57.3rem;
  max-width: 90%;
  height: 10.7rem;
  margin-inline: auto;
  background: var(--c-green);
  border-radius: 6.3rem;
  box-shadow: 0 0 1.94rem 0.3rem var(--c-green-dark);
  font-family: var(--font-display);
  font-size: 4.8rem;
  line-height: 1;
  color: #fff;
  text-align: center;
  transition: background 0.2s, transform 0.2s;
}

.btn-book:hover {
  background: #719b12;
  transform: translateY(-2px);
}

/* ===== Фиксированные еловые ветки по краям экрана =====
   Слои: фон секции → ветки (z-index 1) → контент секции (z-index 6, правило ниже) */
.side-decor__branch {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Контент секций поверх веток. :where() даёт нулевую специфичность:
   правило не перебивает позиционирование, заданное в css секций */
:where(main section:not(.hero) > h2,
       main section:not(.hero) > h3,
       main section:not(.hero) > p,
       main section:not(.hero) > div,
       main section:not(.hero) > a,
       main section:not(.hero) > ul,
       main section:not(.hero) > img,
       main section:not(.hero) > figure,
       main section:not(.hero) > iframe,
       main section:not(.hero) > details) {
  position: relative;
  z-index: 6;
}

.side-decor--visible .side-decor__branch { opacity: 1; }

.side-decor__branch--tl {
  left: 8.4rem;
  top: 27.6rem;
  width: 27.8rem;
  height: 59.1rem;
  transform: translate(-50%, -50%) rotate(-55.88deg) scaleY(-1);
}

.side-decor__branch--br {
  right: 16.6rem;
  bottom: 13.5rem;
  width: 27.8rem;
  height: 59.1rem;
  transform: translate(50%, 50%) rotate(124.12deg) scaleY(-1);
}

.side-decor__branch--bl {
  left: 8rem;
  bottom: 13.5rem;
  width: 41.3rem;
  height: 27.5rem;
  transform: translate(-50%, 50%) rotate(-20.41deg) scaleY(-1);
}

.side-decor__branch--tr {
  right: 8.6rem;
  top: 23.1rem;
  width: 41.3rem;
  height: 27.5rem;
  transform: translate(50%, -50%) rotate(159.59deg) scaleY(-1);
}

/* ===== Подвал ===== */
.site-footer {
  background: #8ba578;
  padding: 1rem 2rem;
}

.site-footer__text {
  font-size: 3.6rem;
  font-weight: 400;
  text-align: center;
  color: #fff;
}

/* ===== Мобильная версия ===== */
@media (max-width: 768px) {
  html { font-size: 10px; }

  :root { --header-h: 56px; }

  .site-header__inner { padding: 0 16px; }

  .site-header__burger { display: block; }

  .site-header__nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(59, 84, 3, 0.95);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  .site-header__link {
    font-size: 18px;
    padding: 14px 16px;
    width: 100%;
    text-align: center;
  }

  .site-header--open .site-header__nav { max-height: 300px; }

  .site-header--open .site-header__burger::before {
    top: 50%;
    translate: 0 -50%;
    rotate: 45deg;
  }

  .site-header--open .site-header__burger span { opacity: 0; }

  .site-header--open .site-header__burger::after {
    bottom: auto;
    top: 50%;
    translate: 0 -50%;
    rotate: -45deg;
  }

  .site-header__socials { gap: 8px; }

  .site-header__socials img {
    width: 36px;
    height: 36px;
  }

  .btn-book {
    width: 300px;
    height: 60px;
    border-radius: 32px;
    font-size: 22px;
  }

  .site-footer__text { font-size: 13px; }

  .side-decor__branch--tl {
    left: 2rem;
    top: 10rem;
    width: 11rem;
    height: 23.4rem;
  }

  .side-decor__branch--br {
    right: 2rem;
    bottom: 3rem;
    width: 11rem;
    height: 23.4rem;
  }

  .side-decor__branch--bl {
    left: 1rem;
    bottom: 3rem;
    width: 16rem;
    height: 10.7rem;
  }

  .side-decor__branch--tr {
    right: 1rem;
    top: 9rem;
    width: 16rem;
    height: 10.7rem;
  }
}
