/* ==========================================================================
   Аритин — внутренние страницы (услуги, продукты, кейсы).

   Использует примитивы из home.css (hp-glass, hp-deep, hp-btn, hp-head,
   hp-eyebrow, hp-metrics, hp-cards, hp-faq, hp-closing) и добавляет только
   раскладку своих блоков с префиксом sp-.
   ========================================================================== */

/* ---------- Шапка над тёмным баннером ---------- */
body.page-service header.site-header,
body.page-service-catalog header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 0;
}

body.page-service .hp-hero,
body.page-service-catalog .hp-hero {
  padding-top: 128px;
  padding-bottom: 0;
  overflow: visible;
  border-radius: 0 0 28px 28px;
}
/* Баннер должен перекрывать следующую секцию — панель показателей
   заходит ниже его края. */
body.page-service .hp-hero,
body.page-service-catalog .hp-hero { z-index: 2; }

/* Пока не прокручено — шапка светлая поверх тёмного баннера. */
body.page-service header.site-header:not(.scrolled) .nav,
body.page-service-catalog header.site-header:not(.scrolled) .nav {
  color: #eef5ff;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 24px 54px -34px rgba(2, 12, 32, .9), inset 0 1px 0 rgba(255, 255, 255, .16);
}
body.page-service header.site-header:not(.scrolled) .logo,
body.page-service header.site-header:not(.scrolled) .logo-text,
body.page-service-catalog header.site-header:not(.scrolled) .logo,
body.page-service-catalog header.site-header:not(.scrolled) .logo-text { color: #eef5ff; }
body.page-service header.site-header:not(.scrolled) .logo-mark,
body.page-service-catalog header.site-header:not(.scrolled) .logo-mark { --logo-1: #eef5ff; --logo-2: #9fd8f5; }
body.page-service header.site-header:not(.scrolled) .nav-links > a,
body.page-service header.site-header:not(.scrolled) .nav-links > .nav-item > a,
body.page-service-catalog header.site-header:not(.scrolled) .nav-links > a,
body.page-service-catalog header.site-header:not(.scrolled) .nav-links > .nav-item > a { color: rgba(232, 242, 255, .78); }
body.page-service header.site-header:not(.scrolled) .nav-links > a:hover,
body.page-service header.site-header:not(.scrolled) .nav-links > .nav-item > a:hover,
body.page-service-catalog header.site-header:not(.scrolled) .nav-links > a:hover,
body.page-service-catalog header.site-header:not(.scrolled) .nav-links > .nav-item > a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
body.page-service header.site-header:not(.scrolled) .nav-phone,
body.page-service-catalog header.site-header:not(.scrolled) .nav-phone { color: #eaf2ff; border-right-color: rgba(255, 255, 255, .22); }
body.page-service header.site-header:not(.scrolled) .mess img,
body.page-service-catalog header.site-header:not(.scrolled) .mess img {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 4px 12px -6px rgba(2, 12, 32, .6);
}
body.page-service header.site-header:not(.scrolled) .btn-ghost,
body.page-service-catalog header.site-header:not(.scrolled) .btn-ghost {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .26);
  color: #eaf2ff;
}
body.page-service header.site-header:not(.scrolled) .burger,
body.page-service header.site-header:not(.scrolled) .burger span,
body.page-service header.site-header:not(.scrolled) .burger span::before,
body.page-service header.site-header:not(.scrolled) .burger span::after,
body.page-service-catalog header.site-header:not(.scrolled) .burger,
body.page-service-catalog header.site-header:not(.scrolled) .burger span,
body.page-service-catalog header.site-header:not(.scrolled) .burger span::before,
body.page-service-catalog header.site-header:not(.scrolled) .burger span::after { color: #eef5ff; background: #eef5ff; }
body.page-service header.site-header:not(.scrolled) .burger,
body.page-service-catalog header.site-header:not(.scrolled) .burger { background: transparent; border-color: rgba(255, 255, 255, .3); }

/* ---------- Крошки на тёмном ---------- */
.sp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  font-size: 12px;
  color: rgba(196, 219, 244, .55);
}
.sp-crumbs a { color: rgba(214, 232, 255, .72); transition: color .18s ease; }
.sp-crumbs a:hover { color: #fff; }
.sp-crumbs span[aria-hidden] { opacity: .4; }

/* ---------- Баннер страницы услуги ---------- */
.sp-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 56px;
  align-items: center;
}
.sp-hero--noimg .sp-hero__grid { grid-template-columns: minmax(0, 1fr); }
.sp-hero--noimg .sp-hero__lead { max-width: 62ch; }

.sp-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 3.9vw, 56px);
  line-height: 1.04;
  letter-spacing: -.042em;
  font-weight: 700;
  color: #f4f8ff;
  text-align: left;
}

.sp-hero__lead {
  margin-top: 20px;
  max-width: 46ch;
  font-size: clamp(15px, 1.15vw, 16.5px);
  line-height: 1.65;
  color: rgba(214, 230, 250, .74);
}

.sp-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.sp-hero__media {
  position: relative;
}
.sp-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
}

/* Показатели — часть баннера: панель чуть заходит за его нижний край. */
.sp-hero .sp-hero__metrics#numbers {
  position: relative;
  top: 40px;
  z-index: 1;
  margin-top: 48px;
  margin-bottom: 0;
  padding: 4px;
  border-radius: 18px;
  background: linear-gradient(to top, #0f386f78, #ffffff00);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.sp-hero__metrics .hp-metric { border-left-color: rgba(255, 255, 255, .12); }
.sp-hero__metrics .hp-metric b { color: #f2f9ff; }
.sp-hero__metrics .hp-metric span {
  padding-top: 10px;
  font-weight: bold;
  color: rgb(255 255 255);
}
/* Блик не нужен: фон задан градиентом. */
.sp-hero__metrics::before { background: none; }

/* Первый блок после баннера: панель показателей свешивается на 40 px,
   поэтому сверху добавляем отступ, чтобы визуально было просторно. */
body.page-service .sp-hero + .hp-section,
body.page-service-catalog .sp-hero + .hp-section { padding-top: 148px; }

/* ---------- Содержание услуги: bento-сетка ----------
   Сетка из трёх колонок: акцентная карточка занимает две колонки и лежит
   горизонтально, остальные карточки «обтекают» её за счёт dense-потока. */
.sp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
  align-items: stretch;
}
/* Без акцентной карточки — просто сетка из трёх колонок. */
.sp-bento--flat {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sp-bento--flat .sp-bento__card--wide { grid-column: span 1; }

.sp-bento__grid { display: contents; }

/* Акцентная карточка: две колонки, картинка слева, текст справа. */
.sp-bento__lead {
  position: relative;
  grid-column: span 2;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  align-content: center;
  padding: 28px 30px;
  overflow: hidden;
  border-radius: 20px;
  color: #eaf2ff;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(58, 122, 190, .38) 0%, rgba(58, 122, 190, 0) 62%),
    var(--hp-deep-grad);
  box-shadow: 0 44px 90px -60px rgba(4, 16, 38, .9);
}
.sp-bento__lead::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(90% 130% at 10% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(90% 130% at 10% 0%, #000 0%, transparent 80%);
}
.sp-bento__lead > * { position: relative; z-index: 1; }
.sp-bento__leadbody { grid-column: 2; min-width: 0; }
/* Без превью текст занимает всю ширину карточки. */
.sp-bento__lead--noimg { grid-template-columns: minmax(0, 1fr); }
.sp-bento__lead--noimg .sp-bento__leadbody { grid-column: 1; }

.sp-bento__lead h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: 1.1;
  color: #f6faff;
  text-align: left;
}
.sp-bento__lead .sp-text {
  font-size: 14px;
  line-height: 1.66;
  color: rgba(214, 230, 250, .76);
}
.sp-bento__lead .sp-text p { margin: 0 0 10px; }
.sp-bento__lead .sp-text p:last-child { margin-bottom: 0; }

.sp-bento__points { display: grid; gap: 10px; padding-top: 14px; }
.sp-bento__points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(226, 240, 255, .9);
  list-style: none;
}
.sp-bento__points .fa-solid { margin-top: 5px; font-size: 10px; color: #6fcdf0; }

/* Обычные карточки */
.sp-bento__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 24px 26px;
  border-radius: 18px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.sp-bento__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 70px -46px rgba(6, 20, 44, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* Последняя карточка добирает остаток ряда. */
.sp-bento__card--span2 { grid-column: span 2; }
.sp-bento__card--span3 { grid-column: span 3; }

.sp-bento__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

/* Превью: заметно крупнее иконок из макета. */
.sp-bento__thumb {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  flex: none;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(10, 42, 85, .09);
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(232, 240, 251, .9));
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px -20px rgba(6, 20, 44, .6);
}
.sp-bento__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sp-bento__thumb--lead {
  width: 132px;
  height: 132px;
  padding: 14px;
  align-self: center;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.sp-bento__num {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .1em;
  color: var(--blue-600, #1857a3);
  font-variant-numeric: tabular-nums;
}

.sp-bento__card h3 {
  margin: 4px 0 0;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.28;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-bento__card .sp-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--hp-muted);
}
.sp-bento__card .sp-text p { margin: 0 0 8px; }
.sp-bento__card .sp-text p:last-child { margin-bottom: 0; }

.sp-ticks { display: grid; gap: 8px; margin-top: 14px; }
.sp-ticks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--hp-muted);
  list-style: none;
}
.sp-ticks li .fa-solid { font-size: 10px; margin-top: 5px; color: var(--blue-600, #1857a3); }

/* Вопрос-ответ: узкий центрированный блок. */
body.page-service .hp-faq,
body.page-service-catalog .hp-faq {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
body.page-service #faq .hp-head,
body.page-service-catalog #faq .hp-head {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
body.page-service #faq .hp-head h2,
body.page-service-catalog #faq .hp-head h2 { text-align: center; }

/* ---------- Две колонки: текст на белом + картинка ----------
   Блок в контейнере, скруглён, картинка занимает правую половину. */
.sp-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--hp-line-soft, rgba(10, 26, 51, .06));
  box-shadow: 0 34px 74px -56px rgba(6, 20, 44, .55);
}

.sp-duo__body {
  display: flex;
  align-items: center;
  padding: 48px 0;
  background: #fff;
}
.sp-duo__inner {
  width: 100%;
  padding: 0 52px;
}
.sp-duo--reverse .sp-duo__body { order: 2; }

.sp-duo__body h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 700;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-duo__body .sp-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--hp-muted);
}
/* Первый абзац — подзаголовок карточки. */
.sp-duo__body .sp-text p:first-child {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.35;
  color: var(--blue-800, #0a2a55);
}
.sp-duo__body .sp-text p { margin: 0 0 10px; }
.sp-duo__body .sp-text p:last-child { margin-bottom: 0; }

.sp-duo__media {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: linear-gradient(160deg, #0b2350, #123f7d);
}
.sp-duo--reverse .sp-duo__media { order: 1; }
.sp-duo__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Тёмный блок с картинкой ---------- */
.sp-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 40px;
  align-items: center;
  padding: 40px;
  overflow: hidden;
  border-radius: 20px;
  color: #eaf2ff;
  background:
    radial-gradient(70% 130% at 98% -10%, rgba(58, 122, 190, .3) 0%, rgba(58, 122, 190, 0) 62%),
    var(--hp-deep-grad);
  box-shadow: 0 44px 90px -60px rgba(4, 16, 38, .9);
}
.sp-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(90% 120% at 12% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(90% 120% at 12% 0%, #000 0%, transparent 80%);
}
.sp-banner > * { position: relative; z-index: 1; }
.sp-banner h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 2.9vw, 40px);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 700;
  color: #f6faff;
  text-align: left;
}
.sp-banner .sp-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(214, 230, 250, .72);
}
.sp-banner .sp-text p { margin: 0 0 10px; }
.sp-banner .sp-text p:last-child { margin-bottom: 0; }
.sp-banner__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  border-radius: 14px;
}

/* ---------- Этапы: вертикальный таймлайн ---------- */
.sp-tl {
  --sp-tl-rail: 76px;
  --sp-tl-dot: 56px;
  position: relative;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.sp-tl__item {
  display: grid;
  grid-template-columns: var(--sp-tl-rail) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
}

.sp-tl__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sp-tl__dot {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--sp-tl-dot);
  height: var(--sp-tl-dot);
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(10, 42, 85, .12);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px -18px rgba(6, 20, 44, .7);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #6b7d95;
  font-variant-numeric: tabular-nums;
  transition: background .45s ease, color .45s ease, border-color .45s ease,
              box-shadow .45s ease;
}

.sp-tl__num { transition: opacity .3s ease; }

.sp-tl__ok {
  position: absolute;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transition: opacity .35s ease .1s;
}

.sp-tl__line {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: 2px;
  min-height: 34px;
  margin-top: 10px;
  border-radius: 1px;
  background: rgba(10, 42, 85, .12);
}

.sp-tl__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #3d6595 0%, #23486f 70%, #2c6155 100%);
  transition: height .7s cubic-bezier(.22, .8, .28, 1);
}

.sp-tl__line-fill::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #f4f8ff;
  border: 1px solid rgba(10, 42, 85, .35);
  opacity: 0;
  transition: opacity .3s ease .2s;
}
.sp-tl__item.is-tip .sp-tl__line-fill::after { opacity: 1; }

.sp-tl__body {
  max-width: 880px;
  padding: 20px 26px 22px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 18px 44px -40px rgba(6, 20, 44, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.sp-tl__item:last-child .sp-tl__body { margin-bottom: 0; }

.sp-tl__body h3 {
  margin: 0;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-tl__body p {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--hp-muted);
}
.sp-tl__body p:last-child { margin-bottom: 0; }

/* Появление по мере прокрутки — только когда скрипт подключился. */
.sp-tl--live .sp-tl__body {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .55s cubic-bezier(.22, .8, .28, 1);
}
.sp-tl--live .sp-tl__item.is-on .sp-tl__body {
  opacity: 1;
  transform: none;
}

/* Пройденный шаг: глубокий синий без свечения и «пружинок». */
.sp-tl__item.is-on .sp-tl__dot {
  border-color: rgba(12, 45, 88, .9);
  color: #eef4fc;
  background: linear-gradient(160deg, #2b5486 0%, #1b3f6b 60%, #15334f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -20px rgba(6, 20, 44, .9);
}

.sp-tl__item.is-on .sp-tl__line-fill { height: 100%; }

/* Финальный шаг — приглушённый зелёный. */
.sp-tl__item--last.is-on .sp-tl__dot {
  color: #fff;
  border-color: #245f4c;
  background: linear-gradient(160deg, #2f7060 0%, #275e4d 62%, #1f4b3e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 24px -20px rgba(9, 46, 36, .9);
}
.sp-tl__item--last.is-on .sp-tl__num { opacity: 0; }
.sp-tl__item--last.is-on .sp-tl__ok { opacity: 1; }
.sp-tl__item--last.is-on .sp-tl__body {
  border-color: rgba(39, 94, 77, .22);
  box-shadow: 0 18px 44px -40px rgba(6, 20, 44, .55), inset 0 1px 0 #fff,
              inset 0 0 0 1px rgba(39, 94, 77, .07);
}

@media (prefers-reduced-motion: reduce) {
  .sp-tl--live .sp-tl__body { opacity: 1; transform: none; transition: none; }
  .sp-tl__line-fill { transition: none; }
}

/* ---------- Преимущества ---------- */
.sp-adv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sp-adv__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: 16px;
}
.sp-adv__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(10, 42, 85, .1);
  background: rgba(24, 87, 163, .07);
  color: var(--blue-700, #103c78);
  font-size: 15px;
}
.sp-adv__card h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-adv__card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--hp-muted);
}

/* ---------- Интерактивный чат с агентом ---------- */
.sp-chat {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 40px 90px -60px rgba(6, 20, 44, .6), inset 0 1px 0 rgba(255, 255, 255, .92);
}

.sp-chat__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(10, 26, 51, .07);
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .5));
}

.sp-chat__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(160deg, #2a5b96, #123f7d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.sp-chat__avatar svg { width: 22px; height: 22px; }

.sp-chat__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-chat__id b {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--blue-950, #050f26);
}
.sp-chat__id small { font-size: 11.5px; color: var(--hp-muted-2, #7a8aa2); }

.sp-chat__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(39, 94, 77, .22);
  background: rgba(47, 112, 96, .08);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2f7060;
}
.sp-chat__live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f7060;
}

.sp-chat__replay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(10, 42, 85, .14);
  background: #fff;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--blue-800, #0a2a55);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.sp-chat__replay:hover { border-color: rgba(10, 42, 85, .3); transform: translateY(-1px); }
.sp-chat__replay .fa-solid { font-size: 11px; }

.sp-chat__log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
}

.sp-chat__row {
  display: flex;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22, .8, .28, 1);
}
.sp-chat__row.is-visible { opacity: 1; transform: none; }
.sp-chat__row--user { justify-content: flex-end; }
.sp-chat__row--bot { justify-content: flex-start; }

.sp-chat__bubble {
  max-width: 78%;
  padding: 13px 17px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.sp-chat__bubble p { margin: 0; }

.sp-chat__row--user .sp-chat__bubble {
  color: #f1f7ff;
  background: linear-gradient(160deg, #2a5b96, #123f7d);
  border-bottom-right-radius: 6px;
  box-shadow: 0 18px 38px -30px rgba(2, 12, 32, .9);
}

.sp-chat__row--bot .sp-chat__bubble {
  color: var(--blue-950, #050f26);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(10, 26, 51, .08);
  border-bottom-left-radius: 6px;
  box-shadow: 0 18px 40px -36px rgba(6, 20, 44, .6);
}
/* Пузырь с карточкой-результатом шире обычного. */
.sp-chat__row--bot .sp-chat__bubble--card { max-width: 86%; }

/* Карточка-результат, которую агент присылает в чат. */
.sp-chat__card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(10, 26, 51, .08);
  background: linear-gradient(170deg, rgba(246, 250, 255, .96), rgba(233, 241, 251, .9));
}
.sp-chat__card p { margin: 0; }

.sp-chat__card-head {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hp-muted-2, #7a8aa2);
}

.sp-chat__kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sp-chat__kpis > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 10px;
  border-right: 1px solid rgba(10, 26, 51, .08);
}
.sp-chat__kpis > div:last-child { border-right: 0; padding-right: 0; }
.sp-chat__kpis b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--blue-800, #0a2a55);
  font-variant-numeric: tabular-nums;
}
.sp-chat__kpis span { font-size: 11.5px; line-height: 1.35; color: var(--hp-muted-2, #7a8aa2); }

.sp-chat__list { display: grid; gap: 7px; margin: 0; padding: 0; }
.sp-chat__list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hp-muted, #4c5f79);
  list-style: none;
}
.sp-chat__list .fa-solid { margin-top: 5px; font-size: 10px; color: var(--blue-600, #1857a3); }

.sp-chat__card-note {
  padding-top: 10px;
  border-top: 1px solid rgba(10, 26, 51, .07);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--hp-muted-2, #7a8aa2);
}

/* Индикатор набора. */
.sp-chat__typing {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 0 24px 12px;
}
.sp-chat__typing.is-typing { display: flex; }
.sp-chat__typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9fb4cc;
  animation: sp-chat-dot 1s ease-in-out infinite;
}
.sp-chat__typing i:nth-child(2) { animation-delay: .15s; }
.sp-chat__typing i:nth-child(3) { animation-delay: .3s; }

@keyframes sp-chat-dot {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.sp-chat__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  border-top: 1px solid rgba(10, 26, 51, .07);
  background: rgba(255, 255, 255, .7);
}
.sp-chat__hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--hp-muted-2, #7a8aa2);
  max-width: 62ch;
}

@media (max-width: 720px) {
  .sp-chat__bar { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .sp-chat__live { order: 3; margin-left: 0; }
  .sp-chat__replay { margin-left: auto; }
  .sp-chat__log { padding: 18px 14px; }
  .sp-chat__bubble { max-width: 92%; font-size: 13.5px; }
  .sp-chat__kpis { grid-template-columns: 1fr; gap: 6px; }
  .sp-chat__kpis > div {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(10, 26, 51, .07);
    padding-bottom: 6px;
  }
  .sp-chat__kpis > div:last-child { border-bottom: 0; padding-bottom: 0; }
  .sp-chat__foot { flex-direction: column; align-items: stretch; padding: 14px; }
  .sp-chat__foot .hp-btn { width: 100%; }
}

/* ---------- Боли клиента: карточки ---------- */
.sp-pains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.sp-pain {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 28px 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 22px 54px -42px rgba(6, 20, 44, .5), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.sp-pain__num {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .16em;
  color: var(--blue-600, #1857a3);
  font-variant-numeric: tabular-nums;
}
.sp-pain h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-pain p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--hp-muted);
}

/* ---------- Заметка (BLOCK2) ---------- */
.sp-note {
  padding: 32px 36px;
  border-radius: 18px;
}
.sp-note h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 2.9vw, 38px);
  letter-spacing: -.035em;
  line-height: 1.08;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-note .sp-text {
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--hp-muted);
}
.sp-note .sp-text p { margin: 0 0 10px; }
.sp-note .sp-text p:last-child { margin-bottom: 0; }

/* ---------- Цены ---------- */
.sp-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
/* Один-два тарифа не растягиваем на всю ширину. */
.sp-plans--1 { grid-template-columns: minmax(0, 460px); }
.sp-plans--2 { grid-template-columns: repeat(2, minmax(0, 460px)); }
.sp-plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border-radius: 18px;
}
.sp-plan__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sp-plan__head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: var(--blue-950, #050f26);
  text-align: left;
}
.sp-plan__term {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hp-line);
  font-size: 11px;
  color: var(--hp-muted-2);
  white-space: nowrap;
}
.sp-plan__price {
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--blue-800, #0a2a55);
  font-variant-numeric: tabular-nums;
}
.sp-plan__price small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--hp-muted-2);
}
.sp-plan .sp-ticks { margin-top: 0; }
.sp-plan__foot { margin-top: auto; padding-top: 6px; }
.sp-plan__foot .hp-btn { width: 100%; height: 44px; font-size: 13.5px; }

/* ---------- Технологии ---------- */
.sp-tech {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.sp-tech__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
}
.sp-tech__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(10, 42, 85, .08);
}
.sp-tech__icon img { max-width: 22px; max-height: 22px; object-fit: contain; }
.sp-tech__item b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--blue-950, #050f26);
  line-height: 1.3;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .sp-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .sp-duo { grid-template-columns: 1fr; }
  .sp-duo--reverse .sp-duo__body { order: 0; }
  .sp-duo--reverse .sp-duo__media { order: 0; }
  .sp-duo__body { padding: 36px 0; }
  .sp-duo__inner { padding: 0 32px; }
  .sp-duo__media { min-height: 300px; }
  .sp-banner { grid-template-columns: 1fr; gap: 26px; }
  .sp-steps, .sp-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-tl { --sp-tl-rail: 64px; --sp-tl-dot: 50px; }
  .sp-tech { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-bento__lead { grid-column: span 2; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; }
  .sp-bento__card--span3 { grid-column: span 2; }
  .sp-bento__thumb--lead { width: 104px; height: 104px; }
  .sp-bento--flat .sp-bento__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .sp-steps, .sp-adv, .sp-plans { grid-template-columns: 1fr; }
  .sp-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-tl__item { gap: 18px; }
}

@media (max-width: 720px) {
  body.page-service .hp-hero,
  body.page-service-catalog .hp-hero { padding-top: 104px; }
  .sp-hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .sp-hero__actions .hp-btn { flex: 1; }
  .sp-crumbs { margin-bottom: 16px; font-size: 11.5px; }
  .sp-duo__body { padding: 30px 0; }
  .sp-duo__inner { padding: 0 20px; }
  .sp-duo__body h2 { font-size: clamp(23px, 6.6vw, 30px); }
  .sp-duo__media { min-height: 240px; }
  .sp-banner { padding: 24px 20px; }
  .sp-note { padding: 24px 20px; }
  body.page-service .sp-hero + .hp-section,
  body.page-service-catalog .sp-hero + .hp-section { padding-top: 116px; }
  .sp-adv__card { padding: 20px 18px; }
  .sp-tl { --sp-tl-rail: 44px; --sp-tl-dot: 38px; margin-top: 26px; }
  .sp-tl__item { gap: 14px; }
  .sp-tl__dot { font-size: 12px; }
  .sp-tl__ok { font-size: 12px; }
  .sp-tl__body { padding: 16px 18px 18px; margin-bottom: 12px; }
  .sp-tl__body h3 { font-size: 15.5px; }
  .sp-tl__body p { font-size: 13px; }
  .sp-tl__line { min-height: 22px; margin-top: 8px; }
  .sp-bento { grid-template-columns: 1fr; }
  .sp-pains { grid-template-columns: 1fr; }
  .sp-pain { padding: 20px 18px 22px; }
  .sp-bento__lead { grid-column: span 1; grid-template-columns: 1fr; gap: 16px; padding: 24px 20px 26px; }
  .sp-bento__lead h3 { font-size: 21px; }
  .sp-bento__card { padding: 20px 18px 22px; }
  .sp-bento__grid { grid-template-columns: 1fr; }
  .sp-bento__card--span2,
  .sp-bento__card--span3 { grid-column: span 1; }
  .sp-bento__thumb { width: 72px; height: 72px; padding: 8px; }
  .sp-bento__thumb--lead { width: 84px; height: 84px; padding: 10px; }
}
