/**
 * Кроссбраузерные правки (Firefox, Safari, Edge).
 * Подключается последним — поверх page-*.css.
 */

/* --- Ширина: 100vw в Firefox шире viewport из‑за скроллбара --- */
.site-header[data-site-chrome-mount="outside"] {
  width: 100%;
  max-width: 100%;
}

html.header-compact.layout-scale-active:not(.responsive-layout)
  .site-header[data-site-chrome-mount="outside"] {
  max-width: 100%;
}

html.header-compact.layout-scale-active:not(.responsive-layout)
  .site-header[data-site-chrome-mount="outside"]
  .site-header__inner {
  width: min(1400px, calc(100% - 40px));
  max-width: min(1400px, calc(100% - 40px));
}

html.header-compact.responsive-layout
  .site-header[data-site-chrome-mount="outside"]
  .site-header__inner {
  width: calc(100% - 20px);
  max-width: calc(100% - 20px);
}

/* --- Футер: subgrid → обычная сетка, если subgrid недоступен --- */
@supports not (grid-template-columns: subgrid) {
  .site-footer__inner .footer-top-grid,
  .site-footer__inner .footer-bottom-row {
    grid-template-columns: 276px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(40px, 4.5vw, 96px);
  }
}

/* --- Inter VF: font-weight:480 → ось wght (Firefox/Edge округляют иначе) --- */
@supports (font-variation-settings: "wght" 480) {
  #design-root :is(
    .home-hero__title,
    .home-hero__solutions-title,
    .home-solutions__title,
    .home-solutions__subtitle,
    .home-services__title,
    .home-services__subtitle,
    .home-outcomes__title,
    .home-advantages__title,
    .home-projects__title,
    .home-clients__title,
    .home-faq__title,
    .home-whats-new__title,
    .about-strip__title,
    .hero-title,
    .method-section__title,
    [class$="-hub-hero__title"],
    .expert-hub-hero__title,
    .case-hub-hero__title,
    .press-hero__title,
    .knowledge-hub-hero__title,
    .open-surveys-hero__title,
    .decision-hero__title,
    .course-hero__title,
    .about-hero__title
  ) {
    font-weight: 400;
    font-variation-settings: "wght" 480, "slnt" 0;
  }

  #design-root .home-hero__title :is(p, span, strong, b, em, i),
  #design-root .hero-title :is(p, span, strong, b, em, i) {
    font-weight: 400;
    font-variation-settings: "wght" 480, "slnt" 0;
  }
}

/* --- line-clamp: стандартное свойство рядом с -webkit (Safari/Firefox) --- */
#design-root [style*="--otido-line-clamp"],
#design-root .home-hero-card__title,
#design-root .home-solutions-card__title {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

/* --- Формы: единый box-model в Firefox --- */
#design-root input,
#design-root textarea,
#design-root select,
#design-root button {
  font-family: inherit;
}

#design-root button {
  appearance: none;
  -webkit-appearance: none;
}

/* --- backdrop-filter: fallback без blur --- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-hero__shell {
    backdrop-filter: none;
  }
}

/* --- :has() fallback для padding главной (Firefox <121) --- */
@supports not selector(:has(*)) {
  body.page-home #design-root.design-root--academy {
    padding-top: 64px;
  }

  @media (min-width: 901px) {
    body.page-home #design-root.design-root--academy {
      padding-top: 80px;
    }
  }
}
