/* Длинная главная нового зеркала (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=halo mood=dark hero=cover sec=stack toc=list steps=timeline gallery=tall faq=cards cta=tint type=tight */
/* Дизайн 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; }
}
html[data-theme="dark"] .nm-home { --bg: #0E180F; --bg-2: #132216; --surface: #182A1B; --surface-2: #1F3723; --text: #EBEFEC; --muted: #B6C3B8; --border: #3B6842; --hair: #2C4E31; --accent: #25DA41; --accent-text: #25DA41; --accent-ink: #0A0A0D; --shadow: #000000; }
.nm-home { --r-sm: 14px; --r: 18px; --r-lg: 22px; }
.nm-home .entry__form { border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--bg)); border-radius: 18px; box-shadow: 0 8px 32px color-mix(in srgb, var(--accent) 24%, transparent); }
.nm-home .entry__form:focus-within { box-shadow: 0 10px 38px color-mix(in srgb, var(--accent) 42%, transparent); }
.nm-home .chip { border: 0; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.nm-home .btn, .nm-home .entry__go { border: 0; border-radius: 14px; }
/* Переменные шапки посчитаны на :root со светлой палитрой, здесь пересчитываем их заново. */
.nm-home { --na-bd: var(--border); --na-fg: var(--text); --na-mut: var(--muted); --na-ac: var(--accent); --na-soft: var(--surface); }
.nm-home .nm-sec--alt { background: var(--bg-2); }
.nm-home .nm-sec__art img, .nm-home .nm-hero__art img { box-shadow: none; }
html:has(body.nm-home) { background: var(--bg); }
.nm-home .nm-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(16px, 8vw, 112px); }
.nm-home .nm-hero__in { grid-template-columns: minmax(0, 1fr); position: static; }
.nm-home .nm-hero__text { max-width: 660px; }
.nm-home .nm-hero__art { position: absolute; inset: 0; z-index: -2; margin: 0; }
.nm-home .nm-hero__art img { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.nm-home .nm-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 96%, transparent) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 62%, color-mix(in srgb, var(--bg) 18%, transparent) 100%); }
[dir="rtl"] .nm-home .nm-hero::after, .nm-home[dir="rtl"] .nm-hero::after { background: linear-gradient(270deg, color-mix(in srgb, var(--bg) 96%, transparent) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 62%, color-mix(in srgb, var(--bg) 18%, transparent) 100%); }
@media (max-width: 959px) { .nm-home .nm-hero::after, [dir="rtl"] .nm-home .nm-hero::after { background: color-mix(in srgb, var(--bg) 90%, transparent); } }
.nm-home .nm-sec__in--img, .nm-home .nm-sec--alt .nm-sec__in--img { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.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; width: 100%; }
.nm-home .nm-sec__art img { aspect-ratio: 21 / 9; }
.nm-home .nm-sec__text { width: 100%; max-width: 760px; }
@media (max-width: 639px) { .nm-home .nm-sec__art img { aspect-ratio: 16 / 10; } }
.nm-home .nm-steps li { padding-inline-start: 52px; margin: 0; padding-block-end: 26px; }
.nm-home .nm-steps li::before { width: 34px; height: 34px; font-size: .9rem; z-index: 1; }
.nm-home .nm-steps li::after { content: ""; position: absolute; inset-inline-start: 16px; top: 0; bottom: 0; width: 2px; background: var(--hair); }
.nm-home .nm-steps li:last-child::after { bottom: auto; height: 34px; }
.nm-home .nm-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nm-home .nm-gallery img { aspect-ratio: 3 / 4; }
.nm-home .nm-gallery figure:nth-child(even) { margin-top: 28px; }
@media (min-width: 960px) { .nm-home .nm-gallery__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.nm-home .faq details { border: 0; background: var(--surface); border-radius: var(--r); padding: 2px 16px; margin-bottom: 10px; }
.nm-home h1, .nm-home h2 { letter-spacing: -.028em; }
.nm-home h2 { font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.9rem); line-height: 1.08; }
