/* =========================================================================
   Aivex — концепция В (контрастная).

   Светлая база, ключевые блоки — тёмные панели со скруглением.
   Цвета сверены с design/concepts.html, блок .mock-c: это тот макет,
   который заказчик утвердил.

   Тёмной темы у сайта нет. Концепция В сама двухсхемная, а ТЗ требует
   светлую базу, поэтому prefers-color-scheme не подключаем.

   Порядок: шрифты · токены · сброс · типографика · сетка · кнопки ·
   шапка · панели · карточки · секции · форма · подвал · адаптив.
   ========================================================================= */

/* ---------- Шрифты -------------------------------------------------------
   Локальные файлы, без CDN: сайт должен открываться без внешней сети.
   Onest переменный, ось wght 100–900 (проверено по fvar в самом файле).
   Satoshi кириллицы не содержит — только логотип и латиница.
   ------------------------------------------------------------------------ */

/* Подменный шрифт на те доли секунды, пока Onest грузится.
   font-display: swap означает, что текст сначала рисуется системным шрифтом,
   а потом перерисовывается нашим — и абзацы прыгают. Lighthouse ловил на этом
   0.084 сдвига макета на странице услуги, почти у самой границы допустимого.

   Цифры не выдуманы, а измерены: строка из ста знаков в Onest на 2.04% шире,
   чем в Arial (Liberation Sans на Linux метрически с ним совпадает), поэтому
   size-adjust: 102.04%. Высоты — из самого файла шрифта (ascent 970, descent
   305 при em 1000), делённые на тот же коэффициент. В итоге подменный шрифт
   занимает ровно столько же места, и подменять становится нечего. */
@font-face {
  font-family: 'Onest fallback';
  src: local('Arial'), local('Liberation Sans'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 102.04%;
  ascent-override: 95.06%;
  descent-override: 29.89%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/satoshi-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Satoshi';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/satoshi-900.woff2') format('woff2');
}

/* ---------- Токены ------------------------------------------------------ */

:root {
  --ink:     #050B1C;
  --ink-2:   #4E5A70;

  /* Был #8A94A6 из макета концепции В. На белом это контраст 3.06, на
     --bg-soft 2.90 — ниже 4.5, которых WCAG требует от обычного текста, и
     Lighthouse честно ловил на этом подвал, подписи формы и даты в статьях.
     #67728A даёт 4.83 и 4.58, оставаясь третьим по светлоте серым. Заказчику
     показать: цвет из утверждённого макета, но нечитаемый. */
  --ink-3:   #67728A;

  --bg:      #FFFFFF;
  --bg-soft: #F7F9FC;
  --hair:    #EAEFF6;

  --brand:   #2563EB;
  --brand-d: #1D4FD8;
  --violet:  #7C3AED;

  /* На тёмной панели */
  --on-dark:      #FFFFFF;
  --on-dark-2:    #A9B6CE;
  --on-dark-hair: rgba(255, 255, 255, .16);

  --panel: linear-gradient(148deg, #050B1C 0%, #0B1730 52%, #131B3E 100%);

  --font-ui:    'Onest', 'Onest fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Satoshi', var(--font-ui);

  --wrap:        1180px;
  --wrap-narrow: 760px;
  --gutter:      20px;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 24px;

  --step: 64px;   /* расстояние МЕЖДУ секциями; каждая берёт половину сверху и снизу */
}

/* ---------- Сброс ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 20px; background: var(--ink); color: #fff; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ---------- Типографика ------------------------------------------------- */

h1, h2, h3 {
  line-height: 1.14;
  letter-spacing: -.025em;
  font-weight: 700;
  text-wrap: balance;
}

.hero__h1     { font-size: clamp(30px, 5.2vw, 52px); }
.section__title { font-size: clamp(24px, 3.4vw, 36px); }
.manifest__title { font-size: clamp(22px, 3vw, 32px); }

.prose p { margin-bottom: 1em; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Сетка ------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: calc(var(--step) / 2); }
.section__head { max-width: 46rem; }

/* Колонка читаемой ширины внутри обычной обёртки.
   Не `wrap--narrow`: та центрируется, и на странице, где широкие и узкие
   секции чередуются, заголовки начинают скакать влево-вправо по вертикали.
   Здесь ось одна для всех секций — левый край обёртки. */
.readable { max-width: 46rem; }

.section__lead {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 17px;
}

.section__more { margin-top: 28px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 600;
}
.link-arrow .icon { transition: transform .18s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Кнопки ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn--sm { padding: 10px 18px; font-size: 14px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-d); }

/* Внутри тёмной панели ведущая кнопка белая — так в макете концепции В */
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #EDF1F8; }

.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .55); }

.btn__icon { flex: none; }
.btn:hover .btn__icon { transform: translateX(2px); }
.btn[disabled] { opacity: .55; cursor: default; }

/* ---------- Шапка ------------------------------------------------------- */

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 66px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo__mark { display: block; flex: none; }
.logo__word {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .13em;
}

.header__burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-right: -8px;
  background: none; border: 1px solid var(--hair); border-radius: var(--r-sm);
  cursor: pointer;
}
.header__burger-icon--close { display: none; }
.header__burger[aria-expanded="true"] .header__burger-icon { display: none; }
.header__burger[aria-expanded="true"] .header__burger-icon--close { display: inline-flex; }

.nav { display: none; }
.nav.is-open {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 8px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}

.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: block; padding: 12px 0;
  font-size: 17px; font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--hair);
}
.nav__link:hover, .nav__link.is-current { color: var(--ink); }

.nav__side {
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px;
}

.langs { display: inline-flex; align-items: center; gap: 2px; }
.langs__item {
  padding: 6px 9px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-3); border-radius: 6px;
}
.langs__item:hover { color: var(--ink); }
.langs__item.is-current { color: var(--ink); background: var(--bg-soft); }

/* ---------- Тёмная панель ----------------------------------------------- */

.panel {
  position: relative;
  overflow: hidden;
  padding: 44px 24px 48px;
  border-radius: 18px;
  color: var(--on-dark);

  /* Фиолетовое свечение — слой фона, а не отдельный элемент. Отдельный
     элемент на узком экране обрезался и давал видимый шов по краю круга;
     фоновый слой растягивается вместе с панелью и края не имеет. */
  background:
    radial-gradient(78% 82% at 84% 14%, rgba(124, 58, 237, .34), transparent 64%),
    var(--panel);
}

.panel > * { position: relative; z-index: 1; }

.hero--panel { padding-top: 20px; }
.hero--light { padding-block: 48px 8px; }

.hero__grid { display: grid; gap: 34px; }
.hero__lead {
  margin-top: 18px;
  max-width: 44ch;
  font-size: 17px;
  color: var(--on-dark-2);
}
.hero--light .hero__lead { color: var(--ink-2); }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero__visual { display: none; }

/* ---------- Схема ------------------------------------------------------- */

.diagram { width: 100%; height: auto; }
.diagram__box {
  fill: rgba(255, 255, 255, .05);
  stroke: rgba(255, 255, 255, .14);
  stroke-width: 1;
}
.diagram__link { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.diagram__dot  { fill: var(--brand); }
.diagram__dot--3 { fill: var(--violet); }
.diagram__label {
  fill: #DCE4F2;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
}

/* ---------- Карточки ---------------------------------------------------- */

.cards { display: grid; gap: 14px; }

.card {
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: #D7E0EE; }

/* Ссылка занимает всю карточку, поэтому отступы живут на ней, а не на карточке.
   У карточки без ссылки те же отступы задаются напрямую. */
.card__hit { display: block; height: 100%; padding: 24px 22px 26px; }
.card--plain { padding: 24px 22px 26px; }

.card__bar {
  display: block; width: 26px; height: 3px;
  margin-bottom: 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--violet));
}

.card__title { font-size: 17px; font-weight: 700; }
.card__text { margin-top: 9px; font-size: 14.5px; color: var(--ink-2); }

.card__more { display: inline-flex; margin-top: 18px; color: var(--brand); }
.card__hit:hover .card__more { transform: translateX(3px); }

/* ---------- Секции ------------------------------------------------------ */

.manifest__grid { display: grid; gap: 22px; }
.manifest__text { font-size: 16.5px; }

.pains__list { display: grid; gap: 2px; margin-top: 28px; }
.pains__item {
  position: relative;
  padding: 16px 0 16px 26px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-2);
}
.pains__item::before {
  content: ""; position: absolute; left: 2px; top: 25px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}

.dirs .cards, .cases-preview .cards, .notes-preview .cards { margin-top: 30px; }

.steps { counter-reset: step; display: grid; gap: 2px; margin-top: 30px; }
.step {
  padding: 22px 0;
  border-top: 1px solid var(--hair);
}
.step:last-child { border-bottom: 1px solid var(--hair); }
.step__num {
  display: block;
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--brand);
}
.step__title { margin-top: 8px; font-size: 18px; }
.step__text  { margin-top: 6px; color: var(--ink-2); font-size: 15px; }

.intro__text { font-size: 17px; max-width: 62ch; }

/* ---------- Страница услуги --------------------------------------------- */

/* Светло-серая полоса во всю ширину. Нужна ровно затем, чтобы три
   перечисления подряд — симптомы, состав работ, результат — не слились
   в одну простыню. */
.section--soft { background: var(--bg-soft); }

.why__text { margin-top: 22px; font-size: 17px; }

/* Симптомы: тире вместо точки — так они не путаются с «где теряется
   скорость» на главной, где список выглядит похоже. */
.when__list { display: grid; margin-top: 26px; border-bottom: 1px solid var(--hair); }
.when__item {
  position: relative;
  padding: 15px 0 15px 28px;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
}
.when__item::before {
  content: ""; position: absolute; left: 2px; top: 25px;
  width: 13px; height: 2px; border-radius: 1px;
  background: var(--violet);
}

/* Состав работ: без маркеров и мельче — это спецификация, её сканируют. */
.specs { display: grid; margin-top: 30px; border-top: 1px solid var(--hair); }
.specs__item {
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 15px;
}

/* Шаги без заголовка: текст крупнее и темнее, он здесь один за весь шаг. */
.steps--plain .step__text { margin-top: 10px; font-size: 16px; color: var(--ink); }

/* Результат: узкая колонка, галочки, крупный кегль — это итог, его читают. */
.gets__list { display: grid; gap: 15px; margin-top: 26px; }
.gets__item {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  align-items: start;
  font-size: 17px; line-height: 1.5;
}
.gets__icon { margin-top: 5px; color: var(--brand); }

.case-preview__box {
  position: relative;
  padding: 30px 24px 32px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  overflow: hidden;
}
.case-preview__box::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--violet));
}
.case-preview__title { font-size: clamp(20px, 2.6vw, 26px); }
.case-preview__text  { margin-top: 14px; }
.case-preview__more  { margin-top: 20px; }

/* ---------- О компании, кейсы, AI Lab ----------------------------------- */

/* Текстовые секции набираются одинаково: отличаются они содержанием,
   а не оформлением. Разводятся между собой фоном (section--soft) и врезками. */
.who__text,
.approach__text,
.context__text,
.problem__text,
.solution__text { margin-top: 22px; font-size: 17px; }

/* Принципы: плитки, а не список. Каждый пункт — отдельное утверждение,
   и читать их подряд одной колонкой не нужно. */
.principles__list { display: grid; gap: 12px; margin-top: 28px; }
.principles__item {
  padding: 20px 20px 22px;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  font-size: 16.5px;
  line-height: 1.35;
}

/* Формат кейса — обещание читателю, поэтому врезка, а не рядовой абзац. */
.format__box {
  padding: 28px 24px 30px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
}
.format__title { font-size: clamp(20px, 2.6vw, 26px); }
.format__steps {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 10px;
  margin-top: 18px;
}
.format__step {
  padding: 7px 14px;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 100px;
  font-size: 14px; font-weight: 600;
}
.format__step + .format__step::before {
  content: "→";
  margin-right: 10px;
  color: var(--ink-3);
  font-weight: 400;
}
.format__text { margin-top: 18px; }

/* Решение кейса: нумерация видимая — это последовательность работ. */
.solution__list { counter-reset: sol; display: grid; margin-top: 24px; }
.solution__item {
  counter-increment: sol;
  position: relative;
  padding: 14px 0 14px 42px;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
}
.solution__item:last-child { border-bottom: 1px solid var(--hair); }
.solution__item::before {
  content: counter(sol, decimal-leading-zero);
  position: absolute; left: 0; top: 16px;
  font-family: var(--font-brand);
  font-weight: 900; font-size: 12px; letter-spacing: .1em;
  color: var(--brand);
}

/* Результат — вывод страницы. Читается отдельно от всего, что выше. */
.result__box {
  position: relative;
  padding: 30px 24px 32px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  overflow: hidden;
}
.result__box::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--violet));
}
.result__title { font-size: clamp(20px, 2.6vw, 26px); }
.result__text  { margin-top: 14px; font-size: 17px; }

/* ---------- Список материалов ------------------------------------------- */

/* Материалы идут строками, а не карточками: их до пяти в категории, и
   половина раскрывается на месте — сетка карточек с этим не справляется. */
.notes { display: grid; margin-top: 30px; border-top: 1px solid var(--hair); }
.note  { border-bottom: 1px solid var(--hair); }

.note__hit, .note__summary { display: block; padding: 22px 0 24px; }

.note__title { display: block; font-size: 18px; font-weight: 700; line-height: 1.25; }
.note__text  { display: block; margin-top: 8px; color: var(--ink-2); font-size: 15px; }

.note__more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  color: var(--brand); font-weight: 600; font-size: 14px;
}
.note__hit:hover .note__more .icon { transform: translateX(3px); }
.note__more .icon { transition: transform .18s ease; }

/* Запись без своей страницы раскрывается тезисами. Ни «скоро», ни битых
   ссылок: содержание у читателя есть, просто без отдельного адреса. */
.note__summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  cursor: pointer;
  list-style: none;
}
.note__summary::-webkit-details-marker { display: none; }
.note__chevron { flex: none; margin-top: 6px; color: var(--ink-3); transition: transform .2s ease; }
.note__open[open] .note__chevron { transform: rotate(180deg); }

.note__outline { display: grid; gap: 8px; padding-bottom: 24px; }
.note__outline li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2); font-size: 15px;
}
.note__outline li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 13px; height: 2px; border-radius: 1px;
  background: var(--violet);
}

/* ---------- Текст статьи и legal ---------------------------------------- */

.prose--article { font-size: 17px; }
.prose--article p { margin-bottom: 1.15em; }

.body__h2 { margin: 1.6em 0 .5em; font-size: clamp(21px, 2.8vw, 27px); }
.body__h3 { margin: 1.4em 0 .4em; font-size: 19px; }
.body__h2:first-child, .body__h3:first-child { margin-top: 0; }

.body__list { display: grid; gap: 10px; margin: 0 0 1.15em; }
.body__list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}
.body__list li::before {
  content: ""; position: absolute; left: 3px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}

.body__quote {
  margin: 1.6em 0;
  padding-left: 22px;
  border-left: 3px solid var(--brand);
  font-size: 19px; line-height: 1.45;
}
.body__quote p { color: var(--ink); }

.body__note {
  margin: 1.6em 0;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  font-size: 15.5px;
}

.body__updated {
  margin-top: 2.4em;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  color: var(--ink-3);
  font-size: 14.5px;
}

/* ---------- 404 ---------------------------------------------------------- */

.links__text { font-size: 17px; color: var(--ink-2); }
.links__row  { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }

.cta__inner { max-width: 46rem; }
.cta__title { font-size: clamp(24px, 3.6vw, 38px); }
.cta__text  { margin-top: 16px; color: var(--on-dark-2); font-size: 17px; }
.cta .btn   { margin-top: 28px; }

/* ---------- FAQ --------------------------------------------------------- */

.faq__list { margin-top: 26px; border-top: 1px solid var(--hair); }

.faq__item { border-bottom: 1px solid var(--hair); }

.faq__q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }

.faq__chevron { flex: none; margin-top: 2px; color: var(--ink-3); transition: transform .2s ease; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }

.faq__a { padding-bottom: 20px; font-size: 15.5px; }

/* ---------- Форма ------------------------------------------------------- */

.form-section__grid { display: grid; gap: 36px; }

.field { margin-bottom: 18px; }

.field__label {
  display: block; margin-bottom: 7px;
  font-size: 14px; font-weight: 600;
}
.field__hint { margin-left: 6px; font-weight: 400; color: var(--ink-3); }

.field__input {
  display: block; width: 100%;
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid #D9E1EE;
  border-radius: var(--r-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field__input::placeholder { color: var(--ink-3); }
.field__input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  outline: none;
}
.field__input--area { resize: vertical; min-height: 150px; line-height: 1.55; }

.field--invalid .field__input { border-color: #C6362F; }

.field--check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
.field__check { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.field__consent { font-size: 14.5px; color: var(--ink-2); cursor: pointer; }

.form__submit { width: 100%; }

.form__legal { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.form__legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

.form__status { margin-top: 16px; font-size: 15px; }
.form__status:empty { margin-top: 0; }
.form__status.is-ok   { color: #167A45; }
.form__status.is-fail { color: #C6362F; }

/* Ответ api/lead.php посетителю без JS: отдельная страница, шапки и подвала
   у неё нет — из неё либо возвращаются по кнопке, либо закрывают вкладку. */
.lead-result__title { margin-bottom: 12px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; }
.lead-result { margin-bottom: 24px; font-size: 20px; line-height: 1.45; }
.lead-result.is-ok   { color: var(--ink); }
.lead-result.is-fail { color: #C6362F; }

.form-aside {
  padding: 24px 22px 26px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  align-self: start;
}
.form-aside__title { font-size: 16px; }
.form-aside__list { display: grid; gap: 12px; margin-top: 16px; }
.form-aside__list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.form-aside__list .icon { flex: none; color: var(--brand); margin-top: 2px; }

/* ---------- Прямые контакты --------------------------------------------- */

.direct__list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.direct__item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--r-sm);
  font-weight: 500;
}
.direct__item:hover { border-color: #D7E0EE; }
.direct__item .icon { color: var(--brand); }

/* ---------- Подвал ------------------------------------------------------ */

.footer {
  padding-block: 48px 32px;
  background: var(--bg-soft);
  border-top: 1px solid var(--hair);
}

.footer__top { display: grid; gap: 34px; }

.footer__tagline { margin-top: 14px; max-width: 34ch; color: var(--ink-2); font-size: 14.5px; }

.footer__contacts { display: grid; gap: 10px; margin-top: 20px; }
.footer__contact { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; }
.footer__contact:hover { color: var(--brand); }
.footer__contact .icon { color: var(--ink-3); }

.footer__col-title { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.footer__links { display: grid; gap: 9px; margin-top: 14px; }
.footer__links a { font-size: 14.5px; color: var(--ink-2); }
.footer__links a:hover { color: var(--ink); }

.footer__bottom {
  display: grid; gap: 12px;
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--hair);
  font-size: 13.5px; color: var(--ink-3);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__legal a:hover { color: var(--ink-2); }

/* =========================================================================
   Адаптив. Mobile first: выше идут стили для 320 px, ниже — надстройки.
   Брейкпойнты 768, 1024, 1280 по ТЗ.
   ========================================================================= */

@media (min-width: 600px) {
  .cards--2, .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .principles__list { grid-template-columns: repeat(2, 1fr); }
  .form__submit { width: auto; min-width: 220px; }
  .footer__bottom { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 768px) {
  :root { --gutter: 28px; --step: 84px; }

  .panel { padding: 60px 44px 64px; border-radius: var(--r-lg); }
  .hero--panel { padding-top: 28px; }

  .manifest__grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

  .steps { grid-template-columns: repeat(2, 1fr); gap: 0 34px; }

  .when__list { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .specs      { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }

  .case-preview__box,
  .result__box,
  .format__box { padding: 36px 34px 38px; }

  .form-section__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 44px; }

  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

@media (min-width: 1024px) {
  :root { --step: 100px; }

  .header__burger { display: none; }

  .nav {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 32px; flex: 1;
    position: static; padding: 0; background: none; border: 0;
  }
  .nav__list { flex-direction: row; gap: 28px; }
  .nav__link {
    padding: 6px 0; font-size: 15px; border: 0;
    border-bottom: 2px solid transparent;
  }
  .nav__link.is-current { border-bottom-color: var(--brand); }
  .nav__side { margin-top: 0; }

  /* Надвое первый экран делится только там, где справа есть схема. */
  .hero__grid--split { grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
  .hero__visual { display: block; }

  /* Без схемы заголовок берёт всю ширину панели, а подзаголовок остаётся
     в читаемой строке — иначе он растянулся бы на 1180 px. */
  .hero__grid:not(.hero__grid--split) .hero__h1   { max-width: 20ch; }
  .hero__grid:not(.hero__grid--split) .hero__lead { max-width: 58ch; }

  .panel { padding: 72px 56px 78px; }

  .cards--3 { grid-template-columns: repeat(3, 1fr); }
  .cards--4 { grid-template-columns: repeat(4, 1fr); }

  /* Колонок ровно столько, сколько шагов: у «Наш подход» их четыре, и пятая
     колонка оставляла бы справа пустое место. Класс проставляет шаблон. */
  .steps { grid-template-columns: repeat(5, 1fr); gap: 0; }
  .steps--3 { grid-template-columns: repeat(3, 1fr); }
  .steps--4 { grid-template-columns: repeat(4, 1fr); }
  .step { border-top: 1px solid var(--hair); border-bottom: 0; padding: 22px 18px 26px 0; }
  .step:last-child { border-bottom: 0; }

  /* Состав работ длиннее симптомов — ему третья колонка, симптомам хватает
     двух: пункт в три слова, растянутый на треть экрана, выглядит пусто. */
  .specs { grid-template-columns: repeat(3, 1fr); column-gap: 40px; }

  .principles__list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
