/* Главная: секции после скролл-истории (возможности, тарифы, Enterprise, форма, финальный призыв). */

.intro.intro--home {
  padding-top: 72px;
}
/* ---------- Заголовок секции главной (возможности, тарифы) ---------- */
.home-head { max-width: 720px; margin: 0 0 32px; font-family: Inter, system-ui, sans-serif; }
.home-head__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--hs-ink);
}
.home-head__lead { margin: 12px 0 0; font-size: 18px; line-height: 1.6; color: var(--hs-muted); }

/* ---------- Тарифы и FAQ (include/main_pricing_inc.php) ---------- */
.home-pricing {
  margin: 96px 0;
  color: var(--hs-ink);
  font-family: Inter, system-ui, sans-serif;
  scroll-margin-top: 96px;
}
.home-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.home-plan {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--hs-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--hs-shadow);
}
.home-plan--accent { border: 2px solid var(--hs-primary); }
.home-plan--labeled { position: relative; }
.home-plan__label {
  position: absolute;
  top: -12px;
  left: 28px;
  padding: 3px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.home-plan__name { font-size: 16px; font-weight: 600; color: var(--hs-muted); }
.home-plan--accent .home-plan__name { color: var(--hs-primary); }
.home-plan__price { margin-top: 12px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.home-plan__term { margin-top: 4px; font-size: 14px; color: var(--hs-muted); }
.home-plan__limits { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--hs-ink); }
.home-plan__list { display: grid; gap: 10px; flex: 1; margin: 24px 0; padding: 0; list-style: none; }
.home-plan__list li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; }
.home-plan__list li::before { display: none; }
.home-plan__list svg { flex: none; width: 20px; height: 20px; color: var(--hs-primary); }
.home-plan .hs-btn { width: 100%; box-sizing: border-box; }
.home-pricing__more { margin: 16px 0 0; text-align: center; font-size: 15px; }
.home-pricing__more a { color: var(--hs-primary); }

.home-faq { margin-top: 72px; }
.home-faq__title {
  margin: 0 0 20px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--hs-ink);
}
.home-faq__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; }
.home-faq__item {
  border: 1px solid var(--hs-border);
  border-radius: 14px;
  background: #fff;
}
.home-faq__item summary {
  position: relative;
  padding: 18px 48px 18px 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.home-faq__item summary::-webkit-details-marker { display: none; }
.home-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--hs-primary);
  transform: translateY(-50%);
  transition: transform .2s;
}
.home-faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.home-faq__item p { margin: 0; padding: 0 20px 18px; font-size: 15px; line-height: 1.6; color: var(--hs-muted); }

/* ---------- Финальный призыв (include/main_register_inc.php) ---------- */
.home-final {
  margin: 96px 0 24px;
  padding: 56px 32px;
  border-radius: 24px;
  background: radial-gradient(60% 90% at 50% 0%, rgba(0, 138, 255, .14), transparent 70%), #EAF4FF;
  text-align: center;
  font-family: Inter, system-ui, sans-serif;
}
.home-final__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--hs-ink);
}
.home-final__text { max-width: 560px; margin: 12px auto 0; font-size: 18px; line-height: 1.6; color: var(--hs-muted); }
.home-final__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

@media (max-width: 74.99875em) {
  .home-plans { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}

@media (max-width: 61.99875em) {
  .home-pricing { margin: 64px 0; }
  .home-plans { grid-template-columns: 1fr; }
  .home-faq { margin-top: 48px; }
  .home-faq__list { grid-template-columns: 1fr; }
  .home-final { margin-top: 64px; padding: 40px 20px; }
  .home-head__lead, .home-final__text { font-size: 16px; }
}
@media (max-width: 29.99875em) {
  .home-final__cta .hs-btn { flex: 1 1 100%; }
}

/* ---------- Enterprise Коробка (include/main_enterprise_inc.php) ---------- */
.home-box {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 40px 0 0;
  padding: 48px;
  border-radius: 24px;
  background: radial-gradient(70% 90% at 85% 50%, rgba(91, 75, 219, .45), transparent 70%), #1B1B22;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  scroll-margin-top: 96px;
}
.home-box__eyebrow { margin-bottom: 14px; font-size: 14px; font-weight: 600; color: #B4AAFF; }
.home-box__title { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.home-box__lead { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .72); }
.home-box__list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.home-box__list li { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.home-box__list li::before { display: none; }
.home-box__list svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #B4AAFF; }
.home-box__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-box__btn { background: #7A5CF0; }
.home-box__btn:hover { background: #6A4BE0; }
.home-box__btn-ghost { border-color: rgba(255, 255, 255, .25); background: transparent; color: #fff; }
.home-box__btn-ghost:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }

.home-box__visual { position: relative; display: grid; place-items: center; min-height: 260px; }
.home-box__server {
  display: grid;
  gap: 12px;
  width: 200px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
}
.home-box__server i {
  position: relative;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
}
.home-box__server i::before,
.home-box__server i::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.home-box__server i::before { left: 14px; width: 8px; height: 8px; border-radius: 50%; background: #3DD68C; box-shadow: 0 0 10px #3DD68C; }
.home-box__server i::after { left: 34px; right: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.home-box__badge {
  position: absolute;
  right: 8%;
  bottom: 6%;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--hs-muted);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
.home-box__badge b { font-size: 14px; color: var(--hs-ink); }

@media (max-width: 61.99875em) {
  .home-box { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; padding: 32px 20px; }
  .home-box__visual { display: none; }
  .home-box__lead { font-size: 16px; }
}
@media (max-width: 29.99875em) {
  .home-box__cta .hs-btn { flex: 1 1 100%; }
}

/* ---------- Демо или вопрос — одна форма (include/main_contact_inc.php) ---------- */
.home-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 40px;
  align-items: start;
  margin: 96px 0 0;
  padding: 32px;
  border-radius: 24px;
  background: #F0F0FD;
  font-family: Inter, system-ui, sans-serif;
  scroll-margin-top: 96px;
}
.home-contact__photo { position: relative; height: 200px; margin-bottom: 24px; overflow: hidden; border-radius: 18px; }
.home-contact__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 78% 30%; }
.home-contact__overlay { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.home-contact__person {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  line-height: 1.3;
}
.home-contact__person b { font-size: 14px; font-weight: 600; color: var(--hs-ink); }
.home-contact__person span { font-size: 12px; color: var(--hs-muted); }
.home-contact__eyebrow { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--hs-primary); }
.home-contact__title { margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--hs-ink); }
.home-contact__text { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--hs-muted); }
.home-contact__messengers { display: flex; gap: 6px; }
.home-contact__msg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(16, 24, 40, .08);
  font-size: 13px;
  font-weight: 500;
  color: var(--hs-ink);
  text-decoration: none;
  transition: border-color .15s;
}
.home-contact__msg:hover { border-color: var(--hs-primary); color: var(--hs-ink); }
.home-contact__msg svg { color: #229ED9; }

.home-contact__card { padding: 24px; border-radius: 18px; background: #fff; box-shadow: var(--hs-shadow); }
.home-contact__seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 12px; background: var(--hs-surface); }
.home-contact__seg button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: 500 14px/1 Inter, system-ui, sans-serif;
  color: var(--hs-muted);
  cursor: pointer;
}
.home-contact__seg button[aria-pressed="true"] { background: #fff; color: var(--hs-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

.home-contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.home-contact__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.home-contact__field[hidden] { display: none; }
.home-contact__field--wide { grid-column: 1 / -1; }
.home-contact__field > span { font-size: 13px; font-weight: 500; color: var(--hs-ink); }
.home-contact__field input,
.home-contact__field textarea {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--hs-border);
  border-radius: 10px;
  background: #fff;
  font: 400 15px/1.4 Inter, system-ui, sans-serif;
  color: var(--hs-ink);
  transition: border-color .15s, box-shadow .15s;
}
.home-contact__field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.home-contact__field input:focus,
.home-contact__field textarea:focus { outline: none; border-color: var(--hs-primary); box-shadow: 0 0 0 3px rgba(0, 138, 255, .15); }
.home-contact__form.was-validated :invalid { border-color: var(--hs-danger); }

.home-contact__consents { display: grid; gap: 6px; margin-top: 16px; font-size: 13px; line-height: 1.4; color: var(--hs-muted); }
.home-contact__consents label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.home-contact__consents input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--hs-primary); }
.home-contact__form.was-validated .home-contact__consents input:invalid { outline: 2px solid var(--hs-danger); outline-offset: 1px; }
.home-contact__consents a { color: var(--hs-primary); }

.home-contact__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; }
.home-contact__captcha { flex: 1 1 260px; min-width: 0; }
.home-contact__captcha.is-error .kptp-captcha__card { border-color: var(--hs-danger); }
.home-contact__submit { flex: 0 0 auto; }

.home-contact__success { display: flex; flex-direction: column; gap: 6px; padding: 32px 8px; text-align: center; font-size: 15px; color: var(--hs-muted); }
.home-contact__success[hidden] { display: none; }
.home-contact__success b { font-size: 20px; color: var(--hs-ink); }

@media (max-width: 61.99875em) {
  .home-contact { grid-template-columns: 1fr; gap: 24px; margin-top: 64px; padding: 20px; }
  .home-contact__photo { height: 180px; }
}
@media (max-width: 29.99875em) {
  .home-contact { padding: 16px; border-radius: 20px; }
  .home-contact__card { padding: 16px; }
  .home-contact__grid { grid-template-columns: 1fr; }
  .home-contact__photo { height: 170px; margin-bottom: 18px; }
  .home-contact__submit { flex: 1 1 100%; }
}

/* ---------- Что умеет kptp.ru (include/main_cards_inc.php) ----------
   Заголовок по центру, вокруг — полупрозрачные карточки со «стикерами» (превью видео / иконка),
   как на витринах банков. На планшете — заголовок сверху и сетка 2×2, на телефоне — одна колонка. */
.home-feat {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 48px;
  margin: 96px 0 0;
  padding: 72px 6% 88px;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(40% 50% at 20% 20%, rgba(0, 138, 255, .16), transparent 70%),
    radial-gradient(40% 50% at 85% 85%, rgba(108, 92, 255, .18), transparent 70%),
    linear-gradient(160deg, #EEF3FF, #F1EEFF);
  font-family: Inter, system-ui, sans-serif;
  scroll-margin-top: 96px;
}
.home-feat__center {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2;
  z-index: 3;
  margin: 8px auto;
  text-align: center;
}
.home-feat__title {
  margin: 0;
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--hs-ink);
}
.home-feat__logo {
  display: inline-block;
  height: .86em;
  width: auto;
  margin-left: .12em;
  vertical-align: -.16em;
}
.home-feat__lead { max-width: 440px; margin: 16px auto 0; font-size: 18px; line-height: 1.5; color: var(--hs-muted); }
.home-feat__btn { margin-top: 28px; border-color: transparent; box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }

.home-feat__card {
  position: relative;
  align-self: start;
  width: min(340px, 100%);
  box-sizing: border-box;
  padding: 32px 32px 36px;
  border-radius: 32px;
  background: rgba(52, 62, 110, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -20px rgba(40, 44, 90, .45);
  color: #fff;
  animation: home-feat-float 7s ease-in-out infinite;
  transition: transform 1.2s cubic-bezier(.16, .84, .3, 1), opacity .9s ease;
}
/* до появления блока карточки собраны у заголовка (смещения --dx/--dy считает скрипт в main_cards_inc.php) */
.home-feat.is-gathered .home-feat__card {
  transform: translate(calc(var(--dx, 0px) * .8), calc(var(--dy, 0px) * .8)) scale(.55);
  opacity: 0;
  transition: none;
}
.home-feat__card--2 { transition-delay: .08s; }
.home-feat__card--3 { transition-delay: .16s; }
.home-feat__card--4 { transition-delay: .24s; }
.home-feat__card--1 { grid-column: 1; grid-row: 1; justify-self: start; margin-left: 4%; }
.home-feat__card--2 { grid-column: 2; grid-row: 1; justify-self: end; margin-top: 72px; animation-delay: -2s; }
.home-feat__card--3 { grid-column: 1; grid-row: 3; justify-self: start; margin-top: 8px; animation-delay: -4s; }
.home-feat__card--4 { grid-column: 2; grid-row: 3; justify-self: end; margin-top: 56px; margin-right: 4%; animation-delay: -1s; }
.home-feat__name { margin: 0 !important; max-width: 220px; font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: #fff; }
.home-feat__text { margin: 14px 0 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .78); }

/* стикер: наклонённое превью, выходит за край карточки */
.home-feat__sticker {
  position: absolute;
  z-index: 2;
  display: block;
  width: 140px;
  height: 140px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #008AFF, #6C5CFF);
  box-shadow: 0 18px 36px -12px rgba(16, 24, 40, .45);
  transition: transform .25s ease;
}
.home-feat__sticker img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-feat__card--1 .home-feat__sticker { top: -52px; right: -64px; transform: rotate(-9deg); }
.home-feat__card--2 .home-feat__sticker { top: -60px; right: -48px; transform: rotate(8deg); }
.home-feat__card--3 .home-feat__sticker { top: -52px; right: -56px; transform: rotate(10deg); }
.home-feat__card--4 .home-feat__sticker { top: -48px; right: -40px; transform: rotate(-12deg); }
.home-feat__sticker:hover { transform: rotate(0) scale(1.06); }
.home-feat__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .25);
}
.home-feat__play::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 15px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent #008AFF;
}
.home-feat__sticker--icon { display: grid; place-items: center; }
.home-feat__sticker--icon svg { width: 72px; height: 72px; }

@keyframes home-feat-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-feat__card { animation: none; }
}

@media (max-width: 74.99875em) {
  .home-feat { padding: 56px 32px 64px; column-gap: 32px; }
  .home-feat__card--1, .home-feat__card--4 { margin-left: 0; margin-right: 0; }
}
@media (max-width: 61.99875em) {
  .home-feat { grid-template-rows: auto; row-gap: 72px; margin-top: 64px; padding: 48px 24px 56px; border-radius: 24px; }
  .home-feat__center { grid-row: 1; margin: 0 auto 8px; }
  .home-feat__card { grid-row: auto !important; width: 100%; margin: 0 !important; justify-self: stretch !important; animation: none; }
  .home-feat__card--1, .home-feat__card--3 { grid-column: 1; }
  .home-feat__card--2, .home-feat__card--4 { grid-column: 2; }
  .home-feat__sticker { width: 104px; height: 104px; border-radius: 20px; }
  .home-feat__card .home-feat__sticker { top: -40px; right: -8px; left: auto; bottom: auto; }
  .home-feat__name { max-width: calc(100% - 100px); }
}
@media (max-width: 47.99875em) {
  .home-feat { grid-template-columns: 1fr; row-gap: 56px; }
  .home-feat__card--1, .home-feat__card--2, .home-feat__card--3, .home-feat__card--4 { grid-column: 1; }
  .home-feat__title { font-size: 44px; }
  .home-feat__lead { font-size: 16px; }
  .home-feat__card { padding: 24px 24px 28px; border-radius: 24px; }
  .home-feat__name { font-size: 22px; }
  .home-feat__sticker { width: 88px; height: 88px; }
  .home-feat__card .home-feat__sticker { top: -32px; }
  .home-feat__play { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .home-feat__play::after { left: 14px; top: 11px; border-width: 7px 0 7px 11px; }
}
