/* Длинная главная нового зеркала (103 домена). Цвета и шрифты — переменные
   из assets/brand.css домена (:root), здесь только раскладка. Шаблон:
   research/mirrors103/tpl/home.css, собирается build_tenant.py. */

.nm-home { background: var(--bg); color: var(--text); font-family: var(--font-body); }
.nm-home .wrap--read { max-width: var(--read, 760px); margin-inline: auto; }
.nm-home h1, .nm-home h2, .nm-home h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.01em; }
.nm-home h2 { font-size: var(--step-2); margin: 0 0 .6em; }
.nm-home h3 { font-size: var(--step-1); margin: 1.4em 0 .4em; }
.nm-home p, .nm-home li { font-size: var(--step-0); line-height: 1.65; }
.nm-home p { margin: 0 0 1em; }

/* первый экран: текст + поле чата слева, картинка справа; на телефоне картинка под полем */
.nm-hero { padding: clamp(28px, 6vw, 80px) 0 clamp(32px, 5vw, 64px); }
.nm-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
/* Элементы сетки не шире колонки: ряд подсказок под полем иначе распирает страницу на телефоне. */
.nm-hero__in > *, .nm-sec__in > * { min-width: 0; }
.nm-home .entry__chips { flex-wrap: wrap; overflow: visible; }
@media (min-width: 960px) { .nm-hero__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.nm-hero h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.4rem); margin: .2em 0 .35em; overflow-wrap: break-word; hyphens: auto; }
.nm-hero__sub { font-size: var(--step-1); color: var(--muted); max-width: 46ch; }
.nm-badge { display: inline-block; font-size: var(--step--1); font-weight: 600; color: var(--accent-text); background: var(--surface-2);
  border-radius: 999px; padding: .35em .9em; margin: 0; }
.nm-hero__art { margin: 0; }
.nm-hero__art img, .nm-sec__art img, .nm-gallery img { display: block; width: 100%; height: auto; border-radius: var(--r-lg, 12px); }
.nm-home .entry { margin-top: 22px; max-width: 640px; }

/* оглавление: короткий список якорей, на телефоне в одну колонку */
.nm-toc { padding: 8px var(--gutter) 24px; }
.nm-toc ol { columns: 2 260px; column-gap: 32px; margin: 0; padding-inline-start: 1.2em; }
.nm-toc li { break-inside: avoid; margin: 0 0 .35em; font-size: max(14px, var(--step--1)); }
.nm-toc a { color: var(--text); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }

.nm-intro { padding: 8px 0 16px; }
.nm-intro p:first-child { font-size: var(--step-1); }

/* разделы: текст + картинка, через один меняются местами и фон */
.nm-sec { padding: clamp(40px, 7vw, 88px) 0; }
.nm-sec--alt { background: var(--bg-2, var(--surface-2)); }
.nm-sec__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
@media (min-width: 960px) {
  .nm-sec__in--img { grid-template-columns: 1.2fr .8fr; }
  .nm-sec--alt .nm-sec__in--img { grid-template-columns: .8fr 1.2fr; }
  .nm-sec--alt .nm-sec__in--img .nm-sec__art { order: -1; }
  .nm-sec__art { position: sticky; top: calc(var(--head-h, 64px) + 24px); }
}
.nm-sec__text { max-width: 720px; }
.nm-sec__art { margin: 0; }
.nm-list { padding-inline-start: 1.2em; margin: 0 0 1em; }
.nm-list li { margin: .3em 0; }
.nm-list li::marker { color: var(--accent); }

.nm-cta-mid { padding: 8px 0 32px; text-align: center; }

.nm-howto { padding: clamp(40px, 7vw, 88px) 0; }
.nm-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.nm-steps li { counter-increment: s; position: relative; padding-inline-start: 56px; margin: 0 0 22px; }
.nm-steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink, #fff); font-weight: 700; display: grid; place-items: center; }
.nm-steps h3 { margin: 6px 0 4px; }

.nm-gallery { padding: 0 0 clamp(40px, 6vw, 72px); }
.nm-gallery__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.nm-gallery figure { margin: 0; }

.nm-faq { padding: clamp(40px, 7vw, 88px) 0; }
.nm-cta { padding: clamp(48px, 8vw, 96px) 0; text-align: center; background: var(--surface-2); }
.nm-cta h2 { margin-bottom: .8em; }

.nm-country { text-align: center; font-size: var(--step--1); color: var(--muted); margin: 0; padding: 18px var(--gutter) 6px; }

@media (max-width: 640px) {
  .nm-hero h1 { font-size: clamp(1.9rem, 1.4rem + 3vw, 2.6rem); }
  .nm-home .btn--lg { width: 100%; }
}

/* Мобильный аудит 03.11: строки оглавления — цель касания ≥40px, звёздочка у h1 — тоже. */
@media (max-width: 640px) {
  .nm-toc li { margin: 0; }
  .nm-toc a { display: inline-block; padding: 9px 0; min-height: 40px; }
  .nm-home .nt-star { display: inline-block; min-width: 24px; min-height: 40px; text-align: center; }
}

/* Шлифовка 04.11: подпись не прилипает к тени поля, подсказки по левому краю текста, на телефоне
   подсказка в поле целиком (две строки) и подсказки в полную ширину, в заголовке без переносов. */
.nm-home .entry__label { margin: 22px 0 10px; letter-spacing: .02em; }
.nm-home .entry__chips { justify-content: flex-start; }
.nm-home .chip { text-align: start; }
.nm-hero h1 { hyphens: manual; }
@media (max-width: 640px) {
  .nm-home .entry__form { align-items: flex-end; }
  .nm-home .entry__form textarea { min-height: calc(2 * 1.45em + 22px); }
  .nm-home .entry__chips { margin: 16px 0 12px; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .nm-home .entry__chips > .chip:nth-child(n) { flex: 1 1 100%; width: 100%; max-width: none; text-wrap: wrap; }
  .nm-home .entry__chips > .chip:nth-child(n+4) { display: none; }
}

/* Lighthouse 05.11: акцент на surface-2 у 27 палитр давал контраст ниже 4.5. */
.nm-badge { color: color-mix(in srgb, var(--accent-text) 70%, var(--text)); }

/* 05.11: ссылка раздела на страницу тарифов, удобная для пальца */
.nm-sec__plans { margin: 8px 0 0; }
.nm-sec__plans a { display: inline-block; padding: 10px 0; font-weight: 600; }

/* design2: shape=pop mood=plain hero=center sec=editorial toc=cards steps=cards gallery=bento faq=cards cta=bold type=accent */
/* Дизайн 2 (07.11). Основа для всех 103: первый экран телефона и чистые размеры. */
.nm-home { --hard: none; --hard-sm: none; }
.nm-home h1, .nm-home h2 { text-wrap: balance; }
.nm-home p { text-wrap: pretty; }
.nm-home .site-head { border-bottom: 1px solid var(--hair); box-shadow: none; }
.nm-home .nm-hero__art img, .nm-home .nm-sec__art img, .nm-home .nm-gallery img { border: 0; padding: 0; background: var(--surface-2); object-fit: cover; }
.nm-home .nm-hero__art img { aspect-ratio: 3 / 2; }
.nm-home .nm-sec__art img { aspect-ratio: 4 / 3; }
.nm-home .nm-sec { position: relative; }
.nm-home .btn--primary, .nm-home .entry__go { box-shadow: none; }
.nm-home .btn--primary:hover, .nm-home .btn--primary:active { transform: none; box-shadow: none; filter: brightness(1.08); }
.nm-home .chip:hover { transform: none; box-shadow: none; background: var(--surface-2); color: var(--text); }
.nm-home .faq details { border-color: var(--hair); }
@media (max-width: 639px) {
  /* Поле чата сразу под заголовком: как на 14 зеркалах, остальное ниже него. Текст не прячем. */
  .nm-home .nm-hero { padding: 14px 0 28px; }
  .nm-home .nm-hero__in { gap: 20px; }
  .nm-home .nm-hero__text { display: flex; flex-direction: column; }
  .nm-home .nm-hero h1 { order: 1; margin: 0 0 12px; font-size: clamp(1.5rem, 6.3vw, 1.95rem); line-height: 1.14; }
  .nm-home .entry { order: 2; margin-top: 0; max-width: none; width: 100%; }
  .nm-home .nm-hero__sub { order: 3; margin: 16px 0 0; font-size: 1rem; max-width: none; }
  .nm-home .nm-badge { order: 4; align-self: flex-start; margin-top: 12px; }
  .nm-home .entry__label { margin: 14px 0 8px; }
  .nm-home .entry__form textarea { font-size: 16px; }
  .nm-home .nm-sec { padding-block: 36px; }
}
.nm-home { --r-sm: 10px; --r: 14px; --r-lg: 18px; }
.nm-home .entry__form { border: 2px solid var(--text); border-radius: 14px; box-shadow: 4px 4px 0 var(--accent); }
.nm-home .entry__form:focus-within { box-shadow: 4px 4px 0 var(--text); }
.nm-home .chip { border: 2px solid var(--text); border-radius: 10px; }
.nm-home .btn, .nm-home .entry__go { border: 2px solid var(--text); border-radius: 10px; }
.nm-home .nm-sec__art img, .nm-home .nm-hero__art img { border: 2px solid var(--text); box-shadow: 6px 6px 0 var(--accent); }
.nm-home .nm-hero__in { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.nm-home .nm-hero__text { text-align: center; max-width: 860px; align-items: center; }
.nm-home .nm-hero__sub { margin-inline: auto; }
.nm-home .entry { margin-inline: auto; max-width: 720px; text-align: start; }
.nm-home .entry__label, .nm-home .entry__note { text-align: center; }
.nm-home .entry__chips { justify-content: center; }
.nm-home .nm-hero__art { width: 100%; }
.nm-home .nm-hero__art img { aspect-ratio: 21 / 9; }
.nm-home .nm-hero h1 { font-size: clamp(1.5rem, 1rem + 3.2vw, 4rem); }
@media (max-width: 639px) { .nm-home .nm-hero__art img { aspect-ratio: 16 / 9; } .nm-home .nm-hero h1 { font-size: clamp(1.5rem, 6.3vw, 1.95rem); } }
.nm-home .nm-sec__in--img, .nm-home .nm-sec--alt .nm-sec__in--img { grid-template-columns: minmax(0, 1fr); }
.nm-home .nm-sec__in--img .nm-sec__art, .nm-home .nm-sec--alt .nm-sec__in--img .nm-sec__art { order: -1; position: static; }
.nm-home .nm-sec__art img { aspect-ratio: 5 / 2; }
.nm-home .nm-sec__text { max-width: none; }
.nm-home .nm-sec { border-top: 1px solid var(--hair); }
.nm-home .nm-sec--alt { background: none; }
@media (min-width: 960px) {
  .nm-home .nm-sec__text { columns: 2; column-gap: 56px; }
  .nm-home .nm-sec__text h2 { column-span: all; }
  .nm-home .nm-sec__text h3, .nm-home .nm-list { break-after: avoid; break-inside: avoid; }
}
@media (max-width: 639px) { .nm-home .nm-sec__art img { aspect-ratio: 16 / 9; } }
.nm-home .nm-toc { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.nm-home .nm-toc ol { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; padding: 0; list-style: none; counter-reset: nmtoc; }
.nm-home .nm-toc li { margin: 0; counter-increment: nmtoc; }
.nm-home .nm-toc a { display: flex; gap: 10px; height: 100%; padding: 12px 14px; background: var(--surface); border-radius: var(--r); text-decoration: none; }
.nm-home .nm-toc a::before { content: counter(nmtoc); font-weight: 700; color: var(--accent-text); }
.nm-home .nm-howto .wrap--read { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.nm-home .nm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.nm-home .nm-steps li { margin: 0; padding: 20px; background: var(--surface); border-radius: var(--r-lg); }
.nm-home .nm-steps li::before { position: static; margin-bottom: 12px; }
.nm-home .nm-steps h3 { margin-top: 0; }
.nm-home .nm-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nm-home .nm-gallery figure:first-child { grid-column: 1 / -1; }
.nm-home .nm-gallery img { height: 100%; aspect-ratio: 1 / 1; }
.nm-home .nm-gallery figure:first-child img { aspect-ratio: 16 / 10; }
@media (min-width: 960px) {
  .nm-home .nm-gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nm-home .nm-gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
  .nm-home .nm-gallery figure:first-child img { aspect-ratio: 1 / 1; }
}
.nm-home .faq details { border: 0; background: var(--surface); border-radius: var(--r); padding: 2px 16px; margin-bottom: 10px; }
.nm-home .nm-cta { background: none; text-align: start; border-top: 1px solid var(--hair); }
.nm-home .nm-cta .wrap { text-align: start; }
.nm-home .nm-cta h2 { font-size: clamp(1.8rem, 1.2rem + 3.4vw, 4rem); max-width: 22ch; line-height: 1.06; }
.nm-home .nm-sec h2, .nm-home .nm-howto h2, .nm-home .nm-faq h2 { color: var(--accent-text); }
.nm-home .nm-list li::marker { color: var(--accent-text); }
