/* Flatroom — вёрстка 2026, концепция «Дом».
   Идея: крыша из логотипа (оранжевый + бирюзовый скат) — главный графический приём.
   Фасад с окнами-портретами на первом экране, услуги — матрица «тип объекта × купить/продать»,
   адрес — петербургская адресная табличка. Акцент один: оранжевый — только действия. */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff") format("woff"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest.woff") format("woff"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #222A3A;        /* текст, тёмные плоскости */
  --navy: #2F394C;       /* фирменный тёмно-синий */
  --paper: #F1F2F4;      /* фон страницы, холодный светлый */
  --white: #FFFFFF;
  --orange: #EE7233;     /* только действия */
  --orange-dk: #D45E21;
  --teal: #0DB2BC;       /* крыша, отметки, ссылки на тёмном */
  --teal-dk: #08838B;
  --mute: #5B6476;
  --line: #D8DCE2;
  --line-dk: rgba(255,255,255,.16);
  --on-dark: rgba(255,255,255,.76);

  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 16px;
  --wrap: 1280px;
  --sp: 72px;            /* вертикальный ритм секций */
  --hh: 64px;            /* высота шапки */
}
@media (min-width: 760px) { :root { --gutter: 32px; --sp: 96px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; --sp: 128px; --hh: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
@media (min-width: 1100px) { body { font-size: 17px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sec { padding-block: var(--sp); }
.sec--white { background: var(--white); }
.sec--dark { background: var(--ink); color: var(--white); }
.sec--flush { padding-top: 0; }

/* ---------- Типографика ---------- */
.d1 { font: 600 clamp(32px, 5.6vw, 84px)/1.0 var(--display); letter-spacing: -0.035em; }
.d2 { font: 600 clamp(28px, 3.9vw, 54px)/1.06 var(--display); letter-spacing: -0.03em; }
.d3 { font: 600 clamp(20px, 2vw, 28px)/1.15 var(--display); letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.5; color: var(--mute); max-width: 36em; }
.sec--dark .lead, .on-dark { color: var(--on-dark); }
.head { display: grid; gap: 18px; margin-bottom: 40px; max-width: 900px; }
.head--row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; }
.head--row > div { display: grid; gap: 18px; max-width: 820px; }
@media (min-width: 1100px) { .head { margin-bottom: 56px; } }

/* Крыша — фирменный знак. Два ската, как в логотипе */
.roof { display: block; width: 56px; height: 16px; }
.roof path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.roof .l { stroke: var(--orange); }
.roof .r { stroke: var(--teal); }

/* ---------- Кнопки ---------- */
.btn { --h: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 28px; border: 0; border-radius: 14px; font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .18s, color .18s, box-shadow .18s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--go { background: var(--orange); color: var(--white); }
.btn--go:hover { background: var(--orange-dk); }
.btn--go:disabled { opacity: .6; cursor: progress; }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--ghost { background: rgba(255,255,255,.08); color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); }
.btn--ghost:hover { background: rgba(255,255,255,.16); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--navy); }
.btn--sm { --h: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn--wide { width: 100%; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .btns > .btn { flex: 1 1 100%; } }

/* ---------- Шапка ---------- */
.addr-line { display: none; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.addr-line .wrap { display: flex; justify-content: space-between; gap: 24px; height: 40px; align-items: center; }
.addr-line a { text-decoration: none; }
.addr-line a:hover { color: var(--ink); }
@media (min-width: 1100px) { .addr-line { display: block; } }
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header .wrap { display: flex; align-items: center; gap: 16px; height: var(--hh); }
.logo img { height: 40px; width: auto; }
@media (min-width: 1100px) { .logo img { height: 38px; } }
.nav { display: none; gap: 2px; margin-left: 32px; }
.nav a { padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--mute); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--white); }
.header__end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header__tel { display: none; font: 600 18px/1 var(--text); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.header__tel:hover { color: var(--orange-dk); }
.header__cta { display: none; }
.ibtn { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: var(--white); color: var(--ink); cursor: pointer; text-decoration: none; }
.ibtn svg { width: 20px; height: 20px; }
.ibtn--call { background: var(--orange); color: var(--white); }
@media (min-width: 760px) { .header__tel { display: inline; } .ibtn--call { display: none; } }
@media (min-width: 1100px) { .nav { display: flex; } .header__cta { display: inline-flex; } .burger { display: none; } .header__end { gap: 24px; } }

.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__bg { position: absolute; inset: 0; background: rgba(20,25,36,.55); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel { position: absolute; inset: 0 0 0 auto; width: min(440px, 100%); background: var(--ink); color: var(--white); padding: calc(12px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 20px; display: flex; flex-direction: column; gap: 28px; transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; }
.drawer__top img { height: 28px; width: auto; }
.drawer__top .ibtn { background: rgba(255,255,255,.1); color: var(--white); }
.drawer__nav { display: grid; }
.drawer__nav a { padding: 14px 0; font: 600 26px/1.2 var(--display); letter-spacing: -0.03em; text-decoration: none; border-bottom: 1px solid var(--line-dk); }
.drawer__info { display: grid; gap: 10px; color: var(--on-dark); font-size: 15px; }
.drawer__info a { text-decoration: none; }
.drawer__tel { font: 600 24px/1.2 var(--text); color: var(--white); }
.drawer .btn { margin-top: auto; }

/* ---------- Первый экран: заголовок + общее фото под «крышей» ---------- */
.hero { padding: 24px 0 var(--sp); }
.hero .wrap { display: grid; gap: 28px; }
.hero__top { display: grid; gap: 22px; }
.hero__side { display: grid; gap: 22px; align-content: end; }
.hero .d1 { font-size: clamp(34px, 6vw, 88px); max-width: 11em; }
.hero__photo { position: relative; margin: 0; padding-top: clamp(18px, 3.4vw, 46px); }
.hero__roof { position: absolute; top: 0; left: 0; width: 100%; height: clamp(22px, 3.8vw, 52px); overflow: visible; }
.hero__roof path { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1200; animation: draw 1.1s .15s cubic-bezier(.6,.1,.2,1) both; }
.hero__roof .l { stroke: var(--orange); }
.hero__roof .r { stroke: var(--teal); animation-delay: .4s; }
@keyframes draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
.hero__photo picture, .hero__photo img { display: block; width: 100%; }
.hero__photo img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0 0 24px 24px; background: #DCE0E6; }
@media (min-width: 760px) { .hero__photo img { aspect-ratio: 2 / 1; border-radius: 0 0 32px 32px; } .hero__roof path { stroke-width: 10; } }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1.5px solid var(--ink); }
.fact { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fact b { font: 600 clamp(32px, 4vw, 56px)/1 var(--display); letter-spacing: -0.04em; }
.fact span { font-size: 15px; line-height: 1.4; color: var(--mute); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .fact { grid-template-columns: 1fr; gap: 10px; padding: 24px 24px 24px 0; border-bottom: 0; }
  .fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
  .fact span { max-width: 22ch; font-size: 16px; }
}
@media (min-width: 1100px) {
  .hero { padding-top: 48px; }
  .hero .wrap { gap: 40px; }
  .hero__top { grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: end; }
}

/* ---------- Услуги: матрица ---------- */
.matrix { border-top: 1.5px solid var(--ink); }
.mrow { display: grid; grid-template-columns: 52px 1fr; gap: 14px 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.mrow__ico { width: 52px; height: 52px; color: var(--navy); }
.mrow__ico svg { width: 100%; height: 100%; }
.mrow__name { font: 600 clamp(19px, 2.1vw, 30px)/1.15 var(--display); letter-spacing: -0.025em; }
.mrow__acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--paper); text-decoration: none; transition: background-color .18s, color .18s; }
.act b { font-size: 17px; font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act b svg { width: 18px; height: 18px; transition: transform .18s; }
.act small { font-size: 13px; color: var(--mute); line-height: 1.3; }
.act:hover { background: var(--ink); color: var(--white); }
.act:hover small { color: var(--on-dark); }
.act:hover b svg { transform: translateX(3px); }
.act .free { position: absolute; top: -9px; right: 12px; padding: 2px 9px; border-radius: 6px; background: var(--orange); color: var(--white); font-size: 12px; font-weight: 600; }
@media (min-width: 900px) {
  .mrow { grid-template-columns: 64px 1fr 220px 220px; gap: 24px; padding: 26px 0; }
  .mrow__ico { width: 64px; height: 64px; }
  .mrow__acts { grid-column: auto / span 2; grid-template-columns: 220px 220px; gap: 16px; }
  .act { padding: 16px 20px; }
}
.extra { display: grid; gap: 12px; margin-top: 28px; }
.xcard { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; min-height: 168px; padding: 24px; border-radius: 24px; background: var(--navy); color: var(--white); text-decoration: none; overflow: hidden; transition: background-color .2s; }
.xcard:hover { background: var(--ink); }
.xcard h3 { font: 600 clamp(22px, 2.4vw, 32px)/1.1 var(--display); letter-spacing: -0.03em; }
.xcard p { margin-top: 8px; color: var(--on-dark); font-size: 15px; }
.xcard__go { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); }
.xcard__go svg { width: 22px; height: 22px; }
.xcard .bg-ico { position: absolute; right: -18px; top: -18px; width: 150px; height: 150px; color: rgba(255,255,255,.07); }
@media (min-width: 760px) { .extra { grid-template-columns: 1fr 1fr; gap: 16px; } .xcard { min-height: 220px; padding: 32px; } }

/* ---------- Почему брокер (тёмная секция) ---------- */
.why { display: grid; gap: 48px; }
.why .d2 { color: var(--white); }
.ticks { display: grid; gap: 0; border-top: 1px solid var(--line-dk); }
.ticks li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line-dk); font-size: 18px; font-weight: 500; line-height: 1.35; }
.ticks .roof { width: 32px; height: 10px; }
.ticks li.hl { color: var(--white); }
.ticks li.hl em { font-style: normal; background: var(--orange); padding: 1px 8px; border-radius: 6px; margin-left: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (min-width: 760px) { .ticks { grid-template-columns: 1fr 1fr; column-gap: 40px; } .ticks li { font-size: 19px; } }
.quote { display: grid; gap: 24px; padding-top: 8px; }
.quote__text { font: 500 clamp(20px, 2.1vw, 28px)/1.4 var(--text); letter-spacing: -0.015em; color: var(--white); }
.who { display: flex; align-items: center; gap: 14px; }
.who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.who b { display: block; font-size: 17px; }
.who span { font-size: 14px; color: var(--on-dark); }
.crew { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.faces { display: flex; }
.faces img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); }
.faces img + img { margin-left: -12px; }
.faces--light img { border-color: var(--white); }
@media (min-width: 1100px) {
  .why { grid-template-columns: 1fr 1fr; gap: 48px 96px; }
  .why > .quote { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; padding-top: 48px; border-top: 1px solid var(--line-dk); }
}

/* ---------- Логотипы: бегущая лента ---------- */
.marquee { position: relative; overflow: hidden; padding-block: 8px; -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; gap: 12px; width: max-content; animation: run 38s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes run { to { transform: translateX(calc(-50% - 6px)); } }
.marquee__item { flex: none; display: grid; place-items: center; width: 200px; height: 104px; padding: 6px 10px; border-radius: 18px; background: var(--white); }
.sec--white .marquee__item { background: var(--paper); }
.marquee__item img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 1100px) { .marquee__item { width: 236px; height: 124px; } }
@media (prefers-reduced-motion: reduce) { .marquee { -webkit-mask-image: none; mask-image: none; } .marquee__track { flex-wrap: wrap; width: auto; } .marquee__item[aria-hidden="true"] { display: none; } }

/* ---------- Вопросы ---------- */
.faq { display: grid; gap: 40px; }
.qlist { border-top: 1.5px solid var(--ink); }
.q { display: grid; grid-template-columns: 1fr 48px; gap: 20px; align-items: center; width: 100%; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; font: 600 clamp(18px, 1.8vw, 24px)/1.3 var(--display); letter-spacing: -0.02em; }
.q__mark { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--ink); transition: background-color .18s, color .18s; }
.q__mark svg { width: 20px; height: 20px; }
.q:hover .q__mark { background: var(--orange); color: var(--white); }
.faq__aside { display: grid; gap: 20px; align-content: start; }
.faq__aside p { font-size: 18px; color: var(--mute); }
@media (min-width: 1100px) { .faq { grid-template-columns: 1.5fr 1fr; gap: 96px; } .faq__aside { padding-top: 28px; } }

/* ---------- Ипотека ---------- */
.mort { display: grid; gap: 32px; }
.mort__big { font: 700 clamp(96px, 17vw, 240px)/0.82 var(--display); letter-spacing: -0.06em; color: var(--teal); }
.mort__big span { color: var(--ink); }
.mort__text { display: grid; gap: 20px; align-content: end; }
.mort__note { display: flex; gap: 14px; padding-left: 16px; border-left: 3px solid var(--teal); font-size: 18px; }
@media (min-width: 1100px) { .mort { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: end; } }
.wrap:has(.mort) + .marquee { margin-top: 48px; }

/* ---------- Оранжевая полоса с формой ---------- */
.ask { background: var(--orange); color: var(--white); }
.ask .wrap { display: grid; gap: 28px; padding-block: 56px; }
.ask .d2 { color: var(--white); }
.ask p { color: rgba(255,255,255,.88); font-size: 18px; }
.ask .form { gap: 12px; }
.ask .input { border-color: transparent; }
.ask .input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.4); border-color: var(--white); }
.ask .consent, .ask .consent a { color: rgba(255,255,255,.85); }
.ask .form__err { color: var(--white); font-weight: 600; }
@media (min-width: 760px) { .ask .row { display: grid; grid-template-columns: 1fr auto; gap: 12px; } }
@media (min-width: 1100px) { .ask .wrap { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; padding-block: 88px; } }

/* ---------- Формы ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field .name { font-size: 14px; font-weight: 550; color: var(--mute); }
.input { width: 100%; height: 58px; padding: 0 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font-size: 17px; appearance: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: #98A0AE; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,178,188,.2); }
.input[style*="outline"] { outline: none !important; border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229,72,77,.18); }
.form__err { display: none; font-size: 14px; color: #C9302C; }
.form.has-error .form__err { display: block; }
.consent { font-size: 13px; line-height: 1.5; color: var(--mute); }
.consent a { color: inherit; text-underline-offset: 2px; }
.file { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 18px; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--paper); color: var(--mute); cursor: pointer; }
.file:hover { border-color: var(--teal); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file svg { width: 22px; height: 22px; color: var(--teal-dk); flex: none; }
.fa-thanks { font-weight: 600; }

/* Карточка формы с «крышей» */
.gable { position: relative; padding-top: 34px; }
.gable__roof { position: absolute; top: 0; left: 0; width: 100%; height: 36px; }
.gable__roof path { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.gable__roof .l { stroke: var(--orange); }
.gable__roof .r { stroke: var(--teal); }
.gable__box { display: grid; gap: 18px; padding: 28px 22px; border-radius: 0 0 24px 24px; background: var(--white); }
.gable__title { font: 600 24px/1.15 var(--display); letter-spacing: -0.03em; }
@media (min-width: 1100px) { .gable__box { padding: 36px; } .gable__title { font-size: 28px; } }

/* ---------- Контакты ---------- */
.where { display: grid; gap: 32px; }
.where__info { display: grid; gap: 28px; align-content: start; }
.cinfo { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.cinfo > div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cinfo dt { font-size: 14px; color: var(--mute); }
.cinfo dd { margin: 0; font-size: 18px; line-height: 1.45; }
.cinfo a { text-decoration: none; }
.cinfo a:hover { color: var(--orange-dk); }
.big-link { font: 600 clamp(24px, 2.6vw, 34px)/1.15 var(--display); letter-spacing: -0.03em; }
.map { position: relative; min-height: 340px; border-radius: 28px; overflow: hidden; background: #E2E6EB; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 18px; }
.map__fallback svg { width: 36px; height: 36px; color: var(--orange); }
.map__fallback small { font-size: 15px; font-weight: 500; color: var(--teal-dk); }
@media (min-width: 1100px) { .where { grid-template-columns: 1fr 1.25fr; gap: 64px; } .map { min-height: 480px; } }

/* ---------- Страница услуги ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; color: var(--mute); text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; }
.svc { padding: 24px 0 var(--sp); }
.svc__head { display: grid; gap: 18px; margin: 28px 0 40px; }
.svc__head .d1 { font-size: clamp(32px, 5vw, 72px); max-width: 14em; }
.free-tag { justify-self: start; padding: 6px 14px; border-radius: 10px; background: var(--orange); color: var(--white); font-weight: 600; font-size: 15px; }
.svc__grid { display: grid; gap: 40px; align-items: start; }
.path { position: relative; display: grid; gap: 0; }
.path li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 18px; padding-bottom: 26px; font-size: 18px; line-height: 1.5; }
.path li::before { content: ""; width: 14px; height: 14px; margin: 6px 0 0 11px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--teal); z-index: 1; }
.path li::after { content: ""; position: absolute; left: 17px; top: 22px; bottom: -4px; width: 2px; background: var(--line); }
.path li:last-child::after { display: none; }
.path li:last-child::before { background: var(--teal); }
@media (min-width: 1100px) { .svc__grid { grid-template-columns: 1fr 440px; gap: 96px; } .svc__grid .gable { position: sticky; top: calc(var(--hh) + 24px); } .path li { font-size: 20px; padding-bottom: 32px; } }

/* ---------- О компании ---------- */
.about { display: grid; gap: 40px; padding-top: 24px; }
.about__text { display: grid; gap: 18px; }
.about__text p { color: var(--mute); max-width: 38em; }
.about__text p.first { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; color: var(--ink); font-weight: 500; }
.cardq { display: grid; gap: 22px; padding: 28px 24px; border-radius: 28px; background: var(--ink); color: var(--white); align-content: start; }
.cardq .quote__text { font-size: clamp(19px, 1.8vw, 24px); }
@media (min-width: 1100px) { .about { grid-template-columns: 1.4fr 1fr; gap: 96px; padding-top: 48px; } }
.gallery { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.gallery figure { overflow: hidden; border-radius: 20px; background: #DCE0E6; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery figure:not(:first-child) { aspect-ratio: 4 / 3; }
@media (min-width: 1100px) { .gallery { grid-template-columns: 2fr 1fr; gap: 16px; } .gallery figure:first-child { grid-column: auto; grid-row: span 2; aspect-ratio: auto; } }
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 12px; }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.mate { display: grid; gap: 14px; }
.mate__ph { aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: #DCE0E6; }
.mate__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.mate h3 { font: 600 clamp(16px, 1.6vw, 21px)/1.2 var(--display); letter-spacing: -0.02em; }
.mate p { color: var(--mute); font-size: 15px; margin-top: 4px; }
.join { display: grid; gap: 28px; }
.join .gable__box { background: var(--white); }
@media (min-width: 1100px) { .join { grid-template-columns: 1fr 1fr; gap: 96px; align-items: center; } }

/* ---------- Политика, Спасибо ---------- */
.doc { max-width: 820px; padding: 28px 0 var(--sp); }
.doc h1 { margin: 24px 0 36px; }
.doc h2 { font: 600 20px/1.3 var(--display); letter-spacing: -0.02em; margin: 44px 0 14px; }
.doc p, .doc li { color: var(--mute); line-height: 1.7; }
.doc p + p { margin-top: 12px; }
.doc ul { display: grid; gap: 12px; }
.doc li { position: relative; padding-left: 20px; }
.doc li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 2px; background: var(--teal); }
.doc b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--teal-dk); }
.thanks { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.thanks > div { display: grid; gap: 18px; justify-items: center; max-width: 620px; }
.thanks .roof { width: 120px; height: 34px; }
.thanks .roof path { stroke-width: 7; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: var(--on-dark); padding-top: 64px; font-size: 15px; overflow: hidden; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer__grid { display: grid; gap: 36px; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
.footer__col h3 { font: 600 13px/1.3 var(--display); letter-spacing: 0; color: var(--white); margin-bottom: 14px; }
.footer__col ul { display: grid; gap: 10px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--white); }
.socials a:hover { background: rgba(255,255,255,.16); }
.socials svg { width: 22px; height: 22px; }
.footer__contact { display: grid; gap: 8px; }
.footer__contact .tel { font: 600 22px/1.2 var(--text); color: var(--white); }
.footer__mark { margin-top: 56px; opacity: .95; }
.footer__mark img { width: 100%; height: auto; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-dk); font-size: 14px; color: rgba(255,255,255,.5); }
.footer__bottom a { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 760px) { .footer__cols { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .footer { padding-top: 96px; } .footer__grid { grid-template-columns: 1fr 3fr; gap: 64px; } .footer__cols { grid-template-columns: repeat(5, 1fr); gap: 32px 24px; } }

/* ---------- Окно заявки ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__bg { position: absolute; inset: 0; background: rgba(20,25,36,.6); opacity: 0; transition: opacity .25s; }
.modal.is-open .modal__bg { opacity: 1; }
.modal__box { position: relative; width: 100%; max-width: 500px; max-height: 94vh; overflow-y: auto; transform: translateY(30px); opacity: 0; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s; }
.modal.is-open .modal__box { transform: none; opacity: 1; }
.modal .gable { padding-top: 0; }
.modal .gable__roof { position: relative; display: block; height: 40px; }
.modal .gable__box { border-radius: 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.modal__close { position: absolute; right: 12px; top: 52px; background: var(--paper); }
.modal__title { font: 600 24px/1.2 var(--display); letter-spacing: -0.03em; padding-right: 48px; }
.modal__title a { color: var(--orange-dk); text-decoration: none; white-space: nowrap; }
.modal__sub { color: var(--mute); margin-top: -8px; }
@media (min-width: 640px) { .modal { place-items: center; padding: 24px; } .modal .gable__box { border-radius: 0 0 24px 24px; padding: 36px; } .modal__title { font-size: 26px; } }

/* ---------- Панель на телефоне, cookie ---------- */
/* справа ~88px оставлено под кнопку Jivo */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 8px; padding: 10px 88px calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s; }
.mbar.is-visible { transform: none; }
.mbar .btn { --h: 48px; flex: 1; padding: 0 12px; font-size: 15px; }
.mbar .btn--line { flex: 0 0 48px; padding: 0; }
@media (min-width: 760px) { .mbar { display: none; } }
@media (max-width: 759px) { body { padding-bottom: 72px; } }
.cookie { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: none; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--ink); color: var(--on-dark); font-size: 14px; line-height: 1.45; box-shadow: 0 20px 40px rgba(20,25,36,.25); }
.cookie.is-visible { display: grid; }
.cookie .btn { --h: 40px; padding: 0 18px; font-size: 14px; justify-self: start; }
@media (max-width: 759px) { .cookie { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 760px) { .cookie { left: 24px; right: auto; bottom: 24px; max-width: 540px; grid-template-columns: 1fr auto; align-items: center; } }
body.is-locked { overflow: hidden; }

.sec > .head { margin-left: auto; margin-right: auto; max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.sec > .head > * { max-width: 900px; }
body { overflow-x: clip; }

/* =====================================================================
   Главная, новая структура
   ===================================================================== */
.muted { color: var(--mute); }
.stars { display: inline-flex; gap: 2px; color: #F5B300; }
.stars svg { width: 16px; height: 16px; }

/* Заглушка под реальный факт — видно сразу, ищется в коде по class="todo" */
.todo { display: inline; padding: 0 6px; border-radius: 6px; background: repeating-linear-gradient(-45deg, rgba(238,114,51,.16) 0 6px, rgba(238,114,51,.08) 6px 12px); box-shadow: inset 0 0 0 1.5px rgba(238,114,51,.55); color: inherit; font-weight: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Первый экран */
.hero__h1 { display: grid; gap: 14px; font-weight: 600; }
.hero__brand { font: 600 15px/1.3 var(--text); color: var(--teal-dk); letter-spacing: 0; }
.hero .d1 { font-size: clamp(32px, 5.2vw, 78px); max-width: 12em; }
.hero__rating { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none; box-shadow: 0 10px 30px rgba(20,25,36,.18); max-width: calc(100% - 32px); }
@media (min-width: 760px) { .hero__rating { left: 24px; bottom: 24px; font-size: 15px; } }

/* Направления */
.dirs { display: grid; gap: 12px; }
.dir { display: grid; gap: 14px; align-content: start; padding: 24px 22px; border-radius: 24px; background: var(--paper); }
.dir__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dir__ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--white); color: var(--navy); }
.dir__ico svg { width: 26px; height: 26px; }
.dir h3 { font: 600 clamp(21px, 2vw, 26px)/1.15 var(--display); letter-spacing: -0.025em; }
.dir p { color: var(--mute); font-size: 16px; }
.dir__badge { padding: 6px 12px; border-radius: 10px; background: var(--orange); color: var(--white); font-size: 14px; font-weight: 600; }
.dir__links { display: grid; margin-top: auto; border-top: 1px solid var(--line); }
.dir__links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.dir__links svg { width: 18px; height: 18px; flex: none; color: var(--orange); transition: transform .18s; }
.dir__links a:hover svg { transform: translateX(4px); }
.dir__links a:hover { color: var(--orange-dk); }
.dir--main { background: var(--navy); color: var(--white); }
.dir--main .dir__ico { background: rgba(255,255,255,.1); color: var(--white); }
.dir--main p { color: var(--on-dark); }
.dir--main .dir__links, .dir--main .dir__links a { border-color: var(--line-dk); }
.dir--main .dir__links a:hover { color: var(--white); }
@media (min-width: 760px) { .dirs { grid-template-columns: 1fr 1fr; gap: 16px; } .dir--main { grid-column: 1 / -1; } }
@media (min-width: 1100px) {
  .dirs { grid-template-columns: repeat(3, 1fr); }
  .dir { padding: 32px; gap: 16px; min-height: 340px; }
  .dir--main { grid-column: span 2; grid-row: span 1; }
  .dir--main h3 { font-size: 40px; }
  .dir--main p { font-size: 18px; max-width: 34em; }
}

/* Этапы — настоящая последовательность, поэтому с номерами */
.steps { display: grid; gap: 0; counter-reset: none; }
.step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 4px 18px; padding: 0 0 28px; }
.step::after { content: ""; position: absolute; left: 23px; top: 50px; bottom: 4px; width: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step__n { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 2px var(--teal); font: 600 18px/1 var(--display); color: var(--ink); }
.step:last-child .step__n { background: var(--teal); color: var(--white); }
.step h3 { font: 600 20px/1.2 var(--display); letter-spacing: -0.02em; padding-top: 12px; }
.step p { color: var(--mute); }
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .step { grid-template-columns: 1fr; gap: 14px; padding: 0; }
  .step__n { grid-row: auto; width: 56px; height: 56px; font-size: 20px; }
  .step::after { left: 64px; right: -16px; top: 27px; bottom: auto; width: auto; height: 2px; }
  .step h3 { padding-top: 6px; }
}

/* Сделки */
.cases { display: grid; gap: 14px; }
.case { display: grid; border-radius: 24px; overflow: hidden; background: var(--paper); }
.case__ph { aspect-ratio: 16 / 10; display: grid; place-items: center; background: #E4E7EC; font-size: 15px; }
.case__body { display: grid; gap: 12px; padding: 22px; }
.case__kind { font-size: 14px; color: var(--teal-dk); font-weight: 600; }
.case h3 { font: 600 20px/1.25 var(--display); letter-spacing: -0.02em; }
.case__body > p:not(.case__kind) { color: var(--mute); }
.case__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.case__nums dt { font-size: 13px; color: var(--mute); }
.case__nums dd { margin: 2px 0 0; font: 600 20px/1.2 var(--display); letter-spacing: -0.02em; }
@media (min-width: 900px) { .cases { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* Цены */
.prices { display: grid; gap: 36px; }
.plist { display: grid; border-top: 1.5px solid var(--ink); }
.plist li { display: flex; align-items: baseline; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.plist .dots { flex: 1; min-width: 20px; border-bottom: 1.5px dotted #B9C0CB; transform: translateY(-4px); }
.plist li > :last-child { flex: none; font-weight: 600; }
.price-free { color: var(--teal-dk); font: 600 18px/1 var(--display); }
@media (max-width: 520px) { .plist li { flex-wrap: wrap; } .plist .dots { display: none; } .plist li > :first-child { flex: 1 1 100%; } }
@media (min-width: 1100px) { .prices { grid-template-columns: 1fr 1.3fr; gap: 96px; align-items: start; } .plist li { font-size: 19px; padding: 22px 0; } }

/* Команда на тёмном */
.team--dark .mate h3 { color: var(--white); }
.team--dark .mate p { color: var(--on-dark); }
.team--dark .mate__ph { background: var(--navy); }
.team { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.mate--more .mate__ph { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center; border: 1.5px dashed var(--line-dk); background: transparent; }
.mate--more b { font: 600 clamp(32px, 4vw, 52px)/1 var(--display); color: var(--white); letter-spacing: -0.04em; }
.mate--more span { color: var(--on-dark); font-size: 15px; }
.quote--team { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line-dk); }
@media (min-width: 1100px) { .quote--team { grid-template-columns: auto 1fr; gap: 48px; align-items: center; } }

/* Отзывы */
.rating { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--paper); text-decoration: none; font-size: 15px; }
.rating > svg { width: 16px; height: 16px; color: var(--mute); }
.rcards { display: grid; gap: 14px; }
.rcard { display: grid; gap: 16px; align-content: start; padding: 26px; border-radius: 24px; background: var(--paper); }
.rcard__head { display: flex; align-items: center; gap: 12px; }
.rcard__head img { width: 36px; height: 36px; }
.rcard h3 { font-size: 17px; font-weight: 650; }
.rcard p { font-size: 17px; line-height: 1.6; }
@media (min-width: 900px) { .rcards { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; } }

/* Партнёры */
.partners { display: grid; gap: 32px; margin-bottom: 40px; }
.partners__head { display: grid; gap: 18px; align-content: start; }
.partners__mort { display: grid; gap: 14px; padding: 28px 24px; border-radius: 28px; background: var(--white); }
.partners__mort .mort__big { font-size: clamp(88px, 12vw, 160px); line-height: .85; }
@media (min-width: 1100px) { .partners { grid-template-columns: 1.2fr 1fr; gap: 64px; } .partners__mort { padding: 40px; } }
.belt { display: grid; gap: 10px; }
.belt + .belt { margin-top: 18px; }
.belt__label { display: block; font-size: 14px; font-weight: 600; color: var(--mute); }

/* Частые вопросы — аккордеон с ответами */
.faq__side { display: grid; gap: 18px; align-content: start; }
.accs { border-top: 1.5px solid var(--ink); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { display: grid; grid-template-columns: 1fr 40px; gap: 16px; align-items: center; padding: 22px 0; cursor: pointer; list-style: none; font: 600 clamp(17px, 1.6vw, 21px)/1.3 var(--display); letter-spacing: -0.02em; }
.acc summary::-webkit-details-marker { display: none; }
.acc__ico { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); transition: background-color .18s; }
.acc__ico::before, .acc__ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.acc__ico::after { transform: rotate(90deg); }
.acc[open] .acc__ico { background: var(--orange); }
.acc[open] .acc__ico::before, .acc[open] .acc__ico::after { background: var(--white); }
.acc[open] .acc__ico::after { transform: rotate(0); }
.acc summary:hover .acc__ico { background: var(--orange); }
.acc summary:hover .acc__ico::before, .acc summary:hover .acc__ico::after { background: var(--white); }
.acc__a { padding: 0 56px 24px 0; }
.acc__a p { color: var(--mute); font-size: 17px; max-width: 46em; }
@media (min-width: 1100px) { .faq { grid-template-columns: 1fr 1.6fr; gap: 96px; } .faq__side { position: sticky; top: calc(var(--hh) + 32px); } }

/* Подбор за минуту */
.pick { background: var(--orange); color: var(--white); }
.pick .wrap { display: grid; gap: 28px; padding-block: 64px; }
.pick .d2 { color: var(--white); }
.pick__text { display: grid; gap: 16px; align-content: start; }
.pick__text p { font-size: 18px; color: rgba(255,255,255,.9); max-width: 30em; }
.qz { display: grid; gap: 20px; padding: 24px 20px; border-radius: 28px; background: var(--white); color: var(--ink); }
.qz__bar { height: 6px; border-radius: 6px; background: var(--paper); overflow: hidden; }
.qz__bar span { display: block; height: 100%; background: var(--teal); border-radius: 6px; transition: width .3s; }
.qz fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 16px; }
.qz legend.name { padding: 0; margin-bottom: 16px; font: 600 clamp(20px, 2vw, 26px)/1.2 var(--display); letter-spacing: -0.025em; color: var(--ink); }
.opts { display: grid; gap: 8px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: flex; align-items: center; min-height: 54px; padding: 12px 18px; border-radius: 14px; background: var(--paper); font-weight: 550; transition: background-color .15s, color .15s; }
.opt:hover span { background: #E4E7EC; }
.opt input:checked + span { background: var(--ink); color: var(--white); }
.opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.qz__contact { display: grid; gap: 12px; }
.qz__nav { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.qz__back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; border: 0; background: none; font-weight: 600; color: var(--mute); cursor: pointer; }
.qz__back svg { width: 18px; height: 18px; }
.qz__back[hidden] { display: none; }
.qz__count { margin-left: auto; font-size: 14px; color: var(--mute); }
.qz .form { gap: 16px; }
@media (min-width: 640px) { .opts { grid-template-columns: 1fr 1fr; } .qz__contact { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pick .wrap { grid-template-columns: 1fr 1.3fr; gap: 80px; padding-block: 104px; align-items: center; } .qz { padding: 40px; } }
[hidden], .qz__step[hidden] { display: none !important; }
.mate--more .todo { font: inherit; padding: 0 10px; }
@media (max-width: 899px) {
  .cases { grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .case { scroll-snap-align: start; }
}

/* Стоимость */
.cost { display: grid; border-radius: 28px; overflow: hidden; background: var(--white); }
.cost__free { display: grid; gap: 10px; align-content: center; padding: 28px 24px; background: var(--navy); color: var(--white); }
.cost__zero { font: 700 clamp(64px, 9vw, 128px)/0.9 var(--display); letter-spacing: -0.05em; color: var(--teal); }
.cost__free p { font-size: 18px; color: var(--on-dark); max-width: 22em; }
.cost__rest { display: grid; gap: 16px; align-content: center; padding: 28px 24px; }
.cost__rest p { color: var(--mute); font-size: 17px; max-width: 34em; }
@media (min-width: 900px) { .cost { grid-template-columns: 1fr 1.3fr; } .cost__free, .cost__rest { padding: 48px; } }

/* Первый экран: одно главное действие + тихая ссылка */
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.tlink { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 6px; transition: text-decoration-color .18s; }
.tlink svg { width: 18px; height: 18px; color: var(--orange); transition: transform .18s; }
.tlink:hover { text-decoration-color: var(--orange); }
.tlink:hover svg { transform: translateX(3px); }
@media (max-width: 520px) { .hero__cta .btn { flex: 1 1 100%; } .hero__cta .tlink { margin-inline: auto; } }

/* Разгрузка главной */
.dirs__note { margin-top: 20px; color: var(--mute); font-size: 16px; }
@media (min-width: 1100px) { .dir { min-height: 0; } .dir--main h3 { font-size: 36px; } }
.dir h3 { margin-top: 4px; }
.dir__links { margin-top: 8px; }
.rcard__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.rcard__text.is-open { display: block; -webkit-line-clamp: unset; }
.rcard__more { justify-self: start; padding: 0; border: 0; background: none; font-weight: 600; color: var(--teal-dk); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.rcard__more[hidden] { display: none; }
.step p { font-size: 15px; }

/* Первый экран v3: фото целиком, в своих пропорциях, без обрезки */
.hero .wrap { display: grid; gap: 28px; align-items: center; }
.hero__text { display: grid; gap: 22px; align-content: center; }
.hero__text .facts { margin-top: 8px; }
.hero__photo { margin: 0; padding: 0; display: flex; justify-content: center; }
.hero__photo picture { display: contents; }
.hero__photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 78vh; aspect-ratio: auto; object-fit: contain; border-radius: 24px; background: none; }
@media (min-width: 760px) { .hero__photo img { aspect-ratio: auto; border-radius: 28px; } }
@media (min-width: 1100px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; }
  .hero .d1 { font-size: clamp(34px, 4.2vw, 64px); }
  .hero__text .facts { grid-template-columns: repeat(3, 1fr); }
  .hero__text .fact { padding: 18px 16px 0 0; }
  .hero__text .fact + .fact { padding-left: 16px; }
  .hero__text .fact b { font-size: clamp(28px, 2.6vw, 40px); }
  .hero__text .fact span { font-size: 14px; }
}
/* Логотипы: viewBox подогнан по контуру, размер задаём одинаковой «рамкой» и центрируем */
.marquee__item img { width: 72%; height: 50%; object-fit: contain; }
.footer__bottom { margin-top: 48px; }
.marquee__item { padding: 0; }
.marquee__item img { width: 140px; height: 52px; max-width: none; object-fit: contain; }
@media (min-width: 1100px) { .marquee__item img { width: 168px; height: 60px; } }

/* Первый экран v4: иллюстрация вместо фото */
.hero__artwrap { position: relative; width: 100%; max-width: 720px; justify-self: center; }
.hero__art { display: block; width: 100%; height: auto; }
.hero__art .lw { animation: lw 9s ease-in-out infinite; }
.hero__art .lw:nth-of-type(3n) { animation-delay: -3s; animation-duration: 11s; }
.hero__art .lw:nth-of-type(4n) { animation-delay: -6s; animation-duration: 13s; }
.hero__art .lw--shop { animation: none; }
@keyframes lw { 0%, 60%, 100% { opacity: 1; } 75% { opacity: .35; } }
.hero__art .roof-l, .hero__art .roof-r { stroke-dasharray: 140; animation: draw2 1s .2s cubic-bezier(.6,.1,.2,1) both; }
.hero__art .roof-r { animation-delay: .45s; }
@keyframes draw2 { from { stroke-dashoffset: 140; } to { stroke-dashoffset: 0; } }
@media (min-width: 1100px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; } .hero__artwrap { justify-self: end; } }

/* Ипотечный калькулятор */
.calc { display: grid; gap: 16px; }
.calc__inputs { display: grid; gap: 26px; padding: 24px 22px; border-radius: 28px; background: var(--paper); }
.sec:not(.sec--white) .calc__inputs { background: var(--white); }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.calc__row label { font-weight: 550; color: var(--mute); }
.calc__val { font: 600 clamp(18px, 1.8vw, 22px)/1.2 var(--display); letter-spacing: -0.02em; text-align: right; font-variant-numeric: tabular-nums; }
.calc__range { --p: 50%; width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.calc__range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--teal) var(--p), var(--line) var(--p)); }
.calc__range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--line); }
.calc__range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--teal); }
.calc__range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--white); border: 3px solid var(--teal); box-shadow: 0 2px 8px rgba(20,25,36,.2); }
.calc__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 3px solid var(--teal); }
.calc__range:focus-visible { outline: none; }
.calc__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(13,178,188,.3); }
.calc__note { font-size: 14px; color: var(--mute); }
.calc__res { display: grid; gap: 14px; align-content: start; padding: 28px 24px; border-radius: 28px; background: var(--navy); color: var(--white); }
.calc__lbl { color: var(--on-dark); }
.calc__pay { font: 700 clamp(36px, 4.4vw, 60px)/1 var(--display); letter-spacing: -0.04em; color: var(--white); font-variant-numeric: tabular-nums; }
.calc__more { display: grid; margin: 8px 0 12px; border-top: 1px solid var(--line-dk); }
.calc__more > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-dk); }
.calc__more dt { color: var(--on-dark); }
.calc__more dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.3fr 1fr; gap: 20px; } .calc__inputs, .calc__res { padding: 40px; } }
.fact b { font-variant-numeric: tabular-nums; }

/* Контакты без карты */
.clinks { display: grid; gap: 10px; }
.big-link--sm { font-size: clamp(18px, 2vw, 26px); }
.where__addr { font-size: 15px; color: var(--mute); max-width: 36em; }
.where__cta { display: grid; gap: 18px; align-content: center; padding: 28px 24px; border-radius: 28px; background: var(--navy); color: var(--white); }
.where__cta .d3 { color: var(--white); }
@media (min-width: 1100px) { .where { grid-template-columns: 1.3fr 1fr; align-items: stretch; } .where__cta { padding: 40px; } }
.clinks a { text-decoration: none; }
.calc__row label { flex: 1 1 auto; }
.calc__val { flex: none; }

/* =====================================================================
   «Живая» главная
   ===================================================================== */
.team--dark { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .team--dark { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* прогресс прокрутки */
.progress { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--orange), var(--teal)); }

/* шапка прячется при прокрутке вниз */
.header { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.header.is-hidden { transform: translateY(-100%); }

/* параллакс иллюстрации */
.hero__art .pl { transition: transform .6s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.hero__art .tl { animation: tl 6s ease-in-out infinite; animation-delay: calc(var(--d) * .35s); }
@keyframes tl { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.hero__art .lw { animation: none; }

/* появление: включается только из JS и только для того, что ниже первого экрана */
.js-anim .ap { opacity: 0; transform: translateY(28px); }
.js-anim .ap.ap-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 80ms); }
/* заголовки по словам */
.wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wd > span { display: inline-block; }
.js-anim .wd-pending .wd > span { transform: translateY(110%); }
.js-anim .wd-in .wd > span { transform: none; transition: transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--w, 0) * 60ms); }

/* свет за курсором на карточках услуг */
.dir { position: relative; overflow: hidden; isolation: isolate; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.dir::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(13,178,188,.16), transparent 60%); }
.dir--main::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(13,178,188,.28), transparent 60%); }
.dir:hover::before { opacity: 1; }
.dir:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(34,42,58,.10); }
.dir__ico { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.dir:hover .dir__ico { transform: rotate(-6deg) scale(1.08); }

/* шаги зажигаются по очереди */
.step__n { transition: background-color .4s, color .4s, transform .4s cubic-bezier(.2,.8,.2,1); }
.js-anim .step.on .step__n { background: var(--teal); color: var(--white); transform: scale(1.06); }
@media (min-width: 1100px) {
  .step::after { background: linear-gradient(90deg, var(--teal) var(--fill, 0%), var(--line) var(--fill, 0%)); transition: --fill .6s; }
  .js-anim .step.on::after { --fill: 100%; }
}
@property --fill { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

/* команда */
.mate__ph { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.mate:hover .mate__ph { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(0,0,0,.28); }
.mate__ph img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.mate:hover .mate__ph img { transform: scale(1.05); }

/* кнопки: лёгкий блик */
.btn--go { position: relative; overflow: hidden; }
.btn--go::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn--go:hover::after { left: 130%; }
.btn:active { transform: scale(.98); }

/* плавный аккордеон (поддерживающие браузеры) */
.acc { interpolate-size: allow-keywords; }
.acc::details-content { height: 0; overflow: clip; transition: height .35s ease, content-visibility .35s allow-discrete; }
.acc[open]::details-content { height: auto; }
.acc__a p { transition: opacity .35s; }

/* подбор: варианты */
.opt span { transition: background-color .15s, color .15s, transform .2s cubic-bezier(.2,.8,.2,1); }
.opt:hover span { transform: translateX(3px); }
.opt input:checked + span { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .js-anim .ap, .js-anim .wd-pending .wd > span { opacity: 1 !important; transform: none !important; }
  .hero__art .pl { transform: none !important; }
  .header.is-hidden { transform: none; }
}
.team--dark { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .team--dark { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mate { min-width: 0; }
@media (min-width: 1100px) { .where { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.where__info, .where__cta { min-width: 0; }
@media (min-width: 760px) { .dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dirs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dir, .dir h3 { min-width: 0; overflow-wrap: anywhere; }

/* Кнопка «Наверх»: справа, над кнопкой чата (на телефоне чат — слева на той же высоте) */
.totop { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: 0 8px 24px rgba(20,25,36,.18); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, transform .25s, visibility .25s, background-color .18s, color .18s; }
.totop svg { width: 22px; height: 22px; }
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--ink); color: var(--white); }
@media (max-width: 759px) { .totop { width: 46px; height: 46px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 16px; } }

/* Полоска прогресса — под меню, внутри шапки, полупрозрачная */
.header { position: sticky; }
.header .progress { position: absolute; left: 0; right: 0; top: auto; bottom: -1px; height: 3px; z-index: 1; background: rgba(34,42,58,.06); }
.header .progress span { opacity: .75; border-radius: 0 3px 3px 0; }
.header.is-scrolled { box-shadow: none; }
.header.is-hidden { transform: none; }

/* Карточки форм: целая карточка, значок-крыша внутри */
.gable { padding-top: 0; }
.gable__box { border-radius: 24px; }
.gable__mark { width: 44px; height: 13px; margin-bottom: -4px; }
.modal .gable__box { border-radius: 24px 24px 0 0; padding-top: 32px; }
@media (min-width: 640px) { .modal .gable__box { border-radius: 24px; padding: 40px; } }
.modal__close { top: 16px; right: 16px; }
.svc__grid .gable__box { box-shadow: 0 20px 50px rgba(34,42,58,.10); }
.team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.svc__what { display: grid; gap: 20px; align-content: start; }

/* ---- Статьи-ответы и «Полезное» в подвале (05.11.2026) ---- */
.art__h1 { font-size: clamp(30px, 4.4vw, 60px); max-width: 18em; }
.art__lead { max-width: 44em; }
.art__grid { display: grid; gap: 48px; align-items: start; }
@media (min-width: 1100px) { .art__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 80px; } .art__side { position: sticky; top: calc(var(--hh) + 32px); } }
.art__body { max-width: 46em; font-size: 18px; line-height: 1.65; }
.art__body h2 { font: 600 clamp(22px, 2.3vw, 32px)/1.15 var(--display); letter-spacing: -0.02em; margin: 48px 0 16px; }
.art__body h2:first-child { margin-top: 0; }
.art__body p { margin: 0 0 16px; }
.art__body a { color: var(--teal-dk); text-decoration: underline; text-underline-offset: 3px; }
.art__body a:hover { color: var(--ink); }
.art__ul, .art__ol { display: grid; gap: 10px; margin: 0 0 18px; }
.art__ul li { position: relative; padding-left: 26px; }
.art__ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.art__ol { counter-reset: n; }
.art__ol li { position: relative; padding-left: 42px; counter-increment: n; }
.art__ol li::before { content: counter(n); position: absolute; left: 0; top: .15em; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--white); font: 600 14px/28px var(--text); text-align: center; }
.art__note { margin-top: 24px !important; padding: 20px 24px; border-radius: 16px; background: var(--paper); border-left: 4px solid var(--orange); font-weight: 550; }
.sec:not(.sec--white) .art__note { background: var(--white); }
.art__side { display: grid; gap: 16px; }
.art__svc { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--teal-dk); text-decoration: none; }
.art__svc:hover { color: var(--ink); }
.art__svc svg, .art__also svg, .svc__tips svg { width: 18px; height: 18px; flex: none; }
.art__also { display: grid; gap: 12px; }
@media (min-width: 760px) { .art__also { grid-template-columns: repeat(3, 1fr); } }
.art__also a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 22px 24px; border-radius: 16px; background: var(--paper); font-weight: 600; text-decoration: none; transition: background-color .18s, color .18s; }
.sec:not(.sec--white) .art__also a { background: var(--white); }
.art__also a:hover { background: var(--ink); color: var(--white); }
.svc__tips { display: grid; gap: 10px; margin-top: 8px; }
.svc__tips-h { font: 600 13px/1.3 var(--display); color: var(--mute); }
.svc__tips ul { display: grid; gap: 8px; }
.svc__tips a { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-dk); font-weight: 550; text-decoration: none; }
.svc__tips a:hover { color: var(--ink); }

/* ---- Калькулятор: поля для точных цифр (05.11.2026) ---- */
.calc__box { display: inline-flex; align-items: baseline; gap: 6px; flex: none; }
.calc__num { width: 10.5ch; padding: 2px 0; border: 0; border-bottom: 1.5px dashed var(--line); border-radius: 0; background: transparent; color: var(--ink);
  font: 600 clamp(18px, 1.8vw, 22px)/1.2 var(--display); letter-spacing: -0.02em; text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.calc__num:hover { border-bottom-color: var(--mute); }
.calc__num:focus { border-bottom: 1.5px solid var(--teal); }
#c-years-num, #c-rate-num { width: 3.4ch; }
.calc__unit { font: 600 clamp(16px, 1.5vw, 19px)/1.2 var(--display); color: var(--mute); }
.calc__pct { align-self: center; margin-left: 6px; padding: 3px 8px; border-radius: 8px; background: rgba(13,178,188,.12); color: var(--teal-dk); font: 600 13px/1.3 var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .calc__row { flex-wrap: wrap; } .calc__num { width: 9.5ch; } }

/* ---- Галерея «О компании» из двух фото (05.11.2026: фото двери старого офиса убрано) ---- */
.gallery--two { grid-template-columns: 1fr; }
.gallery--two figure:not(:first-child) { aspect-ratio: 4 / 3; }
@media (min-width: 760px) {
  .gallery--two { grid-template-columns: 1.5fr 1fr; }
  .gallery--two figure:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery--two figure:not(:first-child) { aspect-ratio: auto; }
}

/* ---- Первый экран на телефоне и планшете (05.11.2026, Алексей): домики справа от заголовка, а не блоком под цифрами ---- */
@media (max-width: 1099px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) clamp(84px, calc(100vw - 335px), 260px); grid-template-areas: "h1 art" "lead lead" "cta cta" "facts facts"; column-gap: 12px; row-gap: 22px; align-items: end; }
  .hero__text { display: contents; }
  .hero__h1 { grid-area: h1; }
  .hero__text > .lead { grid-area: lead; }
  .hero__cta { grid-area: cta; }
  .hero__text > .facts { grid-area: facts; margin-top: 0; }
  .hero__artwrap { grid-area: art; align-self: end; max-width: none; margin-bottom: 4px; }
}
@media (max-width: 420px) { .hero .d1 { font-size: 28px; } .hero .wrap { grid-template-columns: minmax(0, 1fr) clamp(84px, calc(100vw - 295px), 140px); } }
@media (max-width: 370px) { .hero .d1 { font-size: 26px; } }

/* ---- Чат (14.11.2026: свой чат CRM вместо Jivo; место кнопки задано в подключении chat.js — компьютер справа под
   стрелкой «наверх», телефон слева на её высоте, над панелью). Панель на телефоне — во всю ширину. Пока открыты наше окно
   заявки или меню (body.is-locked), кнопка чата прячется. ---- */
@media (max-width: 759px) {
  .mbar { padding-right: max(12px, env(safe-area-inset-right, 0px)); }
}
body.is-locked #fr-chat { display: none !important; }

/* ---- Первый экран на компьютере (05.11.2026, Алексей): домики выше — низ на уровне кнопок,
   цифры — отдельной строкой во всю ширину, число и подпись рядом (было плотно под текстом) ---- */
@media (min-width: 1100px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "h1 art" "lead art" "cta art" "facts facts"; column-gap: 56px; row-gap: 22px; align-items: start; }
  .hero__text { display: contents; }
  .hero__h1 { grid-area: h1; }
  .hero__text > .lead { grid-area: lead; }
  .hero__cta { grid-area: cta; }
  .hero__artwrap { grid-area: art; align-self: end; justify-self: end; }
  .hero__text > .facts { grid-area: facts; margin-top: 34px; grid-template-columns: repeat(3, 1fr); }
  .hero__text .fact { grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 26px 32px 0 0; }
  .hero__text .fact + .fact { padding-left: 32px; }
  .hero__text .fact b { font-size: clamp(38px, 3.4vw, 56px); }
  .hero__text .fact span { font-size: 16px; max-width: 18ch; }
}

/* ---- Ширина строго по экрану (05.11.2026): на айфоне страницу можно было таскать вбок — закрытое меню
   сдвинуто за правый край, и Safari считал страницу шире. Обрезаем по горизонтали у меню (выше) и у всей страницы. ---- */
html { overflow-x: hidden; }

/* ---- Калькулятор на телефоне (05.11.2026): на широких айфонах (430px) строка «подпись + сумма + %» не влезала и распирала
   блок шире экрана. Теперь сумма переносится под подпись, когда места не хватает, а колонки сетки не шире контейнера. ---- */
.calc__row { flex-wrap: wrap; row-gap: 6px; }
.calc__box { margin-left: auto; }
.calc > * { min-width: 0; }
