/* ==========================================================================
   ИП Иванов — лендинг фулфилмента одежды для Wildberries
   Дизайн-система: тёмная тема, один акцентный цвет, крупная типографика.
   ========================================================================== */

/* ---------- 1. Токены ---------- */
:root {
  --bg:          #0B0E14;
  --bg-alt:      #0F141D;
  --surface:     #151B27;
  --surface-2:   #1B2331;
  --border:      #242E40;
  --border-soft: #1C2433;

  --text:        #E9EEF7;
  --text-dim:    #A9B6CB;
  --muted:       #7C8AA1;

  --accent:      #FF6B2C;
  --accent-hover:#FF8145;
  --accent-soft: rgba(255, 107, 44, .12);
  --info:        #4DA3FF;
  --success:     #2ED47A;
  --danger:      #FF5A5A;

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   22px;

  --gap-xs:      8px;
  --gap-sm:      14px;
  --gap:         24px;
  --gap-lg:      40px;
  --section-y:   clamp(56px, 8vw, 104px);

  --shadow:      0 10px 40px rgba(0, 0, 0, .35);
  --shadow-lg:   0 24px 70px rgba(0, 0, 0, .5);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;

  --maxw:        1180px;
  --maxw-narrow: 840px;
}

/* ---------- 2. Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Перебивает display у .modal/.lightbox — иначе они видны, пока JS их не откроет */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5vw, 54px); }
h2 { font-size: clamp(25px, 3.6vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 21px); }
p  { margin: 0 0 1em; }

b, strong { font-weight: 700; color: var(--text); }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: var(--accent); color: #fff; }

.visually-hidden {
  position: absolute; 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: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- 3. Сетка ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding: var(--section-y) 0; }

.section__head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 52px); text-align: center; }
.section__title { margin-bottom: .4em; }
.section__lead { color: var(--text-dim); font-size: clamp(16px, 1.6vw, 18px); margin: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--accent { color: var(--accent); }

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

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

/* ---------- 4. Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 2.5vw, 28px);
}
.card--outline { background: transparent; border-color: var(--border); }
.card--accent {
  background: linear-gradient(160deg, rgba(255,107,44,.10), rgba(255,107,44,.02) 60%), var(--surface);
  border-color: rgba(255, 107, 44, .3);
}

.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.card__icon svg { width: 22px; height: 22px; }

/* ---------- 5. Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 16px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease, color .18s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }

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

.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--tg { background: var(--surface-2); border-color: var(--border); color: var(--text); padding: 13px 16px; }
.btn--tg svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.btn--tg:hover { border-color: var(--info); color: var(--info); }

.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 30px; font-size: 17px; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 6. Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 14, 20, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.header.is-scrolled { border-bottom-color: var(--border-soft); background: rgba(11, 14, 20, .95); }

.header__inner { display: flex; align-items: center; gap: var(--gap); height: 70px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.logo__mark { flex: none; }
.logo__mark rect { fill: var(--accent); stroke: none; }
.logo__mark rect:first-child { fill: var(--text); }
.logo__text { font-size: 19px; }

.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--text-dim); }
.nav a { transition: color .15s ease; }
.nav a:hover { color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }
.header__phone { font-weight: 600; white-space: nowrap; }
.header__phone:hover { color: var(--accent); }

.burger {
  display: none;
  width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .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 { border-top: 1px solid var(--border-soft); background: var(--bg-alt); }
.mobile-menu nav { display: flex; flex-direction: column; padding: 8px 20px 20px; }
.mobile-menu a { padding: 13px 0; border-bottom: 1px solid var(--border-soft); font-size: 16px; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu__phone { font-weight: 700; color: var(--accent); }

/* ---------- 7. Первый экран ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 76px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }

/* Видео-фон первого экрана. Постер виден всегда, видео подставляется скриптом
   только на широких экранах (см. initHeroVideo в js/main.js). */
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__media-poster,
.hero__media-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media-video { opacity: 0; transition: opacity .9s ease; }
.hero__media-video.is-playing { opacity: 1; }
/* Затемнение: слева плотное — под текстом, справа прозрачнее — там видно склад */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 12%, rgba(11,14,20,.90) 46%, rgba(11,14,20,.62) 100%),
    linear-gradient(180deg, rgba(11,14,20,.55) 0%, transparent 30%, rgba(11,14,20,.75) 100%);
}
@media (max-width: 820px) {
  /* На узком экране текст идёт поверх всей ширины — затемняем плотнее */
  .hero__media::after { background: linear-gradient(180deg, rgba(11,14,20,.88), rgba(11,14,20,.94)); }
}

.hero__glow {
  position: absolute; inset: -30% 40% 30% -20%;
  background: radial-gradient(closest-side, rgba(255,107,44,.18), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface);
  font-size: 13.5px; color: var(--text-dim);
  margin: 0 0 22px;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(46,212,122,.15); }

.hero__title { margin-bottom: 20px; }
.hero__lead { font-size: clamp(16.5px, 1.8vw, 19px); color: var(--text-dim); max-width: 34em; margin-bottom: 26px; }

.hero__bullets { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 11px; }
.hero__bullets li { display: flex; align-items: center; gap: 11px; font-size: 16px; color: var(--text); }
.hero__bullets svg { width: 19px; height: 19px; flex: none; color: var(--success); stroke-width: 2.4; }

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

.lead-form__title { font-size: 21px; margin-bottom: 8px; }
.lead-form__sub { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; }

/* ---------- 8. Формы ---------- */
.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-size: 13.5px; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea,
.calc__field select {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit; font-size: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #5D6A80; }
.field input:focus, .field textarea:focus,
.field select:focus, .calc__field select:focus { border-color: var(--accent); outline: none; background: var(--surface-2); }

/* select в опроснике: длинная опция не должна растягивать поле */
.field select { max-width: 100%; appearance: none; cursor: pointer; }

.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); }
.field__error { display: none; font-size: 13px; color: var(--danger); margin-top: 6px; }
.field.is-invalid .field__error { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.consent input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.consent a { color: var(--text-dim); text-decoration: underline; }

.form-status { margin: 14px 0 0; font-size: 14px; min-height: 1px; }
.form-status.is-ok { color: var(--success); }
.form-status.is-error { color: var(--danger); }

/* ---------- 9. Цифры доверия ---------- */
.stats { border-block: 1px solid var(--border-soft); background: var(--bg-alt); padding: clamp(28px, 3.5vw, 44px) 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.stat__value { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.stat__unit { font-size: .55em; color: var(--text-dim); font-weight: 700; }
.stat__label { font-size: 14.5px; color: var(--text-dim); margin-top: 6px; }

/* ---------- 10. Боли ---------- */
.pain { position: relative; }
.pain__num { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .08em; margin-bottom: 12px; }
.pain h3 { font-size: 18px; margin-bottom: 10px; }
.pain p { margin: 0; font-size: 15px; color: var(--text-dim); }

/* ---------- 11. УТП ---------- */
.usp__flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center; gap: 14px;
  margin-bottom: var(--gap-lg);
}
.usp__step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px);
  height: 100%;
}
.usp__step-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 16px;
}
.usp__step-icon svg { width: 23px; height: 23px; }
.usp__step h3 { font-size: 18px; margin-bottom: 9px; }
.usp__step p { margin: 0; font-size: 15px; color: var(--text-dim); }

.usp__arrow { color: var(--muted); }
.usp__arrow svg { width: 26px; height: 26px; }

.usp__extra .card h3 { font-size: 18px; }
.usp__extra .card p { margin: 0; font-size: 15px; color: var(--text-dim); }

/* ---------- 12. Услуги ---------- */
.service h3 { font-size: 17.5px; margin-bottom: 9px; }
.service p { margin: 0; font-size: 14.5px; color: var(--text-dim); }
.service { transition: border-color .18s ease, transform .18s ease; }
.service:hover { border-color: rgba(255,107,44,.4); transform: translateY(-3px); }

/* ---------- 13. Тарифы ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: var(--gap);
  -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.table thead th {
  background: var(--surface-2);
  font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim);
  font-weight: 700; white-space: nowrap;
}
.th-note { display: block; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 500; }
.table tbody th { font-weight: 600; color: var(--text); }
.table tbody td { color: var(--accent); font-weight: 700; white-space: nowrap; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.td-span { text-align: center !important; }

/* Прогрессивная шкала */
.scale {
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
}
.scale h3 { font-size: 22px; }
.scale p { font-size: 15px; color: var(--text-dim); margin-bottom: .8em; }
.scale__note { font-size: 13.5px; color: var(--muted); margin: 0; }

.scale__bars { display: grid; gap: 14px; }
.scale__row { display: grid; grid-template-columns: 130px 1fr 84px; align-items: center; gap: 14px; }
.scale__label { font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.scale__bar { height: 12px; background: var(--bg-alt); border-radius: 100px; overflow: hidden; }
.scale__bar span { display: block; height: 100%; background: linear-gradient(90deg, #FF9A5C, var(--accent)); border-radius: 100px; }
.scale__price { font-weight: 800; font-size: 16px; text-align: right; white-space: nowrap; }
.scale__row--best .scale__price { color: var(--accent); }
.scale__row--best .scale__bar span { background: linear-gradient(90deg, #2ED47A, #1FA85E); }

/* ---------- 14. Калькулятор ---------- */
.calc__wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--gap); align-items: start; }

.calc__field { margin-bottom: 22px; border: 0; padding: 0; }
.calc__field:last-child { margin-bottom: 0; }
.calc__field legend { padding: 0; }

.calc__field select { appearance: none; background-image: none; cursor: pointer; }

input[type="range"] {
  width: 100%; height: 6px; margin: 10px 0 4px;
  background: var(--bg-alt); border-radius: 100px;
  appearance: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); cursor: pointer;
}
.calc__range-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

.calc__checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--text-dim); cursor: pointer; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.check:hover { color: var(--text); }

.calc__result { position: sticky; top: 90px; }
.calc__result-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.calc__total { font-size: clamp(32px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.calc__per-unit { font-size: 15px; color: var(--text-dim); margin: 8px 0 18px; }

.calc__breakdown { list-style: none; margin: 0 0 18px; padding: 18px 0 0; border-top: 1px solid var(--border); display: grid; gap: 9px; }
.calc__breakdown li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-dim); }
.calc__breakdown li b { color: var(--text); font-weight: 600; white-space: nowrap; }

.calc__disclaimer { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }

/* ---------- 15. Как работаем ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: step; }
.step {
  position: relative;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: clamp(20px, 2.4vw, 26px);
}
.step__num {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 15px;
  margin-bottom: 14px;
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--text-dim); margin-bottom: 12px; }
.step__time { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--info); background: rgba(77,163,255,.1); padding: 4px 10px; border-radius: 100px; }

/* ---------- 16. Прозрачность ---------- */
.transparency__inner { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.transparency .section__title, .transparency .section__lead { text-align: left; }

.checklist { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-size: 15.5px; color: var(--text-dim); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.checklist li::after {
  content: ""; position: absolute; left: 5.5px; top: 12px;
  width: 7px; height: 4px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.checklist--compact li { font-size: 14.5px; }

.tg-mock {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.tg-mock__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tg-mock__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 800; color: #fff; }
.tg-mock__name { font-weight: 700; font-size: 15px; }
.tg-mock__status { font-size: 12.5px; color: var(--muted); }
.tg-mock__body { padding: 18px; display: grid; gap: 12px; background: var(--bg-alt); }
.tg-msg {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 4px 14px 14px 14px;
  padding: 12px 15px; font-size: 14px; line-height: 1.55; color: var(--text-dim);
}
.tg-msg b { color: var(--text); }

/* ---------- 17. Галерея ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery__item {
  position: relative; padding: 0; border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface); aspect-ratio: 4 / 3;
  transition: border-color .18s ease, transform .18s ease;
}
.gallery__item:hover { border-color: var(--accent); transform: translateY(-3px); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 16px 12px; text-align: left;
  font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 7, 11, .93);
  display: grid; place-items: center; padding: 40px 20px;
}
.lightbox img { max-width: min(1100px, 92vw); max-height: 78vh; border-radius: var(--radius); }
.lightbox__caption { margin-top: 16px; color: var(--text-dim); font-size: 15px; text-align: center; }
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 26px; line-height: 1; cursor: pointer;
}

/* ---------- 18. Кейсы ---------- */
.case__tag { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.case h3 { font-size: 18px; margin-bottom: 14px; }
.case__problem, .case__result { font-size: 14.5px; color: var(--text-dim); margin-bottom: 10px; }
.case__metrics { display: flex; gap: 22px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.case__metrics div { display: flex; flex-direction: column; }
.case__num { font-size: 25px; font-weight: 800; color: var(--success); letter-spacing: -.02em; }
.case__metrics span:last-child { font-size: 12.5px; color: var(--muted); }

/* ---------- 19. Отзывы ---------- */
.review { display: flex; flex-direction: column; }
.review__stars { color: var(--accent); font-size: 17px; letter-spacing: 2px; margin-bottom: 14px; }
.review__star-off { color: var(--border); }
.review blockquote { margin: 0 0 16px; font-size: 15.5px; color: var(--text-dim); line-height: 1.6; }

.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review__avatar {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 18px; font-weight: 700;
}
.review__name { font-size: 15.5px; font-weight: 700; color: var(--text); }
.review__role { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.review__meta { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--muted); }

/* Плашка общей оценки в шапке секции */
.rating {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px; padding: 10px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px;
}
.rating__score { font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1; }
.rating__stars { color: var(--accent); letter-spacing: 2px; font-size: 15px; }
.rating__meta { font-size: 13.5px; color: var(--muted); }

/* ---------- 20. Лид-магнит ---------- */
.magnet { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 3.5vw, 44px); align-items: center; }
.magnet h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: .4em; }
.magnet__text p { margin: 0; color: var(--text-dim); font-size: 15.5px; }
.magnet__form .field { margin-bottom: 12px; }
.magnet__form .btn { width: 100%; }

/* ---------- 21. Что ещё умеем ---------- */
.extra__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.extra__item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
}
.extra__item b { font-size: 16px; }
.extra__item span { font-size: 14px; color: var(--muted); }

/* ---------- 22. FAQ ---------- */
.accordion { display: grid; gap: 10px; }
.acc { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.acc summary {
  list-style: none; cursor: pointer;
  padding: 18px 52px 18px 22px; position: relative;
  font-weight: 600; font-size: 16.5px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.acc[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.acc[open] summary { color: var(--accent); }
.acc__body { padding: 0 22px 20px; }
.acc__body p { margin: 0; font-size: 15px; color: var(--text-dim); }

/* ---------- 23. Финальная CTA ---------- */
.cta-final__box { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.5vw, 44px); align-items: start; }
.cta-final .section__title, .cta-final .section__lead { text-align: left; }
.cta-final .section__title { font-size: clamp(24px, 3vw, 32px); }
.cta-final .section__lead { margin-bottom: 20px; }

/* ---------- 24. Контакты ---------- */
.contacts__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--gap); align-items: stretch; }
.contacts__list { margin: 0 0 24px; display: grid; gap: 16px; }
.contacts__list div { display: grid; gap: 3px; }
.contacts__list dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contacts__list dd { margin: 0; font-size: 16px; }
.contacts__list a:hover { color: var(--accent); }

.contacts__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-soft); min-height: 340px; }
.contacts__map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
.map-placeholder {
  height: 100%; min-height: 340px;
  display: grid; place-items: center; align-content: center; gap: 8px;
  background: var(--surface); color: var(--muted); text-align: center; padding: 24px;
}
.map-placeholder svg { width: 40px; height: 40px; color: var(--border); }
.map-placeholder p { margin: 0; font-weight: 600; color: var(--text-dim); }
.map-placeholder span { font-size: 13px; }

/* ---------- 25. Футер ---------- */
.footer { border-top: 1px solid var(--border-soft); background: var(--bg-alt); padding: clamp(40px, 5vw, 64px) 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--gap); }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h3 { font-size: 15px; margin-bottom: 4px; }
.footer__col a { font-size: 14.5px; color: var(--text-dim); }
.footer__col a:hover { color: var(--accent); }
.footer__about { font-size: 14px; color: var(--muted); margin: 12px 0 4px; max-width: 34em; }
.footer__addr { font-size: 14px; color: var(--muted); margin: 0; }
.footer__socials { display: flex; gap: 10px; margin-top: 6px; }
.footer__socials a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-dim);
}
.footer__socials svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.footer__socials a:hover { border-color: var(--accent); color: var(--accent); }

.footer__bottom {
  margin-top: clamp(28px, 4vw, 44px); padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer__bottom p { margin: 0; }
.footer__disclaimer { max-width: 46em; }

/* ---------- 26. Липкая мобильная кнопка ---------- */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  display: none; gap: 10px;
  padding: 10px; border-radius: 16px;
  background: rgba(15, 20, 29, .92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.sticky-cta .btn--primary { flex: 1; }
/* Прячется, когда на экране сама форма заявки: иначе под кнопкой
   «Отправить заявку» встаёт вторая, «Оставить заявку», и человек гадает,
   на какую жать. Класс вешает initStickyCta() в js/main.js. */
.sticky-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}
.sticky-cta { transition: opacity .2s ease, transform .25s ease; }

/* ---------- 27. Модальное окно ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal__overlay { position: absolute; inset: 0; background: rgba(5, 7, 11, .82); backdrop-filter: blur(3px); }
.modal__dialog {
  position: relative; width: min(460px, 100%);
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal__close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.modal__close:hover { color: var(--accent); border-color: var(--accent); }

body.is-locked { overflow: hidden; }

/* ---------- 28. Адаптив ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: flex; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .calc__wrap { grid-template-columns: 1fr; }
  .calc__result { position: static; }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__form-wrap { max-width: 520px; }
  .usp__flow { grid-template-columns: 1fr; }
  .usp__arrow { justify-self: center; transform: rotate(90deg); }
  .transparency__inner { grid-template-columns: 1fr; }
  .scale { grid-template-columns: 1fr; }
  .magnet { grid-template-columns: 1fr; }
  .cta-final__box { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .extra__list { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header__phone { display: none; }
  .header__actions .btn { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .sticky-cta { display: flex; }
  body { padding-bottom: 0; }
  main { padding-bottom: 80px; }
}

@media (max-width: 560px) {
  .grid--3, .grid--4, .services__grid, .steps, .extra__list, .gallery__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .calc__checks { grid-template-columns: 1fr; }
  .scale__row { grid-template-columns: 96px 1fr 68px; gap: 10px; }
  .scale__label { font-size: 13px; }
  .hero__actions .btn { width: 100%; }
  .case__metrics { gap: 16px; }
}

/* ---------- 28.1. Контакты: карточка «ближайший склад» ---------- */
.contacts__nearest { display: flex; flex-direction: column; }
.contacts__nearest h3 { font-size: 21px; margin-bottom: 12px; }
.contacts__nearest p { font-size: 15.5px; color: var(--text-dim); }
.contacts__nearest-note {
  padding: 14px 16px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
}
.contacts__nearest .btn { margin-top: auto; align-self: flex-start; }

/* ---------- 28.2. Округа под картой сети ---------- */
.network__districts {
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid var(--border-soft);
}
.network__districts-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.network__districts-head h3 { font-size: 18px; margin: 0; }
.network__districts-head span { font-size: 13.5px; color: var(--muted); }
.district-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  list-style: none; margin: 0; padding: 0;
}
.district {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}
.district b { font-weight: 600; }
.district span {
  flex: none;
  min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center;
  border-radius: 100px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700;
}

@media (max-width: 1080px) { .district-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .district-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .district-grid { grid-template-columns: 1fr; } }

/* ---------- 29. Опросник в форме ---------- */
.quiz {
  margin: 4px 0 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .015);
}
.quiz[open] { border-style: solid; border-color: rgba(255, 107, 44, .35); }

.quiz__toggle {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  position: relative;
}
.quiz__toggle::-webkit-details-marker { display: none; }
.quiz__toggle-text { position: relative; padding-left: 20px; }
.quiz__toggle-text::before {
  content: "+"; position: absolute; left: 0; top: -1px;
  color: var(--accent); font-size: 17px; font-weight: 700; line-height: 1;
}
.quiz[open] .quiz__toggle-text::before { content: "−"; }
.quiz[open] .quiz__toggle { color: var(--accent); }
.quiz__hint { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: auto; }

.quiz__body { padding: 4px 16px 16px; border-top: 1px solid var(--border-soft); }
.quiz__body .field { margin-bottom: 14px; }
.quiz__body .field:last-child { margin-bottom: 0; }
.quiz__body fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.quiz__body legend { padding: 0; }

.quiz__triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quiz__triple input {
  width: 100%; padding: 11px 12px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 15px;
}
.quiz__triple input:focus { border-color: var(--accent); outline: none; background: var(--surface-2); }

.quiz__checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 2px; }

.field__note { display: block; margin-top: 7px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.form-alt { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.form-alt a { color: var(--text-dim); text-decoration: underline; }
.form-alt a:hover { color: var(--accent); }

.table-note { margin: -8px 0 var(--gap); font-size: 13.5px; color: var(--muted); }

.calc__sub-label { margin-top: 14px; }
.calc__field.is-muted { opacity: .5; }

@media (max-width: 560px) {
  .quiz__triple { grid-template-columns: 1fr; }
  .quiz__checks { grid-template-columns: 1fr; }
  .quiz__hint { margin-left: 0; width: 100%; }
}

/* ---------- 30. Уважение к настройкам движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   СЕТЬ СКЛАДОВ ПО МОСКВЕ
   ========================================================================== */
.network__layout {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(20px, 3vw, 40px); align-items: stretch;
}
.network__map {
  margin: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); min-height: 420px;
  display: flex; overflow: hidden;
}
/* Виджет Яндекс.Карт: тянется на весь блок, своей рамки не рисуем */
.network__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

.network__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.network__points li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(16px, 2vw, 22px);
  color: var(--text-dim); font-size: 15.5px; line-height: 1.55;
}
.network__points b { display: block; color: var(--text); margin-bottom: 5px; font-size: 16.5px; }

/* ==========================================================================
   АВТОРСКАЯ СИСТЕМА
   ========================================================================== */
.syst__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
}
.syst__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(18px, 2.2vw, 26px);
}
.syst__card h3 { font-size: 17px; margin: 0 0 8px; }
.syst__card p { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.55; }
.syst__card--accent { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 980px) {
  .network__layout { grid-template-columns: 1fr; }
  .syst__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .syst__grid { grid-template-columns: 1fr; }
  .network__map { min-height: 220px; }
}

/* ---------- 31. Опросник-квалификатор (секция #quiz, js/quiz.js) ----------
   Отдельный блок от «29. Опросник в форме»: тот — раскрывающийся список
   необязательных полей внутри обычной формы, этот — самостоятельный
   пошаговый экран, форма №2 системы приёма заявок. */

.quiz2__card {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.quiz2__progress {
  height: 4px;
  background: var(--border-soft);
}
.quiz2__progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .35s ease;
}

.quiz2__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 16px clamp(18px, 4vw, 34px) 0;
  min-height: 40px;
}
.quiz2__back {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.quiz2__back:hover { color: var(--accent); }
.quiz2__counter {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.quiz2__stage { padding: 10px clamp(18px, 4vw, 34px) clamp(22px, 4vw, 34px); }

.quiz2__title {
  margin: 6px 0 6px;
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.25;
}
.quiz2__hint {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 15px;
}

.quiz2__options { display: grid; gap: 10px; }

.quiz2__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.quiz2__option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.quiz2__option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.quiz2__option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Сводка ответов на шаге контактов — человек видит, что именно отправляет */
.quiz2__summary {
  list-style: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: 14px;
}
.quiz2__summary li {
  display: flex;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 5px 0;
}
.quiz2__summary li + li { border-top: 1px solid var(--border-soft); }
.quiz2__summary span { color: var(--muted); flex: none; max-width: 45%; }
.quiz2__summary b { color: var(--text-dim); font-weight: 600; text-align: right; }

.quiz2__done { text-align: center; padding: 12px 0 8px; }
.quiz2__done-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--success);
  background: rgba(46, 212, 122, .12);
}

@media (max-width: 560px) {
  .quiz2__summary li { flex-direction: column; gap: 2px; }
  .quiz2__summary span { max-width: none; }
  .quiz2__summary b { text-align: left; }
}

/* ---------- 32. Голосовая заявка (внутри основной формы, js/voice.js) ----------
   Раскрывающийся блок рядом с опросником, а не отдельная секция: имя и
   телефон человек уже ввёл выше в этой же форме. */

.voice > .quiz__toggle .quiz__toggle-text { display: flex; align-items: center; gap: 8px; }

.voice__stage { display: grid; gap: 12px; }

.voice__row { display: flex; align-items: center; gap: 14px; }
.voice__text { flex: 1; min-width: 0; }

.voice__mic {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease;
}
.voice__mic:hover { background: rgba(255, 107, 44, .22); transform: scale(1.05); }
.voice__mic:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.voice__lead { margin: 0 0 3px; font-size: 14.5px; }
.voice__note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.voice__note.is-error { color: var(--danger); }

/* Пульсация — единственный признак, что микрофон действительно слушает */
.voice__pulse {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  animation: voice-pulse 1.4s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { transform: scale(.82); opacity: .5; }
  50%      { transform: scale(1);   opacity: .95; }
}

.voice__timer { margin: 0 0 2px; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.voice__max { font-size: 13px; font-weight: 400; color: var(--muted); }
.voice__stop { flex: none; }

.voice__done { margin: 0; font-size: 14.5px; font-weight: 600; }
.voice__player { width: 100%; }
.voice__again { justify-self: start; }

@media (max-width: 560px) {
  .voice__row { flex-wrap: wrap; }
  .voice__stop { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .voice__pulse { animation: none; }
  .voice__mic:hover { transform: none; }
}

/* ---------- 33. ИИ-чат-бот (виджет #chat, js/chat.js) ---------- */

.chat__launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #14100D;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .15s ease;
}
.chat__launcher:hover { background: var(--accent-hover); transform: translateY(-2px); }
.chat__launcher-icon { font-size: 18px; line-height: 1; }

.chat__panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 96;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.chat__title { margin: 0; font-size: 15px; font-weight: 700; }
.chat__sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chat__close {
  margin-left: auto;
  width: 30px; height: 30px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
.chat__close:hover { background: var(--surface); color: var(--text); }

.chat__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat__msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat__msg--bot  { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.chat__msg--user { align-self: flex-end;   background: var(--accent-soft); border-bottom-right-radius: 5px; }

/* Три точки, пока модель думает: без них пауза читается как поломка */
.chat__typing { display: flex; gap: 4px; align-items: center; padding: 14px 13px; }
.chat__typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: chat-dot 1.2s ease-in-out infinite;
}
.chat__typing span:nth-child(2) { animation-delay: .18s; }
.chat__typing span:nth-child(3) { animation-delay: .36s; }
@keyframes chat-dot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30%           { opacity: 1;  transform: translateY(-3px); }
}

.chat__status { margin: 0; padding: 0 16px; font-size: 13px; color: var(--muted); }
.chat__status.is-error { color: var(--danger); padding-bottom: 8px; }

.chat__hand { margin: 0 16px 10px; }

.chat__form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}
.chat__form textarea {
  flex: 1;
  min-width: 0;
  max-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: none;
}
.chat__form textarea:focus { border-color: var(--accent); outline: none; }
.chat__send {
  flex: none;
  width: 42px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #14100D;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
.chat__send:disabled { opacity: .5; cursor: default; }

.chat__lead {
  align-self: stretch;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-alt);
}
.chat__lead-title { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.chat__lead-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.chat__lead .btn--ghost { margin-top: 8px; }

/* На узком экране внизу уже живёт липкая кнопка заявки — поднимаем виджет
   над ней, иначе они перекрывают друг друга. */
@media (max-width: 1080px) {
  .chat__launcher { bottom: 84px; right: 14px; padding: 11px 15px; }
  .chat__panel { bottom: 78px; right: 12px; height: min(520px, calc(100vh - 110px)); }
}

@media (prefers-reduced-motion: reduce) {
  .chat__typing span { animation: none; }
  .chat__launcher:hover { transform: none; }
}

/* Микрофон в чате. Голосом люди рассказывают заметно больше, чем печатают,
   поэтому кнопка стоит наравне с полем ввода, а не спрятана в меню. */
.chat__mic {
  flex: none;
  width: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chat__mic:hover { border-color: var(--accent); }
.chat__mic.is-recording {
  background: var(--accent);
  border-color: var(--accent);
  color: #14100D;
  animation: chat-rec 1.2s ease-in-out infinite;
}
@keyframes chat-rec {
  0%, 100% { opacity: 1; }
  50%      { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
  .chat__mic.is-recording { animation: none; }
}
