
/* Montserrat Alternates */
@font-face {
  font-family: 'Montserrat Alternates';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/montserrat-alternates-v18-cyrillic_latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat Alternates';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/montserrat-alternates-v18-cyrillic_latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat Alternates';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/montserrat-alternates-v18-cyrillic_latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat Alternates';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/montserrat-alternates-v18-cyrillic_latin-700.woff2') format('woff2');
}

/* Roboto Slab */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/roboto-slab-v36-cyrillic_latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/roboto-slab-v36-cyrillic_latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/roboto-slab-v36-cyrillic_latin-600.woff2') format('woff2');
}

:root {
  --ink:          #29323a;
  --ink-soft:     #5b6670;
  --paper:        #faf8f3;
  --paper-raised: #ffffff;
  --forest:       #3a4b58;
  --green:        #4f8f3a;
  --green-deep:   #3c7029;
  --green-light:  #e7f1e1;
  --water:        #4790ac;
  --water-light:  #dbeaf0;
  --sand:         #e79a52;
  --sold:         #a8453f;
  --line:         #e2ddd0;

  --font-display: 'Montserrat Alternates', sans-serif;
  --font-body:    'Montserrat Alternates', serif;

  --container: 1180px;
  --edge: 10px;         /* горизонтальный отступ на мобильном */
  --radius: 6px;
  --shadow: 0 10px 30px -14px rgba(41, 50, 58, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.4;
  font-size: 14px;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(1rem, 5vw, 2rem); font-weight: 300; }
h2 { font-size: clamp(1.5rem, 5vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
p { max-width: 68ch; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
}
@media (min-width: 768px) { :root { --edge: 32px; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.9em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--green); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--green-deep); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--paper-raised); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}
@media (min-width: 560px) { .btn-primary { width: auto; } }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--forest);
  color: #fff;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 20px; padding-bottom: 20px; position: relative;
}
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; color: #fff; white-space: nowrap; }
.logo span { color: #a9d18f; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-icons { display: none; align-items: center; gap: 10px; height: 1.05rem; }
.header-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-light); color: var(--green-deep); text-decoration: none;
}
.header-icons a:hover { background: var(--green); color: #fff; }
.header-icons a svg { width: 16px; height: 16px; }

.nav-icons { display: flex; gap: 12px; margin-top: 20px; }
.main-nav .nav-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; text-decoration: none;
  padding: 0; border-bottom: none;
}
.main-nav .nav-icons a:hover { background: var(--green); color: #a9d18f; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 10px 6px; width: 44px; height: 44px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: fixed; inset: 0; top: 58px;
  background: var(--forest);
  flex-direction: column; align-items: flex-start;
  padding: 12px var(--edge) 24px;
  display: none;
  overflow-y: auto;
}
.main-nav.is-open { display: flex; }
.main-nav a { display: block; width: 100%; padding: 14px 0; text-decoration: none; color: #eef1f2; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.main-nav a:hover { color: #a9d18f; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; top: auto; display: flex !important; flex-direction: row; align-items: center; gap: 24px; padding: 0; background: none; width: auto; }
  .main-nav a { width: auto; padding: 0; border: none; font-size: 0.75rem; }
  .nav-icons { display: none; }
  .header-icons { display: flex; }
}

/* ---------- Герой ---------- */
.hero {
  position: relative; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(29,40,46,0.35) 0%, rgba(20,28,33,0.85) 100%), var(--forest);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; background-image: var(--hero-image); background-size: cover; background-position: center 65%; z-index: -1; }
.hero-inner { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 40px; width: 100%; }
.hero-eyebrow-line { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; color: #cfe6c4; font-size: 0.9rem; }
.hero-eyebrow-line svg { flex-shrink: 0; }
.hero h1 { color: #fff; margin-bottom: 0.35em; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero-sub { font-size: 1.05rem; max-width: 46ch; color: #edf2e8; }

.hero-tags { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 15px; max-width: 54ch; }
.hero-tags span {
  font-size: 0.82rem; padding: 5px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 колонки в один ряд даже на смартфонах */
  gap: 12px;
  margin-top: 48px;                      /* Увеличенный отступ сверху */
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;                   /* Центрирование чисел и подписей */
  text-align: center;                    /* Симметрия текста по вертикальной оси */
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4.5vw, 2.6rem); /* Уменьшенный размер на мобилках, масштабируемый до десктопа */
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-stat-label {
  color: #d9e5d2;
  font-size: clamp(0.72rem, 2.2vw, 0.85rem); /* Компактный размер подписей на узких экранах */
  max-width: 18ch;
  margin-top: 6px;
  line-height: 1.25;
}

@media (min-width: 600px) {
  .hero-stats {
    gap: 36px;
    margin-top: 60px;
  }
}

.hero-brand { position: relative; z-index: 1; padding: 20px 0 20px; }
.hero-brand-label { display: block; font-size: clamp(0.95rem, 2.4vw, 1.15rem); color: #d9e5d2; margin-bottom: 0px; text-align: right; }
.hero-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 12vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  color: #f3f5f0;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
  text-align: right;
}
@media (min-width: 700px) { .hero-brand-name { text-align: right; } .hero-brand-label { text-align: right; } }

/* ---------- Секции общие ---------- */
.section { padding: 56px 0; }
@media (min-width: 768px) { .section { padding: 88px 0; } }
.section-green { background: var(--green-light); }
.section-water { background: var(--water-light); }
.section-forest { background: var(--forest); color: #eef1f2; }
.section-forest h2, .section-forest h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); }

.wave-divider { display: block; width: 100%; height: 40px; margin-top: -1px; }
.wave-divider path { fill: var(--water-light); }
@media (min-width: 768px) { .wave-divider { height: 60px; } }

/* ---------- О посёлке ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.about-grid > div:first-child { order: 2; }
.about-photo { order: 1; margin: 0; }
.about-grid-reverse .about-photo { order: -1; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-photo figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: stretch; }
  .about-grid > div:first-child, .about-photo { order: initial; }
  .about-grid-reverse { grid-template-columns: 0.9fr 1.1fr; }
  .about-grid-reverse .about-photo { order: initial; }
  .about-photo { display: flex; flex-direction: column; }
  .about-photo img { flex: 1 1 auto; min-height: 0; }
}

.pull-quote {
  margin: 28px 0; padding: 18px 22px;
  border-left: 3px solid var(--water);
  background: var(--water-light);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.02rem;
  color: var(--forest);
  border-radius: 0 6px 6px 0;
}

.video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Схема участков ---------- */
.scheme-wrap { background: var(--paper-raised); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.scheme-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; font-size: 0.9rem; color: var(--ink-soft); }
.scheme-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.scheme-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: var(--scheme-ratio, 4/3);
  overflow: hidden;
  border-radius: 4px;
  background: #dfe6df;
  touch-action: pan-y;
}
/* На мобильном — во всю ширину экрана и почти во всю высоту экрана, без обрезки фото по бокам */
@media (max-width: 640px) {
  .scheme-wrap { padding: 0; background: transparent; box-shadow: none; }
  .scheme-viewport {
    height: 70vh;
    aspect-ratio: unset;
    border-radius: 6px;
  }
  .scheme-legend, .plots-table-wrap { padding: 0 var(--edge); }
  .scheme-legend { margin-top: 16px; }
}

.scheme-zoom-layer { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform; }
.scheme-zoom-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scheme-zoom-layer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scheme-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 10px; padding: 0 var(--edge); }
@media (min-width: 641px) { .scheme-hint { padding: 0; } }

.plot-shape { fill-opacity: 0.35; stroke-width: 2; cursor: pointer; transition: fill-opacity 0.15s ease; outline: none; -webkit-tap-highlight-color: transparent; }
.plot-shape:hover, .plot-shape:focus, .plot-shape:focus-visible { fill-opacity: 0.6; outline: none; }

.plot-tooltip {
  position: absolute; pointer-events: none; background: transparent; color: #ffffff; padding: 9px 13px; border-radius: 4px;
  font-size: 0.88rem; transform: translate(-50%, -110%); white-space: nowrap; opacity: 0; transition: opacity 0.12s ease; z-index: 10;
}
.plot-tooltip.is-visible { opacity: 1; }
.plot-tooltip strong {
  display: block; font-family: var(--font-display); margin-bottom: -20px; line-height: 1.2;   
}

.scheme-zoom-controls { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.scheme-zoom-controls button {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--paper-raised); color: var(--forest); font-size: 1.3rem; line-height: 1;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.scheme-zoom-controls button:hover { background: var(--green-light); }
.scheme-zoom-controls #zoom-reset { font-size: 1.05rem; }

.scheme-empty { padding: 50px 16px; text-align: center; color: var(--ink-soft); }

.plots-table-wrap { margin-top: 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.plots-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.9rem; background: var(--paper-raised); border-radius: var(--radius); overflow: hidden; }
table.plots-table th, table.plots-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.plots-table th { font-family: var(--font-display); font-weight: 600; color: var(--forest); background: var(--green-light); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; white-space: nowrap; }
.status-badge .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------- Преимущества ---------- */
.advantages { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.advantage { padding: 26px 22px; background: var(--paper-raised); }
.advantage-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green-light); color: var(--green-deep); margin-bottom: 12px; }
.advantage h4 { font-size: 1.02rem; margin-bottom: 0.35em; }
.advantage p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }
@media (min-width: 640px) { .advantages { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .advantages { grid-template-columns: repeat(3, 1fr); } }

.closing-line {
  margin-top: 36px; font-family: var(--font-display); font-size: 1.1rem; color: var(--forest);
  max-width: 60ch; padding-top: 24px; border-top: 1px solid var(--line);
}

/* ---------- Фотогалерея ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-item { display: block; border-radius: 4px; overflow: hidden; position: relative; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-item:nth-child(1), .gallery-item:nth-child(6) { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
}

.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(20,24,26,0.92); z-index: 1000;
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 4px; }
.lightbox-caption { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: #fff; font-size: 0.92rem; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: none; font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ---------- Инфраструктура ---------- */
.infra-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.infra-list li { display: flex; gap: 16px; align-items: flex-start; }
.infra-list .num { font-family: var(--font-display); font-weight: 700; color: var(--water); font-size: 1.15rem; flex-shrink: 0; }

/* ---------- Условия покупки ---------- */
.conditions-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.condition h4 { color: var(--forest); border-bottom: 2px solid var(--sand); display: inline-block; padding-bottom: 4px; font-size: clamp(1.4rem, 3vw, 1.4rem); }
.condition p { color: var(--ink-soft); font-size: 0.93rem; }
@media (min-width: 600px) { .conditions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .conditions-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- О компании ---------- */
.about-company { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.about-company img { border-radius: var(--radius); width: 100%; object-fit: cover; }
@media (min-width: 860px) { .about-company { grid-template-columns: 0.9fr 1.1fr; gap: 56px; } }

/* ---------- Контакты ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }

.contact-form { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  font-family: var(--font-body); font-size: 1rem; background: var(--paper-raised);
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 0.83rem; color: var(--ink-soft); }
.form-success, .form-error { padding: 13px 16px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.92rem; }
.form-success { background: var(--green-light); color: var(--green-deep); }
.form-error { background: #f7e2df; color: var(--sold); }

.contact-details dt { font-family: var(--font-display); color: var(--forest); font-size: 0.82rem; margin-top: 14px; }
.contact-details dd { margin: 2px 0 0; }
.contact-details a { text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }

.messenger-links { display: flex; gap: 12px; margin-top: 16px; }
.messenger-links a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--green-light); color: var(--green-deep); text-decoration: none;
}
.messenger-links a:hover { background: var(--green); color: #fff; }

/* ---------- Футер ---------- */
.site-footer { background: var(--forest); color: #cdd6d3; padding: 28px 0; font-size: 0.82rem; }
.footer-row { display: flex; flex-direction: column; gap: 8px; }
.footer-row a { color: #cdd6d3; text-decoration: underline; }
@media (min-width: 700px) { .footer-row { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ---------- Утилиты ---------- */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------- Иконки-картинки (SVG), красятся в цвет ссылки и меняются при наведении ---------- */
.icon-mask {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.messenger-links .icon-mask { width: 20px; height: 20px; }
 
.icon-phone     { -webkit-mask-image: url('../img/phone.svg');     mask-image: url('../img/phone.svg'); }
.icon-whatsapp  { -webkit-mask-image: url('../img/whatsapp.svg');  mask-image: url('../img/whatsapp.svg'); }
.icon-telegram  { -webkit-mask-image: url('../img/telegram.svg');  mask-image: url('../img/telegram.svg'); }
.icon-max       { -webkit-mask-image: url('../img/max.svg');       mask-image: url('../img/max.svg'); }