/* ============================================================
   МАГНАТ — срочный выкуп квартир
   Палитра: графитово-синий #1D2338 (из фирменного знака),
   бумажный #FAFAF8, янтарный акцент #E8A33D (кнопки и цифры).
   Шрифт: Golos Text. Ритм 8px. Контейнер 1200px.
   ============================================================ */

/* Golos Text хостим сами (вариативные файлы 400–600, кириллица + латиница):
   без запросов к Google Fonts — быстрее и стабильнее из РФ */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/golos-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/golos-cyr-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/golos-lat.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 {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/golos-lat-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;
}

:root {
  /* цвет */
  --paper: #FFFFFF;
  --paper-2: #FFFFFF;
  --line: #E2DFD6;
  --ink: #1B2130;
  --ink-2: #575E6E;
  --surface: #FFFFFF;          /* карточки и контролы на светлых секциях */
  --surface-hover: #C9C5B8;
  --icon-accent: #8A5B10;      /* янтарная роль на светлом */
  --quote-accent: #8A5B10;
  --success: #2E7D4F;
  --error: #B4432F;
  --sb-track: #EDEBE3;         /* скроллбар */
  --sb-thumb: #C6C2B4;
  --sb-thumb-hover: #A9A493;

  --navy-950: #141929;
  --navy-900: #1D2338;
  --navy-800: #262E4A;
  --navy-line: #39415E;
  --on-navy: #EFEEE8;
  --on-navy-2: #A9B0C6;

  --amber: #E8A33D;
  --amber-hover: #D6912B;
  --amber-ink: #8A5B10; /* янтарный текст на светлом фоне */

  /* типографика: 4 размера через clamp + базовый */
  --fs-1: clamp(1.875rem, 1.1rem + 3.4vw, 3.25rem);   /* h1 */
  --fs-2: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);    /* h2 */
  --fs-3: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem); /* h3 / лид */
  --fs-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --fs-0: 1rem;

  --font: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* геометрия */
  --radius: 6px;
  --radius-lg: 10px;
  --container: 1200px;
  --shadow-1: 0 1px 2px rgba(20, 25, 41, 0.06);
  --shadow-2: 0 8px 24px -8px rgba(20, 25, 41, 0.18);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ночной режим: светлые секции темнеют, тёмные остаются фирменными */
:root[data-theme="night"] {
  --paper: #141929;
  --paper-2: #181E33;
  --line: #2B334E;
  --ink: #EDEDE7;
  --ink-2: #A6ADC2;
  --surface: #1E2540;
  --surface-hover: #3A4364;
  --icon-accent: #E8A33D;
  --quote-accent: #E8A33D;
  --amber-ink: #E8A33D;
  --success: #8FD4AC;
  --error: #F2A08F;
  --sb-track: #12172A;
  --sb-thumb: #2B334E;
  --sb-thumb-hover: #4C5680;
}

/* ---------- фирменный скроллбар ---------- */

html {
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track { background: var(--sb-track); }

::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
  border-radius: 6px;
  border: 3px solid var(--sb-track);
}

::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); }

/* ---------- базовое ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; }

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--navy-900);
  color: var(--on-navy);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 200ms var(--ease-out);
}
.skip-link:focus-visible { top: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.container--narrow { max-width: 800px; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 var(--fs-0)/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn:active { transform: scale(0.97); }

.btn--accent {
  background: var(--amber);
  color: var(--navy-950);
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: var(--amber-hover); }
}

.btn--ghost {
  background: transparent;
  border-color: var(--navy-line);
  color: var(--on-navy);
}
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover { border-color: var(--on-navy-2); }
}

.btn--small { padding: 10px 18px; font-size: var(--fs-small); }
.btn--full { width: 100%; }

/* состояние загрузки */
.btn__loading { display: none; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .btn__label { display: none; }
.btn.is-loading .btn__loading { display: inline; }

/* ---------- шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  color: var(--on-navy);
  border-bottom: 1px solid var(--navy-line);
}

.header__in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding-block: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo__mark { flex: none; color: var(--on-navy); }

.logo__text { display: flex; flex-direction: column; line-height: 1.15; }

.logo__text b {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.14em;
}

.logo__text small {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--on-navy-2);
}

/* навигация по блокам */
.header__nav {
  display: none;
  align-items: center;
  gap: 26px;
  position: relative;
}

.header__nav a {
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
  color: var(--on-navy-2);
  text-decoration: none;
  padding: 4px 0;
  transition: color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .header__nav a:hover { color: var(--on-navy); }
}

.header__nav a.is-active { color: var(--on-navy); }

/* единое скользящее подчёркивание активного раздела */
.nav-ink {
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 24px;
  background: var(--amber);
  border-radius: 1px;
  opacity: 0;
  transform: translateX(0);
  transition:
    transform 300ms var(--ease-out),
    width 300ms var(--ease-out),
    opacity 200ms var(--ease-out);
  pointer-events: none;
}

.nav-ink.is-on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .nav-ink { transition: opacity 200ms ease; }
}

/* выбор города: собранный контрол с пином */
.header__city {
  display: none;
  position: relative;
  align-items: center;
}

.header__city-pin {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  pointer-events: none;
}

.city-select {
  appearance: none;
  background-color: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  color: var(--on-navy);
  font: 500 var(--fs-small)/1.4 var(--font);
  padding: 8px 30px 8px 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23A9B0C6' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.city-select:hover { border-color: var(--on-navy-2); }

/* выпадающий список всегда тёмный, независимо от темы страницы */
.city-select { color-scheme: dark; }
.city-select option {
  color: var(--on-navy);
  background-color: var(--navy-900);
}

/* к якорям не подъезжаем под липкую шапку */
section[id] { scroll-margin-top: 86px; }
#lead-form { scroll-margin-top: 92px; }

/* навигация включается там, где ей просторно */
@media (min-width: 1160px) {
  .header__nav { display: flex; }
}

/* переключатель дневного/ночного режима */
.theme-toggle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  color: var(--on-navy-2);
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover { border-color: var(--on-navy-2); color: var(--on-navy); }
}
.theme-toggle .icon-sun { display: none; }
:root[data-theme="night"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="night"] .theme-toggle .icon-moon { display: none; }

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

/* номер телефона текстом — только там, где ему есть место;
   на остальных ширинах остаётся иконка-трубка */
.header__phone span { display: none; }

@media (min-width: 640px) and (max-width: 1023.98px) {
  .header__phone span { display: inline; }
}

@media (min-width: 1500px) {
  .header__phone span { display: inline; }
}
@media (hover: hover) and (pointer: fine) {
  .header__phone:hover { color: var(--amber); }
}

.header__cta { display: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: var(--on-navy);
  padding-block: 48px 56px;
}

/* «проекция» жилого района: аксонометрическая схема-генплан (улицы, дома, парк) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  opacity: 0.5;
  background: url("picsandvideo/district-plan.svg") center 38% / cover no-repeat;
}

@media (min-width: 1024px) {
  .hero::before { display: block; }
}

.hero .container { position: relative; }

.hero__in {
  display: grid;
  gap: 40px;
}

.hero h1 {
  font-size: var(--fs-1);
  letter-spacing: -0.025em;
}

.hero__sub {
  margin-top: 16px;
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--on-navy-2);
  max-width: 34em;
}

.hero__req {
  margin-top: 24px;
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

/* город посетителя подсвечивается в заголовке;
   вставка не рвётся ни по пробелу после «в», ни по дефису Санкт-Петербурга */
.h1-city {
  color: var(--amber);
  white-space: nowrap;
}

/* плашка для города, которого нет в списке */
.hero__citycall {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  color: var(--on-navy-2);
  max-width: 34em;
}

.hero__citycall b { color: var(--on-navy); }

.hero__citycall a {
  color: var(--amber);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* карточка основателя: портрет + именная плашка одной конструкцией */
.hero__owner {
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-800);
}

.hero__owner img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero__owner figcaption {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--navy-line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__owner b {
  font-weight: 600;
  color: var(--on-navy);
}

.hero__owner figcaption span {
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

/* факты-цифры: три в ряд с вертикальными делениями на любой ширине */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 8px 0 0;
  border-top: 1px solid var(--navy-line);
}

.facts__item {
  padding: 14px 12px 0 0;
}

.facts__item + .facts__item {
  border-left: 1px solid var(--navy-line);
  padding-left: 14px;
}

.facts dt {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--amber);
}

.facts dd {
  margin: 4px 0 0;
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

@media (min-width: 640px) {
  .facts__item { padding: 20px 20px 0 0; }
  .facts__item + .facts__item { padding-left: 20px; }
  .facts dt { font-size: var(--fs-2); }
}

/* ---------- форма ---------- */

.lead-form {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-2);
}

/* карточка формы в hero всегда «светится» дневными цветами —
   в ночной теме иначе сливается с тёмным фоном */
.lead-form:not(.lead-form--wide) {
  --paper: #FFFFFF;
  --paper-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #C9C5B8;
  --line: #E2DFD6;
  --ink: #1B2130;
  --ink-2: #575E6E;
  --amber-ink: #8A5B10;
  --error: #B4432F;
  --success: #2E7D4F;
}

.lead-form__title {
  font-size: var(--fs-3);
  font-weight: 600;
}

.lead-form__note {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.field { margin-top: 16px; }

.field label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 500;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: 400 var(--fs-0)/1.4 var(--font);
  color: var(--ink);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.field input::placeholder { color: var(--ink-2); opacity: 1; }

.field input:hover { border-color: var(--surface-hover); }

.field input:focus {
  outline: none;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(38, 46, 74, 0.12);
}

.field input.is-invalid { border-color: var(--error); }

.field__error {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--error);
}

.section--dark .field__error,
.lead-form--wide .field__error { color: #F2A08F; }

/* поле-ловушка для ботов: физически вне экрана, для людей не существует */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--ink-2);
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 17px; height: 17px;
  margin: 2px 0 0;
  accent-color: var(--navy-900);
  cursor: pointer;
}

.consent a { color: inherit; }

.consent--dark { color: var(--on-navy-2); }
.consent--dark input { accent-color: var(--amber); }

.lead-form .btn--full { margin-top: 20px; }

.form-status {
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.5;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }
.section--cta .form-status.is-success { color: #8FD4AC; }
.section--cta .form-status.is-error { color: #F2A08F; }

/* форма отправлена */
.lead-form.is-sent .field,
.lead-form.is-sent .consent,
.lead-form.is-sent [data-submit],
.lead-form.is-sent .lead-form__note,
.lead-form.is-sent .lead-form__row { display: none; }

/* ---------- секции ---------- */

.section {
  position: relative;
  padding-block: 64px;
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* ---------- билборд с формой ---------- */

.billboard {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* щит «светится» дневными цветами в обеих темах, как настоящий рекламный */
.billboard__panel {
  --paper: #FFFFFF;
  --paper-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #C9C5B8;
  --line: #E2DFD6;
  --ink: #1B2130;
  --ink-2: #575E6E;
  --amber-ink: #8A5B10;
  --error: #B4432F;
  --success: #2E7D4F;

  width: 100%;
  max-width: 1020px;
  background: var(--paper);
  color: var(--ink);
  border: 8px solid var(--navy-line);
  border-radius: 6px;
  padding: 32px 32px 44px;
  box-shadow: var(--shadow-2);
  text-align: center;
}

@media (min-width: 1024px) {
  .billboard__panel { padding: 36px 56px 52px; }
}

.billboard__brand {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 14px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

/* опора: кронштейн, центральная колонна, земля */
.billboard__support {
  position: relative;
  width: min(780px, 100%);
  height: 92px;
  border-bottom: 1px solid var(--navy-line);
}

.billboard__support::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 22px;
  background: var(--navy-line);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 28% 100%);
}

.billboard__support::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  background: var(--navy-line);
}

/* форма внутри щита: компактная, с воздухом вокруг */
.billboard .lead-form--wide { max-width: 720px; margin: 0 auto; padding: 0; background: transparent; box-shadow: none; }
.billboard .lead-form--wide .field { text-align: left; }
.billboard .lead-form--wide .field label { color: var(--ink-2); }
.billboard .consent--dark { color: var(--ink-2); justify-content: center; }
.billboard .consent--dark input { accent-color: var(--navy-900); }
.billboard .field__error { color: var(--error); }
.billboard .form-status.is-success { color: var(--success); }
.billboard .form-status.is-error { color: var(--error); }

.section--tinted { background: var(--paper-2); }

.section--dark {
  background: var(--navy-900);
  color: var(--on-navy);
}

.section__title {
  font-size: var(--fs-2);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.section__lead {
  font-size: var(--fs-3);
  color: var(--ink-2);
  max-width: 40em;
  margin: -20px 0 32px;
}

.section__lead--center {
  color: var(--on-navy-2);
  margin: -20px auto 32px;
}

.section--cta { text-align: center; overflow: hidden; }
.section--cta .section__title { margin-bottom: 16px; }

/* уличная сцена в фас вокруг билборда: фасады, фонари, скамейки, бордюр */
.section--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  background: url("picsandvideo/street-scene.svg") center bottom 20px / 1800px auto no-repeat;
  opacity: 0.75;
}

@media (min-width: 640px) {
  .section--cta::before { display: block; }
  /* земля щита — это бордюр сцены */
  .billboard__support { border-bottom-color: transparent; }
}

@media (min-width: 1024px) {
  .section--cta::before { background-position: center bottom 36px; }
}

/* ---------- преимущества: цельный реестр 3×2 в рамке ---------- */

.benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.benefits__item {
  background: var(--paper);
  padding: 26px 24px 28px;
  transition: background-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .benefits__item:hover { background: rgba(29, 35, 56, 0.035); }
  :root[data-theme="night"] .benefits__item:hover { background: rgba(38, 46, 74, 0.6); }
  .benefits__item:hover .b-ico { border-color: var(--amber); }
}

.b-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--amber-ink);
  transition: border-color 200ms var(--ease-out);
}

.b-ico svg { width: 30px; height: 30px; }

/* иконки «прорисовываются» штрихом при появлении секции */
.js .b-ico svg :is(path, rect, circle) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0ms) + 150ms);
}

.js .benefits.is-revealed .b-ico svg :is(path, rect, circle) {
  stroke-dashoffset: 0;
}

:root[data-shot] .b-ico svg :is(path, rect, circle),
.no-anim .b-ico svg :is(path, rect, circle) {
  stroke-dashoffset: 0 !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .js .b-ico svg :is(path, rect, circle) {
    stroke-dashoffset: 0;
    transition: none;
  }
}

.benefits__item h3 {
  font-size: var(--fs-3);
  margin-bottom: 8px;
}

.benefits__item p {
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.6;
  max-width: 36em;
}

/* ---------- ситуации ---------- */

.situations {
  border-top: 1px solid var(--line);
}

.situations li {
  border-bottom: 1px solid var(--line);
}

/* строка-приглашение: пиктограмма в рамке, текст, стрелка к заявке */
.sit-row {
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
}

.sit-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--amber-ink);
  transition: border-color 180ms var(--ease-out);
}

.sit-ico svg { width: 26px; height: 26px; }

.situations h3 {
  font-size: var(--fs-3);
  margin-bottom: 4px;
  transition: color 180ms var(--ease-out);
}

.situations p {
  color: var(--ink-2);
  font-size: var(--fs-small);
  max-width: 52em;
}

.sit-arr {
  width: 22px;
  height: 22px;
  color: var(--line);
  transition: color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .sit-row:hover .sit-ico { border-color: var(--amber); }
  .sit-row:hover .sit-arr { color: var(--amber); }
  .sit-row:hover h3 { color: var(--amber-ink); }
}

.sit-row:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
  border-radius: var(--radius);
}

@media (min-width: 1024px) {
  .sit-row { grid-template-columns: 56px 1fr 24px; gap: 24px; }
  .sit-ico { width: 56px; height: 56px; }
  .sit-ico svg { width: 30px; height: 30px; }
}

/* тёмная версия секции ситуаций: контрастная жемчужина между светлыми блоками */
.section--sit { overflow: hidden; }

.section--sit::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  background: url("picsandvideo/district-plan.svg") right -420px top -60px / 1500px auto no-repeat;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 72%);
  mask-image: linear-gradient(100deg, transparent 30%, #000 72%);
}

/* на телефоне чертёж уезжает почти целиком за край, но тянет 70 КБ:
   включаем его только там, где он действительно виден */
@media (min-width: 640px) {
  .section--sit::before { display: block; }
}

.section--sit .situations { border-top-color: var(--navy-line); }
.section--sit .situations li { border-bottom-color: var(--navy-line); }
.section--sit .situations h3 { color: var(--on-navy); }
.section--sit .situations p { color: var(--on-navy-2); }

.section--sit .sit-ico {
  border-color: var(--navy-line);
  color: var(--amber);
}

.section--sit .sit-arr { color: var(--navy-line); }

@media (hover: hover) and (pointer: fine) {
  .section--sit .sit-row:hover .sit-ico { border-color: var(--amber); }
  .section--sit .sit-row:hover h3 { color: var(--amber); }
  .section--sit .sit-row:hover .sit-arr { color: var(--amber); }
}

/* ---------- с какими квартирами ---------- */

.objects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.objects li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
  transition: border-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .objects li:hover { border-color: var(--amber); }
}

.objects h3 {
  font-size: var(--fs-0);
  font-weight: 600;
  margin-bottom: 6px;
}

.objects p {
  font-size: var(--fs-small);
  color: var(--ink-2);
}

/* ---------- шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--navy-line);
}

.steps__item {
  position: relative;
  padding: 24px 0 24px 64px;
  border-bottom: 1px solid var(--navy-line);
}

.steps__num {
  position: absolute;
  left: 0;
  top: 24px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber);
  border-radius: 50%;
  color: var(--amber);
  font-weight: 600;
}

.steps h3 {
  font-size: var(--fs-3);
  margin-bottom: 6px;
}

.steps p {
  color: var(--on-navy-2);
  font-size: var(--fs-small);
  max-width: 40em;
}

/* ---------- объяснение и сравнение ---------- */

.explain {
  display: grid;
  gap: 40px;
}

.explain__text p {
  margin-top: 16px;
  color: var(--ink-2);
  max-width: 38em;
}

.explain__text p strong { color: var(--ink); font-weight: 600; }

/* сравнительная таблица: обычная продажа против выкупа */
.cmp-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.cmp th,
.cmp td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.cmp thead th { border-top: none; }

.cmp thead th {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  padding-top: 16px;
  padding-bottom: 16px;
}

.cmp tbody th {
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  width: 86px;
  padding-top: 17px;
}

.cmp td { color: var(--ink-2); }

/* вертикальные волосяные разделители между колонками */
.cmp th + th,
.cmp th + td,
.cmp td + td { border-left: 1px solid var(--line); }

/* колонка выкупа: одним цветом со всеми, иерархия — типографикой */
.cmp thead th.cmp__buy { color: var(--amber-ink); }

.cmp td.cmp__buy {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-weight: 500;
}

.cmp td.cmp__buy::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 1.35em;
  width: 8px;
  height: 1.5px;
  background: var(--amber);
}

/* на узких экранах колонки сплющиваются («2–6 месяцев ожидания» в три строки):
   разворачиваем строки таблицы в карточки, подписи колонок берём из data-col */
@media (max-width: 639.98px) {
  .cmp thead { display: none; }

  .cmp,
  .cmp tbody,
  .cmp tr,
  .cmp tbody th,
  .cmp td { display: block; }

  .cmp tr { padding: 16px; }
  .cmp tr + tr { border-top: 1px solid var(--line); }

  .cmp tbody th {
    width: auto;
    padding: 0 0 10px;
    border: none;
  }

  .cmp td,
  .cmp td + td,
  .cmp th + td {
    border: none;
    border-left: 2px solid var(--line);
    padding: 6px 0 6px 12px;
  }

  .cmp td + td { margin-top: 10px; }

  .cmp td.cmp__buy {
    border-left-color: var(--amber);
    padding-left: 12px;
  }

  /* янтарный штрих заменяем подписью колонки;
     .cmp td.cmp__buy::before перечисляем явно — базовое правило штриха
     специфичнее, чем .cmp td::before, и иначе перебивает подпись */
  .cmp td::before,
  .cmp td.cmp__buy::before {
    content: attr(data-col);
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin-bottom: 1px;
    background: none;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-2);
  }

  .cmp td.cmp__buy::before { color: var(--amber-ink); }
}

/* ---------- отзывы: рейтинг + две встречные бесконечные ленты ---------- */

.rev-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.rev-head .section__title { margin-bottom: 0; }

.rev-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rev-rating b {
  font-size: var(--fs-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rev-stars { display: inline-flex; gap: 3px; }

.rev-stars svg {
  width: 18px;
  height: 18px;
  fill: var(--amber);
}

.rev-rating a {
  font-size: var(--fs-small);
  color: var(--ink-2);
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .rev-rating a:hover { color: var(--amber-ink); }
}

.rev-marquee {
  margin-top: 28px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.rev-marquee:first-of-type { margin-top: 36px; }

.rev-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 72s linear infinite;
}

.rev-track--reverse { animation-direction: reverse; }

.rev-group {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}

/* читать удобнее, когда лента замирает под курсором */
@media (hover: hover) and (pointer: fine) {
  .rev-marquee:hover .rev-track { animation-play-state: paused; }
}
:root[data-shot] .rev-track { animation-play-state: paused; }

/* лента отзывов, как и фото-карусель, едет всегда — включая режим
   «уменьшение анимации»: иначе на телефоне она превращается в ручную прокрутку */

.rev-card {
  flex: none;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .rev-card:hover { border-color: var(--amber); }
}

.rev-card__stars {
  color: var(--amber);
  font-size: 0.9375rem;
  letter-spacing: 3px;
  line-height: 1;
}

.rev-card p {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rev-card footer {
  margin-top: auto;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-2);
}

@media (min-width: 1024px) {
  .rev-card { width: 380px; }
}

/* ---------- бесконечная карусель фото в шагах сделки ---------- */

.marquee {
  margin-top: 48px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}

.marquee__group {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

/* пауза только в режиме скриншота */
:root[data-shot] .marquee__track { animation-play-state: paused; }

/* лента едет всегда, в том числе при системном «уменьшении анимации»:
   прямое требование владельца сайта */

/* заглушка под фото */
.media-slot {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  flex: none;
  width: 224px;
  aspect-ratio: 4 / 5;
  border: 1.5px dashed var(--navy-line);
  border-radius: var(--radius-lg);
  color: var(--on-navy-2);
  font-size: var(--fs-small);
}

/* карточки ленты: клик открывает полный размер;
   подложка на время загрузки — вместо пустой рамки едет плашка в цвет темы */
.marquee__img {
  flex: none;
  width: 224px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--navy-line);
  background: var(--navy-800);
  cursor: zoom-in;
}

.marquee__img:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 25, 41, 0.92);
  cursor: zoom-out;
}

/* display:grid выше перебил бы атрибут hidden — возвращаем ему силу */
.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: min(92vw, 660px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  color: var(--on-navy);
  cursor: pointer;
  transition: border-color 180ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .lightbox__close:hover { border-color: var(--on-navy-2); }
}

/* пока лайтбокс открыт: страница не крутится, лента стоит */
body.lightbox-open { overflow: hidden; }
body.lightbox-open .marquee__track { animation-play-state: paused; }

@media (min-width: 1024px) {
  .media-slot, .marquee__img { width: 264px; }
}


/* ---------- города ---------- */

/* фон секции: аэросъёмка, растворяющаяся в фирменный синий к сетке */
.section--cities {
  position: relative;
  overflow: hidden;
}

.section--cities::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("picsandvideo/aerial.webp") center top / cover no-repeat;
}

.section--cities::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(29, 35, 56, 0.5) 0%,
    rgba(29, 35, 56, 0.74) 36%,
    rgba(29, 35, 56, 0.96) 60%,
    #1D2338 76%
  );
}

.section--cities .container {
  position: relative;
  z-index: 1;
}

/* головной офис: подсвеченный «ваш город» */
.hq {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(38, 46, 74, 0.92);
  border: 1px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.hq__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hq__tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hq__label {
  font-size: var(--fs-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-navy-2);
}

.hq__city {
  font-size: var(--fs-1);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--on-navy);
  line-height: 1.1;
}

.hq__region {
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

.hq__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.hq__phone {
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .hq__phone:hover { color: var(--amber-hover); }
}

.cities__hint {
  font-size: var(--fs-small);
  color: var(--on-navy-2);
  margin-bottom: 12px;
}

.cities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--navy-line);
  border-left: 1px solid var(--navy-line);
}

.cities li {
  border-right: 1px solid var(--navy-line);
  border-bottom: 1px solid var(--navy-line);
}

/* плитка-кнопка города */
.cities__pick {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: transparent;
  border: 1px solid transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cities__pick:hover { background: var(--navy-800); }
}

.cities__pick[aria-pressed="true"] {
  background: var(--navy-800);
  border-color: var(--amber);
}

.cities__pick:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
  border-radius: 0;
}

.cities b { font-weight: 500; }

.cities span {
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

.cities__go {
  margin-top: 6px;
  color: var(--amber) !important;
}

.cities__golink {
  color: var(--amber);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 15 плиток: на 2 колонках CTA встаёт в последнюю ячейку,
   на 3 — своей строкой во всю ширину, на 4 — замыкает последний ряд */
.cities__cta {
  grid-column: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.cities__cta a {
  color: var(--amber);
  font-weight: 500;
  white-space: nowrap;
  text-decoration-color: var(--navy-line);
  text-underline-offset: 3px;
  margin-top: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .cities__cta a:hover { text-decoration-color: var(--amber); }
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.faq-side .section__title { margin-bottom: 12px; }

.faq-side__lead {
  color: var(--ink-2);
  max-width: 26em;
}

.faq-side__cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.faq-side__cta > span {
  font-size: var(--fs-small);
  color: var(--ink-2);
}

.faq-side__phone {
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--amber-ink);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .faq-side__phone:hover { color: var(--amber); }
}

/* аккордеоны в единой рамке-реестре */
.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.faq details:not(:last-child) { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  font-size: var(--fs-3);
  font-weight: 500;
  position: relative;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .faq summary:hover { background: rgba(29, 35, 56, 0.035); }
  :root[data-theme="night"] .faq summary:hover { background: rgba(38, 46, 74, 0.6); }
}

.faq details[open] summary { color: var(--amber-ink); }

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq details p {
  padding: 2px 22px 22px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* мягкое появление ответа */
.faq details[open] > p {
  animation: faq-open 260ms var(--ease-out);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .faq details[open] > p { animation: none; }
}

@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 72px;
    align-items: start;
  }

  .faq-side {
    position: sticky;
    top: 104px;
  }
}

/* ---------- футер ---------- */

.footer {
  background: var(--navy-950);
  color: var(--on-navy);
  padding: 48px 0 96px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer h3 {
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-navy-2);
  margin-bottom: 12px;
}

.footer p {
  font-size: var(--fs-small);
  line-height: 1.8;
  color: var(--on-navy-2);
}

.footer a {
  color: var(--on-navy);
  text-decoration-color: var(--navy-line);
  text-underline-offset: 3px;
  transition: color 180ms var(--ease-out);
}

/* телефон и почта в колонке контактов: тап-цель не меньше 24px */
.footer__col p a {
  display: inline-block;
  padding-block: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .footer a:hover { color: var(--amber); }
}

.footer .logo { margin-bottom: 16px; }

.footer__note { max-width: 44em; }

.footer__copy {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
  font-size: var(--fs-small);
  color: var(--on-navy-2);
}

/* ---------- кнопка «наверх» ---------- */

.to-top {
  position: fixed;
  right: 18px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 55;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  color: var(--on-navy);
  cursor: pointer;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), border-color 180ms var(--ease-out);
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .to-top:hover { border-color: var(--on-navy-2); }
}

@media (min-width: 1024px) {
  .to-top { bottom: 24px; right: 24px; }
}

/* ---------- мобильная панель ---------- */

.mobilebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 25, 41, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--navy-line);
  transform: translateY(0);
  transition: transform 300ms var(--ease-out);
}

.mobilebar.is-hidden { transform: translateY(110%); }

/* ---------- появление секций ---------- */

/* служебный режим ?shot=1: статичный рендер для полностраничных скриншотов */
:root[data-shot] .hero { min-height: 0 !important; }
:root[data-shot] [data-reveal],
:root[data-shot] [data-reveal-group] > * {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* скрываем до появления только при работающем JS (класс .js ставит script.js) */
.js [data-reveal],
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .is-revealed[data-reveal],
.js [data-reveal-group].is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js [data-reveal-group] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .faq summary::after, .mobilebar { transition: none; }
}

/* ============================================================
   ПЛАНШЕТ ≥640px
   ============================================================ */

@media (min-width: 640px) {

  .container { padding-inline: 32px; }

  .benefits { grid-template-columns: 1fr 1fr; }

  .objects { grid-template-columns: 1fr 1fr; }

  .hq {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
  }

  .hq__contacts { align-items: flex-end; }

  .cities__cta {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
  .cities__cta a { margin-top: 0; }


  .cities { grid-template-columns: repeat(3, 1fr); }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }

  .section { padding-block: 80px; }
}

/* ============================================================
   ДЕСКТОП ≥1024px
   ============================================================ */

@media (min-width: 1024px) {

  .header__nav { margin-left: 40px; margin-right: auto; }
  .header__city { display: inline-flex; }
  .header__cta { display: inline-flex; white-space: nowrap; }
  .header__phone { margin-left: 0; }

  .hero {
    padding-block: 64px 72px;
    /* первый экран целиком в тёмной теме: hero добивает высоту окна */
    min-height: calc(100svh - 73px);
    display: flex;
    align-items: center;
  }

  .hero .container { width: 100%; }

  /* одна плотная лента: текст | портрет во всю высоту | форма,
     факты — горизонтальной полосой под всеми колонками */
  .hero__in {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 0.6fr) minmax(340px, 0.95fr);
    gap: 56px 48px;
    align-items: stretch;
  }

  .hero__copy { grid-column: 1; grid-row: 1; align-self: center; }

  /* в узкой колонке трёхколонной ленты заголовок мельче, переносы ровнее */
  .hero h1 { font-size: 2.625rem; }

  /* длинный город («в Санкт-Петербурге», «в Нижнем Новгороде») занимает свою
     строку целиком: кегль чуть меньше, точный размер страхует fitHeroCity() */
  .hero h1.h1--longcity { font-size: 2.5rem; }
  .hero__owner { grid-column: 2; grid-row: 1; }
  .hero__form { grid-column: 3; grid-row: 1; align-self: start; }
  .hero__in .facts { grid-column: 1 / -1; grid-row: 2; }

  .hero__owner img {
    flex: 1;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .lead-form { padding: 36px 32px; }

  .benefits { grid-template-columns: repeat(3, 1fr); }

  .objects { grid-template-columns: repeat(3, 1fr); }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    border-top: none;
  }

  .steps__item {
    padding: 64px 0 0;
    border-bottom: none;
    border-top: 1px solid var(--navy-line);
  }

  .steps__num { top: 24px; }

  .explain {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: center;
  }


  .cities { grid-template-columns: repeat(4, 1fr); }
  .cities__cta {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .cities__cta a { margin-top: 4px; }

  .section { padding-block: 96px; }

  .footer { padding-bottom: 48px; }

  .mobilebar { display: none; }

  /* форма в финальном CTA в одну строку */
  .lead-form--wide {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 720px;
    margin-inline: auto;
  }

  .lead-form--wide .lead-form__row {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 12px;
    align-items: end;
    text-align: left;
  }

  .lead-form--wide .field { margin-top: 0; }
  .lead-form--wide .consent { justify-content: center; }
  .lead-form--wide [data-submit] { padding-block: 13px; }
}

/* подписи полей широкой формы на тёмном фоне: на всех ширинах */
.lead-form--wide .field label { color: var(--on-navy-2); }

/* мобильная и планшетная версия широкой формы */
@media (max-width: 1023.98px) {
  .lead-form--wide {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 480px;
    margin-inline: auto;
    text-align: left;
  }
  .lead-form--wide [data-submit] { width: 100%; margin-top: 20px; }

  /* нижняя панель не перекрывает контент */
  body { padding-bottom: 0; }
  .footer { padding-bottom: 112px; }
}
