/* ==========================================================================
   ООО СК «Патер-Строй» — skpater.ru
   Единая таблица стилей. Без внешних зависимостей (PageSpeed).
   ========================================================================== */

/* -------------------------------------------------- 0. Шрифт
   Inter (SIL Open Font License 1.1), размещён на нашем сервере:
   никаких обращений к сторонним CDN — быстрее и без утечки IP посетителей. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* -------------------------------------------------- 1. Токены */
:root {
  /* Палитра: тёплый камень + латунь. Основана на фирменном #716351 */
  --ink: #1F1B17;
  --ink-2: #3D362F;
  --body: #57534E;
  --muted: #6F675F;      /* контраст 5,2:1 к фону — читаемо по WCAG AA */

  --brand: #6E5F4E;
  --brand-dark: #443B31;
  --brand-soft: #EFE9E0;

  --accent: #B07C33;      /* декоративный: иконки, звёзды, полоски */
  --accent-dark: #8A5F26; /* текст и кнопки: 5,3:1 к фону, 5,6:1 с белым */
  --accent-deep: #6F4A1D; /* наведение */
  --accent-soft: #F7EEDF;

  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-2: #F3EFE9;
  --dark: #26211C;
  --line: #E6DFD5;

  --ok: #2E7D52;
  --err: #B3261E;

  /* Типографика */
  --font: "Inter", "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Сетка */
  --wrap: 1200px;
  --wrap-narrow: 800px;
  --gap: 24px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(31, 27, 23, .06), 0 2px 8px rgba(31, 27, 23, .05);
  --shadow: 0 4px 12px rgba(31, 27, 23, .07), 0 16px 40px rgba(31, 27, 23, .07);
  --shadow-lg: 0 8px 24px rgba(31, 27, 23, .10), 0 32px 64px rgba(31, 27, 23, .12);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);  /* мягкое торможение для появлений */
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  /* Подсветка нажатия в цвете бренда вместо серого прямоугольника по умолчанию */
  -webkit-tap-highlight-color: rgba(138, 95, 38, .14);
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 25px); letter-spacing: -.01em; }
h4 { font-size: 19px; letter-spacing: -.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-dark); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-deep); }

img { max-width: 100%; height: auto; display: block; }
/* <picture> не должен создавать собственный бокс — раскладкой управляет вложенный <img> */
picture { display: contents; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }

strong { color: var(--ink-2); font-weight: 650; }

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------- 3. Раскладка */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* Отступы учитывают безопасную зону: на телефонах с вырезом в альбомной
     ориентации текст не уезжает под скруглённый угол экрана */
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
@media (max-width: 360px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--surface { background: var(--surface); }
.section--soft { background: var(--surface-2); }
.section--dark { background: var(--dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark { color: #D6CEC4; }
.section--dark a { color: #E7C489; }
/* Выделенный текст на тёмном фоне должен быть светлее обычного, а не темнее */
.section--dark strong, .cta-banner strong, .footer strong { color: #FFF7EC; }
.section--dark em, .cta-banner em { color: #E3D9CD; }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 56px); }
/* Черта под заголовком дорисовывается, когда блок появляется в кадре */
.section-head h2::after {
  content: "";
  display: block;
  width: 60px; height: 3px;
  margin: 18px 0 20px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .7s .12s var(--ease-out);
}
.section-head.is-in h2::after { transform: none; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center h2::after { margin-inline: auto; transform-origin: center; }
.section-head p { font-size: 18px; color: var(--body); margin-bottom: 0; }
.section--dark .section-head p { color: #C4BAAE; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.section--dark .eyebrow { color: #E0B372; }
.section--dark .eyebrow::before { background: #E0B372; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  /* Компактные карточки остаются в две колонки: короткий текст читается,
     а страница на телефоне становится вдвое короче */
  /* От 481 до 620 px карточки с фотографией ещё помещаются в две колонки */
  .grid--compact { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid--compact .mini__media { aspect-ratio: 16 / 10; }
  .grid--compact .mini__body { padding: 0 15px 18px; }
  .grid--compact .mini h3 { font-size: 16.5px; }
  .grid--compact .mini p { font-size: 13.5px; }
  .grid--compact .mini__more { padding-top: 12px; font-size: 13.5px; }
  .grid--compact .mini__body .ico { width: 40px; height: 40px; margin: -20px 0 10px; border-radius: 11px; }
  .grid--compact .ico svg { width: 20px; height: 20px; }
}

/* На телефоне до 480 px две колонки с фотографией сжимают карточку до 130 px:
   текст рвётся на слоги, снимок превращается в полоску. Ставим одну колонку —
   благодаря вкладкам в разделе всё равно видно не больше трёх карточек. */
@media (max-width: 480px) {
  .grid--compact { grid-template-columns: 1fr; gap: 12px; }
  .grid--compact .mini__media { aspect-ratio: 2 / 1; }
  .grid--compact .mini__body { padding: 0 20px 20px; }
  .grid--compact .mini h3 { font-size: 19px; }
  .grid--compact .mini p { font-size: 15px; }
  .grid--compact .mini__more { font-size: 15px; }
  .grid--compact .mini__body .ico { width: 46px; height: 46px; margin: -23px 0 12px; border-radius: 13px; }
  .grid--compact .ico svg { width: 23px; height: 23px; }
}

/* -------------------------------------------------- 4. Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
    background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  position: relative;
  overflow: hidden;
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 6px 18px rgba(138, 95, 38, .28);
}
.btn--primary:hover {
  background: var(--accent-deep);
  color: #fff;
  box-shadow: 0 12px 28px rgba(138, 95, 38, .36);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); }
/* Блик, пробегающий по кнопке при наведении */
.btn--primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
  pointer-events: none;
}
.btn--primary:hover::before { transform: translateX(120%); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--brand); color: var(--ink); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent-soft); color: var(--ink); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }

.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------------------------------------- 5. Шапка */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
}
/* Матовое стекло вынесено на псевдоэлемент, а не задано самой шапке.
   Причина: backdrop-filter (как и filter/transform) делает элемент точкой
   отсчёта для потомков с position: fixed. Пока фильтр висел на .header,
   выпадающее меню отсчитывалось от шапки и сжималось до её высоты —
   на телефоне вместо полноэкранной шторки был обрезок в 44 px. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 248, 245, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.header.is-stuck::before { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(31,27,23,.05); }

.header__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}
/* Высоту шапки при прокрутке НЕ меняем.
   Шапка липкая и занимает место в потоке: изменение её высоты сдвигает всё
   содержимое ниже. У самого верха страницы, где прокрутка пружинит, класс
   is-stuck переключался туда-сюда и страница дёргалась на 14 px.
   При прокрутке теперь меняется только тень — она на раскладку не влияет. */


.brand { display: inline-flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; border-radius: 10px; }
/* Фирменный знак из логотипа заказчика. Квадратный — пропорции 1:1,
   иначе крепость сплющивается. Цвета заданы внутри самого знака. */
.brand__mark { width: 42px; height: 42px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.brand__name { display: block; font-size: 17.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; line-height: 1.15; }
.brand__tag { display: block; margin-top: 1px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  position: relative;
  display: block;
  padding: 10px 14px;
  color: var(--ink-2);
  font-size: 15.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: color .22s var(--ease);
}
/* Одна подсказка вместо двух: подчёркивание вместо фоновой «таблетки» */
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 3px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: none; }
.nav__link[aria-current="page"] { color: var(--accent-dark); }
.nav__link[aria-current="page"]::after { transform: none; }

.header__cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header__phone {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.header__phone:hover { color: var(--accent-dark); }

.burger {
  display: none;
  width: 46px; height: 46px;
  flex-shrink: 0;   /* на 320px кнопку сжимало до 34px — попасть пальцем сложно */
  align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.burger span { position: relative; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s var(--ease); }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  .header__phone { display: none; }
}
@media (max-width: 980px) {
  .burger { display: inline-flex; margin-left: auto; }
  .header__cta .btn { display: none; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    margin: 0;
    background: var(--bg);
    padding: 20px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;  /* прокрутка шторки не «пробивает» на страницу */
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 14px 4px; font-size: 20px; font-weight: 650; }
  .nav__link::after { left: 4px; right: auto; width: 26px; bottom: 8px; }
  .nav__drawer { display: block; }
}

/* Мобильная шторка: полное меню сайта.
   Условие именно min-width, а не просто «display:none»: этот блок стоит в файле
   ПОСЛЕ медиазапроса выше, и обычное правило перебивало бы его на всех ширинах —
   шторка не раскрывалась бы вообще. Взаимоисключающие условия убирают
   зависимость от порядка строк. */
@media (min-width: 981px) {
  .nav__drawer { display: none; }
}

.nav__group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.nav__title {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted);
}
.nav__links { list-style: none; margin: 0; padding: 0; }
.nav__links li { margin: 0; }
.nav__links a {
  display: block;
  padding: 12px 4px;
  font-size: 17px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.nav__links li:last-child a { border-bottom: 0; }
.nav__links a:hover { color: var(--accent-dark); }
.nav__links a[aria-current="page"] { color: var(--accent-dark); font-weight: 650; }

.nav__group--contact { text-align: left; }
.nav__phone {
  display: block;
  margin-bottom: 6px;
  font-size: 26px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.nav__phone:hover { color: var(--accent-dark); }
.nav__note { margin: 0 0 16px; font-size: 14.5px; color: var(--muted); }

.nav__social { display: flex; gap: 10px; margin-top: 16px; }
/* На узком экране четыре кнопки в один ряд получаются разной ширины
   («ВКонтакте» длиннее остальных) — раскладываем в две строки по две. */
@media (max-width: 380px) {
  .nav__social { display: grid; grid-template-columns: 1fr 1fr; }
}
.nav__social a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav__social a:hover { border-color: var(--accent); color: var(--accent-dark); }
.nav__social svg { width: 22px; height: 22px; }

.nav__legal {
  list-style: none;
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}
.nav__legal li { margin-bottom: 4px; }
.nav__legal a { font-size: 13.5px; color: var(--muted); }
.nav__legal a:hover { color: var(--ink-2); }

/* -------------------------------------------------- 6. Hero */
.hero { position: relative; padding: clamp(40px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero__lead { font-size: clamp(17px, 1.8vw, 20px); max-width: 34em; margin-bottom: 28px; }
.hero__note { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

.hero__media { position: relative; }
.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.hero__badge {
  position: absolute;
  left: -22px; bottom: -22px;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  max-width: 280px;
}
.hero__badge b { display: block; font-size: 26px; color: var(--ink); line-height: 1; }
.hero__badge span { font-size: 13.5px; color: var(--muted); line-height: 1.3; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero__badge { left: 12px; bottom: -18px; }
}

/* -------------------------------------------------- 7. Карточки */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D8CFC2; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 16px; }
.card__foot { margin-top: auto; padding-top: 18px; }

.ico {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 52px; height: 52px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 14px;
  flex-shrink: 0;
  transition: transform .4s var(--ease-out), background-color .3s var(--ease), color .3s var(--ease);
}
.ico svg { width: 26px; height: 26px; }
.card--hover:hover .ico, .mini:hover .ico {
  transform: translateY(-4px) rotate(-6deg);
  background: var(--accent-dark);
  color: #fff;
}

/* Карточка услуги на главной: фотография, значок на её краю, название и строка описания */
.mini {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  color: var(--body);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease);
}
.mini:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #D8CFC2; color: var(--body); }

.mini__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.mini__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.mini:hover .mini__media img { transform: scale(1.05); }

.mini__body { display: flex; flex-direction: column; flex: 1; padding: 0 24px 24px; }
/* Значок «наезжает» на нижний край фотографии и связывает её с текстом */
.mini__body .ico {
  position: relative;
  margin: -26px 0 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.mini h3 { font-size: 20px; margin-bottom: 8px; }
.mini p { font-size: 15.5px; margin: 0; }
.mini__more {
  margin-top: auto;
  padding-top: 18px;
  font-size: 15px; font-weight: 600;
  color: var(--accent-dark);
}
.mini__more::after {
  content: "→";
  display: inline-block;
  margin-left: 7px;
  transition: transform .3s var(--ease-out);
}
.mini:hover .mini__more::after { transform: translateX(5px); }

/* Услуги */
.service {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.service:hover .service__media img { transform: scale(1.05); }
.service__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.service__body h3 { font-size: 21px; }
.service__body p { font-size: 15.5px; margin-bottom: 16px; }
.service__meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.service__meta b { color: var(--ink); font-size: 17px; }

/* -------------------------------------------------- Вкладки */
.tabs__bar {
  position: relative;
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs__bar::-webkit-scrollbar { display: none; }

/* Бегунок, который переезжает под активную вкладку */
.tabs__ink {
  position: absolute;
  top: 5px; left: 0;
  height: calc(100% - 10px);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), width .35s var(--ease-out);
  pointer-events: none;
}
.tabs__btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
  cursor: pointer;
  transition: color .25s var(--ease);
}
.tabs__btn:hover { color: var(--ink); }
.tabs__btn[aria-selected="true"] { color: var(--ink); }

.tabs__panel[hidden] { display: none; }

/* Подсветка карточки, на которую привела ссылка-якорь */
.is-target {
  animation: targetPulse 1.6s var(--ease-out);
  border-color: var(--accent) !important;
}
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176, 124, 51, 0); }
  25% { box-shadow: 0 0 0 6px rgba(176, 124, 51, .22); }
}
.js .tabs__panel:not([hidden]) { animation: tabIn .4s var(--ease-out) both; }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Внутри тёмной секции вкладки светлые */
.section--dark .tabs__bar { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.section--dark .tabs__ink { background: rgba(255, 255, 255, .16); }
.section--dark .tabs__btn { color: #C4BAAE; }
.section--dark .tabs__btn[aria-selected="true"], .section--dark .tabs__btn:hover { color: #fff; }

@media (max-width: 620px) {
  .tabs__bar { margin-inline: -4px; }
  .tabs__btn { padding: 11px 16px; font-size: 14.5px; }
}

/* -------------------------------------------------- Быстрый выбор под первым экраном */
.picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: clamp(32px, 4vw, 52px);
}
.pick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.25;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease);
}
.pick:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D8CFC2; color: var(--ink); }
.pick .ico { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.pick .ico svg { width: 22px; height: 22px; }
/* Селекторы точные: общий «.pick span» красил и обёртку, и её содержимое —
   из-за этого название входа наследовало приглушённый цвет подписи. */
.pick b { display: block; font-size: 16.5px; color: var(--ink); }
.pick b + span { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 980px) { .picks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) {
  .picks { grid-template-columns: 1fr; gap: 10px; }
  .pick { padding: 14px 16px; }
}

/* Проекты / галерея */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font: inherit; font-size: 15px; font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
  transition: .18s var(--ease);
}
.filter:hover { border-color: var(--brand); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
/* На телефоне галерея остаётся в две колонки — это превью, полный размер
   открывается по нажатию. Длинную подпись убираем, оставляем название. */
@media (max-width: 560px) {
  .tiles { gap: 12px; }
  .tile__cap { padding: 30px 12px 12px; }
  .tile__cap b { font-size: 14.5px; }
  .tile__cap span { display: none; }
}

.tile {
  position: relative;
  display: block;
  border: 0; padding: 0;
  background: var(--surface-2);
  border-radius: var(--r);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
}
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile__cap {
  position: absolute; inset: auto 0 0 0;
  padding: 44px 20px 18px;
  background: linear-gradient(to top, rgba(20,16,13,.88), rgba(20,16,13,0));
  color: #fff;
  transform: translateY(8px);
  transition: transform .4s var(--ease-out);
}
.tile:hover .tile__cap, .tile:focus-visible .tile__cap { transform: none; }
.tile__cap b { display: block; font-size: 18px; font-weight: 650; }
.tile__cap span { font-size: 14px; color: rgba(255,255,255,.82); }
.tile.is-hidden { display: none; }

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(15, 12, 10, .92);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: #EDE7DF; font-size: 15px; padding-inline: 60px; }
.lightbox__btn {
  position: absolute;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12);
  border: 0; border-radius: 50%;
  color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer;
  transition: background .18s var(--ease);
}
.lightbox__btn:hover { background: rgba(255,255,255,.24); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 620px) {
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

/* -------------------------------------------------- 8. Этапы */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 22px; border-top: 2px solid var(--line); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent-dark);
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { font-size: 15.5px; margin: 0; }
.section--dark .step { border-top-color: rgba(255,255,255,.16); }
.section--dark .step p { color: #BFB5A9; }

/* -------------------------------------------------- 9. Разделённый блок (текст + фото) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.facts div b { display: block; font-size: 28px; color: var(--ink); letter-spacing: -.02em; }
.facts div span { font-size: 14.5px; color: var(--muted); }
.section--dark .facts div b { color: #fff; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B07C33' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.section--dark .checklist li::before { background-color: rgba(224,179,114,.18); }

/* -------------------------------------------------- 10. Отзывы */
.review { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.stars { display: flex; gap: 3px; margin-bottom: 14px; color: var(--accent); }
.stars svg { width: 18px; height: 18px; fill: currentColor; }
.review__text { font-size: 16.5px; color: var(--ink-2); margin-bottom: 18px; }
.review__meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); }
.review__meta b { color: var(--ink); font-size: 16px; }

.rating-box { display: flex; align-items: center; gap: 18px; padding: 22px 26px; background: var(--accent-soft); border-radius: var(--r); }
.rating-box__num { font-size: 42px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.03em; }

/* -------------------------------------------------- Отзывы: оценка + карусель */
.reviews { display: grid; grid-template-columns: minmax(260px, .8fr) 1.6fr; gap: clamp(24px, 3vw, 48px); align-items: start; }
@media (max-width: 900px) { .reviews { grid-template-columns: 1fr; } }

.reviews__aside .rating-box { margin-bottom: 20px; }
.reviews__aside p { font-size: 15.5px; }

/* Карточка-цитата */
.quote {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  margin: 0;
  padding: clamp(26px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.quote__mark {
  position: absolute;
  top: 10px; right: 26px;
  font-size: 110px; line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent-soft);
  pointer-events: none;
  user-select: none;
}
.quote .stars { margin-bottom: 18px; }
.quote blockquote {
  position: relative;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
}
.quote figcaption {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
/* Слайд-пометка: не письменный отзыв, а оценка с площадки.
   Оформляем сдержаннее, чтобы визуально не выдавать её за отзыв клиента. */
.quote--note { background: var(--surface-2); }
.quote--note .quote__mark { display: none; }
.quote--note blockquote { font-size: clamp(16px, 1.7vw, 18px); color: var(--body); }

.quote figcaption b { font-size: 17px; color: var(--ink); }
.quote figcaption span { font-size: 14.5px; color: var(--muted); }

/* -------------------------------------------------- Наши люди */
.team .carousel__slide { flex: 0 0 100%; padding-right: 16px; }
@media (min-width: 620px)  { .team .carousel__slide { flex-basis: 50%; } }
@media (min-width: 900px)  { .team .carousel__slide { flex-basis: 33.333%; } }
@media (min-width: 1200px) { .team .carousel__slide { flex-basis: 25%; } }

.person {
  position: relative;
  height: 100%;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
  isolation: isolate;
}
.person__photo { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* Подпись поверх нижней части снимка: фотографии разные по свету,
   и общая тёмная подложка приводит их к одному виду. */
.person__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 46px 18px 16px;
  background: linear-gradient(to top, rgba(18, 14, 11, .92) 32%, rgba(18, 14, 11, .55) 66%, rgba(18, 14, 11, 0));
  color: #fff;
  transition: opacity .3s var(--ease-out);
}
.person__name { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.person__role { display: block; margin-top: 3px; font-size: 13.5px; color: #E0D6C8; }

/* Дополнительные сведения: по наведению мышью, по касанию — по нажатию */
.person__more {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 18px;
  background: linear-gradient(to top, rgba(16, 12, 9, .96), rgba(16, 12, 9, .88));
  color: #EFE7DD;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-out), visibility .3s;
  overflow-y: auto;
}
.person__more b { display: block; font-size: 16.5px; color: #fff; line-height: 1.25; }
.person__more .person__role { color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.person__more ul { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.45; }
.person__more li { position: relative; margin-bottom: 8px; padding-left: 16px; }
.person__more li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.person__hint { margin-top: auto; font-size: 12.5px; color: #9E958A; }

.person.is-open .person__more { opacity: 1; visibility: visible; }
.person.is-open .person__caption { opacity: 0; }
@media (hover: hover) {
  .person:hover .person__more { opacity: 1; visibility: visible; }
  .person:hover .person__caption { opacity: 0; }
}

/* Кнопка поверх карточки: даёт нажатие пальцем и работу с клавиатуры */
.person__toggle {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  padding: 0; border: 0; background: transparent;
  cursor: pointer;
}
.person__toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* -------------------------------------------------- Карусель */
/* min-width: 0 обязателен. Элемент сетки по умолчанию не даёт себя сузить
   меньше содержимого (min-width: auto), а содержимое здесь — лента из
   нескольких слайдов шириной в несколько экранов. Без этого страница
   растягивалась по горизонтали, как только отзывов становилось больше одного. */
.carousel { position: relative; min-width: 0; }
.carousel__viewport { overflow: hidden; border-radius: var(--r-lg); min-width: 0; }
.carousel__track {
  display: flex;
  margin: 0; padding: 0;
  list-style: none;
  transition: transform .55s var(--ease-out);
  touch-action: pan-y;              /* вертикальную прокрутку страницы не перехватываем */
}
.carousel__track.is-dragging { transition: none; cursor: grabbing; }
.carousel__slide { flex: 0 0 100%; min-width: 0; margin: 0; }
.carousel__slide[aria-hidden="true"] { visibility: hidden; }   /* скрытые слайды не ловят фокус */

/* Стрелки стоят по бокам от карточек и по центру их высоты — рука тянется
   к ним прямо от снимка. Внизу остаются только точки, по центру.
   Побочная польза: у нижнего края блока больше нет кнопки, которая
   попадала под плавающие кнопки связи в правом нижнем углу. */
.carousel__stage {
  position: relative;
  display: flex; align-items: center; gap: 14px;
}
.carousel__stage > .carousel__viewport { flex: 1 1 auto; }

.carousel__nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 20px;
}
.carousel__btn {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease-out);
}
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.carousel__btn:active { transform: scale(.94); }

.carousel__dots { display: flex; align-items: center; gap: 8px; }
.carousel__dot {
  width: 9px; height: 9px;
  padding: 0;
  border: 0; border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: width .3s var(--ease-out), background .3s var(--ease);
}
.carousel__dot[aria-selected="true"] { width: 26px; border-radius: var(--r-pill); background: var(--accent-dark); }

/* Индикатор автопрокрутки — видно, что слайд сменится сам */
.carousel__timer { flex-shrink: 0; width: 36px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.carousel__timer i { display: block; height: 100%; width: 0; background: var(--accent); }
.carousel.is-playing .carousel__timer i { animation: timerFill linear forwards; }
@keyframes timerFill { from { width: 0; } to { width: 100%; } }

.carousel__nav[hidden] { display: none; }
.carousel__btn[hidden] { display: none; }

/* На узком экране стрелки по бокам съели бы треть ширины снимка, поэтому
   там они ложатся поверх краёв карточки — на полупрозрачной подложке,
   чтобы читались на любой фотографии. */
@media (max-width: 760px) {
  .carousel__stage { gap: 0; }
  .carousel__btn {
    position: absolute; top: 50%; z-index: 3;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    background: rgba(255, 253, 250, .9);
    border-color: rgba(31, 27, 23, .1);
    box-shadow: 0 4px 14px rgba(31, 27, 23, .16);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .carousel__btn--prev { left: 8px; }
  .carousel__btn--next { right: 8px; }
  /* Без переопределения нажатие сбросило бы вертикальное центрирование */
  .carousel__btn:active { transform: translateY(-50%) scale(.94); }
  .carousel__nav { gap: 10px; margin-top: 16px; }
}

/* -------------------------------------------------- 11. FAQ */
.faq { max-width: 860px; }
.faq details {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.faq details[open] summary { color: var(--accent-dark); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 22px 52px 22px 0;
  font-size: clamp(17px, 2vw, 19.5px);
  font-weight: 650;
  color: var(--ink);
  transition: color .18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 8px; top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1B17' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq__answer { padding: 0 52px 24px 0; font-size: 16.5px; }

/* -------------------------------------------------- 12. Формы */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--err); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { min-height: 118px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(176,124,51,.14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.field__error { display: none; margin-top: 6px; font-size: 13.5px; color: var(--err); }
.field.has-error .field__error { display: block; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.consent.has-error { color: var(--err); }

.form-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

.form-status { display: none; margin-top: 16px; padding: 14px 18px; border-radius: var(--r-sm); font-size: 15.5px; }
.form-status.is-ok { display: block; background: #E8F4ED; color: var(--ok); }
.form-status.is-err { display: block; background: #FBE9E7; color: var(--err); }

.hp { position: absolute !important; left: -9999px; opacity: 0; height: 0; }

/* -------------------------------------------------- 13. Контакты */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: 0 0 28px; padding: 0; }
.contact-list li { display: flex; gap: 16px; margin-bottom: 20px; }
.contact-list .ico { width: 46px; height: 46px; margin: 0; border-radius: 12px; }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.contact-list a, .contact-list span { font-size: 18px; color: var(--ink); font-weight: 600; }
.contact-list a:hover { color: var(--accent-dark); }

/* Карта с карточкой офиса поверх — как на крупных сайтах */
.mapbox { position: relative; }

.map-embed {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.mapbox--tall .map-embed { aspect-ratio: 21 / 9; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.map-embed__stub {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  border: 0; font: inherit; color: var(--body); width: 100%;
}
.map-embed__stub strong { font-size: 18px; color: var(--ink); }
.map-embed__stub > span:last-child { font-size: 14.5px; color: var(--muted); }

/* Условная «сетка кварталов» — заглушка читается как карта, а не как пустой блок */
.map-embed__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  opacity: .55;
  pointer-events: none;
}
.map-embed__pin {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(138, 95, 38, .35);
}
.map-embed__pin svg { width: 26px; height: 26px; }
/* Пульсация вокруг метки — взгляд сразу цепляется за точку на карте */
.js .map-embed__pin::after {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pinPulse 2.6s var(--ease-out) infinite;
}
@keyframes pinPulse {
  0% { transform: scale(.75); opacity: .7; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}

/* Карточка стоит ПОД картой, а не поверх неё.
   Раньше она лежала в левом нижнем углу карты и закрывала обзор: на телефоне
   почти целиком, на большом экране — весь левый край с домами и подъездом.
   Карта нужна, чтобы понять, как доехать, а закрытая карта этой задачи
   не решает. Вместе они читаются как один блок: общая ширина и общие
   скруглённые углы. */
.mapbox__card {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r) var(--r);
}
.map-embed { border-radius: var(--r) var(--r) 0 0; }

.mapbox__title { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.mapbox__list { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14.5px; }
.mapbox__list li { margin-bottom: 6px; }
.mapbox__list a { font-weight: 650; color: var(--ink); }
.mapbox__list a:hover { color: var(--accent-dark); }
.mapbox__card .btn-row { gap: 8px; margin: 0; }

/* На широком экране адрес и кнопки встают в строку: полоса под картой
   выходит невысокой и не отодвигает остальную страницу вниз. */
@media (min-width: 721px) {
  .mapbox__card {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    padding: 18px 24px;
  }
  .mapbox__card > div:first-child { flex: 1 1 320px; min-width: 0; }
  .mapbox__title { margin-bottom: 6px; }
  .mapbox__list { margin-bottom: 0; }
  .mapbox__card .btn-row { flex-shrink: 0; }
}

@media (max-width: 720px) {
  .mapbox__card .btn { flex: 1 1 auto; }
  .map-embed { aspect-ratio: 4 / 3; }
  .mapbox--tall .map-embed { aspect-ratio: 4 / 3; }
}

/* -------------------------------------------------- 14. CTA-баннер */
.cta-banner {
  position: relative;
  border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 64px);
  background: linear-gradient(135deg, #332C25 0%, #4A3F33 100%);
  color: #DED5C9;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(176,124,51,.35), transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; max-width: 18em; }
.cta-banner p { max-width: 44em; font-size: 18px; }
.cta-banner .btn-row { margin-top: 28px; position: relative; z-index: 1; }

/* Способы написать: строка «Написать: Telegram · MAX · ВКонтакте · Почта».
   Не кнопки — иначе ряд из шести кнопок читается как список задач, а не
   как выбор удобного канала. */
.ways {
  position: relative; z-index: 1;
  margin-top: 20px;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px 6px;
}
/* По умолчанию — вид для светлого фона. */
.ways__label { font-size: 15px; color: var(--muted); margin-right: 4px; }
.way {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px; font-weight: 600;
  text-decoration: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.way__ico { display: inline-flex; width: 17px; height: 17px; }
.way__ico svg { width: 100%; height: 100%; }
.way:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

/* На тёмном баннере — светлые ссылки. Правило привязано к самому баннеру,
   а не к «секции без модификатора --dark»: баннер лежит внутри обычной
   секции, и такая проверка красила бы текст в тёмный на тёмном. */
.cta-banner .ways__label { color: #B5A997; }
.cta-banner .way { border-color: rgba(255, 247, 236, .22); color: #F1E7DA; }
.cta-banner .way:hover { border-color: rgba(255, 247, 236, .5); background: rgba(255, 247, 236, .08); color: #fff; }

/* -------------------------------------------------- 15. Подвал */
.footer { background: var(--dark); color: #ADA298; padding: clamp(48px, 6vw, 72px) 0 32px; }
.footer a { color: #CFC5B9; }
.footer a:hover { color: #E7C489; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; font-size: 15.5px; }
.footer .brand__name { color: #fff; }
.footer .brand__tag { color: #9A9088; }
.footer__about { font-size: 15px; margin-top: 16px; max-width: 34em; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13.5px; color: #9A9088;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }

.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #E4DACE;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.socials a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }

/* -------------------------------------------------- 16. Плавающие кнопки */
.quick {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 55;
  display: flex; flex-direction: column; gap: 10px;
}
.quick a, .quick button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  border: 0; border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.quick svg { width: 24px; height: 24px; }
.quick a:hover, .quick button:hover { transform: translateY(-3px); }
.quick .quick--tg { background: #229ED9; color: #fff; }
.quick .quick--call { background: var(--accent); color: #fff; }
@media (max-width: 560px) { .quick { right: 12px; bottom: 12px; } .quick a, .quick button { width: 50px; height: 50px; } }

/* -------------------------------------------------- 17. Модальное окно */
.modal {
  position: fixed; inset: 0; z-index: 130;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(20, 16, 13, .6);
  backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }
.modal__box {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 92vh; overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-lg);
  animation: pop .22s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 0; border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--ink-2);
  cursor: pointer;
}
.modal__close:hover { background: var(--brand-soft); }

/* -------------------------------------------------- 18. Хлебные крошки / страницы */
.crumbs { padding: 18px 0 0; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }

.page-head { padding: clamp(28px, 4vw, 48px) 0 clamp(24px, 3vw, 36px); }
.page-head h1 { max-width: 18em; }
.page-head p { max-width: 46em; font-size: 18.5px; }

.prose { max-width: var(--wrap-narrow); }
.prose h2 { margin-top: 1.8em; font-size: clamp(24px, 3vw, 30px); }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 650; background: var(--surface-2); }

/* Cookie-баннер */
.cookie {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  display: none;
  gap: 18px; align-items: center; flex-wrap: wrap;
  max-width: 760px;
  margin-inline: auto;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: 14.5px;
}
.cookie.is-open { display: flex; }
.cookie p { flex: 1 1 320px; margin: 0; }

/* -------------------------------------------------- 19. Движение
   Анимируем только opacity и transform — это не вызывает пересчёт раскладки
   и не роняет плавность даже на слабых телефонах. */

/* Появление блоков при прокрутке.
   Прячем их только если JS работает (класс .js ставится в <head>) — иначе при
   отключённом или сломавшемся скрипте контент останется невидимым.
   --d задаёт задержку: элементы одной сетки выезжают каскадом, а не разом. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .7s var(--ease-out) var(--d, 0ms),
    transform .7s var(--ease-out) var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Первый экран: заголовок, текст и кнопки выходят по очереди сразу при загрузке */
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeScale { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.js .hero__in > * { animation: riseIn .85s var(--ease-out) both; }
.js .hero__in > *:nth-child(1) { animation-delay: .05s; }
.js .hero__in > *:nth-child(2) { animation-delay: .14s; }
.js .hero__in > *:nth-child(3) { animation-delay: .23s; }
.js .hero__in > *:nth-child(4) { animation-delay: .32s; }
.js .hero__in > *:nth-child(5) { animation-delay: .41s; }
.js .hero__media { animation: fadeScale 1.1s .1s var(--ease-out) both; }
.js .hero__badge { animation: riseIn .7s .55s var(--ease-out) both; }

/* Лёгкий сдвиг фотографии первого экрана при прокрутке — глубина без нагрузки */
.hero__media img { will-change: transform; }

/* Пункты мобильного меню появляются друг за другом */
.js .nav.is-open .nav__list li,
.js .nav.is-open .nav__links li { animation: riseIn .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.js .nav.is-open .nav__group { animation: riseIn .5s .12s var(--ease-out) both; }
.js .nav.is-open .nav__legal { animation: riseIn .5s .24s var(--ease-out) both; }

/* Полоса прочитанного вверху страницы — видно, сколько осталось */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 80;
  pointer-events: none;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transform: scaleX(0);
  transform-origin: left center;
}

/* Кнопка «наверх» появляется, когда до начала страницы уже далеко */
.quick__top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.9);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s;
}
.quick__top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Плавное раскрытие ответов в FAQ */
.faq__answer { overflow: hidden; }
.js .faq__answer { transition: height .35s var(--ease-out), opacity .3s var(--ease); }

/* Фотография в лайтбоксе не выскакивает, а мягко проявляется */
.lightbox.is-open img { animation: fadeScale .35s var(--ease-out) both; }

@media (hover: hover) {
  .service:hover, .card--hover:hover { will-change: transform; }
}

/* Уважаем системную настройку «уменьшить движение»: сайт остаётся полностью
   рабочим, просто без анимаций. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .section-head h2::after { transform: none; }
  .hero__media img { transform: none !important; }
}

/* ==========================================================================
   20. Адаптация под типы устройств
   Ширины экрана недостаточно: телефон, планшет и десктоп различаются ещё и
   способом ввода. Ниже правила сгруппированы по тому, чем именно отличается
   устройство, а не по одной лишь ширине.
   ========================================================================== */

/* -------- Сенсорный ввод: пальцем нужно во что-то попадать -------- */
@media (pointer: coarse) {
  /* Рекомендация Apple HIG и WCAG 2.5.5 — зона нажатия не меньше 44×44 */
  .nav__link { padding-block: 14px; }
  .footer li a,
  .footer__legal a,
  .nav__legal a { display: inline-block; padding-block: 9px; }
  .footer li { margin-bottom: 2px; }
  .filter { min-height: 44px; padding-block: 11px; }
  .faq summary { min-height: 56px; }
  .crumbs a { display: inline-block; padding-block: 10px; }
  .contact-list a { display: inline-block; padding-block: 4px; }
  .socials a { width: 44px; height: 44px; }
  /* Точки карусели: сама точка остаётся маленькой, а попадать пальцем нужно
     во что-то большее. Отступ расширяет зону нажатия до 25px, а
     background-clip оставляет закрашенной только саму точку. */
  .carousel__dots { gap: 0; }
  .carousel__dot {
    box-sizing: content-box;
    padding: 8px;
    background-clip: content-box;
  }
  .btn--sm { min-height: 44px; }
  /* Ссылки внутри предложения (согласие на обработку данных, сноски) не
     увеличиваем: WCAG 2.5.5 делает для них исключение, а разрыв строки
     от лишних отступов читался бы хуже. */
  /* Плавная инерционная прокрутка внутри блоков на iOS */
  .nav, .modal__box { -webkit-overflow-scrolling: touch; }
}

/* -------- Наведение есть только у мыши --------
   Без этого условия на телефоне карточка «залипает» в состоянии наведения
   после нажатия и остаётся приподнятой, пока не тронешь другую. */
@media (hover: none) {
  .card--hover:hover,
  .mini:hover,
  .pick:hover,
  .service:hover,
  .btn--primary:hover,
  .socials a:hover,
  .quick a:hover, .quick button:hover { transform: none; }
  .card--hover:hover .ico,
  .mini:hover .ico { transform: none; background: var(--accent-soft); color: var(--accent-dark); }
  .tile:hover img, .service:hover .service__media img { transform: none; }
  .tile:hover .tile__cap { transform: none; }
  /* Стрелка «Подробнее» и подчёркивание в меню тоже уезжали от касания
     и оставались сдвинутыми до нажатия в другом месте */
  .mini:hover .mini__more::after { transform: none; }
  .nav__link:hover::after { transform: scaleX(0); }
  .nav__link[aria-current="page"]::after { transform: none; }
  .btn--primary::before { display: none; }
  /* На сенсорных экранах подпись на плитке видна сразу, а не по наведению */
  .tile__cap { transform: none; }
}

/* -------- Узкие телефоны, 320–360px (iPhone SE, старые Android) -------- */
@media (max-width: 360px) {
  h1 { font-size: 30px; }
  .brand__name { font-size: 16px; }
  .brand__tag { font-size: 10px; letter-spacing: .1em; }
  .brand__mark { width: 36px; height: 36px; }
  .btn { padding: 14px 20px; font-size: 15.5px; }
  .btn-row { gap: 10px; }
  .btn-row .btn { flex: 1 1 100%; }   /* кнопки в столбик, во всю ширину */
  .grid--compact { gap: 12px; }
  .grid--compact .mini { padding: 16px 14px; }
  .form-card { padding: 20px 16px; }
  .rating-box { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* -------- Телефон в альбомной ориентации --------
   Экран низкий: убираем лишний воздух, иначе первый экран не помещается. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding-block: 28px 36px; }
  .hero__media img { aspect-ratio: 16 / 9; }
  .section { padding-block: 40px; }
  .page-head { padding-block: 20px 16px; }
  .modal__box { max-height: 88vh; }
  .nav__link { padding-block: 10px; font-size: 17px; }
}

/* -------- Планшет в книжной ориентации (iPad 768–1024) -------- */
@media (min-width: 601px) and (max-width: 1024px) {
  .split, .contact-grid { gap: 32px; }
  .hero__lead { max-width: none; }
  /* Галерея в три колонки: на планшете помещается, а плитки не мельчают */
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

/* Планшет в книжной: услуги в две колонки читаются лучше трёх узких */
@media (min-width: 601px) and (max-width: 900px) {
  .grid--compact { grid-template-columns: repeat(2, 1fr); }
}

/* -------- Большие экраны: не даём странице «потеряться» посередине -------- */
@media (min-width: 1600px) {
  :root { --wrap: 1320px; }
  body { font-size: 18px; }
}

/* -------- Реквизиты и другие таблицы на узком экране --------
   Двухколоночная таблица на 320px не ужимается меньше 337px и вылезала
   за экран. Превращаем её в список: подпись сверху, значение снизу. */
@media (max-width: 600px) {
  .prose table, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: 100%; }
  .prose table { margin: 1.2em 0; }
  .prose tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .prose tr:last-child { border-bottom: 0; }
  .prose th {
    padding: 0 0 4px;
    border: 0; background: none;
    font-size: 12.5px; font-weight: 650;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted);
  }
  .prose td { padding: 0; border: 0; }
}

/* -------- Экраны с высокой плотностью пикселей --------
   Тонкие линии на Retina выглядят толще, чем задумано. */
@media (min-resolution: 2dppx) {
  .card, .mini, .service, .form-card, .map-embed { border-width: .5px; }
}

/* Печать */
@media print {
  .header, .footer, .quick, .cookie, .modal, .lightbox, .btn { display: none !important; }
  body { background: #fff; font-size: 12pt; }
}
