/* ---------- 0. Шрифты (локальные woff2, подмножества latin + cyrillic) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/manrope-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/manrope-latin-400-normal.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: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/manrope-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/manrope-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/manrope-latin-600-normal.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: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/manrope-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/manrope-latin-700-normal.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: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/manrope-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/manrope-latin-800-normal.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; }

/* ==========================================================================
   Монтаж-Кровли-Мо — дизайн-система
   Модуль 8px · контейнер 1280 · сетка 12 · радиусы 8/12/16 · Manrope
   Цвета приходят из inc/theme.php (переменные --ink, --accent, ...)
   ========================================================================== */

/* ---------- 1. Reset и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img, svg, picture, video { max-width: 100%; height: auto; display: block; }
.max-icon { width: 1em; height: 1em; vertical-align: -.18em; border-radius: 22%; display: inline-block; flex: 0 0 auto; }
h1, h2, h3, h4, p, li, td, th, a, span, label { overflow-wrap: break-word; }
.container > *, .grid > *, .flex > *, .card > *, .section-head > * { min-width: 0; }
a, button, [role="button"] { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.18; letter-spacing: -.015em; font-weight: 750; }
h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -.025em; }
h2 { font-size: clamp(24px, 3vw, 38px); }
h3 { font-size: clamp(19px, 1.8vw, 24px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- 2. Типографика утилиты ---------- */
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink2); }
.small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--ink2); }
.tnum { font-variant-numeric: tabular-nums; }
.prose { max-width: 72ch; }
.prose p { color: var(--ink2); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul li { color: var(--ink2); }

/* ---------- 3. Сетка ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 940px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); color: #F4F1EA; }
.section--ink h2, .section--ink h3 { color: #fff; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flex { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head > div { max-width: 780px; }
.section-head p { margin: .5em 0 0; color: var(--ink2); }

/* ---------- 4. Кнопки ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: 96px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 16px; font-weight: 650; line-height: 1.2; text-align: center;
  cursor: pointer; transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s, background .16s;
  box-shadow: 0 1px 2px rgba(23,34,43,.06), 0 2px 10px rgba(23,34,43,.09);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(23,34,43,.16); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); box-shadow: none; }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn .ic { width: 20px; height: 20px; flex: 0 0 auto; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent2); }
.link-arrow .ic { width: 18px; height: 18px; transition: transform .16s; }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---------- 5. Иконки ---------- */
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ic-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent2); }
.ic-badge .ic { width: 24px; height: 24px; }

/* ---------- 6. Верхняя полоса и шапка ---------- */
.topbar { background: var(--ink); color: #E9E5DC; font-size: 14px; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: color-mix(in srgb, #fff 70%, var(--gold)); }
.topbar .ic { width: 16px; height: 16px; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; }
.topbar__city { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.09); border-radius: 999px; padding: 4px 12px; border: 0; color: #fff; cursor: pointer; font-size: 14px; }
.topbar__city:hover { background: rgba(255,255,255,.16); }

.header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo-link { display: inline-flex; flex: 0 0 auto; text-decoration: none; color: inherit; }
.logo { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.header__cta { flex: 0 0 auto; white-space: nowrap; }
.logo__mark { width: 44px; height: 44px; flex: 0 0 auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.logo__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { min-width: 0; }
.logo__name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo__sub { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink2); }
.header__nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex-wrap: nowrap; }
.header__nav > a, .navbtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.header__nav > a:hover, .navbtn:hover, .header__nav > a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent2); }
.navbtn .ic { width: 16px; height: 16px; transition: transform .16s; }
.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header__phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.header__phone b { font-size: 16.5px; font-variant-numeric: tabular-nums; }
.header__phone span { font-size: 12px; color: var(--ink2); }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent2); }
.icon-btn__count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.icon-btn__count.is-on { display: inline-flex; }
.burger { display: none; }

/* мега-меню */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(23,34,43,.14); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.mega.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mega__in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 28px; padding: 28px 0 32px; }
.mega__col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink2); margin-bottom: 10px; }
.mega__col a { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; color: var(--ink); }
.mega__col a:hover { color: var(--accent2); }
.mega__col .ic { width: 18px; height: 18px; color: var(--accent); }

/* мобильное меню */
.mmenu { position: fixed; inset: 0; z-index: 100; display: none; }
.mmenu.is-open { display: block; }
.mmenu__backdrop { position: absolute; inset: 0; background: rgba(16,22,28,.5); }
.mmenu__panel { position: absolute; inset: 0 0 0 auto; width: min(420px, 92vw); background: var(--surface); box-shadow: -20px 0 60px rgba(0,0,0,.2); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.mmenu__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.mmenu__body { padding: 12px 20px 32px; }
.mmenu__group { border-bottom: 1px solid var(--line); }
.mmenu__group > a, .mmenu__group > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; font-size: 16px; font-weight: 650; background: none; border: 0; text-align: left; cursor: pointer; }
.mmenu__group .ic { width: 20px; height: 20px; color: var(--accent); }
.mmenu__sub { display: none; padding: 0 0 12px 30px; }
.mmenu__sub a { display: block; padding: 8px 0; font-size: 15px; color: var(--ink2); }
.mmenu__group.is-open .mmenu__sub { display: block; }
.mmenu__cta { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- 7. Hero со слайдером ---------- */
.hero { position: relative; min-height: min(var(--heroH), 78vh); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 8s linear; }
.hero__slide.is-active img { transform: scale(1); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(12,18,24,.88) 0%, rgba(12,18,24,.7) 42%, rgba(12,18,24,.28) 72%, rgba(12,18,24,.45) 100%); }
.hero__in { position: relative; z-index: 2; padding: 56px 0 32px; width: 100%; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 13.5px; font-weight: 650; letter-spacing: .02em; margin-bottom: 18px; }
.hero h1 { color: #fff; max-width: 20ch; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: color-mix(in srgb, var(--gold) 88%, #fff); }
.hero__lead { color: rgba(255,255,255,.86); max-width: 56ch; font-size: clamp(16px,1.5vw,19px); margin-bottom: 26px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero__stats { display: flex; gap: 30px; flex-wrap: wrap; color: #fff; }
.hero__stat b { display: block; font-size: clamp(22px,2.4vw,30px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: 13px; color: rgba(255,255,255,.72); }
.hero__dots { display: flex; gap: 8px; margin-top: 22px; }
.hero__dot { width: 34px; height: 4px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.32); cursor: pointer; transition: background .2s, width .2s; }
.hero__dot.is-active { background: #fff; width: 54px; }
.hero__nav { position: absolute; right: 24px; bottom: 34px; z-index: 3; display: flex; gap: 8px; }
.hero__nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(12,18,24,.35); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .16s; }
.hero__nav button:hover { background: rgba(255,255,255,.22); }

/* ---------- 8. Карточки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, border-color .18s; }
a.card:hover, .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23,34,43,.12); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--ink) 8%, var(--bg)); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a.card:hover .card__media img { transform: scale(1.045); }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0; color: var(--ink); }
.card__text { color: var(--ink2); font-size: 14.5px; line-height: 1.5; margin: 0; }
.card__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mark-list, .check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mark-list li, .check-list li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink2); }
.mark-list li::before, .check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.card--hot { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 8px 26px rgba(23,34,43,.09); }
.card--hot .chip { background: color-mix(in srgb, var(--accent) 16%, transparent); color: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.photo-card__meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.price { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-weight: 600; font-size: 13px; color: var(--ink2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent2); font-size: 12.5px; font-weight: 650; }
.chip--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink2); }
.chip--ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* карточки-сценарии */
.scenario--photo { padding: 0; overflow: hidden; }
.scenario--photo .scenario__media { display: block; margin: 0 0 12px; }
.scenario--photo .scenario__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.scenario--photo .ic-badge, .scenario--photo h2, .scenario--photo p, .scenario--photo .link-arrow { margin-left: 18px; margin-right: 18px; }
.scenario--photo p { margin-bottom: 12px; }
.scenario--photo .link-arrow { margin-bottom: 18px; display: inline-flex; }
.scenario { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .18s, box-shadow .18s, border-color .18s; }
.scenario:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23,34,43,.1); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.scenario__num { position: absolute; top: 18px; right: 22px; font-size: 42px; font-weight: 800; color: color-mix(in srgb, var(--ink) 7%, transparent); line-height: 1; }
.scenario h3 { font-size: 19px; margin: 0; }
.scenario p { margin: 0; color: var(--ink2); font-size: 14.5px; }

/* ---------- 8b. Плитки разделов (каталог, услуги) ---------- */
/* Плитка НЕ обёрнута в ссылку целиком: внутри есть свои ссылки, а вложенный
   <a> в <a> браузер «разрывает» — карточка рассыпается. Кликабельной её делает
   растянутая ссылка заголовка, внутренние ссылки подняты по z-index. */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, border-color .18s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(23,34,43,.12); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tile__media { display: block; position: relative; aspect-ratio: 3 / 2; max-height: 188px; overflow: hidden; background: color-mix(in srgb, var(--ink) 8%, var(--bg)); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .18s ease; }
.tile:hover .tile__media img { transform: scale(1.045); }
.tile__media img.is-swap { opacity: .28; }
.tile__body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; flex: 1 1 auto; }
.tile__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ic-badge--sm { width: 40px; height: 40px; border-radius: 11px; }
.ic-badge--sm .ic { width: 20px; height: 20px; }
.tile__title { font-size: 18.5px; font-weight: 750; line-height: 1.25; margin: 0; color: var(--ink); }
.tile__link { color: inherit; }
.tile__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.tile:hover .tile__title, .tile:hover .tile__link { color: var(--accent2); }
.tile__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14px; color: var(--ink2); }
.tile__list li { position: relative; margin: 0; padding-left: 14px; line-height: 1.45; }
.tile__list li::before { content: ""; position: absolute; left: 0; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.tile__list a { position: relative; z-index: 2; color: var(--ink2); }
.tile__list a:hover { color: var(--accent2); text-decoration: underline; }
.tile__more { margin-top: auto; padding-top: 4px; position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent2); }
.tile__more .ic { width: 18px; height: 18px; transition: transform .16s; }
.tile:hover .tile__more .ic { transform: translateX(3px); }
@media (max-width: 640px) { .tile-grid { grid-template-columns: 1fr; gap: 14px; } }
.cat-search { max-width: 560px; margin-bottom: 26px; }

/* сетка категорий каталога */
.cat-tile { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23,34,43,.1); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cat-tile__body { min-width: 0; }
.cat-tile__media { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--surface-2, #f1f4f8); }
.cat-tile__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 520px) { .cat-tile__media { flex-basis: 60px; width: 60px; height: 60px; } }
.cat-tile h3 { font-size: 16.5px; margin: 0 0 4px; }
.cat-tile span { font-size: 13px; color: var(--ink2); }

/* ---------- 9. Таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
table.price-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
table.price-table th, table.price-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.price-table thead th { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); font-weight: 700; white-space: nowrap; }
table.price-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
table.price-table td.num, table.price-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.price-table tbody tr:last-child td { border-bottom: 0; }
table.price-table .op-link { font-weight: 650; }

/* ---------- 10. Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 14px; font-weight: 650; }
.field .hint { font-size: 12.5px; color: var(--ink2); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; font-family: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 22%, var(--line));
  border-radius: 8px; transition: border-color .16s, box-shadow .16s;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.textarea { min-height: 96px; resize: vertical; }
.input[aria-invalid="true"] { border-color: #B23B2E; }
.err { color: #B23B2E; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink2); line-height: 1.45; margin-bottom: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--accent); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 12px 32px rgba(23,34,43,.07); }
.form-note { font-size: 12.5px; color: var(--ink2); margin-top: 12px; }
.alert { padding: 14px 16px; border-radius: 10px; font-size: 14.5px; margin-bottom: 16px; }
.alert--ok { background: color-mix(in srgb, var(--green) 13%, transparent); color: #2F5A22; border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.alert--err { background: color-mix(in srgb, #B23B2E 11%, transparent); color: #7E2B20; border: 1px solid color-mix(in srgb, #B23B2E 35%, transparent); }

/* ---------- 11. Блоки главной ---------- */
.logos-strip { display: flex; gap: 32px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos-strip div { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); font-weight: 600; }

.steps { counter-reset: st; display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.step { position: relative; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: st; content: "0" counter(st); position: absolute; top: 16px; right: 20px; font-size: 30px; font-weight: 800; color: color-mix(in srgb, var(--accent) 18%, transparent); line-height: 1; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink2); }

.why-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.why { display: flex; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.why h3 { font-size: 16.5px; margin: 0 0 5px; }
.why p { margin: 0; font-size: 14px; color: var(--ink2); }

.calc-teaser { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.calc-teaser__body { padding: 40px; }
.calc-teaser__side { padding: 40px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-left: 1px solid var(--line); }
.calc-mini { display: grid; gap: 12px; }
.calc-mini__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding-bottom: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); }
.calc-mini__row b { font-variant-numeric: tabular-nums; }
.calc-mini__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; font-weight: 700; }

/* зона выезда */
.zone-list { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.zone-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; }
.zone-item:hover { border-color: var(--accent); color: var(--accent2); }
.zone-item span { color: var(--ink2); font-size: 13px; }

/* отзывы */
.reviews-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 4px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share__label { font-size: 13.5px; color: var(--ink2); margin-right: 4px; }
.share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--surface); }
.share__btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--accent2); }
.share__btn .ic { width: 16px; height: 16px; }
@media (max-width: 520px) { .share__label { width: 100%; } }
.review__photo { display: block; margin: -18px -18px 14px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.review__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.review { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.review__head { display: flex; align-items: center; gap: 12px; }
.review__ava { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--bg)); color: var(--accent2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: 0 0 auto; }
.review__name { font-weight: 700; font-size: 15px; }
.review__meta { font-size: 12.5px; color: var(--ink2); }
.review__text { margin: 0; font-size: 14.5px; color: var(--ink2); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .ic { width: 16px; height: 16px; fill: currentColor; stroke: none; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq__item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 18px 20px; text-align: left; font-size: 16px; font-weight: 650; background: none; border: 0; cursor: pointer; }
.faq__q:hover { color: var(--accent2); }
.faq__q .ic { width: 20px; height: 20px; transition: transform .2s; flex: 0 0 auto; color: var(--accent); }
.faq__item.is-open .faq__q .ic { transform: rotate(45deg); }
.faq__a { display: none; padding: 0 20px 18px; color: var(--ink2); font-size: 15px; }
.faq__item.is-open .faq__a { display: block; }

/* CTA */
.cta-band { position: relative; overflow: hidden; border-radius: 20px; background: var(--ink); color: #fff; }
.cta-band__img { position: absolute; inset: 0; }
.cta-band__img img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.cta-band__shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,16,22,.92) 8%, rgba(10,16,22,.62) 55%, rgba(10,16,22,.34) 100%); }
.cta-band__in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; padding: 44px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.84); }
.cta-band .form-card { background: #fff; color: var(--ink); }
.cta-band--plain .cta-band__in { grid-template-columns: 1fr; max-width: 760px; }

/* ---------- 12. Каталог и карточка работы ---------- */
.breadcrumbs { padding: 14px 0; font-size: 13.5px; color: var(--ink2); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.breadcrumbs li + li::before { content: "/"; opacity: .45; }
.breadcrumbs a:hover { color: var(--accent2); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

.page-head { padding: 8px 0 28px; }
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--ink2); max-width: 78ch; margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); }
.filters a.is-active, .filters a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.filters a span { opacity: .7; font-size: 12.5px; }

.work-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; margin-bottom: 32px; }
.work-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.work-media img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.work-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px; }
.work-thumbs--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 0; }
.work-thumb { display: block; position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.work-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .3s; }
.work-thumb:hover img { transform: scale(1.06); }
.work-thumb.is-active { border-color: var(--accent); }
.work-thumb.is-active::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 9px; }
@media (max-width: 520px) { .work-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work-price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 12px 30px rgba(23,34,43,.07); position: sticky; top: 96px; }
.work-price-card .amount { font-size: 32px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.work-price-card .unit { color: var(--ink2); font-size: 14px; }
.work-price-card ul { padding-left: 1.1em; font-size: 14px; color: var(--ink2); margin: 14px 0; }
.work-price-card .btn { margin-bottom: 8px; }

.spec-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.spec-list > div { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt, .spec-list b { color: var(--ink2); font-weight: 600; }
.spec-list dd, .spec-list span { margin: 0; }

/* сравнение и избранное */
.compare-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 55; display: none; align-items: center; gap: 14px; padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 999px; box-shadow: 0 16px 40px rgba(0,0,0,.28); font-size: 14px; }
.compare-bar.is-on { display: flex; }
.compare-bar .btn { min-height: 38px; }

/* ---------- 13. Футер ---------- */
.footer { background: var(--ink); color: #CDD4D8; padding: 56px 0 28px; margin-top: 0; }
.footer a { color: #E7EBEE; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 36px; }
.footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.footer .logo__name { color: #fff; }
.footer .logo__sub { color: #9AA6AE; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: #93A0A9; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.08); }
.footer__social a:hover { background: var(--accent); }
.footer__social img, .footer__social svg { width: 22px; height: 22px; }

/* ---------- 14. Модалки, уведомления ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12,18,24,.55); }
.modal__box { position: relative; width: min(760px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
.city-grid a { padding: 8px 10px; border-radius: 8px; font-size: 14.5px; }
.city-grid a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent2); }
.city-grid a.is-current { background: var(--accent); color: #fff; font-weight: 650; }
.city-letter { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin: 14px 0 6px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: none; gap: 10px; align-items: center; padding: 14px 18px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.25); font-size: 14.5px; }
.toast.is-on { display: flex; animation: toastIn .24s cubic-bezier(.2,.8,.2,1); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 15. Анимации появления ---------- */
/* Скрываем .reveal только когда JS работает (класс .js на <html>): иначе
   при незагрузившемся скрипте страница остаётся с пустыми местами. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }
.counter { font-variant-numeric: tabular-nums; }

/* ---------- 16. Адаптив ---------- */
@media (max-width: 1180px) {
  .header__nav { display: none; }
  .burger { display: inline-flex; }
  .mega { display: none; }
  .grid--4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reviews-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calc-teaser, .cta-band__in, .work-hero { grid-template-columns: 1fr; }
  .calc-teaser__side { border-left: 0; border-top: 1px solid var(--line); }
  .zone-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .header__phone span { display: none; }
  .hero__nav { position: static; display: flex; justify-content: center; margin: 0 auto; padding: 0 0 16px; }
  .work-price-card { position: static; }
  .city-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 44px 0; }
  .section--tight { padding: 28px 0; }
  .grid, .grid--2, .grid--3, .grid--4, .steps, .why-grid, .reviews-grid { grid-template-columns: 1fr; gap: 14px; }
  .section-head { margin-bottom: 22px; }
  .hero__in { padding: 40px 0 26px; }
  .hero__stats { gap: 18px; }
  .hero__stat { min-width: 40%; }
  .hero h1 { max-width: none; }
  .topbar__left .topbar__item:nth-child(n+2) { display: none; }
  .topbar__in { justify-content: space-between; min-height: 38px; }
  .header__in { min-height: 64px; gap: 10px; }
  .header__phone { display: none; }
  .logo__sub { display: none; }
  .logo__name { font-size: 16px; }
  .logo__mark { width: 38px; height: 38px; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band__in { padding: 24px; }
  .calc-teaser__body, .calc-teaser__side { padding: 24px; }
  .zone-list { grid-template-columns: 1fr; }
  .city-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .modal__box { padding: 20px; }
  .footer { padding: 40px 0 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .spec-list > div { grid-template-columns: 1fr; gap: 4px; }
  .compare-bar { left: 12px; right: 12px; transform: none; bottom: 12px; border-radius: 14px; justify-content: space-between; }
  .btn { padding: 0 18px; }
  .work-price-card .amount { font-size: 28px; }
  .page-head { padding-bottom: 20px; }
  .mmenu__panel { width: 100%; }
}
@media (max-width: 420px) {
  .hero__actions .btn { width: 100%; }
  .hero__stat { min-width: 45%; }
  .card__body { padding: 16px; }
  .review { padding: 18px; }
  .form-card { padding: 20px; }
}
/* ---------- 16a-c. Скрытые элементы должны скрываться ---------- */
/* Атрибут [hidden] перебивается любым display из наших правил (карточки,
   сетки, плитки сделаны флексом), поэтому фильтр каталога «не работал»:
   строки оставались на месте. Одно правило закрывает все случаи. */
[hidden] { display: none !important; }

/* ---------- 16b. Тексты: выравнивание по ширине ---------- */
/* Абзацы и списки в контенте выровнены по обоим краям: ровная «колонка»
   читается сплошным полотном, без рваного правого края. Переносы по
   слогам — чтобы в узких колонках не было «дыр» между словами. */
.prose p, .prose li, .prose blockquote,
.page-head p,
.card__text,
.review__text,
.faq__a,
.section-head p,
.step p,
.why p,
.cta-band__in p,
.spec-list > div > span,
.cat-tile__text {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}
/* короткие подписи и однострочные элементы не растягиваем: justify на одной
   строке выглядит как разрядка, а не как выравнивание */
.chip, .btn, .breadcrumbs, .page-head h1, .price, .amount,
.price-table td, .price-table th, .spec-list > div > b,
.card__title, .step h3, .review__name, .review__meta {
    hyphens: manual;
    -webkit-hyphens: manual;
}
/* ---------- 16c. Мобильная шапка: только лого, корзина и меню ---------- */
/* Избранное и сравнение переехали в мобильное меню: в строке остаются
   логотип, корзина и бургер — всё помещается без горизонтального сдвига. */
@media (max-width: 1180px) {
    .header__only-wide { display: none !important; }
    .header__cta { display: none !important; }
    .header__in { gap: 12px; }
    .logo-link { min-width: 0; flex: 1 1 auto; }
    .logo { min-width: 0; }
    .header__actions { flex: 0 0 auto; gap: 8px; }
    .header__in { min-height: 66px; }
}
@media (max-width: 560px) {
    .topbar__right .topbar__item--max { display: none; }
    .header__in { min-height: 58px; gap: 6px; }
    .logo__sub { display: none; }
}
/* На телефоне верхняя полоса убирается целиком: город, «сменить город» и
   телефон переезжают в меню. В шапке остаются лого, корзина и бургер. */
@media (max-width: 720px) {
    .topbar { display: none; }
}
/* ---------- 16d. Галерея кадра ---------- */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery__frame { position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--surface); transition: opacity .18s ease; }
.gallery__img.is-swap { opacity: .25; }
.gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(12, 18, 24, .48);
  color: #fff; backdrop-filter: blur(6px); transition: background .2s, border-color .2s;
}
.gallery__arrow:hover { background: var(--accent); border-color: var(--accent); }
.gallery__arrow .ic { width: 22px; height: 22px; }
.gallery__arrow--prev { left: 10px; }
.gallery__arrow--next { right: 10px; }
.gallery__count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  padding: 4px 11px; border-radius: 999px; background: rgba(12, 18, 24, .58);
  color: #fff; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.gallery--lead { margin-bottom: 22px; }
/* ---------- 16e. Размер кадра: фотография не должна занимать экран ---------- */
/* Раньше крупный кадр растягивался на всю ширину контейнера (до 1232 px) и
   зрительно «съедал» шаблон. Теперь высота кадра ограничена, лишнее
   кадрируется object-fit: cover; обложка раздела — по центру и уже. */
.gallery__img, .work-media img { aspect-ratio: 3 / 2; max-height: 420px; }
.gallery--lead { max-width: 900px; margin-left: auto; margin-right: auto; }
.gallery--lead .gallery__img { max-height: 400px; }
.card__media { aspect-ratio: 3 / 2; max-height: 260px; }
.scenario--photo .scenario__media img { aspect-ratio: 3 / 2; max-height: 240px; }
.review__photo img { aspect-ratio: 3 / 2; max-height: 220px; }
@media (max-width: 720px) {
  .gallery__img, .work-media img { max-height: 260px; }
  .gallery--lead .gallery__img { max-height: 240px; }
  .card__media { max-height: 210px; }
  .scenario--photo .scenario__media img { max-height: 200px; }
}
.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.gallery__thumbs--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery__thumb { position: relative; padding: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.gallery__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .3s; }
.gallery__thumb:hover img { transform: scale(1.06); }
.gallery__thumb.is-active { border-color: var(--accent); }
.gallery__thumb.is-active::after {
  content: ""; position: absolute; inset: 0; border-radius: 9px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent);
}
/* плавная подмена кадра в карточках: обложка листается по наведению */
.card__media img, .cat-tile__media img, .review__photo img { transition: opacity .18s ease; }
.card__media img.is-swap, .cat-tile__media img.is-swap, .review__photo img.is-swap { opacity: .28; }
@media (max-width: 520px) { .gallery__thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .gallery__img, .card__media img, .cat-tile__media img { transition: none; }
}
/* ---------- 17. Мобильная жёсткость: без горизонтального сдвига ---------- */
:where(html, body) { max-width: 100%; }
.container {
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
/* никакого горизонтального скролла и «уезжающих» блоков */
body > *, .section, .container, .grid, .card, .footer__grid { max-width: 100%; }
.table-wrap { max-width: 100%; }
/* sticky-шапка не должна перекрывать якоря */
[id] { scroll-margin-top: 96px; }
/* тап-таргеты */
.btn, .icon-btn, .navbtn, .chip { min-height: 44px; }
.icon-btn { flex: 0 0 auto; }
/* поля ввода: >=16px, иначе iOS зумит страницу */
@media (max-width: 720px) {
  .input, .select, .textarea { font-size: 16px; }
  .header__in { flex-wrap: nowrap; gap: 8px; }
  .header__actions { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .btn { min-height: 44px; }
  .hero__stats { flex-wrap: wrap; }
  .card__media { max-height: 240px; }
  .compare-bar { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; gap: 8px; }
  .compare-bar .btn { padding: 0 12px; font-size: 14px; }
  .breadcrumbs { text-align: center; }
  .breadcrumbs ol { justify-content: center; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer__bottom { flex-direction: column; gap: 10px; text-align: center; }
  h1 { font-size: clamp(26px, 7vw, 38px); }
  h2 { font-size: clamp(21px, 5.4vw, 30px); }
}
@media (max-width: 980px) {
  .header__cta { min-width: 0; padding: 0 14px; font-size: 14px; }
  .header__in { flex-wrap: nowrap; }
}
@media (max-width: 420px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .header__in { min-height: 58px; gap: 6px; }
  .header__cta { min-width: 0; padding: 0 12px; font-size: 13.5px; }
  .price { white-space: normal; }
  .hero__stats { gap: 12px; }
  .logo__name { font-size: 15px; }
  .icon-btn { width: 38px; height: 38px; }
  .btn { padding: 0 14px; font-size: 15px; }
  .chip { font-size: 12.5px; padding: 4px 10px; }
  .price { font-size: 17px; }
}

@media print {
  .topbar, .header, .footer, .hero__nav, .compare-bar, .toast, .mmenu, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 12px 0; }
  a { text-decoration: underline; }
}
