@media (max-width: 767px) {
  :root {
    /* Мобильная типографика */
    --text-h1:       32px;
    --text-h2:       28px;
    --text-h3:       20px;
    --text-body-l:   18px;
    --text-price:    40px;
    --text-case-num: 48px;

    /* Мобильный контейнер */
    --container-padding: 20px;

    /* Мобильные отступы между экранами */
    --gap-section: 64px;

    /* Мобильные кнопки */
    --btn-height:    52px;
    --btn-padding-x: 20px;

    /* Мобильный хедер */
    --header-height: 64px;
  }

  /* Хедер */
  .header {
    height: auto;
    min-height: var(--header-height);
    padding-block: 12px;
  }

  .header__inner {
    height: auto;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 10px;
  }

  .header__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header__nav {
    display: none;
  }

  .header__tg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    grid-column: 2;
    grid-row: 1;
  }

  .header__menu {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 16px;
  }

  .header__menu-link {
    font-size: 14px;
  }

  .header__role {
    display: block;
  }

  .header__name {
    font-size: 16px;
  }

  /* Кнопки на всю ширину */
  .btn--full-mobile {
    width: 100%;
  }

  /* Футер */
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }

  .footer {
    padding-top: 48px;
  }

  /* Cookies-баннер */
  .cookies-banner {
    padding-block: 16px;
  }

  .cookies-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cookies-banner__btn {
    width: 100%;
  }

  /* scroll-padding для мобильного хедера */
  html {
    scroll-padding-top: 64px;
  }

  /* ── Экран 4: Что разбираем ── */
  .analyze__pdfs {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }

  .analyze__outcome {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .analyze__outcome-label        { align-self: auto; }
  .analyze__outcome-label--left  { order: 1; padding-top: 0; }
  .analyze__outcome-item--left   { order: 2; }
  .analyze__outcome-note--left   { order: 3; margin-top: 16px; margin-bottom: 0; }
  .analyze__outcome-label--right { order: 4; display: block; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--color-border); }
  .analyze__outcome-item--right  { order: 5; }
  .analyze__outcome-note--right  { order: 6; margin-top: 16px; margin-bottom: 0; }

  /* ── Экран 5: Кейсы ── */
  .cases__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cases__summary-list {
    flex-direction: column;
    gap: 8px;
  }

  /* ── Экран 6: Бесплатный разбор ── */
  .bonus__inner {
    display: flex;
    flex-direction: column;
  }

  /* Порядок: intro → right (иллюстрация + список) → left (форма + кнопка) */
  .bonus__intro { order: 1; }
  .bonus__right { order: 2; }
  .bonus__left  { order: 3; margin-top: 32px; }

  .bonus__left .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  /* ── Экран 3: Логика vs визуал ── */
  .logic__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .logic__intro {
    margin-bottom: 32px;
  }

  /* ── Экран 2: Когда нужна диагностика ── */
  .when__h2 {
    margin-bottom: 40px;
  }

  .when__h2--desktop { display: none; }
  .when__h2--mobile  { display: block; }

  .when__inner {
    grid-template-columns: 1fr;
  }

  .when__situations {
    gap: 32px;
  }

  .when__visual {
    margin-top: 40px;
  }

  /* Все секции */
  .section {
    padding-block: 32px;
  }

  /* ── Hero ── */
  .section--hero {
    padding-top: 40px;
    /* padding-bottom наследует 32px из .section */
  }

/* Грид → flex-колонка с явным порядком:
     text-top (1) → visual (2) → text-bottom (3) */
  .hero__inner {
    display: flex;
    flex-direction: column;
  }

  .hero__text-top    { order: 1; }
  .hero__visual      { order: 2; margin-bottom: 32px; }
  .hero__text-bottom { order: 3; }

  .hero__sub {
    margin-bottom: 32px;
  }

  /* ── Якорь доверия: 2 строки на мобильной ── */
  .hero__trust-name {
    display: block;   /* имя на отдельной строке */
  }
  .hero__trust-dot {
    display: none;    /* убираем разделитель между строками */
  }
  .hero__trust-role {
    display: block;
  }

  /* ── Фото + PDF: 80% ширины, по центру ── */
  .hero__photo-wrapper {
    position: relative;   /* нужен для absolute-позиции PDF */
    width: 80%;
    margin: 0 auto;
    height: 420px;        /* фиксированная высота: height, не min-height, чтобы img height:100% работал */
  }

  .hero__photo {
    width: 100%;
    height: 100%;         /* заполняет контейнер как на десктопе */
    object-fit: cover;
    object-position: center top;
  }

  /* PDF-превью: поверх нижней части фото, как на десктопе */
  .hero__pdf {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 85%;
  }

  /* ── Метрики: вертикальный стек, каждая — горизонтальная строка ── */
  .hero__metrics {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
  }

  .hero__metric {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  /* Цифра слева, сброс order */
  .hero__metric-num {
    order: 1;
    font-size: 28px;
    flex-shrink: 0;
    width: 84px;       /* фиксированная ширина: вмещает −55% и выравнивает текстовый столбец */
    line-height: 1;
  }

  /* Текст справа: niche и type — отдельные строки */
  .hero__metric-text {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .hero__metric-niche { display: block; }
  .hero__metric-dot   { display: none; }
  .hero__metric-type  { display: block; }

  /* ── Экран 7: Как проходит работа ── */
  .how__step {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-block: 24px;
  }

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

  /* ── Экран 8: О себе ── */
  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
  }

  .about__pub-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__mts-preview {
    width: 120px;
  }

  /* ── Экран 9: Стоимость ── */
  .pricing__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* ── Экран 11: Финальный CTA ── */
  .cta__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cta__photo {
    order: -1;
    margin-bottom: 32px;
    max-height: 360px;
    object-fit: cover;
    object-position: center top;
  }

  /* ── Кнопки: стопкой, 100% ширины ── */
  .hero__buttons {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .hero__buttons .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .decorative-bg-text { display: none; }
}
