/* =========================================================================
   ОНЕГИН55 — коттеджи в селе Пушкино
   Mobile-first. Десктоп — расширение мобильной вёрстки, не отдельный дизайн.
   ========================================================================= */

/* ── Шрифт: Onest Variable, self-hosted, один файл на все начертания ──── */
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  /* здесь живёт знак ₽ (U+20BD) */
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/onest-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                 U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ── Токены ──────────────────────────────────────────────────────────── */
:root {
  /* Тёмный — не нейтральный чёрный, а глубокий зелёный из семейства логотипа */
  --ink:     #16211b;
  --txt:     #141815;
  --muted:   #5e6663;
  --line:    #e2e5e2;
  --line-dk: rgba(255, 255, 255, .17);
  --paper:   #ffffff;
  --soft:    #f1f3f0;

  /* Зелёный держим в оттенке логотипа, но насыщенный: сам #638f6f выцветший
     (насыщенность 18%) и на заливке читается мутным пятном. */
  --brand:    #2e7d51;   /* заливка кнопок */
  --brand-h:  #256844;   /* hover — темнее: текст на кнопке белый */
  --accent:   #24704a;   /* надзаголовки, ссылки, активные вкладки */
  --accent-l: #7cc79c;   /* для акцентов на тёмном фоне */
  --on-brand: #ffffff;   /* текст на зелёной заливке */

  --wrap: 1280px;
  --pad:  clamp(20px, 5vw, 56px);
  --sec:  clamp(64px, 12vw, 148px);

  --hdr-h:  64px;
  --mbar-h: 74px;

  --font: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ── База ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom));
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--txt);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
/* Страховка: длинное слово в заголовке не должно раздвигать страницу вширь */
h1, h2, h3 {
  margin: 0; font-weight: 500; line-height: 1.06; letter-spacing: -.03em;
  overflow-wrap: break-word;
}
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.sec  { padding-block: var(--sec); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 12px 20px; background: var(--ink); color: #fff;
}
.skip-link:focus { left: 0; }

/* ── Типографика ─────────────────────────────────────────────────────── */
.h2 {
  font-size: clamp(2rem, 7vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -.035em;
  max-width: 17ch;
}
.h2--light { color: #fff; }
/* Заявление бренда — единственный чисто типографический экран, поэтому крупнее */
.h2--xl { font-size: clamp(2.4rem, 8.5vw, 4.6rem); letter-spacing: -.042em; max-width: 15ch; }

.eyebrow {
  margin-bottom: 20px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--light { color: var(--accent-l); }

.lead, .sec__lead {
  margin-top: 22px;
  font-size: clamp(1.0625rem, 2.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
}

/* Заголовок секции с волосяной линией сверху — задаёт ритм всей странице */
.sec__head {
  margin-bottom: clamp(40px, 7vw, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contacts .sec__head, .tradein .sec__head { border-color: var(--line-dk); }
.sec__head--wide { margin-bottom: clamp(32px, 5vw, 56px); }
.sec__head--wide .sec__lead { max-width: 62ch; }

/* ── Кнопки ──────────────────────────────────────────────────────────── */
/* Одна основная кнопка на весь сайт: насыщенный зелёный + белый текст.
   Работает и на белом, и на фото, и на тёмной полосе — белых кнопок нет нигде. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  padding: 0 34px;
  border: 1px solid var(--brand);
  border-radius: 2px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover  { background: var(--brand-h); border-color: var(--brand-h); }
.btn:active { background: #1e5638; border-color: #1e5638; }

.btn--lg   { min-height: 62px; padding-inline: 42px; font-size: 1rem; }
.btn--sm   { min-height: 44px; padding-inline: 22px; font-size: .88rem; }
.btn--full { width: 100%; }

.btn--outline {
  background: transparent;
  border-color: rgba(22, 33, 27, .22);
  color: var(--ink);
  font-weight: 500;
}
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.xbtn {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: transparent; cursor: pointer;
  flex: none;
}
.xbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.xbtn:hover { background: rgba(0, 0, 0, .06); }

/* ── Шапка ───────────────────────────────────────────────────────────── */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 90;
  color: #fff;
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.hdr__in {
  display: flex; align-items: center; gap: 18px;
  height: var(--hdr-h);
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--pad);
}
.hdr.is-stuck {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.logo__img { width: 46px; height: 46px; flex: none; }
.logo__txt { font-size: 1.05rem; font-weight: 600; letter-spacing: .15em; }
.logo__txt em { font-style: normal; opacity: .6; }
.logo--foot { margin-right: 0; gap: 14px; }
.logo--foot .logo__img { width: 72px; height: 72px; }
.logo--foot .logo__txt { font-size: 1.2rem; }

.nav { display: none; }
.hdr__act { display: flex; align-items: center; gap: 10px; }
.hdr__tel { display: none; }
.hdr .btn--sm { display: none; }

.burger {
  display: grid; place-content: center; gap: 6px;
  width: 46px; height: 46px;
  border: 0; background: transparent; cursor: pointer;
}
.burger span {
  display: block; width: 24px; height: 1.5px; background: currentColor;
  transition: transform .22s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* Мобильное меню */
.mobmenu {
  position: fixed; inset: var(--hdr-h) 0 0; z-index: 89;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px var(--pad) calc(44px + env(safe-area-inset-bottom));
  background: var(--paper);
  overflow-y: auto;
  animation: fade .2s var(--ease);
}
.mobmenu[hidden] { display: none; }
.mobmenu nav { display: flex; flex-direction: column; }
.mobmenu nav a {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.6rem; font-weight: 500; letter-spacing: -.03em; text-decoration: none;
}
.mobmenu__foot { padding-top: 36px; }
.mobmenu__tel { font-size: 1.6rem; font-weight: 500; letter-spacing: -.03em; text-decoration: none; }
.mobmenu__hours { margin-top: 6px; color: var(--muted); font-size: .92rem; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ── 1. Герой ────────────────────────────────────────────────────────── */
/* Фото на весь экран, текст поверх — одинаково на телефоне и десктопе.
   Широкий рендер в вертикальный экран не влезает, поэтому на телефон уходит
   отдельный вертикальный кадр (см. <picture> в разметке), а не обрезанный
   горизонтальный: композиция сделана заранее, дом читается целиком. */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: 600px;
  height: 100svh;
  max-height: 1000px;
  padding-top: var(--hdr-h);
  /* нижняя панель с кнопкой перекрывает последние 74px экрана — приподнимаем
     содержимое ровно на её высоту, на десктопе --mbar-h равна нулю */
  padding-bottom: calc(clamp(28px, 6vw, 56px) + var(--mbar-h));
  background: var(--ink);
  overflow: hidden;
}
.hero__img { position: absolute; inset: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 21, 17, .58) 0%, rgba(14, 21, 17, .10) 26%,
                                      rgba(14, 21, 17, .72) 58%, rgba(14, 21, 17, .95) 100%);
}
.hero__body {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--pad);
  color: #fff;
}
.hero__kicker {
  margin-bottom: 22px;
  /* трекинг поменьше, чтобы строка влезала на телефон одной строкой */
  font-size: .72rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.hero__h1 {
  font-size: clamp(2.9rem, 12.5vw, 6.4rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.045em;
}
.hero__sub {
  margin-top: 24px;
  max-width: 36ch;
  font-size: clamp(1.05rem, 3.4vw, 1.3rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
}
.hero .btn { margin-top: 32px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 18px;
  margin-top: clamp(34px, 6vw, 56px);
}
.hero__stats > div { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .3); }
.hero__stats dt {
  font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.hero__stats dd {
  margin-top: 5px;
  font-size: clamp(.95rem, 3.7vw, 1.45rem);
  font-weight: 500; letter-spacing: -.025em;
  line-height: 1.2;
}

/* ── 2. О проекте ────────────────────────────────────────────────────── */
/* Блок сознательно без фотографии: сразу под ним идут три больших рендера
   в планировках, и ещё один дом здесь только дублировал бы их. */
.facts { display: grid; gap: 0; }
.facts li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  letter-spacing: -.015em;
}
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts span {
  font-size: .7rem; font-weight: 600; letter-spacing: .1em;
  color: var(--accent);
  flex: none;
}

/* ── 3. Планировки ───────────────────────────────────────────────────── */
.plans { background: var(--soft); }
.cards { display: grid; gap: 44px; }
.card { display: flex; flex-direction: column; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__area {
  position: absolute; left: 0; bottom: 0;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  font-size: .8rem; font-weight: 500; letter-spacing: -.01em;
}
.card__body { display: flex; flex-direction: column; flex: 1; padding-top: 24px; }
.card__title { font-size: clamp(1.4rem, 4vw, 1.7rem); letter-spacing: -.035em; }
.card__spec {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--accent); font-weight: 500;
}
.card__desc { margin-top: 12px; margin-bottom: 26px; color: var(--muted); font-size: .98rem; }
.card__body .btn { margin-top: auto; }

/* Варианты отделки — компактной строкой */
.finish {
  display: grid; gap: 26px;
  margin-top: clamp(56px, 9vw, 96px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.finish__h { font-size: 1.3rem; letter-spacing: -.03em; }
.finish__txt p { margin-top: 8px; color: var(--muted); font-size: .98rem; }
.finish__list { display: flex; flex-wrap: wrap; gap: 10px 34px; }
.finish__list li {
  position: relative; padding-left: 18px;
  font-size: 1.02rem; font-weight: 500; letter-spacing: -.02em;
}
.finish__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--accent);
}

/* ── Трейд-ин ────────────────────────────────────────────────────────── */
.tradein { padding-block: clamp(56px, 10vw, 112px); background: var(--ink); color: #fff; }
.tradein__in { display: grid; gap: 34px; }
.tradein__h { font-size: clamp(1.8rem, 6.2vw, 3rem); font-weight: 500; letter-spacing: -.035em; max-width: 16ch; }
.tradein__p { margin-top: 20px; max-width: 50ch; color: rgba(255, 255, 255, .7); }
.tradein .btn { justify-self: start; }

/* ── 4. Инфраструктура и коммуникации ────────────────────────────────── */
/* Ритм фонов после удаления галереи: белая — светлая — тёмная — белая — светлая — тёмная */
.loc { background: var(--soft); }

.infra__grid { display: grid; gap: clamp(40px, 6vw, 64px); }

.nearby li {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem; letter-spacing: -.02em;
}
.nearby li:last-child { border-bottom: 1px solid var(--line); }
.nearby svg {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}

.comms { padding: clamp(26px, 4vw, 40px); background: var(--soft); }
.comms__h { font-size: 1.3rem; letter-spacing: -.03em; margin-bottom: 10px; }
.comms__list li { display: flex; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.comms__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.comms__list svg {
  width: 22px; height: 22px; margin-top: 4px; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.comms__list b { display: block; font-weight: 500; font-size: 1rem; letter-spacing: -.02em; }
.comms__list span { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Аккордеон */
.acc { margin-top: clamp(40px, 6vw, 56px); border-top: 1px solid var(--line); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 66px; padding: 18px 0;
  font-size: 1.02rem; font-weight: 500; letter-spacing: -.02em;
  cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round;
  transition: transform .22s var(--ease);
}
.acc[open] summary svg { transform: rotate(180deg); }
.acc__body { padding-bottom: 30px; max-width: 68ch; }
.acc__body p { margin-bottom: 16px; color: var(--muted); font-size: 1rem; }
.acc__note { color: var(--txt) !important; font-weight: 500; letter-spacing: -.02em; }

/* ── 5. Расположение ─────────────────────────────────────────────────── */
.loc__grid { display: grid; gap: clamp(32px, 5vw, 56px); }
.loc__dl dt {
  padding-top: 18px; border-top: 1px solid var(--line);
  font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.loc__dl dd { margin: 8px 0 24px; font-size: 1.15rem; letter-spacing: -.025em; }
.loc__dl dd a { display: inline-block; padding-block: 10px; margin-block: -10px; text-decoration: none; }

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg,  var(--soft) 0 40px, #e9eaec 40px 41px),
    repeating-linear-gradient(90deg, var(--soft) 0 40px, #e9eaec 40px 41px);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── 6. Контакты ─────────────────────────────────────────────────────── */
.contacts { background: var(--ink); color: #fff; }
.contacts__grid { display: grid; gap: clamp(40px, 7vw, 72px); }
.contacts__lead { margin-top: 22px; max-width: 42ch; color: rgba(255, 255, 255, .7); }

.contacts__list { margin-top: 44px; }
.contacts__list li { padding: 17px 0; border-top: 1px solid var(--line-dk); }
.contacts__list li:last-child { border-bottom: 1px solid var(--line-dk); }
.contacts__list span {
  display: block; margin-bottom: 4px;
  font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}
.contacts__list a { display: inline-block; padding-block: 10px; margin-block: -10px; text-decoration: none; font-size: 1.15rem; letter-spacing: -.025em; }
.contacts__list a:hover { color: var(--accent-l); }
.contacts__list p { font-size: 1.15rem; letter-spacing: -.025em; }

.formcard { padding: clamp(26px, 5vw, 44px); background: var(--paper); color: var(--txt); }
.formcard__h { font-size: 1.5rem; letter-spacing: -.035em; }
.formcard__s { margin: 12px 0 30px; color: var(--muted); font-size: .98rem; }
.formcard__ns { padding: 18px 20px; background: var(--soft); font-size: .95rem; line-height: 1.55; }
.formcard__ns a { color: var(--accent); font-weight: 600; }

/* ── Лид-форма ───────────────────────────────────────────────────────── */
.lf__row { margin-bottom: 18px; }
.lf__lb {
  display: block; margin-bottom: 9px;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.lf__in {
  width: 100%; min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line); border-radius: 2px;
  background: #fff;
  font-family: inherit; font-size: 1.0625rem; letter-spacing: -.01em; color: var(--txt);
  transition: border-color .18s var(--ease);
}
.lf__in::placeholder { color: #aeb3b8; }
.lf__in:focus { border-color: var(--ink); outline: none; }
.lf__in.is-bad { border-color: #c0392b; }

.lf__err { margin-top: 6px; font-size: .82rem; color: #c0392b; }
.lf__err:empty { display: none; }

.lf__ck { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 24px; cursor: pointer; }
.lf__ck input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.lf__ck span { font-size: .88rem; line-height: 1.45; color: var(--muted); }
.lf__ck a { color: var(--accent); }

.lf__submit[disabled] { opacity: .55; pointer-events: none; }
.lf__ok, .lf__fail { margin-top: 16px; font-size: .95rem; text-align: center; }
.lf__ok   { color: var(--accent); font-weight: 600; }
.lf__fail { color: #c0392b; }

/* ── Футер ───────────────────────────────────────────────────────────── */
.foot { position: relative; padding-top: clamp(52px, 8vw, 88px); }
.foot__in { display: grid; gap: 40px; padding-bottom: 52px; }
.foot__brand p { margin-top: 14px; color: var(--muted); font-size: .95rem; }
.foot__nav { display: grid; gap: 2px; }
.foot__nav a { padding: 11px 0; text-decoration: none; font-size: .98rem; color: var(--muted); }
.foot__nav a:hover { color: var(--txt); }
.foot__contact a { display: block; padding: 10px 0; text-decoration: none; }
.foot__tel { font-size: 1.3rem; font-weight: 500; letter-spacing: -.03em; }
.foot__contact p { margin-top: 12px; color: var(--muted); font-size: .95rem; }

.foot__legal {
  display: grid; gap: 8px;
  padding-block: 26px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.foot__legal a { display: inline-block; padding-block: 14px; margin-block: -14px; color: var(--muted); }
.foot__legal a:hover { color: var(--accent); }

.totop {
  position: fixed; right: var(--pad); bottom: calc(var(--mbar-h) + 16px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease), visibility .22s var(--ease);
}
.totop.is-on { opacity: 1; visibility: visible; }
.totop svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }

/* ── Мобильная нижняя панель ─────────────────────────────────────────── */
.mbar {
  position: fixed; inset: auto 0 0; z-index: 80;
  display: flex; gap: 10px; align-items: center;
  padding: 11px var(--pad) calc(11px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--line);
  transition: transform .28s var(--ease);
}
.mbar.is-hidden { transform: translateY(110%); }
.mbar__tel {
  display: grid; place-items: center;
  width: 54px; height: 54px; flex: none;
  border: 1px solid var(--line); border-radius: 2px;
}
.mbar__tel svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.mbar .btn { min-height: 54px; }

/* ── Оверлеи ─────────────────────────────────────────────────────────── */
.panel, .pm, .pop { position: fixed; inset: 0; z-index: 120; }
.panel[hidden], .pm[hidden], .pop[hidden] { display: none; }

.panel__ov, .pm__ov, .pop__ov {
  position: absolute; inset: 0;
  background: rgba(10, 12, 14, .6);
  animation: fade .2s var(--ease);
}

@keyframes slideUp { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes slideIn { from { transform: translateX(100%) }             to { transform: none } }

.panel__box {
  position: absolute; inset: 0 0 0 auto;
  width: min(460px, 100%);
  padding: 22px var(--pad) calc(36px + env(safe-area-inset-bottom));
  background: var(--paper);
  overflow-y: auto;
  animation: slideIn .28s var(--ease);
}
.panel__box .xbtn { margin: -8px -8px 10px auto; }
.panel__h { font-size: 1.7rem; letter-spacing: -.035em; }
.panel__s { margin: 12px 0 30px; color: var(--muted); font-size: .98rem; }
.panel__tel {
  display: block; margin-top: 32px; padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 1.45rem; font-weight: 500; letter-spacing: -.03em; text-decoration: none;
}
.panel__hours { margin-top: 5px; color: var(--muted); font-size: .9rem; }

/* Модалка планировок */
.pm__box {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--paper);
  animation: slideUp .26s var(--ease);
}
.pm__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.pm__title { font-size: 1.2rem; letter-spacing: -.035em; }
.pm__tabs {
  display: flex; gap: 26px;
  padding: 0 var(--pad);
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.pm__tabs::-webkit-scrollbar { display: none; }
.pm__tabs button {
  min-height: 52px; padding: 0; flex: none;
  border: 0; border-bottom: 2px solid transparent;
  background: transparent; cursor: pointer;
  font-size: .95rem; font-weight: 500; letter-spacing: -.02em;
  color: var(--muted);
  white-space: nowrap;
}
.pm__tabs button.is-on { color: var(--txt); border-bottom-color: var(--accent); }

.pm__scroll { flex: 1; overflow-y: auto; padding: 0 var(--pad) calc(36px + env(safe-area-inset-bottom)); }

.pm__plan {
  position: relative;
  margin-top: 24px;
  background: #eae9e9;
  overflow: auto;
  max-height: 60svh;
}
.pm__plan img { width: 100%; height: auto; transition: width .22s var(--ease); }
.pm__plan.is-zoomed { cursor: zoom-out; }
.pm__plan.is-zoomed img { width: 220%; max-width: none; }
.pm__zoom {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 0; border-radius: 2px;
  background: var(--ink);
  cursor: pointer;
}
.pm__zoom svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }

.pm__info { padding-top: 30px; }
.pm__area { display: flex; align-items: baseline; gap: 12px; }
.pm__area b { font-size: 2.6rem; font-weight: 500; letter-spacing: -.045em; }
.pm__area span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pm__specs { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 22px 0 26px; }
.pm__specs li {
  position: relative; padding-left: 16px;
  font-size: .98rem; letter-spacing: -.02em;
}
.pm__specs li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; background: var(--accent);
}
.pm__desc p { margin-bottom: 12px; color: var(--muted); font-size: 1rem; }
.pm__price {
  margin: 28px 0 20px; padding: 20px;
  background: var(--soft);
  font-weight: 500; letter-spacing: -.02em;
}
.pm__price span { display: block; margin-top: 4px; font-weight: 400; font-size: .88rem; color: var(--muted); letter-spacing: 0; }

/* Автопопап */
.pop__box {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100%);
  padding: 22px var(--pad) calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
  animation: slideUp .26s var(--ease);
  max-height: 92svh; overflow-y: auto;
}
.pop__box .xbtn { margin: -8px -8px 6px auto; }
.pop__h { font-size: 1.6rem; letter-spacing: -.035em; }
.pop__s { margin: 12px 0 26px; color: var(--muted); font-size: .98rem; }

/* ── Появление контента ──────────────────────────────────────────────────
   Только opacity и transform — их браузер считает на видеокарте, поэтому
   даже на слабом телефоне это не влияет на скорость прокрутки.
   Никаких параллаксов, привязок к скроллу и анимаций высоты. */

/* Первый экран — на загрузке, чистым CSS: у JS-варианта элементы успевают
   мигнуть до того, как скрипт навесит классы. `both` держит их скрытыми до старта. */
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes photoIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }

.hero__img img { animation: photoIn 1.1s var(--ease) both; }
.hero__body > * { animation: riseIn .8s var(--ease) both; }
.hero__body > *:nth-child(1) { animation-delay: .10s; }
.hero__body > *:nth-child(2) { animation-delay: .20s; }
.hero__body > *:nth-child(3) { animation-delay: .30s; }
.hero__body > *:nth-child(4) { animation-delay: .40s; }
.hero__body > *:nth-child(5) { animation-delay: .50s; }
.hero__stats > div { animation: riseIn .7s var(--ease) both; }
.hero__stats > div:nth-child(1) { animation-delay: .58s; }
.hero__stats > div:nth-child(2) { animation-delay: .66s; }
.hero__stats > div:nth-child(3) { animation-delay: .74s; }

/* Остальные экраны — по мере подхода к видимой области.
   Задержки внутри группы расставляет JS, отсюда каскад по элементам. */
.rv { opacity: 0; transform: translateY(26px); }
.rv.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
/* картинки в карточках проявляются чуть иначе — с лёгким наездом */
.card.rv .card__media img { transform: scale(1.06); transition: transform .9s var(--ease); }
.card.rv.is-in .card__media img { transform: none; }

/* ── Планшет ─────────────────────────────────────────────────────────── */
@media (min-width: 700px) {
  /* Четыре факта встают в ряд — волосяные линии складываются в одну сплошную */
  .facts { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .facts li:last-child { border-bottom: 0; }

  .hero__stats { gap: 4px 40px; max-width: 620px; }
  .finish { grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
  .tradein__in { grid-template-columns: 1fr auto; align-items: center; gap: 56px; }
  .tradein .btn { justify-self: end; }
  .loc__grid { grid-template-columns: minmax(260px, .8fr) 1.2fr; align-items: start; }
  .foot__in { grid-template-columns: 1.2fr 1fr 1fr; }
  .foot__legal { grid-template-columns: 1fr auto; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
}

/* ── Десктоп ─────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  :root { --hdr-h: 86px; --mbar-h: 0px; }

  body { padding-bottom: 0; }
  .mbar, .burger { display: none; }

  .hero__kicker { letter-spacing: .2em; }

  .nav { display: flex; gap: 34px; margin-right: 34px; }
  .nav a { font-size: .95rem; font-weight: 500; letter-spacing: -.02em; text-decoration: none; opacity: .88; }
  .nav a:hover { opacity: 1; }

  .hdr__tel {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 4px;
    font-size: 1rem; font-weight: 500; letter-spacing: -.02em; text-decoration: none; white-space: nowrap;
  }
  .hdr .btn--sm { display: inline-flex; }
  .hdr:not(.is-stuck) .btn--outline { border-color: rgba(255, 255, 255, .4); color: #fff; }
  .hdr:not(.is-stuck) .btn--outline:hover { background: #fff; border-color: #fff; color: var(--ink); }

  .facts { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
  .facts li {
    flex-direction: column; align-items: flex-start; gap: 14px;
    min-height: 118px; padding: 22px 0 0;
    font-size: 1.1rem;
  }

  .cards { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .infra__grid { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
  .contacts__grid { grid-template-columns: 1fr minmax(400px, .8fr); align-items: start; }
  .totop { bottom: 30px; }

  .pm__box {
    inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(1100px, calc(100vw - 56px));
    max-height: min(900px, calc(100svh - 56px));
    overflow: hidden;
  }
  .pm__scroll { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; padding-bottom: 36px; }
  .pm__plan { max-height: none; margin-bottom: 28px; }
}

@media (min-width: 1100px) {
  .h2 { max-width: 20ch; }
}

/* ── Правовые страницы (privacy.html) ────────────────────────────────── */
body.is-doc { padding-bottom: 0; }
/* Шапка в потоке: inset из базового .hdr сбрасываем, иначе sticky считает
   смещения по всем сторонам. */
.hdr--solid { position: sticky; inset: 0 auto auto; }

.doc { padding-block: 48px clamp(56px, 9vw, 96px); }
.doc__wrap { width: 100%; max-width: 880px; margin-inline: auto; padding-inline: var(--pad); }
.doc__h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 500; letter-spacing: -.035em; }
.doc__h2-big { font-size: clamp(1.5rem, 5vw, 2.2rem) !important; letter-spacing: -.035em; }
.doc__meta { margin-top: 18px; color: var(--muted); font-size: .95rem; }

.doc h2 {
  margin-top: clamp(40px, 6vw, 60px); margin-bottom: 16px;
  font-size: 1.3rem; font-weight: 500; letter-spacing: -.03em;
}
.doc p { margin-bottom: 13px; font-size: 1rem; line-height: 1.68; }
.doc a { color: var(--accent); }

.doc__ul { margin: 0 0 16px; padding-left: 4px; }
.doc__ul li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 1rem; line-height: 1.6; }
.doc__ul li::before {
  content: ""; position: absolute; left: 2px; top: .66em;
  width: 5px; height: 5px; background: var(--accent);
}

.doc__dl { margin-bottom: 16px; }
.doc__dl li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.doc__dl li:last-child { border-bottom: 1px solid var(--line); }
.doc__dl span {
  display: block; margin-bottom: 3px;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}

.doc__box {
  margin: 32px 0 8px; padding: 20px 22px;
  border-left: 2px solid var(--accent);
  background: var(--soft);
  font-size: .95rem; line-height: 1.6; color: var(--muted);
}
.doc__box b { display: block; margin-bottom: 5px; color: var(--txt); }

/* Незаполненные места — видно и в вёрстке, и на печати */
mark.todo {
  padding: 1px 6px; border-radius: 2px;
  background: #fdf1d8; color: #7a5a12;
  font-size: .93em; font-style: italic;
}

.doc__hr { margin: clamp(48px, 8vw, 76px) 0 0; border: 0; border-top: 1px solid var(--line); }
.doc__back { margin-top: 44px; font-weight: 500; }

/* ── Уважение к системным настройкам ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .rv { opacity: 1; transform: none; }
  .card.rv .card__media img { transform: none; }
}
