/* Tetra — стили уровня всей страницы (Lenis, hover-reveal кнопок, parallax,
   swiper на About, мобильная производительность). Стили навбара — в
   tetra-navbar.css. */

/* ===== Lenis база (из пакета lenis) ===== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ===== buttons animation (hover-reveal строки) ===== */
/* Даже до выполнения JS на touch видна только исходная строка. */
@media (hover: none), (pointer: coarse), (pointer: none) {
  .btn-reveal__line--second { display: none !important; }
  .btn-reveal__track { transform: none !important; transition: none !important; }
}
@media (hover: hover) and (pointer: fine) {
  .btn-reveal__viewport {
    display: inline-block;
    height: 1.25em;
    line-height: 1.25em;
    overflow: hidden;
    vertical-align: bottom;
  }
  .btn-reveal__track {
    position: relative;
    display: block;
    height: 2.5em;
    line-height: 1.25em;
    transform: translateY(0);
    will-change: transform;
  }
  .btn-reveal__line {
    display: block;
    height: 1.25em;
    line-height: 1.25em;
    white-space: nowrap;
  }
  /* Сохраняем исходную высоту строки баннера и убираем inline-baseline. */
  .section_banner .banner_link .btn-reveal__viewport {
    display: block;
    height: 1.43em;
    line-height: 1.43em;
  }
  .section_banner .banner_link .btn-reveal__track {
    height: 2.86em;
    line-height: 1.43em;
  }
  .section_banner .banner_link .btn-reveal__line {
    height: 1.43em;
    line-height: 1.43em;
  }
}
@media
  (hover: hover)
  and (pointer: fine)
  and (prefers-reduced-motion: no-preference) {
  .btn-reveal__track {
    transition:
      transform 950ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .btn-reveal:hover .btn-reveal__track,
  .btn-reveal:focus-visible .btn-reveal__track {
    transform: translateY(-1.25em);
  }
  .section_banner .banner_link:hover .btn-reveal__track,
  .section_banner .banner_link:focus-visible .btn-reveal__track {
    transform: translateY(-1.43em);
  }
  [data-btn-nav-root] .btn-nav-reveal {
    transition:
      opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
      color 350ms ease;
  }
  [data-btn-nav-root].nav-engaged .btn-nav-reveal:not(.is-nav-bttn) {
    opacity: 0.65;
  }
  [data-btn-nav-root].nav-engaged
  .btn-nav-reveal.is-nav-active {
    opacity: 1;
  }
}

/* ===== image parallax ===== */
[data-parallax] {
  position: absolute;
  overflow: hidden;
}
[data-parallax] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
}

/* ===== about swiper (mobile portrait) ===== */
@media screen and (max-width: 479px) {
  /* лента выходит на правый край экрана — компенсируем 12px паддинга секции */
  .about_content.swiper {
    width: calc(100% + 0.72rem);
    margin-right: -0.72rem;
    overflow: hidden;
  }
  /* Swiper-стили грузятся позже webflow.css, поэтому размеры карточки задаём с запасом по весу */
  .about_content.swiper .swiper-slide.about-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    width: 18.17rem;
    height: 12.03rem;
    flex-shrink: 0;
    margin-top: 0;
  }
}

/* ===== mobile scroll performance (<=479px) ===== */
@media screen and (max-width: 479px) {
  /* backdrop-filter — главный тормоз скролла на телефоне. Фоны под этими
     элементами и так почти непрозрачные, в макете блюра нет. */
  .button.is-secondary,
  .button.is-secondary-dark {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ------------------------------------------------------------------ *
 * Contact layout: свитч General Inquiry / CADD Redemption (tetra-cta.js).
 * Элементы с [data-contact-show] видны только в своём режиме; режим —
 * атрибут data-contact-mode на .contact_layout (по умолчанию general).
 * ------------------------------------------------------------------ */
[data-contact-show="cadd"] { display: none; }
[data-contact-mode="cadd"] [data-contact-show="general"] { display: none; }
[data-contact-mode="cadd"] [data-contact-show="cadd"] { display: block; }
/* HubSpot-формы (приложение HubSpot V2) внутри Contact layout: только CSS —
 * разметку менять нельзя (мост HubSpot сверяет её хэш). Фокус как у .contact_input,
 * ряд имени/фамилии в строку (у HubSpot инлайн display:block). */
.contact_layout [data-hsfc-id="Renderer"] .contact_input:focus,
.contact_layout [data-hsfc-id="Renderer"] .contact_input:focus-visible {
  border-color: #090e13 !important; outline: none !important; box-shadow: none !important;
}
.contact_layout [data-hsfc-id="Renderer"] .contact_row { display: flex !important; }
/* Шеврон на submit, как .button_icon у остальных кнопок (svg в кнопку не вставляем). */
.contact_layout [data-hsfc-id="Button"]::after {
  content: ""; flex-shrink: 0; width: 1rem; height: 1rem; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 2.6665L10.8619 7.52842C11.1223 7.78877 11.1223 8.21088 10.8619 8.47123L6 13.3332' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 2.6665L10.8619 7.52842C11.1223 7.78877 11.1223 8.21088 10.8619 8.47123L6 13.3332' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Success (thank-you из HubSpot): иконка + шрифты как .contact_success-*. */
.contact_layout .hsfc-PostSubmit .hsfc-RichText { display: flex; flex-direction: column; gap: 0.375rem; }
.contact_layout .hsfc-PostSubmit .hsfc-RichText::before {
  content: ""; display: block; width: 3rem; height: 3rem; margin-bottom: 1.125rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none'%3E%3Ccircle cx='24' cy='24' r='24' fill='%23CE191D'/%3E%3Cpath d='M16 24.5L21.5 30L32 19.5' stroke='white' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.contact_layout .hsfc-PostSubmit .hsfc-RichText p {
  margin: 0 !important; max-width: 16.7rem; color: #666; font-size: 1rem !important;
  line-height: 1.5rem !important; font-weight: 450;
}
.contact_layout .hsfc-PostSubmit .hsfc-RichText p:first-child {
  max-width: none; color: #090e13; font-size: 2rem !important; line-height: 2.75rem !important;
  letter-spacing: -0.03125rem;
}
.contact_layout .hsfc-PostSubmit .hsfc-RichText p:first-child strong { font-weight: inherit; }
.contact_layout .hsfc-PostSubmit .hsfc-RichText p:nth-child(n+3) { display: none; }
@media (max-width: 479px) {
  .contact_layout .hsfc-PostSubmit .hsfc-RichText p:first-child {
    font-size: 1.2034rem !important; line-height: 1.6546rem !important; letter-spacing: -0.0188rem;
  }
}
.contact_switch-btn { border: 0; font-family: inherit; }
.contact_switch-btn.is-active { background-color: #fff; color: #131315; }
