/* ==========================================================================
   SanDez Control — layout.css
   Header, footer, hero, bento-сетки, general layout primitives.
   ========================================================================== */

/* ---------- Header (sticky) ----------------------------------------------- */

.header {
  position: static;
  z-index: 60;
  padding-block: 12px;
  padding-top: calc(12px + var(--safe-top));
  background: transparent;
  transition:
    background var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    padding var(--dur-fast) var(--ease);
}

/* На десктопе header закрепляем при прокрутке. На mobile/tablet — обычный статичный. */
@media (min-width: 1024px) {
  .header {
    position: sticky;
    top: 0;
  }
}

.header.is-scrolled {
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--border-soft);
  padding-block: 8px;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}

/* Десктоп: header — это 3-колоночный grid [logo|nav|cta], где боковые
   колонки 1fr (одинаковой ширины), а nav в центре auto. justify-self
   фиксирует логотип влево, nav в центре, cta вправо. nav оказывается
   ровно по центру шапки независимо от длины логотипа/кнопок. */
@media (min-width: 1024px) {
  .header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .header__inner > .logo { justify-self: start; }
  .header__inner > .nav  { justify-self: center; }
  .header__inner > .header__cta { justify-self: end; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

/* Логотип-плашка: SVG-жучок (top-view) поверх оранжевого radial-gradient.
   SVG встроен inline в CSS через data URI — один HTTP-запрос превращается
   в ноль (не тянется файл с сервера, рендерится из вёрстки). Градиент
   внутри data URI повторяет --accent/--accent-hover из base.css, чтобы
   плашка оставалась узнаваемой и при смене палитры вручную была
   одной правкой в этом же файле, а не в трёх местах.
   background: слой SVG сверху, слой gradient снизу — иначе background-image
   скрывает под собой gradient. */
.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><defs><radialGradient id='g' cx='40%25' cy='35%25' r='75%25'><stop offset='0%25' stop-color='%23EE5C34'/><stop offset='100%25' stop-color='%23DC4B25'/></radialGradient></defs><rect width='64' height='64' rx='14' fill='url(%23g)'/><g fill='none' stroke='%23FAF6F0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M27 15 L24 10'/><path d='M37 15 L40 10'/><path d='M22 25 L14 22'/><path d='M22 32 L13 32'/><path d='M22 39 L14 42'/><path d='M42 25 L50 22'/><path d='M42 32 L51 32'/><path d='M42 39 L50 42'/></g><ellipse cx='32' cy='20' rx='7' ry='6' fill='%23FAF6F0'/><ellipse cx='32' cy='35' rx='11' ry='14' fill='%23FAF6F0'/><path d='M32 23 L32 48' stroke='%23EE5C34' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.15);
}

.logo__text { line-height: 1; }
.logo__text-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-top: 3px;
}

.nav {
  display: none;
  gap: 2px;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .nav { display: inline-flex; }
}

.nav__link {
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--bg-soft); }
.nav__link[aria-current="page"] { color: var(--accent); }

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .header__cta { margin-left: 12px; }
}

.header__phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease);
}
.header__phone:hover { background: var(--bg-soft); }
@media (min-width: 1280px) { .header__phone { display: inline-flex; } }

.header__cta .btn {
  min-height: 36px;
  padding: 8px 18px;
  font-size: 0.875rem;
  display: none;
}
@media (min-width: 1024px) {
  .header__cta .btn { display: inline-flex; }
}

.header__menu-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--ink);
  flex-shrink: 0;
}
@media (min-width: 1024px) { .header__menu-btn { display: none; } }

/* Языковой переключатель: вся плашка — одна ссылка на другой язык.
   Внутренние span'ы — только визуальные метки активного/неактивного языка,
   чтобы на телефоне пользователю не приходилось целиться в узкий KZ. */
.lang {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
@media (hover: hover) {
  .lang:hover { background: var(--bg-muted); }
}
.lang__item {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--dur-fast) var(--ease);
  pointer-events: none;
}
.lang__item--active {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 6vw, 80px);
  overflow: hidden;
}

/* Hero — сетка:
   • mobile/tablet (<1024): одна колонка, блоки идут по смыслу сверху вниз:
       live → заголовок+текст → жучки → кнопки → (stats вне grid).
   • desktop (≥1024): две колонки. Левая — контент и кнопки, правая —
       live-плашка в правом верхнем углу, под ней жучки. Плашка оказывается
       визуально «на уровне» первой строки h1 (align-items: start). */
.hero__grid {
  display: grid;
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
  grid-template-columns: 1fr;
  grid-template-areas:
    "live"
    "content"
    "visual"
    "bottom";
}

@media (min-width: 1024px) {
  .hero__grid {
    /* Левая колонка шире правой (1.2fr vs 1fr) — даёт достаточно места
       чтобы «Рассчитать за 30 секунд» + «Написать в WhatsApp» уместились
       в одну строку без переноса. Визуал в правой колонке спанит оба
       ряда, поднимает жучков на уровень заголовка. */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "content visual"
      "bottom  visual";
    column-gap: clamp(32px, 4vw, 64px);
    row-gap: clamp(32px, 3vw, 48px);
  }
}

.hero__content {
  grid-area: content;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__title {
  /* Минимум поднят с 2.25rem до 2.75rem — заголовок на мобилке не сливается
     с подзаголовком и «держит» секцию, как просил клиент. На десктопе
     максимум тот же (5.5rem), промежуточные значения чуть крупнее. */
  font-size: clamp(2.75rem, 7.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
  /* text-wrap: pretty вместо balance — balance на мобилке может пересчитывать
     разбивку строк при малейшем изменении вьюпорта (скролл с подъёмом
     адресной строки, клавиатура), из-за чего squiggle-подчёркивание под
     «Собирайте вещи.» визуально «дёргается». pretty стабильнее и тоже
     даёт красивые переносы. */
  text-wrap: pretty;
}

.hero__title strong {
  font-weight: 600;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(1rem, 1.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

/* Hero bottom row: кнопки слева + бейджи справа на одной линии (desktop),
   стек на mobile. Занимает обе колонки grid. */
.hero__bottom {
  grid-area: bottom;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 1024px) {
  .hero__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
}

.hero__actions-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mobile (<640): кнопки столбиком и на всю ширину — по одной строке на
   кнопку, так лендинг выглядит «собраннее», и палец попадает в цель
   с первой попытки. */
@media (max-width: 639px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

/* Tablet (640–1023): кнопки в одну строку, места хватает — контейнер
   занимает всю ширину. */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero__actions { flex-wrap: nowrap; align-items: center; }
  .hero__actions .btn { white-space: nowrap; }
}

/* Desktop (≥1024): кнопки живут в левой колонке grid. Чтобы обе помещались
   в одну строку даже на ноутбуках 1280–1440, уменьшаем padding и шрифт
   относительно базового .btn--lg. На узких десктопах (1024–1279) fallback
   через flex-wrap: wrap — лучше пусть перенесутся, чем будут обрезаны. */
@media (min-width: 1024px) {
  .hero__actions { flex-wrap: wrap; align-items: center; }
  .hero__actions .btn { white-space: nowrap; }
  .hero__actions .btn--lg {
    padding: 16px 28px;
    min-height: 56px;
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  .hero__actions { flex-wrap: nowrap; }
}

/* Live-плашка «мастер выехал».
   • mobile/tablet: живёт в первом ряду grid, над заголовком.
   • desktop: прижимается к правому краю правой колонки, оказывается
     визуально напротив первой строки h1 («на уровне» по верху). */
.hero__live {
  grid-area: live;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 16px;
  width: fit-content;
  max-width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  /* Бирюзовое свечение — той же палитры что и CTA-кнопки (вместо мятного
     зелёного), чтобы плашка визуально перекликалась с кнопками внизу. */
  box-shadow:
    0 0 0 6px rgba(18, 140, 126, 0.12),
    0 0 24px rgba(18, 140, 126, 0.14),
    0 1px 2px rgba(26, 24, 21, 0.04);
  animation: live-glow 3.6s ease-in-out infinite;
}

@media (min-width: 1024px) {
  .hero__live {
    /* Явное размещение: верх-право правой колонки, поверх визуала (z-index).
       grid-area: live из базового правила здесь перекрывается — в десктопном
       шаблоне области "live" нет, потому используем явные координаты. */
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    z-index: 3;
  }
}

@media (max-width: 360px) {
  .hero__live {
    white-space: normal;
    font-size: 0.875rem;
    padding: 8px 14px 8px 14px;
  }
}

.hero__live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cta-teal);
  flex-shrink: 0;
}
.hero__live-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--cta-teal);
  opacity: 0.3;
  animation: live-ripple 2s ease-out infinite;
}

@keyframes live-glow {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(18, 140, 126, 0.12),
      0 0 24px rgba(18, 140, 126, 0.14),
      0 1px 2px rgba(26, 24, 21, 0.04);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(18, 140, 126, 0.08),
      0 0 36px rgba(18, 140, 126, 0.20),
      0 1px 2px rgba(26, 24, 21, 0.04);
  }
}

@keyframes live-ripple {
  0%   { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(2.2);  opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .hero__live, .hero__live-dot::before { animation: none !important; }
}

.hero__visual {
  grid-area: visual;
  position: relative;
  aspect-ratio: 4 / 3;
  isolation: isolate;
}
/* Планшет: визуал не распирает всю ширину контейнера, центрируется —
   иначе жучки плавают в пустоте по бокам. */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero__visual {
    max-width: 560px;
    margin-inline: auto;
  }
}
@media (min-width: 1024px) {
  .hero__visual {
    /* 4/3 вместо 5/4: визуал чуть короче по высоте, поэтому Рик (и компания)
       поднимаются визуально до уровня заголовка — раньше они «тонули» в
       нижней четверти hero. */
    aspect-ratio: 4 / 3;
    /* Сдвигаем ВСЮ компанию на ~48px вниз одним движением: раньше Фло
       (верхняя-правая блоха) наползала на live-плашку — теперь она и
       остальная шайка сидят ниже плашки. Сдвиг через margin-top у
       контейнера, а не индивидуально у каждого жучка — композиция
       (которую клиент утвердил) остаётся нетронутой. */
    margin-top: 48px;
  }
}

/* Мягкое сияние-бэкдроп — объединяет группу персонажей без «картинки» */
.hero__visual::before {
  content: '';
  position: absolute;
  inset: 6% 2%;
  background:
    radial-gradient(ellipse 70% 55% at 50% 58%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 40% 30% at 78% 22%, var(--trust-soft), transparent 75%);
  opacity: 0.85;
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

/* Персонажи абсолютно-позиционированы в границах hero__visual */
.hero__char {
  position: absolute;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(26, 24, 21, 0.14));
}

/* Рик — главный герой с чемоданом, крупный, в центре-низу */
.hero__char--rick {
  bottom: 0;
  left: 20%;
  width: 62%;
  max-width: 460px;
  z-index: 5;
  animation: char-run 6s ease-in-out infinite;
}

/* Боб — средний, машет ручкой. Правее и повыше — плотнее к группе. */
.hero__char--bob {
  top: 2%;
  left: 14%;
  width: 32%;
  max-width: 210px;
  z-index: 6; /* выше Рика, чтобы машущая рука читалась */
  animation: char-float 5s ease-in-out infinite;
}

/* Фло — маленькая, прыгает, верх-справа, ближе к группе */
.hero__char--flo {
  top: 4%;
  right: 6%;
  width: 22%;
  max-width: 135px;
  z-index: 4;
  animation: char-jump 2.8s ease-in-out infinite;
}

/* Тикки — маленький, низ-справа, замыкает композицию */
.hero__char--tikki {
  bottom: 6%;
  right: 2%;
  width: 21%;
  max-width: 125px;
  z-index: 3;
  animation: char-float 7s ease-in-out infinite;
  animation-delay: -2s;
}

/* Tablet (640–1023): сохраняем иерархию, чуть компактнее */
@media (max-width: 1023px) and (min-width: 640px) {
  .hero__char--rick  { width: 58%; max-width: 400px; }
  .hero__char--bob   { width: 32%; max-width: 200px; }
  .hero__char--flo   { width: 22%; max-width: 125px; }
  .hero__char--tikki { width: 21%; max-width: 115px; }
}

/* Mobile (<640): персонажи крупнее и равномернее распределены по ширине.
   aspect-ratio визуала уже 4/3 (см. базовое правило .hero__visual). */
@media (max-width: 639px) {
  .hero__char--rick {
    bottom: 0;
    left: 14%;
    width: 72%;
    max-width: 300px;
  }
  .hero__char--bob {
    top: 2%;
    left: 0;
    width: 40%;
    max-width: 165px;
  }
  .hero__char--flo {
    top: 5%;
    right: 10%;
    width: 30%;
    max-width: 120px;
  }
  .hero__char--tikki {
    bottom: 6%;
    right: 0;
    width: 28%;
    max-width: 110px;
  }
}

/* Анимации idle-поведения */
@keyframes char-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

@keyframes char-jump {
  0%, 100%  { transform: translateY(0); }
  40%       { transform: translateY(-18px); }
  60%       { transform: translateY(-8px); }
}

@keyframes char-run {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__char { animation: none !important; }
}

/* Symptom avatar с картинкой персонажа.
   scale(1.7) + transform-origin: bottom — рисунок насекомого «вырастает»
   из круга вверх (нижняя точка рисунка стоит на нижней дуге, верхняя
   часть выходит над верхним краем круга). Получается мини-3D-эффект
   «бабочка из лупы», как просил клиент. Layout-размер img остаётся
   100% кружка — соседние элементы карточки не смещаются. */
.symptom__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transform: scale(1.5);
  transform-origin: bottom center;
}

/* Trust-бейджи: живут в hero__bottom справа от кнопок на desktop,
   на mobile — стек под кнопками. */
/* ==========================================================================
   Hero stats — 4 цифры с доверительными метриками под hero.
   Desktop: 4 колонки, тонкие вертикальные разделители, центровка каждой ячейки.
   Mobile:  2×2 сетка с отступами, без разделителей.
   ========================================================================== */

.hero-stats {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 40px) clamp(20px, 2vw, 28px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 32px) clamp(8px, 2vw, 20px);
  /* Бóльший отступ от кнопок — stats читается как отдельный блок,
     а не продолжение hero. На десктопе особенно важно, т.к. кнопки
     теперь подняты наверх ближе к тексту, и без воздуха внизу stats
     будет выглядеть лепестком к кнопкам. */
  margin-top: clamp(48px, 7vw, 96px);
  isolation: isolate;
}

/* Лёгкое свечение в фоне — объём без тяжёлой декорации */
.hero-stats::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    rgba(238, 92, 52, 0.05),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

@media (min-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
}

.hero-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-width: 0;
}

/* Вертикальный разделитель между колонками на desktop */
@media (min-width: 768px) {
  .hero-stat {
    padding-inline: clamp(12px, 1.5vw, 24px);
  }
  .hero-stat + .hero-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: var(--border);
  }
}

.hero-stat__num {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.hero-stat__unit {
  font-family: var(--font-body);
  font-size: 0.44em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
  text-transform: lowercase;
}

.hero-stat__unit--accent {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.7em;
  letter-spacing: -0.02em;
}

.hero-stat__unit--star {
  color: var(--highlight);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-stat__label {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 22ch;
}

/* ---------- Bento grid (универсальный) ------------------------------------ */

.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.bento--services {
  grid-auto-rows: auto;
}
@media (min-width: 1024px) {
  .bento--services {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: repeat(2, auto);
  }
  .bento--services > *:nth-child(1) { grid-row: span 2; }
  /* Валера (6-я карточка) занимает всю ширину 3-го ряда — иначе она
     остаётся в одной колонке, а справа зияет пустое пространство. */
  .bento--services > *:nth-child(6) { grid-column: 1 / -1; }
}

.bento__item {
  min-height: 0;
}

/* ---------- Steps grid (Как работаем) ------------------------------------- */

.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

.step {
  position: relative;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
}
.step::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  top: -16px;
  left: 24px;
  min-width: 48px;
  height: 32px;
  padding: 0 12px;
  background: var(--accent);
  color: #FFF;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.steps { counter-reset: step; }

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.step__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.step__media {
  margin-top: auto;
  border-radius: var(--r-md);
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- Timeline (Что будет после) ------------------------------------ */

.timeline {
  display: grid;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  /* Градиент оранжевый → бирюзовый. Раньше второй цвет был --trust
     (мятный зелёный), но мы давно ушли от мятного в пользу единой
     бирюзовой палитры — и тут оставался последний зелёный «хвост». */
  background: linear-gradient(180deg, var(--accent), var(--cta-teal));
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  padding: 16px 0 32px 56px;
}

.timeline__dot {
  position: absolute;
  left: 12px;
  top: 18px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline__time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

.timeline__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 4px 0 6px;
}

.timeline__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Symptoms grid ("У вас кто?") ---------------------------------- */

.symptoms {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .symptoms { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .symptoms { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.symptom {
  position: relative;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition:
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

@media (hover: hover) {
  .symptom:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }
}

.symptom__head {
  display: flex;
  align-items: center;
  /* gap 24px — после scale(1.5) на изображении нижний край вписывается в
     круг, верхний выходит наверх, а правый край изображения растёт на
     ~16px. 24px gap гарантирует, что насекомое не упрётся в имя справа. */
  gap: 24px;
}

.symptom__avatar {
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  /* overflow: visible — кружок сохраняет форму-фон, а картинка через
     transform-origin: bottom вылезает за ВЕРХНЮЮ кромку круга (3D-эффект
     насекомого, выпрыгивающего из «лупы»). Снизу картинка стоит ровно
     на нижней дуге круга и не торчит ниже. */
  position: relative;
  overflow: visible;
}

.symptom__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.symptom__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.symptom__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.symptom__list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.symptom__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.symptom__footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.symptom__verdict {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Testimonials (scroll-snap карусель) --------------------------- */

/* Верх секции отзывов: badges слева, кнопки навигации справа.
   Кнопки скрыты на мобилке/планшете (там работает свайп), показываются
   только на десктопе. */
.reviews__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.reviews__badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.reviews__nav {
  display: none;
  gap: 8px;
}
@media (min-width: 1024px) {
  .reviews__nav { display: inline-flex; }
}

.reviews__nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.reviews__nav-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.reviews__nav-btn:active { transform: scale(0.94); }
.reviews__nav-btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.reviews-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(85%, 360px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 0 24px;
  /* Mobile/planшет: лента вылезает из container-padding в свободную область
     (margin-inline отрицательный = возвращаем 100% viewport'а). */
  scroll-padding-inline: var(--container-pad);
  margin-inline: calc(-1 * var(--container-pad));
  padding-inline: var(--container-pad);
}

/* Desktop: на больших экранах (1920, ultrawide) container имеет max-width
   1400px и центрирован — между его краем и viewport остаётся 260+ px с
   каждой стороны, в которые лента НЕ заходила (= «обрезанные» отзывы).
   Ломаем container и растягиваем ленту от края до края viewport:
     • width: 100vw — лента ровно по ширине окна
     • margin-inline: calc(50% - 50vw) — классический «break-out»-трюк:
       сдвигает ленту влево ровно на разницу между центром container'а
       и центром viewport'а, чтобы занять все 100vw
     • padding-inline с max() — первая карточка остаётся на визуальной
       левой границе container'а (не улетает в самый угол), а вот last
       card может «выглянуть» в правое поле при скролле — виден намёк,
       что контент не обрезан, там есть ещё отзывы.
   scroll-padding-inline синхронизирован с padding-inline, чтобы snap-точки
   работали корректно на расширенной ленте. */
@media (min-width: 1024px) {
  .reviews-rail {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-inline: max(
      var(--container-pad),
      calc((100vw - var(--container-max)) / 2 + var(--container-pad))
    );
    scroll-padding-inline: max(
      var(--container-pad),
      calc((100vw - var(--container-max)) / 2 + var(--container-pad))
    );
  }
}
.reviews-rail::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .reviews-rail { grid-auto-columns: min(45%, 420px); }
}
@media (min-width: 1024px) {
  .reviews-rail { grid-auto-columns: min(32%, 440px); }
}

.review {
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.review__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review__avatar {
  width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Цвет аватара отзыва по источнику площадки. 2ГИС использует дефолтный
   оранжевый (как badge выше). Google и Instagram — бирюзовый, чтобы
   визуально различались источники в потоке отзывов. */
.review[data-source="google"] .review__avatar,
.review[data-source="instagram"] .review__avatar {
  background: var(--cta-teal-soft);
  color: var(--cta-teal);
}

.review__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.25;
}

.review__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.review__rating {
  display: inline-flex;
  gap: 2px;
  color: var(--highlight);
}

.review__rating .icon { width: 14px; height: 14px; }

.review__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
  flex: 1;
}

/* ---------- FAQ accordion ------------------------------------------------- */

.faq {
  max-width: 880px;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__item:first-child { border-top: 1px solid var(--border); }

.faq__summary {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  letter-spacing: -0.015em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-fast) var(--ease);
}
.faq__summary::-webkit-details-marker { display: none; }

.faq__summary:hover { color: var(--accent); }

.faq__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: transform var(--dur-base) var(--ease), background var(--dur-fast) var(--ease);
}
details[open] .faq__icon { transform: rotate(45deg); background: var(--accent); color: #FFF; }

.faq__body {
  padding: 0 0 28px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 720px;
}

.faq__body .img-placeholder {
  margin-top: 16px;
  max-width: 480px;
}

/* ---------- Footer -------------------------------------------------------- */

.footer {
  position: relative;
  background: var(--bg-dark);
  color: var(--bg-soft);
  padding-block: clamp(48px, 6vw, 80px);
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

.footer__grid {
  position: relative;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .footer__grid { grid-template-columns: 1fr 1fr; } }
/* 3 колонки на десктопе: brand (шире) + меню + контакты. Раньше было 4
   с отдельными «Услугами» и «Клиентам», но обе группы дублировали
   навигацию в шапке. Объединил в один пункт «Меню» с якорными
   ссылками на секции. */
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; } }

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__list a {
  font-size: 0.9375rem;
  color: var(--bg-soft);
  opacity: 0.8;
  transition: opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.footer__list a:hover { opacity: 1; color: var(--accent-soft); }

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 340px;
}

.footer__brand p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.footer__socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.footer__socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  color: var(--bg-soft);
  transition: background var(--dur-fast) var(--ease);
}
.footer__socials a:hover { background: var(--accent); color: #FFF; }

.footer__bottom {
  position: relative;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  align-items: center;
  justify-content: space-between;
}

.footer__bottom a { color: var(--bg-soft); opacity: 0.7; }
.footer__bottom a:hover { opacity: 1; color: var(--accent-soft); }

/* ---------- Mobile menu (<dialog>) ---------------------------------------- */

.m-menu {
  border: 0;
  width: 100vw; max-width: 100%;
  height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  /* Чистый fade без translateY — логотип и крестик появляются ровно на той
     же вертикальной позиции, что и в шапке сайта, без видимого «скачка». */
  opacity: 0;
  transition:
    opacity 160ms var(--ease),
    overlay 160ms var(--ease) allow-discrete,
    display 160ms var(--ease) allow-discrete;
}
.m-menu[open] {
  opacity: 1;
}
@starting-style {
  .m-menu[open] {
    opacity: 0;
  }
}

.m-menu::backdrop {
  background: rgba(26, 24, 21, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition:
    opacity 180ms var(--ease),
    overlay 180ms var(--ease) allow-discrete,
    display 180ms var(--ease) allow-discrete;
}
.m-menu[open]::backdrop { opacity: 1; }
@starting-style {
  .m-menu[open]::backdrop { opacity: 0; }
}

.m-menu__inner {
  padding-inline: var(--container-pad);
  padding-top: calc(12px + var(--safe-top));
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

/* Шапка меню должна быть геометрически идентична .header__inner: такой же
   min-height без дополнительного padding-block — иначе логотип и крестик
   оказываются ~8px ниже бургера из шапки, и при открытии это читается как
   «скачок» вниз. */
.m-menu__head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.m-menu__head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.m-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-menu__link {
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 4vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.m-menu__foot {
  margin-top: auto;
  padding-top: 16px;
  padding-bottom: var(--safe-bottom);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Кнопка «Рассчитать цену» в футере меню: чуть компактнее базовой CTA,
   но не плоская — видимая и тапабельная. */
.m-menu__foot .btn {
  min-height: 52px;
  padding: 14px 24px;
  font-size: 1rem;
}
