/* ==========================================================================
   bx-core.css — базовый слой посадочных страниц раздела «Битрикс»
   Сброс, типографика, контейнер, утилиты, адаптив.
   Значения --bx-* вынесены в bx-vars.css (единственный источник токенов).
   Этот файл подключается ПОСЛЕ bx-vars.css. Разделение нужно потому, что
   страницы на вендорской вёрстке (/bitrix.html) получают блоки без сброса.
   ========================================================================== */


/* --- Сброс ------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bx-bg);
  color: var(--bx-txt);
  font-family: var(--bx-font);
  font-size: var(--bx-fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
  overflow-wrap: break-word;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--bx-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--bx-red);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--bx-line);
}

/* --- Типографика ------------------------------------------------------- */

.bx-h1,
.bx-h2,
.bx-h3,
.bx-h4 {
  color: var(--bx-title);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bx-h1 {
  font-size: var(--bx-fs-h1);
}

.bx-h2 {
  font-size: var(--bx-fs-h2);
}

.bx-h3 {
  font-size: var(--bx-fs-h3);
}

.bx-h4 {
  font-size: var(--bx-fs-h4);
  font-weight: 700;
}

.bx-lead {
  font-size: 18px;
  line-height: 1.65;
}

.bx-text {
  font-size: var(--bx-fs-body);
  line-height: 1.7;
}

.bx-text + .bx-text {
  margin-top: 16px;
}

.bx-accent {
  color: var(--bx-blue);
}

.bx-strong {
  color: var(--bx-title);
  font-weight: 700;
}

/* --- Контейнер --------------------------------------------------------- */

.bx-container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 20px;
}

.bx-section {
  padding-block: var(--bx-section-y);
}

.bx-section--tight {
  padding-block: 44px;
}

.bx-section--surface {
  background: var(--bx-surface);
}

.bx-section--head {
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
}

.bx-section__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--bx-blue);
  font-size: var(--bx-fs-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bx-section__note {
  margin-top: 16px;
  font-size: var(--bx-fs-sm);
}

.bx-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--bx-title);
  color: #fff;
  z-index: 100;
}

.bx-skip:focus {
  left: 0;
  color: #fff;
}

/* --- Кнопки ------------------------------------------------------------ */

.bx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bx-btn:hover {
  transform: translateY(-2px);
}

.bx-btn--primary {
  background: var(--bx-red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 30, 68, 0.24);
}

.bx-btn--primary:hover {
  background: var(--bx-red-hover);
  color: #fff;
}

.bx-btn--ghost {
  border: 2px solid var(--bx-blue);
  color: var(--bx-blue);
}

.bx-btn--ghost:hover {
  background: var(--bx-blue);
  color: #fff;
}

.bx-btn[disabled],
.bx-btn.is-sending {
  opacity: 0.65;
  pointer-events: none;
  transform: none;
}

.bx-btn--primary.is-sending::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bx-spin 0.7s linear infinite;
}

@keyframes bx-spin {
  to {
    transform: rotate(360deg);
  }
}

.bx-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --- Утилиты ----------------------------------------------------------- */

.bx-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bx-list-check {
  display: grid;
  gap: 12px;
}

.bx-list-check > li {
  position: relative;
  padding-left: 30px;
  font-size: var(--bx-fs-body);
  line-height: 1.6;
}

.bx-list-check > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 10px;
  border-left: 2.5px solid var(--bx-blue);
  border-bottom: 2.5px solid var(--bx-blue);
  transform: rotate(-45deg);
}

/* --- Адаптив ----------------------------------------------------------- */

@media (max-width: 1240px) {
  :root {
    --bx-section-y: 64px;
  }

  .bx-h1 {
    font-size: 38px;
  }

  .bx-h2 {
    font-size: 30px;
  }
}

@media (max-width: 992px) {
  :root {
    --bx-fs-h1: 32px;
    --bx-fs-h2: 26px;
    --bx-fs-h3: 21px;
    --bx-section-y: 52px;
  }

  .bx-lead {
    font-size: 17px;
  }

  .bx-section--head {
    margin-bottom: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --bx-fs-h1: 27px;
    --bx-fs-h2: 23px;
    --bx-fs-h3: 19px;
    --bx-fs-body: 15px;
    --bx-section-y: 44px;
  }

  .bx-btn {
    width: 100%;
  }

  .bx-btn-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  :root {
    --bx-fs-h1: 24px;
    --bx-fs-h2: 21px;
    --bx-gap: 14px;
    --bx-section-y: 36px;
  }

  .bx-lead {
    font-size: 16px;
  }

  .bx-btn {
    min-height: 52px;
    padding: 12px 18px;
    font-size: 15px;
  }
}
