/* Sync2Sys site v2: страница для дистрибуторов (.dist-).
   Подключается после sec-solutions.css: `css: sec-solutions.css, sec-distributors.css`. */

/* ---------- Первый экран: текст слева, схема справа ---------- */
.dist-hero .hero__stage { margin-top: 56px; padding-bottom: 80px; }
.dist-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 44px; align-items: center; max-width: 940px; margin: 0 auto; }
.dist-map small { display: block; font-size: 13px; color: var(--ink-3); }
.dist-map b { display: block; font-weight: 500; letter-spacing: -0.02em; }
.dist-map span { display: block; font-size: 13px; color: var(--ink-2); }
.dist-map__src, .dist-map__out > div { position: relative; padding: 18px 20px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.dist-map__src b { margin: 6px 0 4px; font-size: 24px; line-height: 1.1; }
.dist-map__hub { position: relative; padding: 34px 30px; border-radius: 16px; background: var(--p, #146671); color: #fff; box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--th) 70%, #000); }
.dist-map__hub small { color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.dist-map__hub ul { display: grid; gap: 14px; margin-top: 22px; font-size: 18px; font-weight: 500; }
.dist-map__logo span { display: inline; font-size: 24px; color: #fff; }
.dist-map__logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.dist-map__logo img { width: 34px; height: 34px; }
.dist-map__logo em { font-style: normal; color: var(--green-bright, #2fd27a); }
.dist-map__hub li { display: flex; align-items: center; gap: 10px; }
.dist-map__hub li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright, #2fd27a); }
.dist-map__out { display: grid; gap: 12px; }
.dist-map__out > div { padding: 14px 18px; }
.dist-map__out b { margin: 3px 0 2px; font-size: 19px; color: color-mix(in srgb, var(--th) 82%, #000); }
/* провода между колонками и бегущая точка */
/* Провода схемы: две ленты с изломом, туда и обратно (вариант H, решение Саши 19.11), как .hub */
.dist-map i { position: absolute; top: 50%; width: 44px; height: 31px; margin-top: -15px; background: none; --rl: 44px; --rib-c: var(--th); --rib-t: color-mix(in srgb, var(--th) 32%, white); }
.dist-map__src i { left: 100%; }
.dist-map__out i { right: 100%; }
.dist-map i::before, .dist-map i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0), var(--rib-c)) -22px 0 / 22px 100% no-repeat, var(--rib-t); animation: hub-r 2.4s linear infinite; }
/* Данные идут в одну сторону (прайс-лист в Sync2Sys, фиды группам): оба отрезка бегут вправо, второй со сдвигом на полпериода */
.dist-map i::after { animation-delay: 1.2s; }
/* Фиды забирают реселлеры по ссылке: отрезки у групп бегут от карточки к узлу (пин 377) */
.dist-map__out i::before, .dist-map__out i::after { background: linear-gradient(to left, rgba(255,255,255,0), var(--rib-c)) var(--rl) 0 / 22px 100% no-repeat, var(--rib-t); animation-name: hub-l; }
.dist-map__src i { translate: 0 6px; }
.dist-map__out i { translate: 0 -6px; }
.dist-map__out > div:nth-child(2) i::before { animation-delay: 0.4s; }
.dist-map__out > div:nth-child(2) i::after { animation-delay: 1.6s; }
.dist-map__out > div:nth-child(3) i::before { animation-delay: 0.8s; }
.dist-map__out > div:nth-child(3) i::after { animation-delay: 2s; }
.dist-map i::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 31' preserveAspectRatio='none'%3E%3Cpath d='M0 6H16L24.5 14.5Q28 18 31.5 18H44' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 31' preserveAspectRatio='none'%3E%3Cpath d='M0 6H16L24.5 14.5Q28 18 31.5 18H44' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
.dist-map i::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 31' preserveAspectRatio='none'%3E%3Cpath d='M0 13H13.1L21.6 21.5Q25.1 25 28.6 25H44' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 31' preserveAspectRatio='none'%3E%3Cpath d='M0 13H13.1L21.6 21.5Q25.1 25 28.6 25H44' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
@media (min-width: 1100px) {
  .dist-hero > .wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding-bottom: 104px; }
  .dist-hero .h1 { font-size: 56px; }
  .dist-hero .hero__stage { margin-top: 0; padding-bottom: 0; }
  .dist-map { gap: 32px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.1fr); }
  .dist-map i { width: 32px; --rl: 32px; }
  .dist-map i::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 31' preserveAspectRatio='none'%3E%3Cpath d='M0 6H10L18.5 14.5Q22 18 25.5 18H32' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 31' preserveAspectRatio='none'%3E%3Cpath d='M0 6H10L18.5 14.5Q22 18 25.5 18H32' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
  .dist-map i::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 31' preserveAspectRatio='none'%3E%3Cpath d='M0 13H7.1L15.6 21.5Q19.1 25 22.6 25H32' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 31' preserveAspectRatio='none'%3E%3Cpath d='M0 13H7.1L15.6 21.5Q19.1 25 22.6 25H32' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
  .dist-map__src, .dist-map__out > div { padding: 14px 16px; }
  .dist-map__hub { padding: 22px 18px; }
  .dist-map__hub ul { font-size: 15px; }
  .dist-map__src b { font-size: 21px; }
}

/* ---------- Цветной блок: заголовок по центру, текст и окно внутри ---------- */
.dist-band { padding: 72px 64px; border-radius: 24px; color: #fff; background: radial-gradient(150% 130% at 100% 100%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%), var(--p, #146671); }
.dist-band > .h2 { max-width: 760px; margin: 0 auto 56px; text-align: center; color: #fff; }
.dist-band__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.dist-band--rev .dist-band__text { order: 2; }
.dist-band__text .tag { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.dist-band__text .h3 { margin: 20px 0 14px; color: #fff; }
.dist-band__text .body { font-size: 18px; color: rgba(255, 255, 255, 0.84); }
.dist-band__text > .btn { margin-top: 28px; }
.dist-band__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 28px; }
.dist-band__more { font-size: 16px; color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.5); }
.dist-band .ui { width: 100%; max-width: 480px; margin: 0 auto; color: var(--ink); }
.dist-band .ui .mk { width: 44px; }

/* Тариф: число товаров в скобках */
.sol-plan li small { font-size: 14px; color: var(--ink-3); }

/* ---------- Сцены ---------- */
.dist-bar--q i, .film .ui.sc .on .dist-bar--q i, .film .ui.anim.in .dist-bar--q i { width: 25%; }
.dist-px .dist-px__v { font-size: 19px; font-weight: 500; color: var(--ink); }
.dist-url { font-family: var(--mono, ui-monospace, monospace); font-size: 12px; overflow-wrap: anywhere; }

/* ---------- Шаги ---------- */
.dist-steps li { position: relative; }
.dist-steps li::after { content: ""; position: absolute; left: 0; top: -2px; width: 100%; height: 2px; background: var(--th); transform: scaleX(1); transform-origin: 0 50%; }

@media (max-width: 860px) {
  .dist-map { grid-template-columns: 1fr; gap: 28px; }
  .dist-map i { left: 50%; right: auto; width: 31px; height: 28px; margin: 0 0 0 -15px; --rl: 28px; }
  .dist-map__src i { top: 100%; }
  .dist-map__out > div:first-child i { top: auto; bottom: 100%; }
  .dist-map__out > div:nth-child(n+2) i { display: none; }
  .dist-map i::before, .dist-map i::after { background: linear-gradient(to bottom, rgba(255,255,255,0), var(--rib-c)) 0 -26px / 100% 26px no-repeat, var(--rib-t); animation-name: hub-dn; }
  .dist-map i::after { animation-name: hub-dn; }
  .dist-map__out i::before, .dist-map__out i::after { background: linear-gradient(to top, rgba(255,255,255,0), var(--rib-c)) 0 var(--rl) / 100% 26px no-repeat, var(--rib-t); animation-name: hub-up; }
  .dist-map__src i { translate: 6px 0; }
  .dist-map__out i { translate: -6px 0; }
  .dist-map i::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 28' preserveAspectRatio='none'%3E%3Cpath d='M6 0V8L14.5 16.5Q18 20 18 23.5V28' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 28' preserveAspectRatio='none'%3E%3Cpath d='M6 0V8L14.5 16.5Q18 20 18 23.5V28' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
  .dist-map i::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 28' preserveAspectRatio='none'%3E%3Cpath d='M13 0V5.1L21.5 13.6Q25 17.1 25 20.6V28' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 28' preserveAspectRatio='none'%3E%3Cpath d='M13 0V5.1L21.5 13.6Q25 17.1 25 20.6V28' fill='none' stroke='%23000' stroke-width='4' stroke-linejoin='miter' stroke-miterlimit='10'/%3E%3C/svg%3E"); }
  .dist-band { padding: 40px 20px; border-radius: 20px; }
  .dist-band > .h2 { margin-bottom: 32px; }
  .dist-band__in { grid-template-columns: 1fr; gap: 28px; }
  .dist-band--rev .dist-band__text { order: 0; }
  .dist-px .dist-px__v { font-size: 16px; }
  .dist-url { font-size: 11px; }
}

/* ================= Движение (класс sol-js ставит sec-solutions.js) ================= */
/* В покое: точки бегут по проводам схемы, пункты узла по очереди подсвечиваются */
@keyframes disthub { 0%, 30%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } 10%, 20% { transform: scale(1.5); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18); } }
.dist-js .dist-map__hub li::before { animation: disthub 6s ease-in-out infinite; }
.dist-js .dist-map__hub li:nth-child(2)::before { animation-delay: 2s; }
.dist-js .dist-map__hub li:nth-child(3)::before { animation-delay: 4s; }
@media (min-width: 1100px) { 
/* По прокрутке: шаги появляются по очереди, верхняя черта заполняется цветом страницы */
.dist-js .dist-steps li { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 220ms); }
.dist-js .dist-steps li::after { transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 220ms + 200ms); }
.dist-js .dist-steps.is-in li { opacity: 1; transform: none; }
.dist-js .dist-steps.is-in li::after { transform: scaleX(1); }
/* Цветные блоки появляются по прокрутке */
.dist-js .dist-band { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.dist-js .dist-band.is-in { opacity: 1; transform: none; }
}
.sol-plan li b { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .dist-map i::before, .dist-map i::after { animation: none; } }

/* Сверка с согласованными страницами интеграций (Саша 20.11, пин 379: «у нас нет такого стиля, когда в белом экране большой цветной блок»).
   Цветной блок стал полосой во всю ширину, как .int-how-band--th и .plat-early-band; содержимое по сетке страницы */
.dist-strip { margin-top: 0; padding: 96px 0; color: #fff; background: radial-gradient(150% 130% at 100% 100%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%), var(--p, #146671); }
/* Ди1 (24.11): левый край текста в полосе по сетке страницы, а не 64px */
.dist-strip .dist-band { padding: 0 var(--gut); border-radius: 0; background: none; }
.dist-strip + .sec--rule::before { display: none; }
/* Окно схемы в первом экране: без тени, как карточки на страницах интеграций */
.dist-map__hub { box-shadow: none; }
/* Пин 382: отступ между плитками и блоком отзывов */
.sec + #story { margin-top: calc(var(--sec) * 0.62); }
@media (max-width: 860px) { .dist-strip { padding: 56px 0; } .dist-strip .dist-band { padding-left: var(--gut); padding-right: var(--gut); } }

/* Карточки «что получает реселлер»: белая карточка без обводки, сверху светлая подложка с мини-окном (как review-demo/connectors-cards) */
.dist-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dist-card { display: flex; flex-direction: column; padding: 10px 10px 26px; border-radius: 16px; background: #fff; border: 0; }
.dist-card__art { position: relative; height: 210px; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--th) 12%, white); }
.dist-win { position: absolute; left: 22px; right: 22px; top: 22px; bottom: -12px; padding: 12px 14px; border-radius: 10px 10px 0 0; background: #fff; border: 1px solid color-mix(in srgb, var(--th) 30%, white); font-size: 13px; }
.dist-win h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.dist-win__r { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.dist-win__r b { margin-left: auto; font-weight: 600; color: var(--ink); }
.dist-win__r s { flex: none; width: 12px; height: 12px; border: 2px solid var(--th); border-radius: 4px; }
.dist-pill { position: absolute; right: 14px; top: 14px; z-index: 1; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--th) 14%, white); border: 1px solid color-mix(in srgb, var(--th) 30%, white); color: color-mix(in srgb, var(--th) 80%, #000); font-size: 14px; font-weight: 600; }
.dist-card h3 { margin: 20px 12px 8px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.dist-card p { margin: 0 12px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
@media (max-width: 980px) { .dist-cards { grid-template-columns: 1fr; } }
