/* ==========================================================================
  @@2  КОНТЕНТ СТРАНИЦЫ  (бывш. page_main.css)
  ========================================================================== */

/* ===== Контент страницы ===== */
.page_main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 6rem;
}

/* Общая карточка-инфоблок */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 3.5rem;
}

.section__head { max-width: 720px; margin-bottom: 2.5rem; }

.section__eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section__title {
  font-size: clamp(1.625rem, 2.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section__text {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* ===== Первый экран ===== */
.hero {
  /* Ширина слайдера: не больше 568px и не выше экрана.
    240px — запас на шапку окна, подпись и кнопки под слайдером */
  --photo-ratio: calc(568 / 835);
  --slider-w: clamp(260px, calc((100vh - 240px) * var(--photo-ratio)), 568px);

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--slider-w));
  gap: 4rem;
  align-items: center;
}

/* svh учитывает панели браузера на мобильных */
@supports (height: 100svh) {
  .hero {
    --slider-w: clamp(260px, calc((100svh - 240px) * var(--photo-ratio)), 568px);
  }
}

.hero__badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--warm-ink);
  background: var(--warm-surface);
  border: 1px solid var(--warm-border);
  border-radius: var(--radius-pill);
}

/* Заголовок собран из контуров логотипа, размер задаётся картинке */
.hero__title {
  margin-bottom: 1rem;
  line-height: 1.05;
}

.hero__title img {
  width: auto;
  height: clamp(2.75rem, 5.5vw, 4.25rem);
}

.hero__subtitle {
  max-width: 48ch;
  margin-bottom: 1rem;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.4;
}

.hero__lead {
  max-width: 72ch;
  margin-bottom: 1.75rem;
  color: var(--text-muted);
}

.hero__features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.hero__features li {
  position: relative;
  padding-left: 1.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Галочка у пунктов */
.hero__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2307689a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.hero__contact {
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.hero__contact p { margin-bottom: 0.25rem; color: var(--text-muted); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__docs {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
}

/* ===== Шаги ===== */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.steps__item {
  padding: 1.75rem;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.steps__num {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.steps__title { margin-bottom: 0.5rem; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.steps__text { font-size: 0.9375rem; color: var(--text-muted); }

/* ===== Кому подходит ===== */
.audience {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
/* Две карточки вместо трёх: страница контактов */
.audience--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.audience__card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.audience__card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.audience__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 14px;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.audience__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.audience__icon-dot { fill: currentColor; stroke: none; }

/* Наведение на карточку: инвертируются только значок и чипсы */
.audience__card:hover .audience__icon {
  color: var(--primary-soft);
  background: var(--primary);
}

.audience__title { margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 700; }
.audience__text { flex: 1; margin-bottom: 1.25rem; color: var(--text-muted); }

.audience__card:hover .chips li {
  color: var(--primary-soft);
  background: var(--primary);
}

/* ===== Адаптив ===== */
@media (max-width: 1180px) {
  .section { padding: 2.5rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .audience { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* На телефоне элементы интерфейса компактнее, запас по высоте меньше */
  .hero {
    --slider-w: clamp(240px, calc((100vh - 200px) * var(--photo-ratio)), 568px);
    gap: 2rem;
  }

  @supports (height: 100svh) {
    .hero { --slider-w: clamp(240px, calc((100svh - 200px) * var(--photo-ratio)), 568px); }
  }

  /* остальные правила 560px без изменений */
  .page_main { gap: 1.25rem; padding-bottom: 2.5rem; }
  .section { padding: 2rem 1.25rem; }
  .hero__features { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .audience__card { padding: 1.5rem; }
}

/* Телефон в горизонтальной ориентации: экран низкий, слайдер не должен стать крошечным */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { --slider-w: min(100%, 320px); }
}

/* Отступ при якорном скролле, чтобы липкая шапка не перекрывала заголовки */
section[id],
footer[id] {
  scroll-margin-top: 110px;
}
