/* ===== Цвета и шрифты ===== */
:root {
  --cream: #f8f2e8;
  --sand: #efe4d2;
  --sand-dark: #e2d2b8;
  --terracotta: #b5562f;
  --terracotta-dark: #96441f;
  --terracotta-text: #a04a26; /* для мелкого текста: контраст 4.5+ на песочном */
  --green: #2f3d2c;
  --green-light: #45583f;
  --ink: #2a2520;
  --muted: #6e6357;
  --wa: #157a43; /* белый текст читается: контраст 5.3 */
  --wa-dark: #0f6435;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(60, 40, 20, 0.10);
  --line: rgba(120, 90, 60, .18);
}

/* ===== Основа ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Видимая рамка при переходе по клавише Tab */
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
.section--green :focus-visible, .hero :focus-visible, .footer :focus-visible, .header:not(.is-scrolled) :focus-visible { outline-color: #f3c9a8; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
/* Ровные цифры в Cormorant, чтобы «1» не путалась с «I» */
.facts strong, .prices strong, .calc__total output, .booking__price strong { font-variant-numeric: lining-nums; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 780px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 15px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--large { padding: 16px 28px; font-size: 16px; }
.btn--small { padding: 12px 18px; font-size: 14px; min-height: 44px; }
.btn--block { width: 100%; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }
.btn--ig { background: var(--terracotta); color: #fff; }
.btn--ig:hover { background: var(--terracotta-dark); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.icon-wa { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }

/* ===== Шапка ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 12px 0;
  color: #fff;
  transition: background .3s, box-shadow .3s, color .3s;
}
.header.is-scrolled {
  background: rgba(248, 242, 232, .96);
  color: var(--ink);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  backdrop-filter: blur(8px);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header__inner .logo { margin-right: auto; }
.logo {
  font: 700 26px/1 var(--serif);
  text-decoration: none;
  letter-spacing: .01em;
}
.logo span { color: #e9a77c; }
.header.is-scrolled .logo span { color: var(--terracotta); }
.logo--light span { color: #e9a77c; }
/* Меню на телефоне: кнопка «Меню» открывает список разделов */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: inherit;
  font: 600 14px var(--sans);
  cursor: pointer;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform .2s;
}
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: 8px 16px 16px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
  font-size: 17px;
  font-weight: 600;
}
.nav.is-open { display: flex; }
.nav a { text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nav a:last-child { border-bottom: 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ===== Первый экран ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  /* Запасной фон, пока нет фото */
  background: linear-gradient(170deg, #6f8a74 0%, #3e5141 45%, #2a3426 100%);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 60%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,18,14,.40) 0%, rgba(20,18,14,.10) 30%, rgba(20,18,14,.55) 60%, rgba(20,18,14,.85) 100%);
}
.hero__content { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 56px; }
.hero__title {
  font: 600 clamp(42px, 11vw, 96px)/0.98 var(--serif);
  letter-spacing: -.015em;
  max-width: 11ch;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero__slogan {
  font: italic 500 clamp(21px, 5.2vw, 30px)/1.3 var(--serif);
  max-width: 560px;
  margin-bottom: 22px;
  color: #f6e6d6;
}
/* Короткие факты под слоганом — с горной «вершиной» вместо точки */
.hero__facts {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
  font-weight: 500;
}
.hero__facts li { display: flex; align-items: center; gap: 8px; }
.hero__facts li::before {
  content: "";
  width: 12px;
  height: 8px;
  background: #e9a77c;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  flex-shrink: 0;
}
.hero__facts li:last-child { font-weight: 700; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; }

/* ===== Секции ===== */
.section { padding: 72px 0; }
.section--sand { background: var(--sand); }
.section--green { background: var(--green); color: #f3ece0; }
/* Подзаголовок над заголовком раздела — курсивом, без капслока */
.eyebrow {
  font: italic 500 21px/1.2 var(--serif);
  color: var(--terracotta-text);
  margin-bottom: 6px;
}
.eyebrow--light { color: #e9a77c; }
.section__title {
  font: 600 clamp(34px, 8vw, 52px)/1.08 var(--serif);
  margin-bottom: 18px;
  max-width: 20ch;
  text-wrap: balance;
}
.section__sub { color: var(--muted); font-size: 17px; max-width: 620px; margin-bottom: 36px; }
.section__sub--light { color: rgba(243,236,224,.85); }
.lead { font-size: 18px; font-weight: 500; max-width: 62ch; }
.about p, .houses__intro p { max-width: 64ch; }

/* Заглушки, которые нужно заполнить */
.todo {
  color: var(--terracotta);
  font-style: italic;
  font-size: 14px;
}
.todo::before { content: "✎ "; font-style: normal; }

/* ===== О нас ===== */
.about__grid { display: grid; gap: 40px; }
.about p { color: #4a4037; }
/* Три факта — список с тонкими линиями, без карточек */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.facts strong {
  font: 700 30px/1.05 var(--serif);
  color: var(--terracotta);
}
.facts span { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* ===== Что входит ===== */
.included { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.included__item {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px;
}
.included__item svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}
.included__item h3 { font: 700 24px/1.2 var(--serif); margin-bottom: 6px; }
.included__item p { color: var(--muted); font-size: 15px; }

/* ===== Фото и заглушки фото ===== */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--sand-dark);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-empty {
  background:
    linear-gradient(160deg, rgba(255,255,255,.25), rgba(0,0,0,.05)),
    var(--sand-dark);
}
.photo.is-empty img { display: none; }
.photo.is-empty::after {
  content: "Фото: " attr(data-file);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ===== Направления ===== */
.places { display: grid; gap: 20px; }
.place {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.place .photo { aspect-ratio: 3 / 2; }
.place__body { padding: 18px 20px 22px; }
.place__body h3 { font: 700 24px/1.2 var(--serif); margin-bottom: 8px; }
.place__body p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ===== Калькулятор ===== */
.calc__wrap { display: grid; gap: 36px; }
.prices { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prices li {
  border: 1px solid rgba(243,236,224,.25);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.prices span { font-size: 14px; opacity: .8; }
.prices strong { font: 700 30px/1.15 var(--serif); color: #fff; }
.prices em { font-style: normal; font-size: 13px; opacity: .7; }
.calc__hint { font-size: 15px; opacity: .85; }

.calc {
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.calc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sand-dark);
}
.calc__row label { font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--sand-dark);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  color: var(--terracotta);
  cursor: pointer;
}
.stepper button:hover { border-color: var(--terracotta); }
.stepper button:disabled { opacity: .35; cursor: default; border-color: var(--sand-dark); }
.stepper input {
  width: 52px;
  height: 42px;
  text-align: center;
  border: none;
  background: transparent;
  font: 700 20px var(--sans);
  color: var(--ink);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__limit { color: var(--terracotta-text); font-size: 14px; margin: 10px 0 0; }
.calc__total { padding: 22px 0 20px; text-align: center; }
.calc__total span { display: block; font: italic 500 20px/1.2 var(--serif); color: var(--muted); }
.calc__total output { display: block; font: 700 46px/1.1 var(--serif); color: var(--terracotta); }
.calc__total small { color: var(--muted); font-size: 14px; }

/* ===== Галерея ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
  gap: 10px;
}
.gallery__item {
  border: 0;
  padding: 0;
  border-radius: 14px;
  cursor: zoom-in;
}
.gallery__item.is-empty { cursor: default; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item img { transition: transform .4s; }
.gallery__item:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 12, 8, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; border-radius: 10px; }
.lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 48px;
  height: 48px;
  line-height: 1;
  background: none;
  border: 0;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

/* ===== Вопросы ===== */
.faq details {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 52px 18px 20px;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 400;
  color: var(--terracotta);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px; color: #4a4037; }
.faq details a { color: var(--terracotta); font-weight: 600; }
.faq details p:last-child { padding-bottom: 20px; }

/* ===== Контакты ===== */
.contacts__inner { text-align: center; }
.contacts .section__title,
.contacts .section__sub { margin-left: auto; margin-right: auto; }
.contacts__buttons { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }

/* ===== Подвал ===== */
.footer { background: #232c21; color: rgba(243,236,224,.75); padding: 32px 0 96px; font-size: 14px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.footer .logo { color: #f3ece0; margin-bottom: 6px; }
.footer p { margin: 0; }

/* ===== Плавающая кнопка WhatsApp ===== */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.wa-float.is-visible { opacity: 1; pointer-events: auto; }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }

/* ===== Домики ===== */
.houses { display: grid; gap: 32px; }
.houses > * { min-width: 0; }
.houses__intro { max-width: 720px; margin-bottom: 36px; color: #4a4037; }

/* Лента вертикальных фото и видео */
.houses__media {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: thin;
}
.houses__photo {
  flex: 0 0 auto;
  height: 340px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  scroll-snap-align: start;
}
.houses__photo { border: 0; padding: 0; cursor: zoom-in; }
.houses__photo.is-empty { cursor: default; }
.houses__hint { font-size: 13px; color: var(--muted); margin: 8px 0 32px; }
.houses__subtitle { font: 700 26px/1.2 var(--serif); margin-bottom: 14px; }

.amenities {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.amenities li { position: relative; padding-left: 30px; }
.amenities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--terracotta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.houses .todo { margin-bottom: 32px; }

.floors { display: grid; gap: 10px; margin-bottom: 32px; }
.floor {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
}
.floor__name {
  font: italic 600 21px/1.2 var(--serif);
  color: var(--terracotta-text);
  margin-bottom: 8px;
}
.floor ul { margin: 0; padding-left: 18px; color: #4a4037; }
.floor li { margin-bottom: 4px; }

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rules li {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}
.rules span { font-size: 13px; color: var(--muted); }
.rules strong { font-weight: 700; font-size: 16px; }

.booking { background: #fff; align-self: start; border: 1px solid var(--line); box-shadow: var(--shadow); }
.booking__price { padding-bottom: 16px; border-bottom: 1px solid var(--sand-dark); }
.booking__price strong { display: block; font: 700 40px/1.1 var(--serif); color: var(--terracotta); }
.booking__price span { color: var(--muted); font-size: 14px; }
.booking__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 0 6px;
}
.booking__dates label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.booking__dates input {
  width: 100%;
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--sand-dark);
  border-radius: 12px;
  background: var(--cream);
  font: 500 15px var(--sans);
  color: var(--ink);
}
.booking__dates input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.booking__note { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ===== Планшеты ===== */
@media (min-width: 640px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .included { grid-template-columns: repeat(2, 1fr); }
  .places { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 190px; }
  .contacts__buttons { flex-direction: row; justify-content: center; }
  .amenities { grid-template-columns: 1fr 1fr; }
  .rules { grid-template-columns: repeat(3, 1fr); }
  .floors { grid-template-columns: 1fr 1fr; }
  .calc { padding: 32px; }
}

/* ===== Компьютеры ===== */
@media (min-width: 960px) {
  .section { padding: 104px 0; }
  .menu-toggle { display: none; }
  .nav, .nav.is-open {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 26px;
    padding: 0;
    background: none;
    color: inherit;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
  }
  .nav a { padding: 4px 0; border: 0; opacity: .9; }
  .nav a:hover { opacity: 1; }
  .header__inner .logo { margin-right: 0; }
  .hero__content { padding-bottom: 96px; }
  .hero__facts { font-size: 16px; }
  .about__grid { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 64px; }
  .included { grid-template-columns: repeat(5, 1fr); }
  .included__item { padding: 26px 20px; }
  .places { grid-template-columns: repeat(3, 1fr); }
  .calc__wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; }
  .houses { grid-template-columns: 1.6fr 1fr; gap: 48px; }
  .booking { position: sticky; top: 90px; }
  .houses__media { margin: 0; padding-left: 0; padding-right: 0; scroll-padding: 0; }
  .houses__photo { height: 400px; }
  .footer { padding-bottom: 32px; }
  .wa-float { display: none; }
}

/* Подпись об авторстве фото */
.footer__credits { font-size: 12px; color: rgba(243,236,224,.7); }
.footer__credits a { color: inherit; }
