/* Perf helpers for sales-landing — качество сохраняем, режем лишний paint/compositor */
.main-features,
.key-stats,
.how-it-works,
.our-benefits,
.case-studies,
.home-cta,
.faq,
.footer,
.industries,
.capabilities {
  content-visibility: auto;
  contain-intrinsic-size: 1px 920px;
}

.benefits-card,
.case-content-card,
.swiper-slide {
  contain: layout paint style;
}

/* Blur/glow — стабильная яркость без затухания при скролле */
.chain-blur,
.chain-blur.is-second {
  will-change: auto;
  transform: translateZ(0);
  pointer-events: none;
}

.hero-label-glow-bg,
.button-glow-bg,
.case-studies-elipse,
.decoration-blur,
.contact-us-decor,
.hero-elipse-black {
  will-change: auto;
  contain: paint;
}

/* Активный parallax — только когда секция на экране */
.key-stats .paralax-card {
  will-change: auto;
}
.key-stats.is-inview .paralax-card {
  will-change: transform, opacity;
}

.our-benefits.is-inview .swiper,
.case-studies.is-inview .swiper {
  will-change: transform;
}

img[loading="lazy"] {
  content-visibility: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 991px) {
  .chain-blur,
  .hero-label-glow-bg,
  .button-glow-bg,
  .case-studies-elipse {
    display: none !important;
  }

  .paralax-card {
    transform: none !important;
  }
}

html.sales-landing-perf-lite .chain-blur,
html.sales-landing-perf-lite .hero-label-glow-bg,
html.sales-landing-perf-lite .button-glow-bg {
  opacity: 0.25;
  filter: none !important;
}

html.sales-landing-perf-lite .paralax-card {
  transform: none !important;
}

/* Горизонтальный how-it-works — не композитим всю ленту постоянно */
.how-it-works {
  contain: layout paint;
}

/* Не прячем цепь/фон до inview — иначе чёрная пустота */

.our-benefits:not(.is-inview) .swiper-wrapper {
  content-visibility: auto;
}


/* Key-stats: «Наглядно» чуть крупнее оригинала */
.key-stats .heading-key-stats {
  font-size: clamp(9rem, 14vw, 16.25rem);
  letter-spacing: -0.04em;
}

.key-stats .span-key-stats {
  inset: 4.4rem auto auto 11.5rem;
}

@media (max-width: 991px) {
  .key-stats .span-key-stats {
    inset: 1rem auto auto 3.5rem;
  }
}

/* Slot 6 — glass logo без чёрного фона */
.big-3d-logo,
.features-logo {
  background: transparent !important;
  mix-blend-mode: normal;
}

/* Features hero: tall crystal — старт под кнопкой, без чёрного квадрата */
.features {
  overflow: hidden;
}

.features .features-logo {
  mix-blend-mode: screen;
  height: auto;
  object-fit: contain;
  object-position: center top;
  pointer-events: none;
  background: transparent !important;
}

.features .features-logo.mobile-hide {
  width: min(34rem, 52vw);
  max-width: 560px;
  max-height: 40rem;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  /* Старт строго под кнопкой «Запросить демо» */
  top: 30.5rem !important;
  bottom: auto !important;
  inset: 30.5rem auto auto 50% !important;
  z-index: 0;
  transform: translateX(-50%);
  opacity: 1;
}

.features .features-logo.mobile-only {
  width: min(17rem, 78vw);
  max-height: 18rem;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 0;
  position: relative;
  transform: none;
  display: block;
  margin: 0.75rem auto 0;
  mix-blend-mode: screen;
}

.features .container,
.features .main-button-hover {
  position: relative;
  z-index: 2;
}

.features .features-label {
  position: absolute;
  z-index: 2;
}

/* Лейблы вокруг tall crystal (ниже кнопки) */
.features .features-label.mobile-hide:not(.is-second):not(.is-alternate) {
  inset: 33rem auto auto calc(50% + 17rem);
  right: auto;
}

.features .features-label.is-second.mobile-hide {
  inset: 39rem auto auto calc(50% - 28rem);
  right: auto;
}

.features .features-label.is-alternate.mobile-hide {
  inset: 47rem auto auto calc(50% + 17rem);
  right: auto;
}

@media (max-width: 1400px) {
  .features .features-label.mobile-hide:not(.is-second):not(.is-alternate) {
    inset: 33rem auto auto calc(50% + 11rem);
  }

  .features .features-label.is-second.mobile-hide {
    inset: 39rem auto auto calc(50% - 22rem);
  }

  .features .features-label.is-alternate.mobile-hide {
    inset: 47rem auto auto calc(50% + 11rem);
  }
}

.features .features-blur-section {
  z-index: 1;
  background-image: linear-gradient(
    180deg,
    rgba(8, 6, 9, 0) 0%,
    rgba(8, 6, 9, 0.45) 45%,
    #080609 100%
  );
}

@media (max-width: 991px) {
  .features {
    height: auto !important;
    min-height: 40rem;
    padding-bottom: 1.5rem;
  }

  .features .features-logo.mobile-hide {
    width: min(24rem, 68vw);
    max-height: 26rem;
    top: 26rem;
  }
}

@media (max-width: 479px) {
  .features {
    height: auto !important;
    min-height: 0;
    padding-top: 4.5rem !important;
    padding-bottom: 1.5rem;
  }

  .features .features-logo.mobile-only {
    width: min(16.5rem, 82vw);
    max-height: 17rem;
    margin: 0.75rem auto 0;
  }

  .features .features-blur-section {
    display: none;
  }
}

/* Slot 7 — скрыть текстовый placeholder, если аватар не подгрузился */
.horizontal-scroll-bg-gr[src*="placeholders/slot-07"] {
  opacity: 0 !important;
  pointer-events: none;
}

/* Main features: премиальные иллюстрации v2 в card-decoration */
.main-features .card-decoration.ca-feature-art {
  display: block;
  overflow: hidden;
  height: 11.5rem !important;
  max-height: none !important;
  padding: 0.4rem 0.55rem 0;
  border-radius: 0;
}

.main-features .card-decoration.ca-feature-art > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.main-features .card-decoration.ca-feature-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 0.85rem;
  transform: translateZ(0) scale(1.01);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s ease;
  will-change: transform;
  animation: ca-feature-breathe 5.5s ease-in-out infinite;
}

.main-features .card.is-main-fetatures:hover .card-decoration.ca-feature-art img {
  transform: translateZ(0) scale(1.045);
  filter: saturate(1.05) contrast(1.02);
  animation-play-state: paused;
}

@keyframes ca-feature-breathe {
  0%,
  100% {
    transform: translateZ(0) scale(1.01) translateY(0);
  }

  50% {
    transform: translateZ(0) scale(1.025) translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-features .card-decoration.ca-feature-art img {
    animation: none !important;
  }
}


/* How-it-works: минималистичная цепь (стеклянные кольца), панорама 8:1 */
.how-it-works .horziontal-chain {
  width: 247rem;
  min-width: 247rem;
  max-width: none;
  height: 30.875rem;
  max-height: 31rem;
  object-fit: cover;
  object-position: center center;
  top: auto !important;
  z-index: 0 !important;
  pointer-events: none;
}

.how-it-works .chain-blur,
.how-it-works .chain-blur.is-second {
  z-index: 0 !important;
  pointer-events: none;
}

.how-it-works .widh-horizontal-scroll {
  z-index: 2;
}

.how-it-works .horizontal-final-card {
  z-index: 2;
}

.how-it-works .horizontal-scroll-card {
  z-index: 3 !important;
}

@media (max-width: 991px) {
  .how-it-works .horziontal-chain {
    width: 110rem;
    min-width: 110rem;
    height: 13.75rem;
    max-height: 14rem;
    top: 13.5rem !important;
    bottom: auto !important;
  }
}

/* How-it-works: карточки 01/03/05 на верхней линии цепи; 02/04 — на нижней */
@media (min-width: 992px) {
  .how-it-works .horizontal-scroll-card.is-first,
  .how-it-works .horizontal-scroll-card.is-three,
  .how-it-works .horizontal-scroll-card.is-five {
    bottom: 22.38rem !important;
    top: auto !important;
  }

  .how-it-works .horizontal-scroll-card.is-five {
    z-index: 3 !important;
  }

  .how-it-works .horziontal-chain {
    filter: blur(2px);
    opacity: 0.72;
  }
}

/* Case studies envelope — см. #ca-case-envelope-quotes в index.html */

/* Header brand lockup: белый на тёмной шапке, чёрный на светлой (после скролла) */
.header:not(.header--light-surface) .ca-brand-lockup__mark {
  filter: brightness(0) invert(1);
  opacity: 1;
  width: 48px !important;
  max-width: 48px !important;
  transition: filter 0.25s ease, opacity 0.25s ease, max-width 0.25s ease;
}

.header:not(.header--light-surface) .ca-brand-lockup__wordmark,
.header:not(.header--light-surface) .ca-brand-lockup__comment,
.header:not(.header--light-surface) .ca-brand-lockup__analysis {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #fff !important;
  transition: color 0.25s ease;
}

.header.header--light-surface .ca-brand-lockup__mark {
  filter: none !important;
  opacity: 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  margin: 0;
  overflow: hidden;
}

.header.header--light-surface .ca-brand-lockup__wordmark,
.header.header--light-surface .ca-brand-lockup__comment,
.header.header--light-surface .ca-brand-lockup__analysis {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #000 !important;
  transition: color 0.25s ease;
}

/* Footer: всегда на тёмном фоне */
.logo-footer img[data-slot="22"] {
  filter: brightness(0) invert(1) !important;
}

/* Навигация шапки: светлая на тёмном фоне, тёмная на белой шапке */
.header:not(.header--light-surface) nav.mobile-hide .text-size-16-16-14 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.header.header--light-surface nav.mobile-hide .text-size-16-16-14 {
  color: rgba(0, 0, 0, 0.72) !important;
}

.header.header--light-surface nav.mobile-hide a.w--current .text-size-16-16-14 {
  color: #000 !important;
}
