/* Стили написаны от телефона к компьютеру: базовые правила — для смартфона,
   @media (min-width: …) — дополнения для планшета и десктопа. */
:root {
  --forest-950: #0a1713;
  --forest-900: #0d1d18;
  --forest-800: #132a23;
  --forest-700: #1d3b31;
  --paper: #f3efe6;
  --paper-2: #e8e2d4;
  --ink: #15211c;
  --ink-soft: #4b5a53;
  --mist: rgba(243, 239, 230, .78);
  --line: rgba(243, 239, 230, .18);
  --free: #8fcf74;
  --free-deep: #4f9a3a;
  --reserved: #e2b65c;
  --sold: #c9c2b2;
  --radius-xl: 28px;
  --radius-l: 20px;
  --pad: 16px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}
@media (min-width: 700px) { :root { --pad: 32px; --radius-xl: 36px; --radius-l: 24px; } }
@media (min-width: 1100px) { :root { --pad: 48px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--forest-900);
  color: var(--paper);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 700px) { body { font-size: 17px; } }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Типографика ── */
.eyebrow {
  font: 600 11px/1.4 var(--font-head);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0 0 14px;
}
.eyebrow--dark { color: var(--ink-soft); }
.h2 {
  font: 400 clamp(28px, 7.4vw, 56px)/1.1 var(--font-head);
  text-transform: uppercase;
  margin: 0 0 20px;
  text-wrap: balance;
}
.h2--dark { color: var(--ink); }
.lead { font-size: clamp(16px, 4.2vw, 20px); color: var(--mist); max-width: 620px; margin: 0 auto 28px; text-wrap: pretty; }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .3s ease, background .3s ease, color .3s ease;
  cursor: pointer;
}
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--ghost { border-color: rgba(255,255,255,.8); color: #fff; background: rgba(0,0,0,.18); backdrop-filter: blur(6px); }
.btn--dark { background: var(--forest-800); color: var(--paper); }
@media (hover: hover) {
  .btn--light:hover { background: #fff; }
  .btn--ghost:hover { background: rgba(0,0,0,.3); }
  .btn--dark:hover { background: var(--forest-700); }
}

/* ── Шапка ── */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--pad);
  transition: background .4s ease, padding .4s ease;
}
.topbar.is-scrolled { background: rgba(13,29,24,.88); backdrop-filter: blur(14px); padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 36px; height: 36px; color: #fff; }
.brand__name { display: none; font: 500 13px/1.2 var(--font-head); letter-spacing: .2em; text-transform: uppercase; }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { font-size: 14px; text-decoration: none; color: var(--mist); transition: color .2s; }
.nav a:hover { color: var(--paper); }
.topbar__phone { margin-left: auto; font: 600 15px/1 var(--font-body); text-decoration: none; white-space: nowrap; color: #fff; }
@media (min-width: 480px) { .brand__name { display: inline; } }
@media (min-width: 960px) { .nav { display: flex; } .topbar__phone { margin-left: 0; } }

/* ── Первый экран ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--pad) 28px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media picture { display: contents; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 26s ease-in-out infinite alternate; }
.hero__media::after { /* ровная тёмная плашка 25% + мягкий переход в фон страницы снизу */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 70%, var(--forest-900) 100%),
    rgba(0,0,0,.25);
}
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.hero__inner { text-align: center; max-width: 1100px; margin: auto auto 0; }
.hero .eyebrow { max-width: 300px; margin-inline: auto; line-height: 1.7; }
@media (min-width: 700px) { .hero .eyebrow { max-width: none; } }
.hero .eyebrow { color: #fff; font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.hero__title {
  font: 500 clamp(46px, 13vw, 150px)/.95 var(--font-head);
  text-transform: uppercase;
  margin: 0 0 22px;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero__lead {
  font: 500 clamp(17px, 4.6vw, 23px)/1.45 var(--font-body);
  max-width: 560px; margin: 0 auto 30px; text-wrap: balance;
  text-shadow: 0 1px 16px rgba(0,0,0,.5);
}
.hero__actions { display: grid; gap: 12px; max-width: 340px; margin: 0 auto; }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: auto 0 0; padding-top: 40px;
  text-align: center;
}
.hero__facts > div + div { border-left: 1px solid rgba(255,255,255,.35); }
.hero__facts dt { font: 500 clamp(18px, 5vw, 26px)/1.2 var(--font-head); text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero__facts dd { margin: 4px 0 0; font: 500 12px/1.3 var(--font-body); text-shadow: 0 1px 10px rgba(0,0,0,.6); }
@media (min-width: 700px) {
  .hero { padding-bottom: 36px; }
  .hero__actions { display: flex; justify-content: center; max-width: none; }
  .hero__facts { max-width: 640px; margin-inline: auto; width: 100%; }
  .hero__facts dd { font-size: 13px; }
}

/* ── Секции ── */
.section { padding: clamp(64px, 12vw, 140px) var(--pad); }

/* О посёлке */
.about { text-align: center; }
.orbs { display: flex; justify-content: center; margin: 0 auto 40px; }
.orbs img {
  --s: clamp(70px, 19vw, 180px);
  width: var(--s); aspect-ratio: 1; object-fit: cover;
  border-radius: 50%; border: 3px solid var(--forest-900);
  margin-left: calc(var(--s) * -.2);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.orbs img:first-child { margin-left: 0; }

/* Преимущества — плитки с фото и видео */
.features__title { text-align: center; margin-bottom: 32px; }
.features__grid { display: grid; gap: 12px; max-width: 1280px; margin: 0 auto; }
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  min-height: 300px;
  background: var(--forest-800);
  isolation: isolate;
}
.tile__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.62) 100%); }
.tile__text { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.tile h3 { font: 500 clamp(22px, 6vw, 30px)/1.15 var(--font-head); text-transform: uppercase; margin: 0 0 6px; color: #fff; }
.tile p { margin: 0; font-weight: 500; color: rgba(255,255,255,.92); max-width: 360px; }
.tile--tall { min-height: 460px; }
.tile--top .tile__text { top: 0; bottom: auto; }
.tile--top::after { background: linear-gradient(0deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.6) 100%); }
.tile--top .tile__media { object-position: center 70%; }
@media (hover: hover) { .tile:hover .tile__media { transform: scale(1.05); } }
@media (min-width: 700px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
  .tile--tall { grid-row: span 2; min-height: 0; }
}
@media (min-width: 1100px) {
  .features__grid { grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 330px 330px; }
  .tile { min-height: 0; }
}
.ticks {
  list-style: none; padding: 0; margin: 28px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.ticks li {
  width: 270px; display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 16px 12px 44px; font-size: 15px; line-height: 1.25;
}
.ticks li::before { content: ""; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--free); }

/* ── Бегущая строка ── */
.marquee { overflow: hidden; padding: 6px 0 clamp(8px, 2vw, 20px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee span { font: 300 clamp(30px, 7vw, 72px)/1.2 var(--font-head); text-transform: uppercase; white-space: nowrap; color: rgba(243,239,230,.9); padding: 0 clamp(28px, 4vw, 60px); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Светлые карточки-секции ── */
.plan__card, .location__card, .request__card {
  max-width: 1280px; margin: 0 auto;
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius-xl);
  padding: 22px 16px;
}
@media (min-width: 700px) { .plan__card, .location__card, .request__card { padding: clamp(28px, 4vw, 52px); } }
.plan.section, .location.section, .request.section { padding-inline: 10px; }
@media (min-width: 700px) { .plan.section, .location.section, .request.section { padding-inline: var(--pad); } }

/* ── План ── */
.plan__head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 8px; }
@media (min-width: 700px) { .plan__head { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 0; } }
.plan__head .h2 { margin-bottom: 8px; }
.plan__counter { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.plan__counter b { font: 300 clamp(44px, 12vw, 76px)/1 var(--font-head); color: var(--free-deep); }
.plan__counter > span { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.plan__hint { color: var(--ink-soft); margin: 0 0 18px; font-size: 15px; }
.plan__body { display: grid; gap: 16px; }
.plan__map {
  position: relative;
  background:
    radial-gradient(circle at 20% 15%, rgba(79,154,58,.16), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(79,154,58,.14), transparent 50%),
    var(--paper-2);
  border-radius: var(--radius-l);
  padding: 8px;
  overflow: hidden;
}
#planSvg { width: 100%; height: auto; display: block; overflow: visible; }
.road { fill: #d9d1bf; stroke: none; }
.plot { stroke: var(--paper-2); stroke-width: 2.5; stroke-linejoin: round; transition: fill .25s ease, filter .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); transform-box: fill-box; transform-origin: center; -webkit-tap-highlight-color: transparent; }
.plot--sold { fill: var(--sold); }
.plot:focus { outline: none; }
.plot:focus-visible { stroke: var(--ink); stroke-width: 3; }
.plot--free { fill: var(--free); cursor: pointer; animation: breathe 3.2s ease-in-out infinite; }
.plot--reserved { fill: var(--reserved); cursor: pointer; }
@media (hover: hover) {
  .plot--free:hover, .plot--reserved:hover { filter: brightness(1.08) drop-shadow(0 6px 10px rgba(21,33,28,.25)); transform: scale(1.03); }
}
.plot.is-active { fill: var(--free-deep); animation: none; }
.plot--reserved.is-active { fill: #c7922f; }
@keyframes breathe { 50% { filter: brightness(1.1); } }
.plot-label { font: 600 17px/1 var(--font-head); fill: var(--ink); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.plot-label--sold { fill: #8f877a; font-weight: 400; }
.plot-label.is-active { fill: #fff; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 4px 2px; font-size: 13px; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 7px; }
.sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.sw--free { background: var(--free); } .sw--reserved { background: var(--reserved); } .sw--sold { background: var(--sold); }

.plan__panel { background: #fff; border-radius: var(--radius-l); padding: 22px; }
.panel__empty { display: none; }
.panel__empty[hidden], .panel__plot[hidden] { display: none !important; }
.panel__plot { position: relative; }
.panel__close { position: absolute; top: -6px; right: -6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink); }
.panel__label { margin: 0; font: 600 11px/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.panel__num { font: 300 56px/1 var(--font-head); margin: 8px 0 10px; }
.panel__status { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(143,207,116,.25); color: #2f6b22; }
.panel__status.is-reserved { background: rgba(226,182,92,.25); color: #8a5f12; }
.panel__facts { margin: 0 0 20px; }
.panel__facts > div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #ece6d9; }
.panel__facts dt { color: var(--ink-soft); }
.panel__facts dd { margin: 0; font-weight: 700; }
.panel__plot .btn { width: 100%; }
/* На телефоне карточка участка появляется только после выбора */
.plan__panel:has(.panel__plot[hidden]) { display: none; }
@media (min-width: 900px) {
  .plan__head { align-items: flex-end; }
  .plan__body { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: stretch; }
  .plan__map { padding: 20px; }
  .plot-label { font-size: 15px; font-weight: 500; }
  .plan__panel:has(.panel__plot[hidden]) { display: block; }
  .panel__empty { display: grid; place-items: center; text-align: center; height: 100%; color: var(--ink-soft); gap: 10px; align-content: center; }
  .panel__empty p { margin: 0; }
  .panel__icon { width: 44px; height: 44px; color: var(--free-deep); }
}

/* ── Утро начинается с леса за окном ── */
.why { max-width: 1280px; margin: 0 auto; display: grid; gap: 28px; align-items: center; }
.why__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-xl); }
.why__text .h2 { margin-bottom: 18px; }
.why__text p { color: var(--mist); margin: 0; max-width: 500px; font-size: clamp(16px, 4.2vw, 19px); }
@media (min-width: 820px) {
  .why { grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
  .why__photo { max-height: 760px; }
}

/* ── Что рядом ── */
.location__head p:not(.eyebrow) { color: var(--ink-soft); margin: 0 0 20px; max-width: 640px; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #ddd5c4; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 9px 14px; font: 600 14px/1 var(--font-body); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="true"] { background: var(--forest-800); color: var(--paper); border-color: var(--forest-800); }
.location__body { display: grid; gap: 14px; }
.nearmap { height: 380px; border-radius: var(--radius-l); overflow: hidden; background: var(--paper-2); z-index: 0; }
.nearlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.nearlist li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #fff; border-radius: 14px; cursor: pointer; }
.nearlist i { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.nearlist .n-name { flex: 1; font-weight: 600; font-size: 15px; line-height: 1.3; }
.nearlist .n-km { color: var(--ink-soft); font-size: 14px; white-space: nowrap; }
.location__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.location__foot .btn { width: 100%; }
.location__note { margin: 0; font-size: 13px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; }
  .location__body { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .nearmap { height: 520px; }
  .nearlist { max-height: 520px; align-content: start; }
  .location__foot .btn { width: auto; }
}
/* ── Галерея по сезонам ── */
.gallery { max-width: 1280px; margin: 0 auto; }
.gallery .h2 { text-align: center; margin-bottom: 24px; }
.seasons { display: flex; justify-content: center; gap: 6px; margin: 0 auto 20px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 999px; }
.seasons button { border: 0; background: none; color: var(--mist); font: 600 15px/1 var(--font-body); padding: 12px 22px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.seasons button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.season { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; animation: fadein .5s ease; }
.season[hidden] { display: none; }
.season img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-l); aspect-ratio: 4 / 5; }
.season img:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
@media (min-width: 700px) {
  .season { grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
  .season img, .season img:first-child { grid-column: auto; aspect-ratio: 3 / 4; }
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ── Заявка ── */
.request__card { display: grid; gap: 8px; }
.request__text p:not(.eyebrow) { color: var(--ink-soft); margin: 0 0 16px; }
.request__chosen { background: rgba(143,207,116,.22); color: #24521a !important; padding: 12px 16px; border-radius: 14px; }
.request__form { min-height: 420px; }
@media (min-width: 820px) { .request__card { grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); } }

/* ── Подвал ── */
.footer { text-align: center; padding: 60px var(--pad) 110px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer__brand { font: 400 clamp(26px, 6vw, 44px)/1 var(--font-head); text-transform: uppercase; margin-bottom: 16px; }
.footer__phone { font: 500 22px/1 var(--font-head); text-decoration: none; }
.footer__legal, .footer__note { font-size: 13px; color: var(--mist); margin: 20px auto 0; max-width: 700px; }
.footer__links { margin: 10px 0 0; font-size: 14px; }

/* ── Кнопка звонка на телефоне ── */
.call-fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--free); color: var(--forest-900);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .3s, transform .3s;
}
.call-fab svg { width: 26px; height: 26px; }
.call-fab.is-shown { opacity: 1; pointer-events: auto; transform: none; }
@media (min-width: 960px) { .call-fab { display: none; } }

/* ── Появление при прокрутке ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img, .plot--free { animation: none; }
  .marquee__track { animation-duration: 120s; }
  html { scroll-behavior: auto; }
}
