/* ============ Базовое ============ */
* { box-sizing: border-box; }

:root {
  --bg: #ebe9e2;
  --ink: #000;
  --muted: rgba(0, 0, 0, 0.5);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  padding: 24px 0 40px;
  overflow-x: hidden;
}

img { display: block; }

/* Контентная область строго в пределах 960px */
.page {
  width: min(920px, 100% - 48px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* до 1440px — 184px, к 1920px растёт на 20% (до 220.8px), линейно между ними */
  gap: clamp(184px, 73.6px + 7.667vw, 220.8px);
}

.frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* до 1440px — 144px, к 1920px растёт на 20% (до 172.8px), линейно между ними */
  --frame-gap: clamp(144px, 57.6px + 6vw, 172.8px);
  gap: var(--frame-gap);
}

/* Вертикальная линия-связка между «этажами»: по центру промежутка
   (intro → S&OP → cta). Псевдоэлемент не влияет на flex-раскладку. */
.intro,
.sop { position: relative; }
.intro::after,
.sop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, calc(var(--frame-gap) / 2 - 12px));
  width: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.2);   /* как верхний разделитель футера (.footer__line) */
  pointer-events: none;
}

/* ============ Хедер ============ */
.brand {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 20px;
  line-height: normal;
}

/* ============ Блок «спросили 500+ компаний» ============ */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
}

/* Диаграмма-ссылка — ширина 600px по центру; на ховере поднимается и увеличивается */
.chart-link {
  display: block;
  width: 600px;
  max-width: 100%;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  transform-origin: center;
}
.chart-link:hover {
  transform: translateY(-8px) scale(1.03) rotate(-1.5deg);
}
.chart {
  width: 100%;
  height: auto;
  display: block;
}

.lead {
  margin: 0;
  width: 100%;
  max-width: 840px;
  text-align: center;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 36px;
  line-height: 46px;
  letter-spacing: 0.01em;   /* 1% */
}

/* «спросили 500+ компаний» — выделенный фрагмент текста (без подчёркивания и ссылки) */
.link {
  color: inherit;
}

/* ============ Большая надпись S&OP ============ */
.sop {
  /* размер буквы; от него считаются позиции сносок, поэтому они масштабируются вместе с буквами */
  --sop-fs: min(400px, calc((100vw - 48px) / 2.4));
  position: relative;
  width: 100%;
  height: calc(var(--sop-fs) * 1.4);   /* 560px при буквах 400px, пропорционально на планшете */
  /* без overflow:hidden — иначе обрезается левый край S, выходящий за 920px (буквы 960px) */
}
.sop__row {
  display: flex;
  justify-content: center;
  width: 100%;
  /* сброс дефолтов h1 — визуально это по-прежнему большие буквы S&OP, а не заголовок */
  margin: 0;
  font-weight: inherit;
}
/* Смысловые слова h1: видны поисковику и скринридеру, но не появляются на странице. */
.sop__seo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.letter {
  flex: 0 0 auto;
  text-align: center;
  /* 4 моноширинных символа (advance 0.6em) заполняют ширину контента без зазоров,
     максимум 400px → на десктопе ровно 960px, на мобиле — во всю ширину */
  font-size: var(--sop-fs);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  user-select: none;
}
.letter--int { cursor: pointer; }
/* Заливка активной буквы (последней, на которую навели; изначально — S).
   Обводку НЕ убираем, иначе буква становится тоньше. */
.letter--int.is-active {
  color: var(--ink);
}

/* Сноски: коннектор + текст. Координаты — доли от размера буквы (--sop-fs),
   при 400px дают исходные пиксели, на планшете пропорционально уменьшаются. */
.conn {
  position: absolute;
  top: calc(var(--sop-fs) * 0.9675);    /* 387px */
  width: calc(var(--sop-fs) * 0.1775);  /* 71px  */
  height: calc(var(--sop-fs) * 0.2);    /* 80px  */
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.note {
  position: absolute;
  top: calc(var(--sop-fs) * 1.035);     /* 414px */
  width: calc(var(--sop-fs) * 1.135);   /* 454px */
  margin: 0;
  font-size: calc(var(--sop-fs) * 0.05);/* 20px  */
  line-height: normal;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

/* S — коннектор уходит вправо, текст справа (точно как в Фигме) */
.conn--s { left: calc(var(--sop-fs) * 0.3); }      /* 120px */
.note--s { left: calc(var(--sop-fs) * 0.5425); text-align: left; }  /* 217px */

/* O — коннектор зеркалится влево, текст слева (чтобы влезть в ширину) */
.conn--o { left: calc(var(--sop-fs) * 1.325); transform: scaleX(-1); }  /* 530px */
.note--o { left: calc(var(--sop-fs) * 0.1225); text-align: right; }     /* 49px  */

/* P — то же, что и O */
.conn--p { left: calc(var(--sop-fs) * 1.925); transform: scaleX(-1); }  /* 770px */
.note--p { left: calc(var(--sop-fs) * 0.7225); text-align: right; }     /* 289px */

/* P: стрелочку-коннектор чуть выше — только на десктопе */
@media (min-width: 1009px) {
  .conn--p { top: calc(var(--sop-fs) * 0.9675 - 8px); }
}

/* Показ сноски активной буквы */
.sop:has([data-letter="s"].is-active) .conn--s,
.sop:has([data-letter="s"].is-active) .note--s,
.sop:has([data-letter="o"].is-active) .conn--o,
.sop:has([data-letter="o"].is-active) .note--o,
.sop:has([data-letter="p"].is-active) .conn--p,
.sop:has([data-letter="p"].is-active) .note--p {
  opacity: 1;
}

/* ============ Призыв и кнопка ============ */
.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;   /* как отступ перед «Мы спросили…» (.intro) */
  width: 100%;
}
.headline {
  margin: 0;
  width: 100%;
  max-width: 840px;
  text-align: center;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 36px;
  line-height: 46px;
  letter-spacing: 0.01em;   /* 1% */
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;   /* между кнопками и подписью */
  width: 100%;
}
.cta-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;   /* обе кнопки одинаковой высоты */
  justify-content: center;
  gap: 24px;
}
.cta-caption {
  margin: 0;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 20px;
  line-height: normal;
  color: var(--ink);
}
/* Ссылка «Узнать больше об игре →» под кнопками CTA (главная) */
.cta-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 20px;
  line-height: normal;
  color: var(--ink);
  text-decoration: none;
}
.cta-more__icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.cta-more:hover .cta-more__icon { transform: translateX(3px); }
/* Кнопки CTA — общая база */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;              /* между иконкой и текстом */
  min-height: 68px;
  padding: 16px 40px 16px 34px;   /* слева −6px, чтобы визуально нивелировать иконку */
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.01em;   /* 1% */
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 2px;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}
.btn span {
  color: inherit;
  white-space: nowrap;
}
.btn__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
/* Кнопка «текст слева, стрелка справа» */
.btn--arrow {
  justify-content: space-between;
  padding-left: 40px;
  min-width: 280px;
}
.btn__arrow {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.btn--arrow:hover .btn__arrow { transform: translateX(3px); }
/* Primary — сплошная заливка (Telegram): белым по чёрному */
.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--primary .btn__icon {
  width: 22px;
  height: 22px;
  filter: invert(1);   /* чёрная иконка Telegram → белая на тёмном фоне */
}
.btn--primary:hover {
  transform: translateY(-3px);
}
.btn--primary:active {
  transform: translateY(0);
}
/* Secondary — контурная (почта), чёрная обводка */
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover {
  transform: translateY(-3px);
}
.btn--secondary:active {
  transform: translateY(0);
}

/* ============ Футер «Уже сыграли» (по Figma) ============ */
.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-size: 20px;
  line-height: normal;
  color: rgba(0, 0, 0, 0.4);
}
.footer__line {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
}
.footer__row {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}
.footer__label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.footer__logos {
  flex: 1;
  min-width: 0;
  overflow: hidden;   /* обрезает бегущую строку по краям контейнера */
}
.footer__track {
  display: flex;
  width: 100%;
}
.footer__group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;   /* статичный режим: названия равномерно по ширине */
  gap: 24px;                        /* минимальный зазор между названиями */
}
.footer__name {
  white-space: nowrap;
  flex-shrink: 0;
  color: inherit;            /* наследуем rgba(0,0,0,0.4) от .footer */
  text-decoration: none;
}
a.footer__name:hover { color: var(--ink); }   /* на ховере — чёрный */
.footer__group--dup { display: none; }

/* Режим бегущей строки — включает JS, когда названия не помещаются в контейнер */
.footer--marquee .footer__row { gap: 16px; }   /* «Уже сыграли:» → строка (мобайл; планшет — ниже) */
.footer--marquee .footer__track {
  width: max-content;
  animation: footer-marquee 30s linear infinite;
}
.footer--marquee .footer__group {
  flex: 0 0 auto;
  justify-content: flex-start;
  gap: 22px;             /* зазор в бегущей строке (на ~30% меньше десктопного) */
  padding-right: 22px;   /* = зазор: group+padding повторяется дважды → сдвиг -50% бесшовный */
}
.footer--marquee .footer__group--dup { display: flex; }

/* ===== Старый футер «Уже сыграли» (заменён новым по Figma) — оставлен закомментированным:
.played {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.played__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}
.played__title span {
  font-size: 20px;
  line-height: normal;
  color: var(--muted);
  white-space: nowrap;
}
.played__line {
  width: 390px;
  height: 4px;
  flex-shrink: 0;
}
.played__logos {
  width: 100%;
}
.played__track {
  display: flex;
  width: 100%;
}
.played__group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.played__group--dup {
  display: none;
}
===== */

/* ============ Адаптив ============ */
/* Порог = момент, когда контент перестаёт помещаться в 960px (960 + 2×24 = 1008) */
@media (max-width: 1008px) {
  body { padding-bottom: 28px; }   /* нижний отступ страницы на мобиле/планшете (десктоп — 40px) */
  .page { gap: clamp(104px, 12vw, 160px); }
  .frame { --frame-gap: clamp(80px, 11vw, 144px); }
  .intro { gap: 24px; }       /* между диаграммой и текстом */
  .cta-block { gap: 32px; }   /* перед кнопкой «Спросить за участие» */
  .cta-group { gap: 12px; }   /* между кнопками-стопкой */
  .footer { gap: 24px; }      /* между линией и рядом логотипов */

  /* Крупный текст на мобиле/планшете — 26/34 */
  .lead, .headline { font-size: 26px; line-height: 34px; }
  /* Шрифты 20px: пропорционально уменьшаем (на мобиле 20px смотрелись крупно) */
  .brand, .footer, .cta-caption, .cta-more {
    font-size: clamp(14px, 3vw, 20px);
  }

  /* На узких экранах кнопки — стопкой во всю ширину (макс. как диаграмма) */
  .cta-group { flex-direction: column; align-items: stretch; width: 100%; }
  .btn { width: 100%; max-width: 600px; margin: 0 auto; font-size: 18px; padding: 12px 24px; min-height: 54px; }
  .btn span { white-space: normal; text-align: center; }   /* допускаем перенос текста кнопки */
  .btn__icon { width: 21px; height: 21px; }
  .btn--primary .btn__icon { width: 19px; height: 19px; }

  /* На планшете (768–1008px) сноски остаются десктопными (коннектор + абсолют,
     масштаб через --sop-fs). Статичный вариант сносок — только для телефонов: см. @media ≤767px ниже. */

  /* Футер выглядит «как на десктопе» на всех экранах; бегущая строка включается
     не по брейкпоинту, а по факту переполнения (класс .footer--marquee от JS). */
  .footer--marquee .footer__group { gap: 16px; padding-right: 16px; }
}

/* ===== Телефоны: сноски статичным потоком под надписью (десктопный коннектор тесен) ===== */
@media (max-width: 767px) {
  .sop {
    height: auto;
    min-height: 256px;     /* фикс. минимум, чтобы высота не скакала при смене сноски */
  }
  .conn { display: none; }   /* «уголок»-коннектор — только десктоп/планшет */

  /* вместо коннектора — небольшая точка под активной буквой */
  .letter { position: relative; }
  .letter--int.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(0.86em + 26px);   /* ниже базовой линии глифа (зазор над точкой +6px) */
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--ink);
  }

  .note {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    /* фикс. зазор ~16px от точки до текста: компенсирует масштаб букв (точка привязана к em) */
    margin: calc(48px - var(--sop-fs) * 0.14) 0 0;
    font-size: clamp(14px, 3vw, 20px);
    opacity: 1;
    display: none;
  }
  /* на мобиле все сноски — по центру */
  .note--s,
  .note--o,
  .note--p { text-align: center; }
  .sop:has([data-letter="s"].is-active) .note--s,
  .sop:has([data-letter="o"].is-active) .note--o,
  .sop:has([data-letter="p"].is-active) .note--p {
    display: block;
  }
}

/* ===== Планшет (768–1008px): свой диапазон. База — мобильная раскладка
   (одна колонка, кнопки стопкой), но шрифты и отступы крупнее мобильных
   и меньше десктопных. Значения ставим ПОСЛЕ @media ≤1008, чтобы их перебить. ===== */
@media (min-width: 768px) and (max-width: 1008px) {
  /* Вертикальный ритм — между мобильным и десктопным */
  body { padding-bottom: 34px; }
  .page { gap: clamp(120px, 14vw, 168px); }        /* мобайл clamp(104,12vw,160) → десктоп 184+ */
  .frame { --frame-gap: clamp(100px, 12vw, 150px); }/* мобайл clamp(80,11vw,144) → десктоп 144+ */
  .intro { gap: 40px; }        /* мобайл 24, десктоп 56 */
  .cta-block { gap: 44px; }    /* мобайл 32, десктоп 56 */
  .cta-group { gap: 16px; }    /* мобайл 12, десктоп 24 */
  .footer { gap: 28px; }       /* мобайл 24, десктоп 32 */

  /* крупный текст — между мобильным 26/34 и десктопным 36/46 */
  .lead, .headline { font-size: 32px; line-height: 42px; }

  /* кнопки крупнее мобильных, но меньше десктопных (остаются стопкой) */
  .btn { font-size: 20px; padding: 14px 32px; min-height: 60px; }   /* мобайл 18/54, десктоп 22/68 */
  .btn__icon { width: 23px; height: 23px; }                          /* мобайл 21, десктоп 26 */
  .btn--primary .btn__icon { width: 20px; height: 20px; }            /* мобайл 19, десктоп 22 */

  /* футер: зазоры бегущей строки — между мобильным 16 и десктопным 24 */
  .footer--marquee .footer__row { gap: 26px; }
  .footer--marquee .footer__group { gap: 20px; padding-right: 20px; }
}

/* ============ Контентная страница (шаблон) ============ */
/* Аскетичный шаблон текстовой страницы: хедер с возвратом на главную,
   колонка текста с картинками, CTA внизу. Используется в kak-prohodit-biznes-igra.html;
   новые контентные страницы верстаются той же разметкой. */
.page--article {
  gap: clamp(56px, 8vw, 88px);
  align-items: stretch;
}
.topbar {
  display: flex;
  flex-direction: column;
  gap: 24px;   /* между строкой и линией */
  font-size: 16px;
  line-height: normal;
}
.topbar__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.topbar__line {
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);   /* та же линия, что над футером (.footer__line) */
}
.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.topbar__back:hover { color: var(--ink); }
.topbar__back-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.topbar__brand {
  margin: 0;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}
a.topbar__brand:hover { color: var(--ink); }

.article {
  width: 100%;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0.01em;
}
/* Статья делится на части (.article__part): первая — с заголовком, остальные —
   со своими подзаголовками. На десктопе части чередуются по горизонтали
   вокруг центра со сдвигом 120px: нечётные левее, чётные правее. */
.article__part { max-width: 680px; }
.article__part:nth-of-type(odd)  { margin: 0 auto 0 60px; }   /* центр −60px */
.article__part:nth-of-type(even) { margin: 0 60px 0 auto; }   /* центр +60px */
/* Модификатор без чередования (страница политики): все части в колонке первой */
.article--uniform .article__part:nth-of-type(even) { margin: 0 auto 0 60px; }
/* Шрифты подключены только в 400-м начертании, поэтому заголовки
   отличаются размером, а не жирностью. */
.article h1 {
  /* Отрицательные поля растягивают контейнер заголовка из колонки первой
     части на всю ширину контентного блока (920px): −60px слева компенсирует
     сдвиг части, −180px справа добирает остаток — текст центрируется по странице */
  margin: 32px -180px 72px -60px;
  font-size: 64px;
  line-height: 68px;
  text-align: center;
  letter-spacing: -0.01em;
  font-weight: 600;
}
/* Заголовок страницы политики — обычный размер h1, но по левому краю колонки */
.article--uniform h1 {
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}
.article h2 {
  margin: 96px 0 24px;   /* отступ между частями статьи */
  /* стиль крупного текста главной (.lead/.headline): 36/46, обычное начертание */
  font-size: 36px;
  line-height: 46px;
  letter-spacing: 0.01em;
  font-weight: 400;
}
.article p { margin: 0 0 24px; }
.article ul,
.article ol {
  margin: 0 0 24px;
  padding-left: 28px;
}
.article a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article li { margin-bottom: 12px; }
.article li:last-child { margin-bottom: 0; }
.article figure {
  margin: 40px 0;
}
.article figure img {
  width: 100%;
  height: auto;
}
.article figcaption {
  margin-top: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 16px;
  line-height: normal;
  color: rgba(0, 0, 0, 0.4);   /* как мелкий серый текст в футере и топбаре */
}

/* Иллюстрации на полях: простые рисованные пиктограммы к абзацам.
   Кладутся в свободное поле, которое создаёт шахматный сдвиг частей:
   у нечётных (левых) частей — справа, у чётных (правых) — слева. */
.article p,
.article ul,
.article ol { position: relative; }
.mfig {
  position: absolute;
  top: -8px;
  width: 112px;
  height: 112px;
  color: var(--ink);
  pointer-events: none;
}
.article__part:nth-of-type(odd) .mfig { right: -172px; }
.article__part:nth-of-type(even) .mfig { left: -172px; }
.mfig--hidden { display: none; }   /* временно скрытые иллюстрации */

/* Рисованный овал вокруг ключевых слов — в духе обведённой даты на календаре CTA */
.circled { position: relative; white-space: nowrap; }
.circled__oval {
  position: absolute;
  left: -0.9em;
  top: -0.55em;
  width: calc(100% + 2.1em);
  height: calc(100% + 1.1em);
  color: var(--ink);
  overflow: visible;
  pointer-events: none;
}

@media (max-width: 1008px) {
  .topbar { font-size: clamp(13px, 2.5vw, 16px); }
  .article { font-size: 17px; line-height: 26px; }
  /* на мобиле/планшете части не чередуются — одна центральная колонка */
  .article__part:nth-of-type(odd),
  .article__part:nth-of-type(even) { margin: 0 auto; }
  /* полей нет — иллюстрации прячем */
  .mfig { display: none; }
  .article h1 { font-size: 34px; line-height: 38px; margin: 16px 0 40px; }
  .article h2 { font-size: 24px; line-height: 32px; margin-top: 72px; font-weight: 600; letter-spacing: normal; }
  .article figure { margin: 32px 0; }
}

/* ===== Планшет (768–1008px), статья: одна центральная колонка (как на мобиле),
   но шрифты и отступы крупнее мобильных и меньше десктопных. ===== */
@media (min-width: 768px) and (max-width: 1008px) {
  .topbar { font-size: 15px; }                         /* мобайл clamp(13,…,16) → десктоп 16 */
  .article { font-size: 18px; line-height: 28px; }     /* мобайл 17/26, десктоп 20/30 */
  .article h1 { font-size: 46px; line-height: 52px; margin: 24px 0 56px; }  /* мобайл 34/38, десктоп 64/68 */
  .article h2 { font-size: 28px; line-height: 36px; margin-top: 84px; }  /* мобайл 24/32, десктоп 32/40 */
  .article figure { margin: 36px 0; }                  /* мобайл 32, десктоп 40 */
}

/* ===== CTA-панель (статья): плашка на всю ширину контентной области,
   внутри одна центрированная колонка — анонс, дата/контакт, форма ===== */
.cta-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 5vw, 56px);
  width: 100%;
  padding: 64px clamp(24px, 6vw, 80px) clamp(56px, 8vw, 104px);
  background: #fff;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  text-align: center;
}
.cta-panel__info {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Тот же масштаб, что у .mfig: 112px при viewBox 120 — толщина штриха совпадает */
.cta-panel__badge {
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
  color: var(--ink);
}
.cta-panel__title {
  margin: 0;
  max-width: 440px;   /* не шире колонки формы (.cta-panel__form) — переносим */
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
/* Подзаголовок с Телеграмом (под заголовком) */
.cta-panel__overline {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 20px;
  line-height: normal;
}
.cta-panel__overline { margin-top: 20px; }   /* отступ между заголовком и подзаголовком */
.cta-panel__tg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: bottom;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.18s ease;
}
.cta-panel__tg-link:hover { opacity: 0.6; }
.cta-panel__tg-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Форма — узкая колонка по центру плашки */
.cta-panel__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: min(440px, 100%);
  margin-top: -16px;   /* чуть ближе к заголовку (гасим общий gap панели) */
}
/* Скрытое поле для ботов: люди его не видят и не заполняют */
.cta-panel__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
/* Поля ростом с кнопку: min-height повторяет .btn (68px, мобайл — 54px) */
.cta-panel__input {
  width: 100%;
  min-height: 68px;
  padding: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 20px;
  line-height: normal;
  transition: border-color 0.18s ease;
}
.cta-panel__input::placeholder { color: rgba(0, 0, 0, 0.5); }
/* Дёргаем поле влево-вправо, если при отправке оно не заполнено или телефон неполный */
@keyframes input-shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.cta-panel__input.is-shake { animation: input-shake 0.4s ease; }
.cta-panel__input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
/* Оформление — от общих .btn btn--primary btn--arrow; здесь только позиция в форме */
.cta-panel__submit {
  align-self: stretch;
  margin-top: 16px;
  cursor: pointer;
}
/* Во время отправки и после успеха кнопка неактивна («Отправляем…» / «Заявка отправлена») */
.cta-panel__submit:disabled { pointer-events: none; }
.cta-panel__submit { transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease; }
/* «Отправляем…» — кнопка полупрозрачная */
.cta-panel__submit.is-sending { opacity: 0.5; }
/* «Заявка отправлена» — галочка слева от текста, всё по центру, стрелка спрятана */
.btn__check {
  display: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.cta-panel__submit.is-sent { justify-content: center; flex-wrap: wrap; row-gap: 6px; }
.cta-panel__submit.is-sent .btn__check { display: block; }
.cta-panel__submit.is-sent .btn__arrow { display: none; }
/* Вторая строка кнопки после успешной отправки — под «Заявка отправлена» */
.btn__sub {
  display: none;
  flex-basis: 100%;
  font-size: 15px;
  line-height: normal;
}
.cta-panel__submit.is-sent .btn__sub { display: block; }
/* Приписка про персональные данные — самый мелкий серый текст (как figcaption) */
.cta-panel__consent {
  margin: -8px 0 0;   /* чуть ближе к кнопке (гасим общий gap формы) */
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 16px;
  line-height: normal;
  color: rgba(0, 0, 0, 0.4);
}
.cta-panel__consent a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.25);
  text-underline-offset: 4px;
}
.cta-panel__consent a:hover { color: var(--ink); }
/* Сообщение об ошибке отправки — под кнопкой */
.cta-panel__form-status {
  margin: 0;
  font-size: 16px;
  line-height: normal;
  color: #a33;
}
@media (max-width: 767px) {
  .cta-panel { padding-top: 40px; padding-bottom: 36px; }
  .cta-panel__badge { width: 84px; height: 84px; margin-bottom: 18px; }
  .cta-panel__overline { margin-top: 12px; }
  .cta-panel__input { min-height: 54px; font-size: 18px; }
  /* подпись плашки — размером с body-текст мобилы */
  .cta-panel__overline { font-size: 17px; }
}

/* Бегущая строка логотипов: сдвиг на одну копию (-50% дорожки из двух копий) */
@keyframes footer-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .footer__track { animation: none; }
}
