/* ============================================================
   Лендинг «Интеграция МИС IDENT с Битрикс24»
   Перенос hifi-макета из design_handoff_ident_bitrix24 в классы.
   Значения — из tokens.css; сырых цветов и размеров здесь быть не должно,
   кроме единичных величин, привязанных к конкретному элементу макета.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* Классы с display:flex перебивают браузерное [hidden]{display:none}.
   Панель калькулятора переключает состояния именно атрибутом, поэтому правило
   должно быть сильнее любого из них. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  font-family: var(--font);
  color: var(--text);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

h1, h2, h3, p, figure { margin: 0; }

h1 {
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.015em;
}

h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.01em;
}

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

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

/* ---------- Каркас ---------- */

.section { scroll-margin-top: 70px; }
.section--white { background: var(--bg-section); }
.section--soft { background: var(--accent-soft); border-top: 1px solid rgba(18, 38, 32, .06); }
.section--dark { background: var(--bg-dark); color: #fff; }

/* Ширина как в макете: 1240px — это ШИРИНА КОНТЕНТА, поля лежат снаружи.
   С border-box паддинг съедал бы её изнутри, контент становился 1144px,
   и каждая секция разъезжалась по высоте из-за лишних переносов строк. */
.container {
  box-sizing: content-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.container--sm { padding-block: var(--pad-y-sm); }   /* калькулятор, совместимость МИС */
.container--xs { padding-block: clamp(40px, 5vw, 60px); }  /* гарантии */

.head { max-width: 820px; display: flex; flex-direction: column; gap: 14px; }
.head--g16 { gap: 16px; }          /* «Проблема» — единственная секция с 16px */
.head--cases { max-width: 660px; } /* «Кейсы» — заголовок уже остальных */
.head--full { max-width: none; }   /* «Интегратор» — абзац во всю ширину */
.head--narrow { max-width: 760px; }

.eyebrow {
  font: 600 11px var(--font-mono);
  letter-spacing: .12em;
  color: var(--accent-label);
}
.section--dark .eyebrow { color: var(--accent-on-dark); }

.lead { font-size: 16.5px; line-height: 1.6; color: var(--text-2); }
.section--dark .lead { color: rgba(255, 255, 255, .7); }

.note { font-size: 12px; line-height: 1.5; color: var(--text-3); }

/* Сетки: адаптив без медиазапросов, минимум колонки задаётся через --min */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 330px), 100%), 1fr));
  gap: 16px;
}
.grid--gap-lg { gap: clamp(24px, 4vw, 48px); }
.mt-lg { margin-top: 32px; }
.mt-36 { margin-top: 36px; }

/* ---------- Кнопки и мелкие элементы ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: var(--r-btn);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--sh-btn); }
.btn--primary:hover { color: #fff; filter: brightness(1.06); }
.btn--ghost { border: 1.5px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover { color: var(--text); border-color: var(--accent); }
.btn--onDark { background: var(--accent-on-dark); color: var(--bg-dark); font-size: 15px; font-weight: 700; padding: 14px 24px; }
.btn--onDark:hover { color: var(--bg-dark); filter: brightness(1.05); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
}

.tick {
  flex: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-chip-bg);
  color: var(--accent-chip-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.tick--lg { width: 20px; height: 20px; font-size: 11px; }
.tick--cross { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .75); }

.badge {
  font: 600 10px var(--font-mono);
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-label);
}
.badge--onDark { background: var(--accent-on-dark); color: var(--bg-dark); }

.tag {
  padding: 6px 11px;
  background: #f2f1ec;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
}
.tag--onDark { background: rgba(255, 255, 255, .1); }

.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.wordmark .i { color: var(--brand-ident); }
.wordmark .n { color: var(--brand-b24); }

/* ---------- Шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar__inner {
  box-sizing: content-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar__logo { display: block; height: 26px; width: auto; }

#topnav { display: flex; gap: 18px; margin-left: 14px; flex-wrap: wrap; }
#topnav a { font-size: 13.5px; font-weight: 500; color: rgba(18, 38, 32, .65); }
#topnav a:hover { color: var(--text); }

.topbar__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
#topphone { font-size: 14px; font-weight: 600; color: var(--text); }
#topcta {
  padding: 9px 18px;
  border-radius: var(--r-btn-sm);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
#topcta:hover { color: #fff; filter: brightness(1.06); }

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

.hero__inner {
  box-sizing: content-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad-x) clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero__col { display: flex; flex-direction: column; gap: 22px; }
.hero__eyebrow { display: flex; align-items: center; gap: 8px; }
.hero__eyebrow span {
  font: 600 12px var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-label);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.hero__lead { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 540px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__cta { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }

.sync { display: flex; flex-direction: column; align-items: stretch; }
.sync__card { border-radius: var(--r-card-lg); padding: 22px 24px; }
.sync__card--light { background: var(--bg-section); border: 1px solid var(--border); box-shadow: var(--sh-card); }
.sync__card--dark { background: var(--bg-dark); color: #fff; box-shadow: var(--sh-card-dark); }
.sync__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sync__role { font-size: 12px; color: var(--text-muted); }
.sync__card--dark .sync__role { color: var(--text-on-dark-3); }
.sync__top .badge { margin-left: auto; }
.sync__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.sync__link { display: flex; align-items: center; gap: 12px; padding: 10px 28px; }
.sync__dash {
  width: 2px;
  align-self: stretch;
  min-height: 46px;
  margin-left: 32px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 11px);
}
.sync__meta { display: flex; flex-direction: column; gap: 5px; }
.sync__meta > span { font: 600 11px var(--font-mono); color: var(--accent-text); }
.sync__pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 4px 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-chip-strong);
}

.trust { border-top: 1px solid var(--border-soft); }
.trust__inner {
  box-sizing: content-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.trust__inner b { font-weight: 600; color: rgba(18, 38, 32, .75); }

/* ---------- Карточки ---------- */

.card {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section--white .card { background: var(--bg-page); }
.card--onLight { background: var(--bg-section); border-color: var(--border); box-shadow: var(--sh-card); }
.card__num { font: 600 12px var(--font-mono); color: var(--danger); }
.card__title { font-size: 16px; font-weight: 700; }
.card__text { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.card__metric { font: 700 30px var(--font-mono); color: var(--accent-text); }

/* Решение 1+1=3 */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; margin-top: 36px; }
.list {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--r-card-lg);
  padding: 22px 24px;
}
.list--accent { border-color: var(--accent-on-dark); }
.list__title { font: 600 11px var(--font-mono); letter-spacing: .1em; color: var(--accent-on-dark); margin-bottom: 14px; }
.list ul { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--border-on-dark); font-size: 14px; }
.list li:last-child { border-bottom: none; }

.banner {
  margin-top: 22px;
  background: var(--accent-on-dark);
  color: var(--bg-dark);
  border-radius: var(--r-card-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.banner__eq { font: 700 22px var(--font-mono); white-space: nowrap; }
.banner__text { font-size: 14px; font-weight: 500; line-height: 1.5; }

/* Совместимость МИС */
.mis { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mis__item {
  padding: 14px 20px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mis__item--primary { border-color: var(--accent); }
.mis__item--cta { border-style: dashed; border-color: var(--accent); color: var(--accent-text); }

/* Данные и безопасность */
.safe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; margin-top: 36px; }
.safe__box { border-radius: var(--r-card-lg); padding: 26px 28px; }
.safe__box--light { background: var(--bg-section); border: 1px solid var(--border); box-shadow: var(--sh-card); }
.safe__box--dark { background: var(--bg-dark); color: #fff; box-shadow: var(--sh-card-dark); }
.safe__title { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.safe ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.safe li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.safe__foot {
  margin-top: 20px;
  padding: 13px 16px;
  border-radius: var(--r-card-sm);
  background: rgba(255, 255, 255, .07);
  font-size: 13px;
  color: var(--text-on-dark-2);
}

/* Этапы внедрения */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 16px; margin-top: 36px; }
.step { border-top: 3px solid var(--accent-step); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.step--first { border-top-color: var(--accent); }
.step__num { font: 600 11px var(--font-mono); color: var(--accent-text); }
.step__title { font-size: 15.5px; font-weight: 700; }
.step__text { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }

/* Гарантии */
.guards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 12px; margin-top: 20px; }
.guard {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}
.guard .tick { width: 18px; height: 18px; margin-top: 1px; }

/* Кейсы */
.cases__head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
/* Ссылка прижимается собственным auto-отступом. Тянуть заголовок через flex:1
   нельзя — он упирается в свой max-width, и ссылка встаёт по центру экрана. */
.cases__head > a { margin-left: auto; font-size: 14.5px; font-weight: 600; color: var(--accent-text); }

/* Интегратор */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; margin-top: 32px; }
.why__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 12px; }
.why__card {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(18, 38, 32, .6);
}
.why__card b { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 5px; }
.quote {
  background: var(--bg-dark);
  color: #fff;
  border-radius: var(--r-card-lg);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--sh-card-dark);
}
.quote__text { font-size: 19px; line-height: 1.5; font-weight: 500; }
.quote__text .mark { font-size: 40px; line-height: 0; vertical-align: -12px;
  color: var(--accent-on-dark); font-weight: 700; margin-right: 6px; }
.quote__author { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.quote__photo {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: center;
  font: 600 9px var(--font-mono); color: rgba(255, 255, 255, .6);
  flex: none; object-fit: cover;
}
.quote__name { font-size: 14px; font-weight: 600; }
.quote__role { font-size: 12.5px; color: var(--text-on-dark-3); }
.quote__foot {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .65);
}

/* ---------- Калькулятор потерь ---------- */

.panel {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}
.panel__left { padding: clamp(26px, 4vw, 40px); display: flex; flex-direction: column; gap: 26px; }
.panel__right {
  background: var(--bg-dark);
  color: #fff;
  padding: clamp(26px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  position: relative;
}
.panel__h { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 9px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__label { font-size: 14.5px; font-weight: 600; }
.field__value { font: 600 15px var(--font-mono); color: var(--accent-text); white-space: nowrap; }
.field__hint { font-size: 12px; color: var(--text-3); }

/* Трек рисуется фоном самого input, как в макете. Без padding и background-clip:
   в вебките они гасят отрисовку дорожки, и остаётся один ползунок в пустоте.
   Зона касания добирается обёрткой .field__range, а не паддингом. */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  display: block;
  width: 100%; height: 6px;
  border-radius: 3px;
  background: rgba(18, 38, 32, .16);
  outline: none;
  margin: 0;
}

/* Зона касания 44px набирается паддингом, который тут же гасится отрицательным
   внешним отступом: палец получает крупную мишень, а высота в потоке остаётся
   равной дорожке — ровно как в макете (поле целиком 58px). */
.field__range {
  display: flex;
  align-items: center;
  padding-block: 19px;
  margin-block: -19px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
  cursor: pointer;
}
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.result__cap { font-size: 14px; color: var(--text-on-dark-3); }
.result__big { font: 700 clamp(34px, 4vw, 48px)/1.05 var(--font-mono); color: var(--accent-on-dark); }
.result__mid { font: 700 clamp(24px, 2.6vw, 32px)/1.05 var(--font-mono); }
.result__sub { font-size: 14px; color: var(--text-on-dark-2); margin-top: 6px; }
.rule { height: 1px; background: rgba(255, 255, 255, .15); }
.disclaimer { font-size: 13px; line-height: 1.55; color: var(--text-on-dark-3); }

/* ---------- Калькулятор внедрения ---------- */

/* Якорь кнопки «Подключить» из шапки. Отступ нужен свой: scroll-margin-top
   стоит на секции, а прыгаем мы внутрь неё, под липкую шапку. */
.cfg { margin-top: 28px; scroll-margin-top: 80px; }
.cfg .panel__left,
.cfg .panel__right { padding: clamp(24px, 3.4vw, 38px); }
.cfg .panel__left { gap: 22px; }
/* У панели потерь содержимое центрируется, у конфигуратора — прижато к верху */
.cfg .panel__right { justify-content: flex-start; gap: 16px; }
.cfg .head { gap: 8px; }
.cfg__services { display: flex; flex-direction: column; gap: 10px; }

.svc {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--r-card-sm);
  padding: 13px 15px;
  cursor: pointer;
}
.svc:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.svc:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.svc input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: #177567; flex: none; cursor: pointer; }
.svc__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.svc__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.svc__name { font-size: 15px; font-weight: 600; }
.svc__price { font: 600 14px var(--font-mono); color: var(--accent-text); white-space: nowrap; }
.svc__desc { font-size: 13px; line-height: 1.5; color: var(--text-2); }

.laterbox {
  background: var(--bg-page);
  border: 1px dashed rgba(18, 38, 32, .18);
  border-radius: var(--r-card-sm);
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.laterbox__title { font: 600 11px var(--font-mono); letter-spacing: .1em; color: var(--accent-label); }
.laterbox__text { font-size: 13px; line-height: 1.55; color: var(--text-2); }

/* Правая панель: смета / форма / готово */
.quote-lines { display: flex; flex-direction: column; gap: 9px; }
.quote-line { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.quote-line span:last-child { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.quote-line--discount { color: var(--accent-on-dark); }
.quote-empty { font-size: 13.5px; color: rgba(255, 255, 255, .55); line-height: 1.5; padding: 8px 0; }

.total__old { font: 600 16px var(--font-mono); color: rgba(255, 255, 255, .5); text-decoration: line-through; }
.total__badge { font: 700 11px var(--font-mono); background: var(--accent-on-dark); color: var(--bg-dark); padding: 3px 8px; border-radius: var(--r-pill); margin-left: 10px; }
.total__big { font: 700 clamp(30px, 3.4vw, 42px)/1.05 var(--font-mono); color: var(--accent-on-dark); }
.total__cap { font-size: 14px; color: var(--text-on-dark-2); margin-top: 6px; }
.total__monthly { font: 700 clamp(20px, 2.2vw, 26px)/1.05 var(--font-mono); }

.perks { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text-on-dark-3); }
.perks li { display: flex; gap: 8px; line-height: 1.5; }
.perks li i { color: var(--accent-on-dark); font-style: normal; }
.perks { list-style: none; margin: 0; padding: 0; }

.cfgform { display: flex; flex-direction: column; gap: 14px; }
.cfgform__summary {
  background: rgba(255, 255, 255, .07);
  border-radius: var(--r-card-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-on-dark-2);
}
.cfgform__summary b { color: #fff; font-family: var(--font-mono); }

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-btn);
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 400 15px var(--font);
}
.input::placeholder { color: rgba(255, 255, 255, .45); }
.input:focus { outline: 2px solid var(--accent-on-dark); outline-offset: 1px; border-color: transparent; }
.input[aria-invalid="true"] { border-color: #ff9d7a; }

.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.formerr {
  font-size: 13.5px;
  line-height: 1.5;
  color: #ffb59a;
  background: rgba(180, 85, 47, .18);
  border-radius: var(--r-card-sm);
  padding: 12px 14px;
}
.formerr a { color: #fff; text-decoration: underline; }

.backlink { background: none; border: none; padding: 0; cursor: pointer; font: 400 13.5px var(--font); color: var(--text-on-dark-2); text-align: left; }
.backlink:hover { color: #fff; }

.done { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.done__icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-on-dark); color: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}

/* Фоновая анимация правой панели — декоративная */
.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fx__blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.fx__blob--a {
  width: 340px; height: 340px; top: -90px; right: -110px;
  background: radial-gradient(circle, oklch(0.87 0.07 190 / .16), transparent 65%);
  animation: cfgBlobA 11s ease-in-out infinite;
}
.fx__blob--b {
  width: 300px; height: 300px; bottom: -70px; left: -90px;
  background: radial-gradient(circle, oklch(0.6 0.09 190 / .2), transparent 65%);
  animation: cfgBlobB 14s ease-in-out infinite;
}
.fx__chart { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; width: 100%; opacity: .9; }
.fx__line { stroke-dasharray: 640; animation: cfgDraw 7s ease-in-out infinite; }
/* Никакого transform-box: в макете scale считается от начала координат SVG,
   поэтому точки не мигают на месте, а расходятся и сходятся — «плавают».
   С transform-box:fill-box они масштабируются вокруг себя — выходит мигание. */
.fx__dot { animation: cfgPulse 3s ease-in-out infinite; }


.panel__right > *:not(.fx) { position: relative; z-index: 1; }

@keyframes cfgBlobA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.15); }
}
@keyframes cfgBlobB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, -30px) scale(1.1); }
}
@keyframes cfgDraw {
  0% { stroke-dashoffset: 640; opacity: 0; }
  12% { opacity: 1; }
  55% { stroke-dashoffset: 0; }
  88% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes cfgPulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.35); }
}

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

.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: clamp(24px, 4vw, 48px); }
#faqhead { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.acc { display: flex; flex-direction: column; gap: 10px; }
.acc details { background: var(--bg-page); border-radius: var(--r-card-sm); }
.acc summary {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 17px 20px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.acc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-card-sm); }
.acc summary::after { content: '＋'; margin-left: auto; color: var(--accent); font-weight: 400; flex: none; }
.acc details[open] summary::after { content: '－'; }
.acc__body { padding: 0 20px 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* ---------- Финальный CTA и форма Битрикс24 ---------- */

.audit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; }
.audit__trust { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--text-on-dark-3); }
#b24form { min-height: 320px; }
#b24form .b24-form { background: transparent !important; }

/* ---------- Футер ---------- */

.footer { background: var(--bg-footer); color: rgba(255, 255, 255, .6); }
.footer__inner {
  box-sizing: content-box;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo { height: 22px; width: auto; align-self: flex-start; filter: invert(1); opacity: .85; display: block; }
.footer__col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 12.5px; }
.footer__regalia { font-size: 12px; color: rgba(255, 255, 255, .45); }
/* Строка регалий держится в эталонной длине, поэтому ссылка на политику —
   отдельной строкой: в общей строке она добавляла 152px и ломала перенос */
.footer__privacy { font-size: 12px; }
.footer a { color: rgba(255, 255, 255, .6); }
.footer a:hover { color: #fff; }
.footer__phone { font-weight: 600; color: rgba(255, 255, 255, .85) !important; }
.footer__links {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
}

/* ---------- Куки-уведомление ---------- */

.cookie {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 60;
  max-width: 560px;
  margin-inline: auto;
  background: var(--bg-dark);
  color: #fff;
  border-radius: var(--r-card);
  padding: 16px 18px;
  box-shadow: var(--sh-card-dark);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  line-height: 1.5;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; min-width: 220px; color: var(--text-on-dark-2); }
.cookie a { color: var(--accent-on-dark); text-decoration: underline; }
.cookie button {
  padding: 10px 20px;
  border: none;
  border-radius: var(--r-btn-sm);
  background: var(--accent-on-dark);
  color: var(--bg-dark);
  font: 600 13.5px var(--font);
  cursor: pointer;
}

/* ---------- Появление при скролле ---------- */

/* Прячет только то, что app.js пометил как «ниже первого экрана».
   Без JS и до его выполнения контент виден — первая отрисовка ни от чего не зависит. */
[data-reveal] {
  transition: opacity .65s cubic-bezier(.2, .7, .3, 1), transform .65s cubic-bezier(.2, .7, .3, 1);
}
[data-reveal].reveal-hidden { opacity: 0; transform: translateY(22px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal].reveal-hidden { opacity: 1; transform: none; }
  [data-reveal] { transition: none; }
  .fx__blob, .fx__line, .fx__dot { animation: none; }
}

/* ---------- Мобильный ---------- */

@media (max-width: 760px) {
  #topnav {
    order: 5;
    flex: 0 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-left: 0;
  }
  #topnav::-webkit-scrollbar { display: none; }
  #topnav a { white-space: nowrap; }
  #topphone { display: none; }
  #faqhead { position: static; }
  .cases__head { align-items: flex-start; }
  .btn { width: 100%; }
  .hero__cta .btn { width: auto; flex: 1 1 auto; }
}

/* ---------- Добавлено при сверке с эталоном ---------- */

/* Шапка карточки в блоке «Решение»: вордмарк + бейдж, а не моно-строка */
.list__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.list__head .wordmark { font-size: 18px; }

/* Схема: карточки компактнее, чем в блоке болей, и нумерация акцентом */
.grid--steps { gap: 14px; }
.card--step { padding: 20px 22px; gap: 9px; border-color: var(--border); }
.card--step .card__num { font: 700 13px var(--font-mono); color: var(--accent-text); }
.card--step .card__title { font-size: 15.5px; }
.card--step .card__text { font-size: 13.5px; }

.cfg__block { display: flex; flex-direction: column; gap: 10px; }
.cfg__label { font-size: 14.5px; font-weight: 600; }

.case__sub { font-weight: 500; color: var(--text-muted); }

.done__title { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 8px; }


/* Панель конфигуратора: своя типографика, мельче общесекционной —
   значения сняты с прототипа (шапка 133px, карточка услуги 67px) */
.cfg .panel__h { font-size: 26px; line-height: 1.2; }
.cfg .head .lead { font-size: 14px; line-height: 1.5; }
.cfg .svc__name { font-size: 14.5px; }
.cfg .svc__price { font-size: 13.5px; }
.cfg .svc__desc { font-size: 12.5px; line-height: 1.45; }
.cfg .cfg__label { font-size: 14px; }

/* ---------- Кейсы: карточка по макету ---------- */

.case { border: 1px solid var(--border); border-radius: var(--r-card-lg); padding: 24px; gap: 14px; background: var(--bg-page); }
.case__head { display: flex; align-items: center; gap: 10px; }
/* Вместо буквенных бейджей макета — настоящие логотипы клиник в той же позиции */
.case__logos { flex: none; display: flex; align-items: center; gap: 10px; }
.case__logo { display: block; width: auto; height: 28px; }
.case__name { font-size: 15.5px; font-weight: 700; }
.case__sub { font-size: 12px; font-weight: 500; color: rgba(18, 38, 32, .55); }
.case__text { font-size: 13.5px; line-height: 1.55; color: rgba(18, 38, 32, .62); }
.case__metric { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.case__num { font: 700 22px var(--font-mono); color: var(--accent-text); }
.case__cap { font-size: 13px; color: rgba(18, 38, 32, .6); margin-top: 4px; }
