/* ==========================================================================
   /moyka-fasadov/ (apps/web/templates/site/landings/moyka-fasadov.html).
   Первый экран — макет «Мойка А», блоки — бриф docs/site/briefs/moyka-fasadov.md.
   Общие компоненты (верёвка, карточки на тросах, калькулятор, анкета) — styles.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Первый экран: факты, кнопки, «Работали для», рельсы, калькулятор на тросах
   -------------------------------------------------------------------------- */

.mhero__rail {
  position: absolute; z-index: 0; top: 0; bottom: 0; width: 1px;
  background: rgba(180, 185, 192, .28); pointer-events: none;
}
.mhero__rail--l { left: 50%; }
.mhero__rail--r { right: 20px; }

.mfacts { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 0; padding: 0; list-style: none; }
.mfacts li { display: flex; flex-direction: column; gap: 4px; }
.mfacts li + li { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.mfacts b {
  font-family: var(--f-display); font-size: 26px; font-weight: 400; line-height: 1.1;
  color: var(--text); white-space: nowrap;
}
.mfacts span { font-size: 13px; color: var(--muted); }

.mclients {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.mclients ul { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.mclients li {
  font-family: var(--f-display); font-size: 20px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--lead);
}

.mturn--hero { display: none; }
.mcalc__wrap { position: relative; width: 100%; max-width: 440px; justify-self: end; }
.lhero .mcalc { --cable-h: 148px; margin-top: 64px; padding: 24px 28px; }
.mcalc .mcalc__title { margin: 0 0 14px; }
.mcalc .calc__free { margin-bottom: 18px; }
.mcalc .calc__hint { margin: 6px 0 0; }
.mcalc__sum {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.mcalc__sum > span { font-size: 15px; color: var(--muted); }
.mcalc__sum .calc__sum { margin: 0; color: var(--sky); }
.mcalc .calc__formula { margin: 6px 0 4px; }
.mcalc .calc__note { margin-bottom: 20px; }
.mcalc .calc__more { margin-top: 12px; }

@media (max-width: 1100px) {
  .mhero__rail { display: none; }
  .mcalc__wrap { justify-self: start; max-width: 520px; }
  .lhero .mcalc { --cable-h: 72px; margin-top: 72px; }
  /* Тросы калькулятора начинаются на горизонтали ответвления, а не уходят вверх в никуда */
  .mturn--hero { display: block; }
  .mturn--hero .tros-turn__h { right: calc(-1 * var(--pad)); }
}
@media (max-width: 600px) {
  .mfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 0; }
  .mfacts li, .mfacts li + li { padding: 10px 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .mfacts b { font-size: 24px; }
  .mhero__call, .mclients { display: none; }
  .lhero .mcalc { --cable-h: 48px; margin-top: 48px; padding: 22px 18px; }
}

/* --------------------------------------------------------------------------
   Общее для разделов страницы
   -------------------------------------------------------------------------- */

/* Бывшие светлые и чередующиеся разделы брифа — тёмные ради бесшовности, как у зимы (gen8.py TONES):
   #11151A с переходом в фон страницы по 160 px сверху и снизу */
.mtone {
  --mtone: #11151A;
  --surface: #181D24; --line: #262D36; --line-soft: #262D36;
  background: linear-gradient(180deg, var(--bg) 0, var(--mtone) 160px,
    var(--mtone) calc(100% - 160px), var(--bg) 100%);
}

/* Ответвление (site/tros/_turn.html): верёвка уходит от основной вправо, на ней висят плашки раздела.
   .mrow — горизонталь на 40 px ниже верха ряда, тросы плашек начинаются на ней;
   .mrow--top — горизонталь по верху ряда, как у формы заявки (.lform__row) */
.mrow { position: relative; margin-top: 8px; }
.mrow > .container { position: relative; z-index: 2; padding-top: 40px; }
.mrow--top { margin-top: 0; }
.mrow--top > .container { padding-top: 0; }
.mhang { position: relative; }
.mturn--m { display: none; }

.landing--moyka-fasadov :is(section[id], #peskostruy, #doposle, #kontakty) { scroll-margin-top: 72px; }
.rope .mhead { margin-bottom: 40px; max-width: 24ch; }
.rope .mlead { margin-top: 16px; max-width: 64ch; }
.rope .h2.knot + :is(p, .text, .lead) { margin-top: 22px; }
.rope .container > .h2.knot + div { margin-top: 40px; }
.rope .mnote { margin-top: 18px; font-size: 15px; color: var(--muted); }
.mlink {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--sky); font-weight: 500; text-decoration: none;
}
.mlink:hover { text-decoration: underline; }
.mlink .ico-s { color: var(--sky); }
.mactions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.mactions .mprice, .mactions .text { margin: 0; }
.mprice {
  margin: 28px 0 4px; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(36px, 3.6vw, 52px); line-height: 1; color: var(--sky); white-space: nowrap;
}
.mlist { display: grid; gap: 4px; margin: 20px 0 28px; padding: 0; list-style: none; }
.mlist li { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0; color: var(--lead); }
.mlist .ico-s { margin-top: 2px; }

/* Тестовая мойка: плашка на тросах слева, фото справа */
.mtest__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.mtest__photo { margin-top: 90px; }
.rope .mtest__card { --cable-h: 90px; padding: 32px; }
.mtest__card .text { margin: 0; }
.mtest__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.mtest__foot .mprice { margin: 0; }
.mtest__photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Что моем: пары 2×2 и методы строкой */
.mdirt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; margin-top: 48px; }
.mdirt article { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; align-items: start; }
.mdirt .h3 { margin-bottom: 10px; }
.mdirt p { margin: 0; color: var(--lead); }
.mdirt .mlink { margin-top: 6px; }
.rope .mmethods__title { margin: 64px 0 24px; }
.mmethods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.mmethods li { display: flex; flex-direction: column; gap: 14px; color: var(--lead); font-size: 16px; }
.mmethods a { color: var(--text); text-decoration: underline; text-decoration-color: var(--sky); text-underline-offset: 4px; }
.mmethods a:hover { color: var(--sky); }

/* Окна и очистка: фото и текст рядом */
.msplit { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 64px; align-items: start; }
.msplit--rev { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.msplit__photo img { display: block; width: 100%; height: 100%; max-height: 720px; aspect-ratio: 4 / 5; object-fit: cover; }
.msplit__body .lead { margin: 0; }
.msplit__body .h3 { margin-top: 8px; }
#okna .mprice { margin-top: 8px; }

/* Методы очистки: строки через одну фоном, без линий */
.mtable { margin: 48px 0 0; padding: 0; list-style: none; }
.mtable li {
  display: grid; grid-template-columns: 40px minmax(0, 280px) minmax(0, 1fr);
  gap: 8px 24px; align-items: center; padding: 14px 20px; color: var(--lead);
}
.mtable li:nth-child(odd) { background: var(--surface); }
.mtable b { font-weight: 500; color: var(--text); scroll-margin-top: 120px; }

/* Цены: две группы рядом, условия на всю ширину */
.mprices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 48px; }
.mprices .price__group, .mprices .price__group + .price__group, .mterms { margin: 0; }
.mterms { margin-top: 48px; }
.price__gtitle .h3 { margin: 0; }
.mterms .terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.rope .price__download { margin-top: 24px; }
.mmore { margin-top: 40px; color: var(--muted); }
.mmore a { color: inherit; font-weight: 500; }

/* Весна: узкая плашка на тросах */
.rope .mvesna__card {
  --cable-h: 90px; max-width: 760px; padding: 32px;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 24px;
}
.mvesna__card .text { margin: 0; }

.rope #kak-rabotaem .steps { margin-top: 48px; }

/* Анкета: заголовок ниже горизонтали, коробка висит от неё */
.mquiz .quiz__side { padding-top: 80px; }
.rope .mquiz .quiz__box { --cable-h: 72px; }

/* Бизнесу: годовой договор на ответвлении, условия справа */
.rope .mbiz__head .lead { margin-top: 22px; max-width: 64ch; }
.rope .mbiz__head .text { max-width: 64ch; }
.rope .mbiz .biz__pack { --cable-h: 72px; margin-top: var(--cable-h); }
.mbiz .biz__list { margin-top: 72px; }
.mbiz__foot { margin-top: 56px; align-items: center; }

/* Объекты: одна большая и четыре малые */
.mobjects { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.mobjects .object--main { grid-row: span 2; }
.mobjects .object__media img { aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; }
.mobjects .object--main .object__media img { aspect-ratio: auto; height: 100%; }
.mobjects .object--main .object__media { flex: 1; min-height: 0; }
.mobjects .object--main { display: flex; flex-direction: column; }

/* Заявка: мессенджеры под текстом */
.mmsgr { display: grid; max-width: 420px; margin: 8px 0 0; color: var(--muted); }
.mmsgr a {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-top: 1px solid var(--line-soft); color: var(--text); font-size: 17px; text-decoration: none;
}
.mmsgr a:first-of-type { margin-top: 12px; }
.mmsgr a:last-of-type { border-bottom: 1px solid var(--line-soft); }
.mmsgr a:hover { color: var(--sky); }
.mmsgr .ico-s { color: var(--sky); }

@media (max-width: 1100px) {
  .mmethods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mturn--d { display: none; }
  .mturn--m { display: block; }
  .mturn--m .tros-turn__h { right: calc(-1 * var(--pad)); }
  .mquiz .quiz__side { padding-top: 0; padding-bottom: 8px; }
  .rope .mquiz .quiz__box { --cable-h: 56px; }
  .mtest__photo { margin-top: 0; }
  .mbiz .biz__list { margin-top: 0; }
  .mtest__grid, .msplit, .msplit--rev, .mprices { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .msplit--rev .msplit__photo { order: -1; }
  .msplit__photo img { aspect-ratio: 4 / 3; }
  .mdirt { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .mterms .terms { grid-template-columns: minmax(0, 1fr); }
  .mobjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobjects .object--main { grid-column: 1 / -1; grid-row: auto; }
  .mobjects .object--main .object__media img { aspect-ratio: 4 / 3; height: auto; }
}
@media (max-width: 600px) {
  .rope .mhead { margin-bottom: 28px; }
  .rope .mtest__card, .rope .mvesna__card { --cable-h: 48px; padding: 22px 18px; }
  .rope .mvesna__card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mmethods { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .mmethods li { flex-direction: row; align-items: center; }
  .mtable li { grid-template-columns: 40px minmax(0, 1fr); padding: 14px 12px; }
  .mtable li > span:last-child { grid-column: 2; }
  .mobjects { grid-template-columns: minmax(0, 1fr); }
  .mactions .btn { flex: 1 1 100%; }
}
