/* =========================================================================
   Фаворит Клининг — стили лендинга
   Фирменный стиль меняется в одном месте: блок :root ниже.
   ========================================================================= */

/* ---------- Шрифты (хранятся локально в /fonts) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic.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 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-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;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/playfair-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/playfair-italic-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;
}

/* ---------- Фирменный стиль ---------- */
:root {
  /* Цвета */
  --c-cream: #f7f6f2;        /* шапка, светлые секции, кнопки на тёмном */
  --c-white: #ffffff;        /* карточки, формы */
  --c-sage: #eceee6;         /* фирменный фон: светлый оливково-серый */
  --c-sage-light: #f3f4ee;
  --c-green: #55613a;        /* основные кнопки, тёмные блоки: оливковый */
  --c-green-hover: #6a7748;
  --c-heading: #55613a;      /* заголовки */
  --c-ink: #2f3428;          /* основной текст */
  --c-ink-muted: #4a5040;    /* второстепенный текст (контраст ≥ 4.5:1 и на фоне секций) */
  --c-brass: #c2a46a;        /* только декор: иконки, линии, звёзды */
  --c-brass-text: #7d6024;   /* текст-акцент, только на светлом */
  --c-brass-light: #e6d3a3;  /* золотой текст на оливковом фоне */
  --c-line: rgba(47, 52, 40, 0.14);
  --c-error: #a3271f;
  --c-success: #2f6b3a;

  /* Шрифты */
  --f-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  /* Размеры текста (плавно растут от мобильных к десктопу) */
  --fs-h1: clamp(2rem, 1.35rem + 2.9vw, 3.5rem);
  --fs-h2: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
  --fs-h3: 1.2rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.78rem;

  /* Отступы */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --section-y: clamp(56px, 4rem + 3vw, 112px);
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;

  /* Скругления и тени */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --shadow-card: 0 1px 2px rgba(43, 53, 36, 0.06), 0 8px 24px rgba(43, 53, 36, 0.08);
  --shadow-float: 0 8px 24px rgba(43, 53, 36, 0.28);

  --header-h: 72px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3 { margin: 0 0 var(--sp-4); line-height: 1.2; color: var(--c-ink); }
h1, h2 { font-family: var(--f-display); font-style: italic; font-weight: 600; color: var(--c-heading); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0; padding: 0; list-style: none; }
input[type="range"] { accent-color: var(--c-green); }

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

:focus-visible {
  outline: 3px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.on-dark:focus-visible { outline-color: var(--c-cream); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-green);
  color: var(--c-cream);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: var(--sp-3); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section--cream { background: var(--c-cream); }
.section--sage { background: var(--c-sage); }
.section--green { background: var(--c-green); color: var(--c-cream); }
.section--green h2, .section--green h3 { color: var(--c-cream); }

.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head p { color: var(--c-ink-muted); font-size: 1.05rem; }
.section--green .section-head p { color: rgba(245, 241, 230, 0.85); }

.eyebrow {
  display: block;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brass-text);
}
.section--sage .eyebrow { color: var(--c-ink); }
.section--green .eyebrow { color: var(--c-brass-light); }

/* Заглушки, которые нужно заменить реальными данными (см. README) */
.todo {
  outline: 2px dashed #c2410c;
  outline-offset: 2px;
  background: rgba(253, 186, 116, 0.35);
  border-radius: 2px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:active { transform: translateY(1px); }

/* На кремовом и белом — тёмно-зелёная */
.btn--primary { background: var(--c-green); color: var(--c-cream); }
.btn--primary:hover { background: var(--c-green-hover); }

/* На шалфее и тёмной зелени — кремовая */
.btn--cream { background: var(--c-cream); color: var(--c-ink); }
.btn--cream:hover { background: var(--c-white); }

.btn--outline { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--outline:hover { background: rgba(43, 53, 36, 0.08); }

.btn--outline-light { background: transparent; color: var(--c-cream); border-color: var(--c-cream); }
.btn--outline-light:hover { background: rgba(245, 241, 230, 0.12); }

.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Логотип ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--c-ink);
}
.logo__mark { width: 58px; height: 46px; flex-shrink: 0; object-fit: contain; }
.logo__name {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1;
}
.logo__sub {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--c-brass-text);
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow 0.2s ease;
}
.header.is-scrolled { box-shadow: 0 4px 20px rgba(43, 53, 36, 0.08); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  height: var(--header-h);
}

.nav { display: none; }
.nav__list { display: flex; gap: var(--sp-5); }
.nav__link {
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  color: var(--c-ink-muted);
  padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--c-ink); border-bottom-color: var(--c-brass); }

.header__actions { display: flex; align-items: center; gap: var(--sp-3); }
.header__phone {
  display: none;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-line);
  color: var(--c-ink);
}
.header__phone-icon svg { width: 20px; height: 20px; }
.header__cta { display: none; }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: transparent;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  padding: var(--sp-5) var(--gutter) var(--sp-7);
  background: var(--c-cream);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list li { border-bottom: 1px solid var(--c-line); }
.mobile-menu__list a {
  display: block;
  padding: var(--sp-4) 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}
.mobile-menu__phone {
  display: block;
  margin: var(--sp-5) 0 var(--sp-4);
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  background: var(--c-sage);
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-6);
}
.hero__rating {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--c-white);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}
.hero__rating-stars { color: var(--c-brass-text); letter-spacing: 1px; }
.hero__lead { max-width: 560px; font-size: 1.1rem; color: var(--c-ink-muted); }
.hero__benefits { display: grid; gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-6); }
.hero__benefits li { display: flex; align-items: flex-start; gap: var(--sp-3); font-weight: 600; }
.hero__benefits svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; color: var(--c-green); }
.hero__actions { display: flex; flex-direction: column; gap: var(--sp-3); }

.hero__media { position: relative; margin: 0; }
.hero__media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: 50% 70%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
}

/* ---------- Цифры доверия ---------- */
.stats { padding: var(--sp-7) 0; }
.stats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-5); }
/* нечётная последняя цифра на телефоне — на всю ширину, без пустой клетки рядом */
@media (max-width: 639px) { .stats__grid > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.stat__value {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem);
  line-height: 1.1;
  color: var(--c-brass-light);
}
.stat__label { display: block; margin-top: var(--sp-2); font-size: var(--fs-small); color: rgba(245, 241, 230, 0.85); }

/* ---------- Почему мы ---------- */
.why__grid { display: grid; gap: var(--sp-4); }
.why-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-cream);
  border-radius: var(--r-md);
}
.why-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-cream);
}
.why-item__icon svg { width: 22px; height: 22px; }
.why-item h3 { margin-bottom: var(--sp-1); font-size: 1.05rem; }
.why-item p { margin: 0; font-size: 0.95rem; color: var(--c-ink-muted); }
.why-item--cta { background: var(--c-green); color: var(--c-cream); }
.why-item--cta h3 { color: var(--c-cream); }
.why-item--cta p { margin-bottom: var(--sp-4); color: rgba(245, 241, 230, 0.85); }
.why-item--cta :focus-visible { outline-color: var(--c-cream); }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1.5px solid var(--c-line);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip input:checked + span { background: var(--c-green); border-color: var(--c-green); color: var(--c-cream); }
.chip input:focus-visible + span { outline: 3px solid var(--c-green); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }

/* ---------- Две колонки: заголовок слева, содержимое справа ---------- */
.split { display: grid; gap: var(--sp-6); }
.split > .section-head { margin-bottom: 0; }

/* Фото рядом с текстом */
.media-split { display: grid; gap: var(--sp-6); }
.media-split__img { order: 2; margin: 0; overflow: hidden; border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.media-split__img img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; object-position: 50% 35%; }
.media-split__body .section-head { margin-bottom: var(--sp-6); }

.pillars { display: grid; gap: var(--sp-4); }
.pillars .why-item { background: var(--c-white); box-shadow: var(--shadow-card); }

/* Список с галочками */
.checklist { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; font-weight: 600; }
.checklist svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; color: var(--c-green); }
.checklist--light li { color: var(--c-cream); font-size: 1.05rem; }
.checklist--light svg { color: var(--c-brass-light); }
.checklist--light li + li { padding-top: var(--sp-3); border-top: 1px solid rgba(245, 241, 230, 0.18); }

.note {
  margin: 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 3px solid var(--c-brass-light);
  background: rgba(245, 241, 230, 0.08);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: rgba(245, 241, 230, 0.9);
  font-style: italic;
}

/* Стоимость */
.price-card {
  padding: var(--sp-6) var(--sp-5);
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.price-card h3 { margin-bottom: var(--sp-5); font-family: var(--f-display); font-style: italic; font-size: 1.5rem; color: var(--c-heading); }
.price-card__note { margin: var(--sp-3) 0 0; text-align: center; font-size: var(--fs-small); color: var(--c-ink-muted); }

/* Для кого */
.clients { display: grid; gap: var(--sp-5); }
.client-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.client-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.client-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
}
.client-card .why-item__icon { margin-top: calc(-1 * var(--sp-6) - 22px); box-shadow: 0 0 0 4px var(--c-white); }

#security .media-split__img img { object-position: 42% 50%; }
.client-card h3 { margin: 0; font-family: var(--f-display); font-style: italic; font-size: 1.6rem; color: var(--c-heading); }
.client-card p { margin: 0; color: var(--c-ink-muted); }
.client-card .btn { margin-top: auto; }

/* Подписи под кнопкой первого экрана */
.hero__notes { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-4); font-size: var(--fs-small); font-weight: 600; color: var(--c-ink-muted); }
.hero__notes li { display: flex; align-items: center; gap: var(--sp-2); }
.hero__notes svg { width: 18px; height: 18px; color: var(--c-brass-text); }
.hero__lead { margin-bottom: var(--sp-6); }

/* Группа полей в форме */
.field--group { margin: 0 0 var(--sp-4); padding: 0; border: 0; }
.field--group legend { margin-bottom: var(--sp-2); padding: 0; font-size: var(--fs-small); font-weight: 700; }
.modal__note { margin: var(--sp-3) 0 0; text-align: center; font-size: var(--fs-tiny); color: var(--c-ink-muted); }

/* ---------- Как работаем ---------- */
.steps { display: grid; gap: var(--sp-4); counter-reset: step; }
.step {
  position: relative;
  padding: var(--sp-5);
  padding-left: calc(var(--sp-5) + 52px);
  background: var(--c-cream);
  border-radius: var(--r-md);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: var(--sp-5);
  top: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-green);
  color: var(--c-cream);
  font-weight: 800;
}
.step h3 { margin-bottom: var(--sp-1); font-size: 1.05rem; }
.step p { margin: 0; font-size: 0.95rem; color: var(--c-ink-muted); }

/* ---------- Отзывы ---------- */
.reviews__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.reviews__top .section-head { margin-bottom: 0; }
.slider-nav { display: flex; gap: var(--sp-2); }
.slider-nav[hidden] { display: none; }
.slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--c-ink);
  border-radius: 50%;
  background: transparent;
  color: var(--c-ink);
}
.slider-btn:hover { background: rgba(43, 53, 36, 0.08); }
.slider-btn[disabled] { opacity: 0.35; cursor: default; }
.slider-btn svg { width: 20px; height: 20px; }

.slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88%;
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-bottom: var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: var(--c-sage) transparent;
}
.review-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.review-card__stars { color: var(--c-brass-text); letter-spacing: 2px; }
.review-card__text {
  margin: 0;
  font-size: 0.95rem;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
}
.review-card.is-open .review-card__text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.review-card__more {
  align-self: flex-start;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--c-brass-text);
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.review-card__more[hidden] { display: none; }
.review-card__author { margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--c-line); }
.review-card__name { display: block; font-weight: 700; }
.review-card__meta { display: block; font-size: var(--fs-small); color: var(--c-ink-muted); }

.rating-box {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.rating-box__score { display: flex; align-items: center; gap: var(--sp-4); }
.rating-box__num { font-family: var(--f-display); font-style: italic; font-weight: 700; font-size: 2.6rem; line-height: 1; }
.rating-box__stars { color: var(--c-brass-text); letter-spacing: 2px; }
.rating-box__caption { font-size: var(--fs-small); color: var(--c-ink-muted); }
.rating-box__links { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq__item {
  margin-bottom: var(--sp-3);
  background: var(--c-cream);
  border-radius: var(--r-md);
}
.faq__item summary {
  position: relative;
  display: block;
  padding: var(--sp-5);
  padding-right: calc(var(--sp-5) + 32px);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: var(--sp-5);
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -8px;
  border-right: 2px solid var(--c-ink);
  border-bottom: 2px solid var(--c-ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__answer { padding: 0 var(--sp-5) var(--sp-5); color: var(--c-ink-muted); }
.faq__answer p:last-child { margin-bottom: 0; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-size: var(--fs-small); font-weight: 700; }
.field__optional { font-weight: 500; color: var(--c-ink-muted); }
.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px rgba(51, 63, 39, 0.18); }
textarea.input { min-height: 96px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--c-error); }
.field__error { min-height: 0; font-size: var(--fs-small); font-weight: 600; color: var(--c-error); }
.field__error:empty { display: none; }

.consent { display: flex; gap: var(--sp-3); align-items: flex-start; margin: var(--sp-2) 0 var(--sp-2); font-size: var(--fs-small); }
.consent input { flex-shrink: 0; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c-green); }
.consent a { font-weight: 700; }

/* honeypot: скрыто от людей, видно ботам */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: var(--sp-3) 0 0; font-size: var(--fs-small); font-weight: 600; }
.form-status:empty { display: none; }
.form-status--error { color: var(--c-error); }

.form-actions { margin-top: var(--sp-4); }

.thanks { text-align: center; padding: var(--sp-6) var(--sp-4); }
.thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--sp-4);
  border-radius: 50%;
  background: var(--c-sage);
  color: var(--c-green);
}
.thanks__icon svg { width: 32px; height: 32px; }
.thanks h3 { font-family: var(--f-display); font-style: italic; font-size: 1.6rem; }

/* ---------- Финальный CTA ---------- */
.cta { display: grid; gap: var(--sp-6); align-items: center; }
.cta__text p { color: rgba(245, 241, 230, 0.85); font-size: 1.05rem; }
.cta__form {
  padding: var(--sp-5);
  background: var(--c-cream);
  color: var(--c-ink);
  border-radius: var(--r-lg);
}
.cta__form .consent a { color: var(--c-ink); }

/* ---------- Контакты ---------- */
.contacts { display: grid; gap: var(--sp-5); }
.contacts__list { display: grid; gap: var(--sp-4); }
.contacts__item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.contacts__item svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; color: var(--c-green); }
.contacts__item b { display: block; font-size: var(--fs-small); color: var(--c-ink-muted); font-weight: 600; }
.contacts__item a, .contacts__item span { font-weight: 700; font-size: 1.05rem; }
.contacts__messengers { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }

.map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--c-sage-light);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  text-align: center;
}
.map__placeholder p { max-width: 340px; margin: 0; font-size: var(--fs-small); color: var(--c-ink-muted); }

/* ---------- Футер ---------- */
.footer { padding: var(--sp-7) 0 var(--sp-6); background: var(--c-green); color: rgba(245, 241, 230, 0.85); font-size: var(--fs-small); }
.footer__grid { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid rgba(245, 241, 230, 0.18); }
.footer .logo { color: var(--c-cream); }
.footer .logo__sub { color: var(--c-brass-light); }
.footer__links { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer__links a, .footer__links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-cream);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: var(--fs-small);
}
.footer__phone { color: var(--c-cream); font-size: 1.05rem; font-weight: 700; text-decoration: none; }
.footer__bottom { padding-top: var(--sp-5); }
.footer .todo { color: var(--c-ink); }

/* ---------- Юридические страницы ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); }
.legal h2 { margin-top: var(--sp-6); font-size: 1.35rem; }
.legal p, .legal li { color: var(--c-ink-muted); }
.legal__list { margin: 0 0 var(--sp-4); padding-left: 1.2em; list-style: disc; }
.legal__list li { margin-bottom: var(--sp-1); }
.legal__note {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--c-white);
  border-left: 4px solid var(--c-brass);
  font-size: var(--fs-small);
}

/* ---------- Плавающие мессенджеры ---------- */
.floating {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--banner-h, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: opacity 0.2s ease, transform 0.2s ease, bottom 0.2s ease;
}
.floating.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
.floating__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  box-shadow: var(--shadow-float);
}
.floating__btn svg { width: 26px; height: 26px; }
.floating__btn--max { background: linear-gradient(135deg, #19baff 0%, #263dff 50%, #8114ff 100%); }
.floating__btn--max svg { width: 25px; height: 25px; }
.floating__btn { text-decoration: none; }
.floating__btn--tg { background: #1f6fa8; }

/* ---------- Модальное окно ---------- */
.modal {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-cream);
  color: var(--c-ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.modal::backdrop { background: rgba(43, 53, 36, 0.6); }
.modal__inner { padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.modal__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-ink);
}
.modal__close:hover { background: rgba(43, 53, 36, 0.08); }
.modal__close svg { width: 22px; height: 22px; }
.modal h2 { font-size: 1.7rem; padding-right: 40px; }
.modal__summary {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-4);
  background: var(--c-white);
  border-radius: var(--r-md);
  font-size: var(--fs-small);
}
.modal__summary li { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 4px 0; }
.modal__summary li span:first-child { color: var(--c-ink-muted); }
.modal__summary li span:last-child { font-weight: 700; text-align: right; }

/* ---------- Cookie-баннер ---------- */
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  padding: var(--sp-4) 0;
  background: var(--c-white);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -8px 24px rgba(43, 53, 36, 0.12);
}
.cookie[hidden] { display: none; }
.cookie__inner { display: flex; flex-direction: column; gap: var(--sp-3); }
.cookie p { margin: 0; font-size: var(--fs-small); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cookie__actions .btn { min-height: 44px; padding: 10px 18px; }
@media (max-width: 420px) {
  .cookie__actions { flex-wrap: nowrap; }
  .cookie__actions .btn { flex: 1 1 auto; padding: 10px 12px; font-size: 0.9rem; }
}

/* ---------- Появление блоков ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Запасной вариант: если main.js не загрузился, блоки появляются сами через 2,5 с */
.js:not(.js-ready) .reveal { animation: reveal-fallback 0.6s ease 2.5s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .slider { scroll-behavior: auto; }
}

/* =========================================================================
   Адаптив: от мобильных (база выше) к большим экранам
   ========================================================================= */
@media (min-width: 480px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .rating-box__links { flex-direction: row; flex-wrap: wrap; }
  .cookie__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie__actions { flex-shrink: 0; }
}

@media (min-width: 640px) {
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slider { grid-auto-columns: calc((100% - var(--sp-4)) / 2); }
  .stats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__media img { height: 380px; }
}

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
  .media-split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: var(--sp-8); align-items: stretch; }
  .media-split__img { order: 0; }
  .media-split--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .media-split--reverse .media-split__img { order: 2; }
  .media-split__img img { max-height: none; min-height: 520px; }
  .pillars .why-item { flex-direction: row; }
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-card, .client-card__body { padding: var(--sp-7) var(--sp-6); }
  .client-card .why-item__icon { margin-top: calc(-1 * var(--sp-7) - 22px); }
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .step { padding: var(--sp-5); padding-top: calc(var(--sp-5) + 52px); }
  .cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); }
  .cta__form { padding: var(--sp-6); }
  .contacts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: stretch; }
  .map { min-height: 420px; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .rating-box { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  :root { --header-h: 84px; }
  .nav { display: block; }
  .burger, .mobile-menu, .header__phone-icon { display: none !important; }
  .header__cta { display: inline-flex; }
  .slider { grid-auto-columns: calc((100% - var(--sp-4) * 2) / 3); }

  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 620px;
    padding-top: var(--sp-8);
    padding-bottom: var(--sp-8);
    align-items: center;
  }
  .hero__content { max-width: 560px; }
  .hero__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 52%;
  }
  .hero__media img {
    height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
    mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  }
}

@media (min-width: 1200px) {
  .why__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .why-item { flex-direction: column; }
  .header__phone { display: inline-block; }
  .nav__list { gap: var(--sp-6); }
}

@media (min-width: 1600px) {
  .hero__inner { min-height: 700px; }
}
