/**
 * Внутренние страницы: раздел и подраздел.
 * Одна светлая поверхность, крупный заголовок, список ниже.
 */

.page {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 60px 28px;      /* первый экран по содержимому, а не на всю высоту */
  background: var(--panel);
}

/* ── Шапка страницы ─────────────────────────────────────── */

/* хлебные крошки: цепочка, из которой видно выход в корень */
.crumbs { margin: 0 0 22px; }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumb {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity var(--dur-fast) var(--ease);
}

/*
 * Скобки — оформление, а не текст: скринридер их не читает.
 * Подъём на 0.06em совмещает центр скобки с центром прописных:
 * по метрике шрифта она рисуется от подстрочной линии и без сдвига
 * свисает под строку.
 */
.crumb::before,
.crumb::after {
  display: inline-block;
  transform: translateY(-0.06em);
  opacity: 0.65;
}

.crumb::before { content: "["; margin-right: 0.18em; }
.crumb::after  { content: "]"; margin-left: 0.18em; }

a.crumb:hover,
a.crumb:focus-visible { opacity: 1; }

.crumb--current { opacity: 1; }

.page__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.75rem, 6.8vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: break-word;   /* длинные русские слова не режут край */
}

.page__lead {
  max-width: 46ch;
  margin: 24px 0 0;
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.page__body { margin-top: auto; }

.page__note {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #fff;
}

/* ── Список подразделов ─────────────────────────────────── */
.cards {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.card__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  text-decoration: none;
  transition: padding-left 0.22s ease, color 0.22s ease;
}

.card__link:hover,
.card__link:focus-visible { padding-left: 12px; }

.card__num {
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.45;
}

.card__title {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.25rem, 5.2vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.card__lead {
  display: block;
  max-width: 52ch;
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.72;
}

.card__arrow {
  align-self: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.card__link:hover .card__arrow,
.card__link:focus-visible .card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Соседние подразделы ────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * Форму режет squircle.js, поэтому рамки быть не может: clip-path обрезал бы
 * её по кругу поверх суперэллипса. Обводку заменяет заливка.
 */
.chip {
  --radius: 10px;
  display: inline-block;
  padding: 10px 15px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.07);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.chip:hover,
.chip:focus-visible {
  background: var(--ink);
  color: var(--lime);
}

/* ── Десктоп ────────────────────────────────────────────── */
@media (min-width: 900px) {
  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: clamp(32px, 4vw, 64px);
    padding: 60px clamp(32px, 2.9vw, 52px);
  }

  .page__head { grid-row: 1 / span 2; align-self: center; }

  .page__title { font-size: clamp(2.75rem, 4.4vw, 5rem); }

  .page__body { margin-top: 0; align-self: center; }

  .page__siblings { grid-column: 2; align-self: end; }
}

/* ── Второй экран: услуги таблицей ──────────────────────── */
.services {
  padding: 40px 24px 48px;
  background: var(--paper);
}

.services__kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.5;
}

.services__title {
  margin: 0 0 36px;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.75rem, 6.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ── Мобильный вид: каждая строка — карточка ────────────── */
.table { width: 100%; border-collapse: collapse; }

.table thead { display: none; }          /* на узком экране шапка бессмысленна */

.table tr {
  display: block;
  padding: 26px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.table tr:last-child { border-bottom: 1px solid rgba(0, 0, 0, 0.14); }

.table th,
.table td { display: block; text-align: left; }

.table__name {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.25rem, 5.4vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.table__included,
.table__audience { margin-top: 18px; }

/* подпись колонки, пока таблица разобрана на карточки */
.table__included::before,
.table__audience::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.45;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ticks li {
  position: relative;
  padding-left: 16px;
}

.ticks li + li { margin-top: 7px; }

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.table__cta { margin-top: 20px; }

.deeper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  padding-bottom: 4px;
  transition: gap 0.18s ease, border-color 0.18s ease;
}

.deeper:hover,
.deeper:focus-visible {
  gap: 14px;
  border-color: var(--ink);
}

/* ── Десктоп: настоящая таблица ─────────────────────────── */
@media (min-width: 900px) {
  .services { padding: clamp(40px, 3.6vw, 64px) clamp(32px, 2.9vw, 52px) clamp(48px, 4vw, 72px); }

  .services__title { font-size: clamp(2rem, 3.2vw, 3.25rem); }

  .table { table-layout: fixed; }

  .table thead { display: table-header-group; }

  .table thead th {
    padding: 0 24px 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.45;
    vertical-align: bottom;
  }

  .table tr {
    display: table-row;
    padding: 0;
    border: 0;
  }

  .table tbody tr:last-child { border-bottom: 0; }

  .table th,
  .table td {
    display: table-cell;
    padding: 26px 24px 26px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.14);
    vertical-align: top;
    font-weight: inherit;   /* у <th> браузерный жирный — снимаем, вес берём от body */
  }

  /* при table-layout: fixed ширины берутся отсюда, а не с ячеек тела */
  .col--service  { width: 23%; }
  .col--included { width: 36%; }
  .col--audience { width: 30%; }
  .col--cta      { width: 11%; }

  .table__cta { padding-right: 0; }

  .table__included,
  .table__audience { margin-top: 0; }

  .table__included::before,
  .table__audience::before { display: none; }   /* есть шапка таблицы */

  .table__cta { margin-top: 0; }

}

/* ── Подраздел: состав услуги и адресат ─────────────────── */
.split {
  display: grid;
  gap: 32px;
}

.split__label {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.5;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 3vw, 52px);
  }
}

/* метка группы: сколько услуг внутри */
.card__count {
  --radius: 8px;
  display: inline-block;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.07);
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* ── Индекс: позиция услуги в направлении ───────────────── */
.page__index {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 40px 0 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.page__index-now { color: var(--ink); }

.page__index-sep,
.page__index-all { opacity: 0.28; }

.page__index-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.45;
}

/* ── Отклик строки таблицы ──────────────────────────────── */
@media (min-width: 900px) {
  .table tbody tr { transition: opacity var(--dur-fast) var(--ease); }

  .table tbody:hover tr { opacity: 0.42; }
  .table tbody:hover tr:hover { opacity: 1; }

  .table tbody tr:hover .table__name { transform: translateX(6px); }

  .table__name { display: block; transition: transform var(--dur-base) var(--ease); }
}

/* ── Пары «ключ — значение»: часы, срок ответа ──────────── */
.facts {
  margin: 34px 0 0;
  padding: 0;
}

.facts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.facts__row:last-child { border-bottom: 1px solid rgba(0, 0, 0, 0.14); }

.facts__key {
  min-width: 72px;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.45;
}

.facts__val {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ── Профили и соцсети: второстепенные ссылки ───────────── */
.elsewhere { margin-top: 40px; }

.elsewhere__label {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.45;
}

/* ── Иконки платформ ────────────────────────────────────── */
.chip--icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chip__icon {
  width: 12px;
  height: 12px;
  flex: none;
  opacity: 0.72;
  transition: opacity var(--dur-fast) var(--ease);
}

.chip--icon:hover .chip__icon,
.chip--icon:focus-visible .chip__icon { opacity: 1; }

.card__count--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card__icon {
  width: 11px;
  height: 11px;
  flex: none;
  opacity: 0.7;
}

/* ── Второй экран контактов: форма на тёмном ────────────── */
.write {
  display: grid;
  gap: 36px;
  padding: 40px 24px 44px;
  background: var(--ink);
  color: var(--paper);
}

.write__kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--lime);
}

.write__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.75rem, 6.8vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.write__lead {
  max-width: 34ch;
  margin: 20px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.62;
}

/* состояние «отправлено» */
.write__done {
  margin: 0;
  max-width: 46ch;
  font-size: 1.05rem;
  line-height: 1.5;
}

.write__done-mark {
  display: inline-block;
  margin-right: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--lime);
  color: var(--on-accent, var(--ink));
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* ── Поля ───────────────────────────────────────────────── */
.form__grid {
  display: grid;
  gap: 20px;
}

.form__field { margin: 0; }

.form__label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.5;
}

.form__input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid rgba(234, 236, 232, 0.22);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-text);
  font-weight: inherit;   /* формы не наследуют шрифт от body */
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease);
}

.form__input::placeholder { color: rgba(234, 236, 232, 0.3); }

.form__input:hover { border-color: rgba(234, 236, 232, 0.4); }

.form__input:focus {
  outline: none;
  border-color: var(--lime);
}

.form__input--area {
  resize: vertical;
  min-height: 128px;
  padding-top: 6px;
}

.form__input.is-wrong { border-color: #e2725b; }

.form__error {
  display: block;
  margin-top: 7px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #f0a08e;
}

.form__alert {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(226, 114, 91, 0.16);
  font-size: 0.9rem;
}

/* ловушка для ботов: не видна, но и не «display:none» — часть ботов это проверяет */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Отправка ───────────────────────────────────────────── */
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.send {
  --radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--on-accent, var(--ink));
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: gap var(--dur-base) var(--ease), opacity var(--dur-fast) var(--ease);
}

.send:hover,
.send:focus-visible { gap: 18px; }

.send:active { opacity: 0.85; }

.form__note {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.55;
}

.form__note a { text-underline-offset: 3px; }

/* ── Десктоп ────────────────────────────────────────────── */
@media (min-width: 900px) {
  .write {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(32px, 4vw, 72px);
    padding: clamp(48px, 4.4vw, 76px) clamp(32px, 2.9vw, 52px);
  }

  .write__head { align-self: start; }

  .write__title { font-size: clamp(2rem, 3.2vw, 3.25rem); }

  .form__grid { grid-template-columns: 1fr 1fr; gap: 24px 28px; }

  .form__field--wide { grid-column: 1 / -1; }
}
