/* ==========================================================================
   RKK39 V2 — стили главной. Визуальная система по референсу:
   тёплый светлый фон, крупный гротеск, один акцент для действия,
   карточки 24px, сетка 3 колонки с шириной 1/2/3.
   ========================================================================== */

/* --- Токены ---------------------------------------------------------------- */
:root {
	--wrap:      1320px;
	--wrap-pad:  24px;   /* поле контейнера слева и справа; к нему же выходит лента работ на телефоне */
	--gap:       24px;
	/* Поля карточек — одна управляющая величина. Обычные карточки — --card-pad;
	   большие во всю ширину (первый экран, калькулятор, «Важно знать») — ×1.25;
	   вкладыш-плитка внутри карточки (фото 2×2, блок фото) — ×0.5. К --card-pad
	   привязаны и картинки в углах карточек. */
	--card-pad:    28px;
	--card-pad-lg: calc(var(--card-pad) * 1.25);
	--card-pad-sm: calc(var(--card-pad) * .5);

	/* Вертикальный ритм страницы. --block-gap — расстояние между любыми двумя
	   блоками: каждый даёт половину сверху и половину снизу, поэтому пара соседей
	   всегда даёт ровно --block-gap. --title-gap — заголовок блока → его карточки. */
	--block-gap: 96px;
	--title-gap: 28px;
	--radius:    24px;
	--radius-sm: 16px;

	--bg:        #f4f4f2;
	--inset:     #f4f4f2; /* вкладыши внутри карточек (подводка, поля, плашки): не следуют за фоном страницы */
	--paper:     #ffffff;
	--fg:        #263238;
	--fg-muted:  #53615d;
	--rule:      #dde1dc;
	--placeholder: #68736f;

	/* Акцент — только действие: кнопки, телефон, выделенное слово в H1. */
	--accent:      #ff0101;
	--accent-dark: #d90000;
	--focus:       var(--accent-dark); /* контур клавиатурного фокуса; на тёмных карточках — сливочный */

	/* Насыщенные заливки карточек. Светлые (yellow, grey, white, milk, sage) — тёмный текст. */
	--c-green:  #4f9d5b;
	--c-blue:   #3d5ac7;
	--c-yellow: #f7d35b;
	--c-violet: #6a4de0;
	--c-navy:   #2b3050;
	--c-coral:  #e6553f;
	--c-grey:   #e4e4e0;
	/* Фирменные: графит и два серо-зелёных — палитра страниц услуг. Алый и молочный — --accent и --bg. */
	--c-graphite:   #263238;
	--c-sage-light: #e7ede7;
	--c-sage:       #dce6d8;
	--c-cream:      #f3df91;

	/* Пастельные плашки. */
	--t-0: #dfe9ff;
	--t-1: #ffe1ea;
	--t-2: #fde9c8;
	--t-3: #e3dcff;
	--t-4: #d9f2df;

	--font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--font-head: 'Google Sans', var(--font); /* заголовки; основной текст — Onest */
	--shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 30px rgba(38,50,56,.06);
}

/* --- База ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.5;
	color: var(--fg);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .5em; font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Клавиатурный фокус: единый контур; внутри тёмных карточек он сливочный (--focus). */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.field input:focus, .field textarea:focus, .pfield__input:focus, .stepper__input:focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; padding: 8px 12px; background: var(--fg); color: #fff; border-radius: 8px; }

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

/* --- Шапка ------------------------------------------------------------------ */
/* Шапка всегда белая с тёмным текстом — от фона страницы не зависит. */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); color: var(--fg); }
.site-header__in { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.logo { font-weight: 700; font-size: 26px; letter-spacing: -.03em; text-decoration: none; }
.logo span { color: var(--accent); }
.logo--img { display: block; line-height: 0; flex: 0 0 auto; }
.logo--img img { display: block; height: 40px; width: auto; } /* SVG-логотип в шапке: буквы и метка, точка — цвет акцента */
.site-nav { display: flex; gap: 22px; margin-left: 8px; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 16px; color: var(--fg); }
.site-nav a:hover { color: var(--accent); }
.site-header__phone { margin-left: auto; text-decoration: none; font-weight: 600; font-size: 17px; }
/* Адрес в шапке ведёт к блоку «Контакты» с картой; телефон тогда идёт сразу за ним. */
.site-header__addr { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 15px; color: var(--fg-muted); }
.site-header__addr:hover { color: var(--accent); }
.site-header__addr svg { flex: 0 0 auto; color: var(--accent); }
.site-header__addr + .site-header__phone { margin-left: 0; }
@media (max-width: 1279px) { .site-header__addr { display: none; } .site-header__addr + .site-header__phone { margin-left: auto; } }
/* Значок звонка — только на телефоне (до 720px), вместо скрытого номера. Квадрат высотой с кнопку:
   поле как у .btn по вертикали, значок — высота строки кнопки (1.2em). */
.btn.site-header__call { display: none; }
.site-header__call svg { display: block; width: 1.2em; height: 1.2em; }

/* --- Кнопки ----------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 24px; border-radius: 14px; border: 0;
	font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background .15s, color .15s;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { background: var(--paper); color: var(--fg); box-shadow: inset 0 0 0 1px var(--rule); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.btn--lg { padding: 18px 30px; font-size: 17px; border-radius: 16px; }

/* --- Секции ----------------------------------------------------------------- */
.section { padding-block: calc(var(--block-gap) / 2); }
/* «Фон секции» (rkk_section_band): полоса во всю ширину вокруг блока. Классы card--X
   дают заливку и цвет текста по той же палитре и формулам, что у карточек; поля
   полосы — поля самой секции. Молочный здесь — фон сайта, а не фон этой страницы. */
.section-band.card--milk { --card-color: var(--inset); }
.section__title { font-size: 40px; margin-bottom: var(--title-gap); }

/* --- Первый экран ----------------------------------------------------------- */
.hero { padding: calc(var(--block-gap) / 2) 0; }
.hero__title { font-size: clamp(44px, 6.2vw, 84px); line-height: .98; letter-spacing: -.035em; max-width: 16em; margin-bottom: 28px; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead { max-width: 56em; font-size: 19px; line-height: 1.55; margin-bottom: 32px; }
.hero__lead p { margin: 0; }
.hero__lead a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero__lead a:hover { color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); border-top: 1px solid var(--rule); padding-top: 32px; }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact__value { font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.fact__label { font-size: 15px; color: var(--fg-muted); }

/* --- Сетка и карточки ------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.card {
	position: relative; display: flex; flex-direction: column;
	padding: var(--card-pad); border-radius: var(--radius);
	background: var(--paper); color: var(--fg);
	min-height: 320px;
}
.card__title { font-size: 28px; margin-bottom: 8px; }
.card__title--sm { font-size: 22px; }
.card__subtitle { font-size: 17px; opacity: .85; margin-bottom: 20px; }
.card__text { font-size: 16px; margin-bottom: 8px; }
.card__label { font-weight: 600; margin-right: .3em; }
.card__list { margin: 0 0 24px; padding-left: 1.1em; list-style: disc; font-size: 16px; line-height: 1.45; }
.card__list li { margin-bottom: 6px; }
.card__list li::marker { opacity: .6; }
.card__big { font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.card__small { margin-top: auto; padding-top: 24px; font-size: 15px; color: var(--fg-muted); }
.card--stat { min-height: 220px; }
.card--text .prose { font-size: 17px; }
.card--text .prose p:last-child { margin-bottom: 0; }

/* Цвета карточек. Правило контраста: белый текст только на тёмном.
   --card-color нужен слою затемнения поверх фотографии. */
.card--green  { --card-color: var(--c-green);  background: var(--card-color); color: #fff; }
.card--blue   { --card-color: var(--c-blue);   background: var(--card-color); color: #fff; }
.card--violet { --card-color: var(--c-violet); background: var(--card-color); color: #fff; }
.card--navy   { --card-color: var(--c-navy);   background: var(--card-color); color: #fff; }
.card--coral  { --card-color: var(--c-coral);  background: var(--card-color); color: #fff; }
.card--yellow { --card-color: var(--c-yellow); background: var(--card-color); color: var(--fg); }
.card--grey   { --card-color: var(--c-grey);   background: var(--card-color); color: var(--fg); }
.card--white  { --card-color: var(--paper);    background: var(--card-color); color: var(--fg); }
.card--accent     { --card-color: var(--accent);       background: var(--card-color); color: #fff; }
.card--graphite   { --card-color: var(--c-graphite);   background: var(--card-color); color: #fff; }
.card--milk       { --card-color: var(--bg);           background: var(--card-color); color: var(--fg); }
.card--sage-light { --card-color: var(--c-sage-light); background: var(--card-color); color: var(--fg); }
.card--sage       { --card-color: var(--c-sage);       background: var(--card-color); color: var(--fg); }
.card--cream      { --card-color: var(--c-cream);      background: var(--card-color); color: var(--fg); }
/* Свой цвет: заливка и цвет текста приходят переменными из style (см. rkk_custom_card_vars). */
.card--custom { background: var(--card-color, var(--paper)); color: var(--card-text, var(--fg)); }

/* Цвет текста карточки из настроек. Два класса — перебивают цвет по умолчанию
   из .card--{color}. Без класса действует автоматика: белый на тёмных, тёмный на светлых. */
.card.card--text-white { color: #ffffff; --card-text: #ffffff; }
.card.card--text-milk  { color: #f4f4f2; --card-text: #f4f4f2; }
.card.card--text-grey  { color: var(--fg); --card-text: var(--fg); }
.card.card--text-black { color: #111111; --card-text: #111111; }
/* Свой цвет текста: заголовок и текст — переменными из style (см. rkk_custom_text_vars).
   Прозрачность с текста снимаем, чтобы HEX из админки был точным. */
.card.card--text-custom { color: var(--text-color, var(--card-text, var(--fg))); }
.card--text-custom .gcard__title, .card--text-custom .pcalc__title, .card--text-custom .scard__title, .card--text-custom .notice__title, .card--text-custom .svc-hero__title { color: var(--title-color, inherit); }
.card--text-custom .gcard__desc, .card--text-custom .pcalc__lead, .card--text-custom .scard__text, .card--text-custom .notice__text, .card--text-custom .svc-hero__lead { color: var(--text-color, inherit); opacity: 1; }

/* Объект справа от текста — для широких карточек. Тексту отдано 60% ширины,
   объекту — зона справа. Картинка масштабируется по высоте зоны; если она уже
   зоны — прижата к правому краю, если шире — вылезает за край карточки и
   срезается. В текст она не заходит никогда. Высоту карточки задаёт текст. */
.card--group.has-image { padding-right: 40%; overflow: hidden; }
.card--group.has-image .card__figure {
	position: absolute; left: 62%; top: 20px; bottom: 12px; min-width: calc(38% - 20px);
	margin: 0; display: flex; align-items: flex-end; justify-content: flex-end;
}
.card--group.has-image .card__figure img { height: 100%; width: auto; max-width: none; flex: none; }
.span-1.card--group.has-image { padding-right: 38%; }
.span-1.card--group.has-image .card__figure { left: 64%; min-width: calc(36% - 20px); }

/* Объект в углу — для узких карточек. Картинка лежит ПОД текстом у правого края
   от уровня подзаголовка до низа и текст не сдвигает. Зона — правые 40%: объект
   уже зоны прижат к правому краю, шире — уходит за край карточки и срезается.
   Высоту карточки задаёт текст. Под узкие вертикальные объекты. */
.card--group.has-corner { overflow: hidden; }
.card--group.has-corner .card__figure {
	position: absolute; left: 60%; top: 13%; bottom: -3%; min-width: 40%; z-index: 0;
	margin: 0; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none;
}
.card--group.has-corner .card__figure img { height: 100%; width: auto; max-width: none; flex: none; }
.card--group.has-corner .card__head,
.card--group.has-corner .pills { position: relative; z-index: 1; }
/* Список и плашки не доходят до штанги объекта — 7% на всех экранах. */
.card--group.has-corner .card__list,
.card--group.has-corner .pills { padding-right: 7%; }

/* Карточка группы с фоновой фотографией: картинка на всю карточку, поверх неё
   слой цвета карточки с прозрачностью --tint (0 — без затемнения), текст сверху.
   Высоту задаёт текст, как у карточек без картинки: фон заполняет карточку любой
   пропорции (object-fit: cover), лишнее срезается по краям. */
.card--group.has-cover { overflow: hidden; }
.card--group.has-cover .card__bg { position: absolute; inset: 0; z-index: 0; }
.card--group.has-cover .card__bg picture { display: contents; }
.card--group.has-cover .card__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card--group.cover-left  .card__bg img { object-position: left center; }
.card--group.cover-right .card__bg img { object-position: right center; }
.card--group.has-cover .card__bg::after {
	content: ''; position: absolute; inset: 0;
	background: var(--card-color); opacity: var(--tint, 0);
}
.card--group.has-cover .card__head,
.card--group.has-cover .pills { position: relative; z-index: 1; }
/* Список на фоне не доходит до правого края — там по правилу безопасной зоны объект. */
.card--group.has-cover .card__list { padding-right: 20%; }
/* Без затемнения текст защищает мягкая тень. */
.card--group.has-cover:not([style*="--tint"]) .card__head { text-shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.25); }

/* Узор у нижнего края: картинка на прозрачном фоне на всю ширину, прижата к низу;
   лишнее уходит за верхний край и срезается. Высоту карточки задаёт текст —
   без минимальной высоты, затемнения и тени у текста. */
.card--group.has-pattern { overflow: hidden; }
.card--group.has-pattern .card__pattern { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.card--group.has-pattern .card__pattern img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; max-width: none; }
.card--group.has-pattern .card__head,
.card--group.has-pattern .pills { position: relative; z-index: 1; }

/* Плашки. Цвет задаётся переменными --pill-bg / --pill-fg, которые выставляет
   карточка: автоматически в тон заливки, на фото — цветом карточки, вручную —
   классом card--pill-{key}. Вне карточек — пастель по умолчанию. */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pill {
	display: inline-block; padding: 9px 16px; border-radius: 999px;
	font-size: 15px; font-weight: 500; line-height: 1.2;
	background: var(--pill-bg, var(--t-0)); color: var(--pill-fg, var(--fg)); text-decoration: none;
	transition: transform .12s, filter .12s;
}
a.pill:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Автоматика: на тёмной заливке плашка чуть светлее, на светлой — чуть темнее. */
/* Всё производное считается из цвета карточки, поэтому любая краска из списка
   (и свой HEX) сразу правильная: плашка — на тон темнее (на тёмных — светлее),
   второстепенный текст — основной с примесью цвета карточки, панель-вкладыш —
   на тон светлее тёмной (+12 % белого: 8 % почти сливались с карточкой) / темнее
   светлой. У белой плашка — молочная (--inset). */
.card--green, .card--blue, .card--violet, .card--navy, .card--coral, .card--accent, .card--graphite {
	--card-text: #fff; --pill-bg: color-mix(in srgb, var(--card-color), white 22%); --pill-fg: currentColor;
	--panel: color-mix(in srgb, var(--card-color), white 12%); --focus: var(--c-cream);
}
.card--yellow, .card--grey, .card--white, .card--milk, .card--sage-light, .card--sage, .card--cream {
	--card-text: var(--fg); --pill-bg: color-mix(in srgb, var(--card-color), black 9%); --pill-fg: currentColor;
	--panel: color-mix(in srgb, var(--card-color), black 6%);
}
.card--white { --pill-bg: var(--inset); }
.card { --text-muted: color-mix(in srgb, var(--card-text, var(--fg)) 80%, var(--card-color, var(--paper))); }
/* На фоне-картинке — плотная плашка на тон темнее цвета карточки: затемнение фона
   подмешивает именно цвет карточки, а узоры — светлые оттенки того же цвета, так
   плашка не сливается ни с тем, ни с другим. :where — чтобы ручной «Цвет плашек»
   (.card.card--pill-*, ниже) оставался важнее. */
.card--group.has-cover { --pill-bg: var(--card-color); --pill-fg: var(--card-text); }
.card--group.has-cover:where(.card--green, .card--blue, .card--violet, .card--navy, .card--coral, .card--accent, .card--graphite) { --pill-bg: color-mix(in srgb, var(--card-color), black 15%); }
.card--group.has-cover:where(.card--yellow, .card--grey, .card--white, .card--milk, .card--sage-light, .card--sage, .card--cream) { --pill-bg: color-mix(in srgb, var(--card-color), black 9%); }

/* Ручной выбор из палитры. Текст: белый на тёмных, тёмный на светлых. */
.card.card--pill-white   { --pill-bg: #ffffff; --pill-fg: var(--fg); }
.card.card--pill-milk    { --pill-bg: #f4f4f2; --pill-fg: var(--fg); }
.card.card--pill-yellow  { --pill-bg: #f7d35b; --pill-fg: var(--fg); }
.card.card--pill-orange  { --pill-bg: #ef8a2c; --pill-fg: #1d1d1d; }
.card.card--pill-coral   { --pill-bg: #e6553f; --pill-fg: #fff; }
.card.card--pill-magenta { --pill-bg: #b8286e; --pill-fg: #fff; }
.card.card--pill-violet  { --pill-bg: #6a4de0; --pill-fg: #fff; }
.card.card--pill-blue    { --pill-bg: #3d5ac7; --pill-fg: #fff; }
.card.card--pill-navy    { --pill-bg: #2b3050; --pill-fg: #fff; }
.card.card--pill-teal    { --pill-bg: #2f8f83; --pill-fg: #fff; }
.card.card--pill-green   { --pill-bg: #4f9d5b; --pill-fg: #fff; }
.card.card--pill-grey    { --pill-bg: #e4e4e0; --pill-fg: var(--fg); }
.card.card--pill-dark    { --pill-bg: #263238; --pill-fg: #fff; }

.pill--tag { font-size: 14px; padding: 7px 14px; }
.pill--tint-0 { background: var(--t-0); }
.pill--tint-1 { background: var(--t-1); }
.pill--tint-2 { background: var(--t-2); }
.pill--tint-3 { background: var(--t-3); }
.pill--tint-4 { background: var(--t-4); }
.pills--geo .pill { font-size: 17px; padding: 12px 20px; }

/* Работы: белая карточка, фото сверху, тег внизу. */
.card--case { padding: 0; overflow: hidden; }
.card__media { aspect-ratio: 4 / 3; background: var(--c-grey); }
.span-2 .card__media { aspect-ratio: 2 / 1; }
.span-3 .card__media { aspect-ratio: 5 / 2; }
.card__img { width: 100%; height: 100%; object-fit: cover; }
.card__img--placeholder {
	background: linear-gradient(135deg, #dfe3e6 0%, #c9d0d5 100%);
}
.card--case .card__body { display: flex; flex-direction: column; flex: 1; padding: var(--card-pad); }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.card__place { font-size: 15px; color: var(--fg-muted); }
.card__link { color: inherit; text-decoration: none; }
.card__link:hover { color: var(--accent); }
/* Задача и «Сделали» в карточке — до трёх строк; целиком — на странице работы. */
.card--case .card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* «Примеры из нашей практики» на главной: три карточки и кнопка «Все работы» → /raboty/;
   на телефоне — лента со свайпом и точками, последней — карточка-ссылка «Все работы». */
.cases-home__all { display: none; }
.cases-home__more { display: flex; justify-content: center; margin-top: var(--gap); }
.cases-home__dots { display: none; }

/* О компании: фото процесса сеткой 2×2. */
/* «О компании» на главной: текст и фото — по половине ширины, факты ниже — по три в ряд
   (сетка из шести колонок: 3 + 3, затем 2 + 2 + 2). */
.grid--about { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--about > .card--text, .grid--about > .card--photos { grid-column: span 3; }
.grid--about > .card--stat { grid-column: span 2; }
.grid--about > .card--text .prose { flex-grow: 1; } /* текст растягивается — кнопка уходит в низ карточки */
.about__more { align-self: flex-start; margin-top: var(--title-gap); }
/* Фото процесса: три квадрата сверху, широкое на всю ширину снизу; по клику — лайтбокс. */
.card--photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: var(--card-pad-sm); min-height: 0; }
.card--photos > * { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); }
.card--photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card--photos .ph { background: linear-gradient(135deg, #d5dade, #bfc7cd); }
.card--photos .is-wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; } /* широкое фото снизу — под горизонтальный снимок 3:2 */
.card--photos__item { position: relative; }
/* Смена фото — быстрое растворение (about-photos.js): новое фото проявляется поверх старого. */
.card--photos__fade { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.card--photos__fade.is-on { opacity: 1; }

/* Шаги. */
.steps { counter-reset: step; }
.step { min-height: 240px; }
.step__num { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 20px; border-radius: 50%; background: var(--fg); color: #fff; font-weight: 600; }

/* Контакты и форма. */
.contacts__phone { display: block; margin: 8px 0 20px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.card--white .contacts__phone, .card--grey .contacts__phone { color: var(--accent); }
.contacts__line { margin-bottom: 6px; opacity: .9; }
.contacts__line a { text-decoration: none; color: var(--accent); }
/* Яндекс Карта с карточкой организации — под контактами и формой, во всю ширину. */
.contacts-map { margin-top: var(--gap); border-radius: var(--radius); overflow: hidden; background: var(--inset); aspect-ratio: 8 / 3; }
.contacts-map iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 720px) { .contacts-map { aspect-ratio: 1 / 1; } }
.form { gap: 12px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--fg-muted); }
.field input, .field textarea {
	font: inherit; font-size: 16px; color: var(--fg);
	padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--inset);
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.form .btn { align-self: flex-start; margin-top: 8px; }
.form .btn[disabled] { opacity: .6; cursor: default; }
/* Галочка согласия на обработку персональных данных — обязательная, перед кнопкой. */
.form__consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--fg-muted); cursor: pointer; }
.form__consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.form__consent a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.form__consent a:hover { color: var(--accent); }
.form__consent.is-invalid { color: var(--accent-dark); }
.form__note { font-size: 13px; color: var(--fg-muted); margin: 8px 0 0; }
.form__note a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.form__note a:hover { color: var(--accent); }
.form__error { margin: 0; font-size: 14px; color: var(--accent-dark); }
.field.is-invalid input { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
/* Ловушка для ботов: за экраном, а не display:none — так её заполняют охотнее. */
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Страница «Спасибо»: одна белая карточка во всю ширину, текст до 36em. */
.thanks { padding: var(--card-pad-lg); min-height: 0; align-items: flex-start; }
.thanks__title { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -.03em; margin-bottom: 20px; }
.thanks__phone { font-size: 19px; margin-bottom: 12px; }
.thanks__text { max-width: 36em; font-size: 18px; }
.thanks__text p:last-child { margin-bottom: 0; }
.thanks__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--card-pad); }
.thanks__msg { margin-top: var(--card-pad); }

/* --- Страница услуги: хлебные крошки над первым экраном --------------------- */
/* Как у работ (.case__crumbs): мелкий приглушённый текст, разделитель «›». Первый
   экран под крошками — без верхнего поля: отступ от шапки задают сами крошки. */
.crumbs { padding: 20px 0 16px; font-size: 15px; color: var(--fg-muted); }
.crumbs__list { list-style: none; margin-block: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs__item + .crumbs__item::before { content: '›'; margin: 0 .5em; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs + .svc-hero { padding-top: 0; }

/* --- Страница услуги: первый экран ------------------------------------------ */
.svc-hero { padding: calc(var(--block-gap) / 2) 0; }
/* Широкая карточка (оформление «фото»): вплотную к шапке, по бокам поле --gap / 2
   (12px), на телефоне --gap / 3; снизу — обычная половина --block-gap, чтобы ритм
   до следующего блока не менялся. Скругления те же. */
.svc-hero--wide { padding-top: 0; }
.svc-hero--wide .wrap { max-width: none; padding-inline: calc(var(--gap) / 2); }
.svc-hero__card { padding: var(--card-pad-lg); min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--card-pad); }
.svc-hero__card.has-media { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.svc-hero__text { display: flex; flex-direction: column; align-items: flex-start; }
.svc-hero__tag {
	display: inline-block; padding: 7px 14px; border-radius: 999px;
	background: var(--inset); color: var(--fg-muted); font-size: 14px; margin-bottom: 24px;
}
.svc-hero__title { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.03em; margin-bottom: 28px; }
.svc-hero__title em { font-style: normal; color: var(--accent); }
.svc-hero__lead { align-self: stretch; background: var(--inset); border-radius: var(--radius-sm); padding: 28px var(--card-pad); font-size: 18px; line-height: 1.5; margin-bottom: 28px; }
.svc-hero__lead p { margin: 0; }
.svc-hero__lead p + p { margin-top: .6em; }
.svc-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.btn--outline { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--outline:hover { background: var(--accent); color: #fff; }
/* Подложка объекта: серая, объект целиком внутри с полями. */
.svc-hero__media {
	background: var(--inset); border-radius: var(--radius); padding: calc(var(--card-pad) * .75);
	display: flex; align-items: flex-end; justify-content: center; min-height: 420px;
}
.svc-hero__media img { width: 100%; height: 100%; max-height: 640px; object-fit: contain; object-position: center bottom; }
/* Фото на всю подложку (has-photo): снимок заполняет колонку от края до края,
   края кадра обрезаются по пропорции колонки, центр сохраняется. */
.has-photo .svc-hero__media { position: relative; padding: 0; overflow: hidden; }
.has-photo .svc-hero__media img { position: absolute; inset: 0; max-height: none; object-fit: cover; object-position: center; }
/* Оформление «фото во всю карточку»: снимок заполняет карточку, в кадре держится
   правый край (объект — там, левая половина кадра остаётся под текст). Текст лежит
   поверх фото в левых 74 % и тянет карточку минимум на 560px; текст доверия без
   подложки, у плашки только контур. Контурная кнопка становится полупрозрачной:
   на фото красный контур с красным текстом не читается. Цвет карточки фото не
   перекрывает — от него считаются цвет текста и контуры. */
.svc-hero__card.has-cover { overflow: hidden; min-height: 560px; }
.svc-hero__bg { position: absolute; inset: 0; z-index: 0; }
.svc-hero__bg picture { display: contents; }
.svc-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.has-cover .svc-hero__text { position: relative; z-index: 1; max-width: 74%; }
.has-cover .svc-hero__lead { background: none; box-shadow: none; padding: 0; max-width: 52em; }
/* Плашка на фото: текст цвета карточки (белый на тёмной), а не приглушённый серый. */
.has-cover .svc-hero__tag { color: inherit; background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 60%, transparent); }
.has-cover .btn--outline { color: inherit; background: color-mix(in srgb, currentColor 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, currentColor 35%, transparent); }
.has-cover .btn--outline:hover { color: inherit; background: color-mix(in srgb, currentColor 22%, transparent); }
/* Оформление «Анимация»: сцена уточнения границ во всю ширину под шапкой, без
   карточки. Сцена стоит в дорожке: скрипт ставит is-live, и пока дорожка идёт мимо,
   экран под шапкой (88px) держится (top считает скрипт), а контур из ЕГРН съезжается
   к забору. Путь --scene-path — как у блока «Сцена» (дорожка 290vh минус экран);
   последняя треть — стоп-кадр.
   Экран — колонка: сверху заголовок и текст доверия в колонке сайта, под ними участок
   на всю оставшуюся высоту (контейнер по размеру, svc-hero__plot). Участок привязан
   к тексту: чуть заходит под него (--plot-lift — доля своей высоты, над забором там
   пусто) и растёт, пока хватает ширины или высоты; лишняя высота узкого окна уходит
   под него. Кнопки привязаны к участку: справа под передним забором (--plot-buttons —
   доля его высоты), в колонке сайта. Обе доли — под картинку, из rkk_border_scene_shapes(). */
.svc-hero--scene { padding-top: 0; --scene-path: 190vh; }
.svc-hero__track.is-live::after { content: ''; display: block; height: var(--scene-path); }
.svc-hero__track.is-live .svc-hero__stage { position: sticky; top: 0; }
.svc-hero__stage { position: relative; display: flex; flex-direction: column; height: calc(100vh - 88px); padding-block: calc(var(--block-gap) / 2); }
.svc-hero__head { flex: none; }
.svc-hero__plot { flex: 1 1 0; min-height: 0; container-type: size; }
.svc-hero__plot-in {
	--plot-h: min(100cqw / (var(--ratio)), 100cqh / (1 - var(--plot-lift, 0)));
	position: relative; width: calc(var(--plot-h) * (var(--ratio)));
	margin: calc(var(--plot-h) * var(--plot-lift, 0) * -1) auto 0;
}
.svc-hero--scene .bscene__canvas { margin: 0; width: 100%; }
/* Для телефона может быть своя картинка — свой холст; на компьютере он скрыт. */
.bscene__canvas--phone { display: none; }
/* Фон: «до уточнения» (из админки; пасмурный и тёмный — под белым H1) гаснет по
   ходу схождения (--t от скрипта) и открывает фон страницы — к совпадению экран
   сливается со страницей без шва. Под ним — сияние от центра, белое к прозрачному:
   на любом фоне страницы середина светлее, края равны фону. Земля на картинке
   прозрачная, поэтому фон страницы — и цвет травы. */
.svc-hero__stage {
	background:
		linear-gradient(color-mix(in srgb, var(--scene-from, #8a9591) calc((1 - var(--t, 0)) * 100%), transparent), color-mix(in srgb, var(--scene-from, #8a9591) calc((1 - var(--t, 0)) * 100%), transparent)),
		radial-gradient(ellipse 70% 75% at 55% 50%, color-mix(in srgb, #fff 35%, transparent), transparent 70%);
}
/* H1 и текст доверия белые с начала и до конца, без подложки. Мягкая тень отделяет
   буквы от светлой травы и фона; у мелкого текста она плотнее. Текст доверия — сразу
   под заголовком и не шире забора под ним: в узком окне участок мельче, и задний
   забор поднимается ближе к тексту, поэтому ширина ограничена ещё и долей экрана. */
.svc-hero--scene .svc-hero__title { margin-bottom: var(--card-pad-sm); text-wrap: balance; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 2px 18px rgb(0 0 0 / .22); }
.svc-hero--scene .svc-hero__lead { max-width: min(34em, 55vw); margin: 0; padding: 0; background: none; border-radius: 0; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .3), 0 1px 12px rgb(0 0 0 / .25); }
/* Кнопки: правый край — по колонке сайта (её поле 24px, как у .wrap), как кнопка в
   шапке; у низкого участка они выходят за его правый край — там пусто. В окнах уже
   1150px кнопки закрывают бо́льшую часть участка и доходят до переднего забора
   слева, поэтому встают под участок. */
.svc-hero--scene .svc-hero__actions {
	position: absolute; z-index: 3; top: calc(var(--plot-buttons, 1) * 100%);
	right: calc((100% - min(100cqw, var(--wrap))) / 2 + 24px); margin: 0;
}
@media (max-width: 1150px) {
	/* Участок оставляет под собой место на кнопки: их 56px минус нижнее поле экрана
	   (--block-gap / 2) плюс зазор до края. */
	.svc-hero__plot-in { --plot-h: min(100cqw / (var(--ratio)), (100cqh - 56px + var(--block-gap) / 2 - 16px) / (1 - var(--plot-lift, 0))); }
	.svc-hero--scene .svc-hero__actions { top: 100%; }
}
/* Кнопки ждут совпадения контура: скрипт ставит is-shown и больше не снимает. Без
   скрипта (нет is-live) они видны сразу. Контурная — на белом, на зелени красный
   контур без заливки не читается. */
.svc-hero__track.is-live:not(.is-shown) .svc-hero__actions { opacity: 0; visibility: hidden; transform: translateY(16px); }
.svc-hero--scene .svc-hero__actions { transition: opacity .5s ease, transform .5s ease, visibility .5s; }
.svc-hero--scene .btn--outline { background: var(--paper); }
.svc-hero--scene .btn--outline:hover { background: var(--accent); }
.svc__body { max-width: 46em; font-size: 18px; }

/* --- Блок «Сетка карточек» --------------------------------------------------
   Колонок 2–4; карточка занимает w колонок и h рядов. Ряд — 300px минимум,
   растёт по содержимому. Режимы картинки: объект в углу / фото сверху / фон. */
.section__title--lg { font-size: clamp(32px, 3.6vw, 52px); letter-spacing: -.03em; line-height: 1.08; max-width: 18em; }
.section__title--lg em { font-style: normal; color: var(--accent); }
/* Подзаголовок под заголовком секции (блок работ): заголовок отдаёт ему свой нижний отступ. */
.section__title.has-lead { margin-bottom: 12px; }
.section__lead { margin: 0 0 var(--title-gap); max-width: 40em; font-size: 17px; color: var(--fg-muted); }
.cgrid { display: grid; gap: var(--gap); grid-auto-rows: minmax(300px, auto); grid-auto-flow: dense; }
.cgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gcard--w1 { grid-column: span 1; } .gcard--w2 { grid-column: span 2; } .gcard--w3 { grid-column: span 3; } .gcard--w4 { grid-column: span 4; }
.gcard--h1 { grid-row: span 1; }    .gcard--h2 { grid-row: span 2; }

.gcard { position: relative; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.gcard__body { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; padding: var(--card-pad); }
.gcard__tag {
	align-self: flex-start; padding: 8px 14px; border-radius: 10px; font-size: 15px; font-weight: 500;
	background: var(--pill-bg, rgba(0,0,0,.08)); color: inherit; margin-bottom: 20px; /* в тон карточки, см. --pill-bg */
}
.gcard__text { margin-top: auto; }
.gcard__title { font-size: 24px; line-height: 1.2; margin-bottom: 10px; }
.gcard__title em { font-style: normal; color: var(--accent); }
.gcard--w2 .gcard__title, .gcard--w3 .gcard__title, .gcard--w4 .gcard__title { font-size: 28px; }
.gcard__desc { font-size: 16px; line-height: 1.5; margin: 0; color: var(--text-muted); }

/* Фото сверху: заполняет всё над текстом, плашка поверх фото. */
.gcard--top .gcard__media { position: relative; flex: 1 1 auto; min-height: 240px; background: var(--c-grey); overflow: hidden; }
.gcard--top .gcard__media img, .gcard__ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gcard__ph { background: linear-gradient(135deg, #dfe3e6, #c9d0d5); }
.gcard--top .gcard__body { flex: 0 0 auto; }
.gcard__tag--over { position: absolute; top: var(--card-pad); left: var(--card-pad); margin: 0; background: var(--inset); color: var(--fg); z-index: 1; }
.gcard__tag--mobile { display: none; } /* дубль плашки для телефона: под фото, над заголовком */
/* Свободное размещение: картинка позади текста; центр в % карточки (--ix/--iy),
   ширина в % (--isz), поворот (--irot). На телефоне — свои значения --m*. */
.gcard--free .gcard__free { position: absolute; inset: 0; z-index: 0; }
.gcard--free .gcard__free img {
	position: absolute; left: calc(var(--ix, 80) * 1%); top: calc(var(--iy, 45) * 1%);
	width: calc(var(--isz, 55) * 1%); height: auto; max-width: none;
	transform: translate(-50%, -50%) rotate(var(--irot, 0deg)); transform-origin: center;
}
/* Режим «по правому полю»: угол картинки на --card-pad от правого и нижнего края,
   размер в % ширины карточки (--asz). Одинаковый отступ на карточке любой ширины. */
.gcard--free.gcard--anchor .gcard__free img {
	left: auto; top: auto; right: var(--card-pad); bottom: var(--card-pad);
	width: calc(var(--asz, 40) * 1%); transform: none;
}
/* По вертикали: нижний угол (по умолчанию), верхний угол, по центру. */
.gcard--free.gcard--anchor-top .gcard__free img { bottom: auto; top: var(--card-pad); }
.gcard--free.gcard--anchor-center .gcard__free img { bottom: auto; top: 50%; transform: translateY(-50%); }
.gcard--shadow .gcard__free img { filter: drop-shadow(0 12px 24px rgba(0,0,0,.25)); }

/* Режим «Фон»: фото или видео заполняют карточку с кадрированием; снизу градиент,
   чтобы белая подпись читалась на любом кадре; подпись — до трёх строк. Клик по
   карточке (если включено увеличение) — прозрачная ссылка поверх всего. */
.gcard--fill { color: #fff; --card-text: #fff; --pill-bg: rgba(255,255,255,.22); --pill-fg: currentColor; }
.gcard--fill .gcard__fill { position: absolute; inset: 0; z-index: 0; background: var(--card-color, var(--c-grey)); }
.gcard__fill picture, .gcard__media picture { display: contents; } /* <picture> с картинкой для телефона не мешает растяжке */
.gcard--fill .gcard__fill img, .gcard--fill .gcard__fill video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gcard--fill .gcard__fill::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.3) 34%, rgba(0,0,0,0) 60%);
}
.gcard--fill .gcard__tag { background: var(--pill-bg); }
.gcard--fill .gcard__title { margin-bottom: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gcard__zoom { position: absolute; inset: 0; z-index: 2; cursor: zoom-in; border-radius: inherit; }
.gcard__zoom:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
/* Карточка-ссылка (оглавление): прозрачная ссылка поверх всей карточки, стрелка
   в правом нижнем углу на поле карточки; текст оставляет ей место справа. Заголовок
   такой карточки — абзац, а не h3, поэтому шрифт заголовков задан явно. */
.gcard__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.gcard__link:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.gcard__arrow { position: absolute; right: var(--card-pad); bottom: var(--card-pad); z-index: 1; font-size: 26px; line-height: 1; transition: transform .15s; }
.gcard--link .gcard__text { padding-right: calc(var(--card-pad) * 1.5); }
.gcard--link:hover .gcard__arrow { transform: translateX(4px); }
p.gcard__title { font-family: var(--font-head); font-weight: 600; letter-spacing: -.02em; }

/* Лайтбокс: нативный <dialog> на весь экран. */
.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(20,24,26,.94); }
.lightbox__img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: min(92vw, 1600px); max-height: 90vh; width: auto; height: auto; border-radius: var(--radius-sm); }
.lightbox__close, .lightbox__nav {
	position: absolute; z-index: 1; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.14); color: #fff; font: 400 30px/1 var(--font-head); display: grid; place-items: center;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
.lightbox__nav[hidden] { display: none; }

/* --- Блок «Стоимость — калькулятор» ---------------------------------------- */
.pcalc { min-height: 0; padding: var(--card-pad-lg); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--card-pad-lg); }
.pcalc__title { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.03em; line-height: 1.08; margin-bottom: 14px; }
.pcalc__title em { font-style: normal; color: var(--accent); }
.pcalc__lead { font-size: 17px; color: var(--text-muted); max-width: 34em; margin-bottom: 28px; }
.pcalc__fields { display: grid; gap: 18px; max-width: 520px; }
/* Поля одного вида работ — с теми же промежутками, что между полями формы. */
.pcalc__set { display: grid; gap: inherit; }
.pcalc__set[hidden], .pcalc__submit[hidden] { display: none; }
.pcalc__hint { margin: 0; }
/* Выбор вида работ: плашки в тон карточки; выбранная — цветом отмеченной галочки. */
.pkinds { margin-top: 0; }
.pkind { cursor: pointer; }
.pkind input { position: absolute; opacity: 0; width: 0; height: 0; }
.pkind .pill { transition: transform .12s, background .15s, color .15s; }
/* Наведение — фон с примесью цвета текста: на тёмной карточке светлее, на светлой темнее
   (осветление, как у ссылок-плашек, на белой карточке сливает плашку с фоном). */
@media (hover: hover) {
	.pkind:hover .pill { transform: translateY(-1px); }
	.pkind:hover input:not(:checked) + .pill { background: color-mix(in srgb, var(--pill-bg, var(--t-0)) 90%, currentColor); }
}
.pkind input:checked + .pill { background: var(--accent-dark); color: #fff; }
.pkind input:focus-visible + .pill { outline: 2px solid var(--focus); outline-offset: 3px; }
.pfield { display: flex; flex-direction: column; gap: 8px; }
.pfield__label { font-size: 14px; color: var(--text-muted); }
.pfield__input, .stepper__input {
	font: inherit; font-size: 20px; font-weight: 500; color: var(--fg);
	padding: 14px 18px; border: 0; border-radius: 14px; background: #fff; width: 100%; box-shadow: inset 0 0 0 1px var(--rule);
}
/* Поле с ошибкой: красная рамка и подпись; снимается при вводе. */
.pfield__input::placeholder { color: var(--placeholder); font-weight: 400; }
.pfield__error { display: none; font-size: 14px; color: #ffb4b4; }
.pfield.is-invalid .pfield__input { outline: 3px solid var(--accent); outline-offset: 0; }
.pfield.is-invalid .pfield__error { display: block; }
.card--yellow .pfield__error, .card--grey .pfield__error, .card--white .pfield__error { color: var(--accent-dark); }
/* Подсказка под полем — тоном второстепенного текста карточки. */
.pfield__hint { font-size: 14px; color: var(--text-muted); }
/* Площадь: «м²» внутри поля справа. */
.pfield__unit { position: relative; display: block; max-width: 220px; }
.pfield__unit .pfield__input { padding-right: 52px; -moz-appearance: textfield; }
.pfield__unit .pfield__input::-webkit-inner-spin-button, .pfield__unit .pfield__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pfield__unit-text { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--placeholder); pointer-events: none; }

/* Счётчик точек: − число + */
.stepper { display: inline-grid; grid-template-columns: 56px 100px 56px; align-items: stretch; align-self: flex-start; width: max-content; border-radius: 14px; overflow: hidden; background: #fff; }
.stepper__btn { border: 0; background: var(--inset); color: var(--fg); font-size: 24px; font-weight: 500; cursor: pointer; }
.stepper__btn:hover { background: var(--c-sage); }
.stepper__input { text-align: center; border-radius: 0; -moz-appearance: textfield; }
.stepper__input::-webkit-inner-spin-button, .stepper__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.is-disabled { opacity: .45; }
.stepper.is-disabled .stepper__btn { cursor: default; }
/* Галочка */
.pcheck { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 17px; }
.pcheck input { position: absolute; opacity: 0; width: 0; height: 0; }
.pcheck__box { width: 26px; height: 26px; border-radius: 8px; background: #fff; flex: none; position: relative; }
.pcheck input:checked + .pcheck__box::after {
	content: ''; position: absolute; left: 8px; top: 3px; width: 7px; height: 13px;
	border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.pcheck input:checked + .pcheck__box { background: var(--accent-dark); }
.pcheck input:focus-visible + .pcheck__box { outline: 2px solid var(--focus); outline-offset: 3px; }
/* «Рассчитать» — красная (.btn--accent): акцент на действии. */
.pcalc__submit { justify-self: start; margin-top: 6px; }
.pcalc__submit:disabled { opacity: .6; cursor: default; }
/* Оговорка под кнопкой: видна всегда — что считается отдельно или не входит в цену. */
.pcalc__note { margin: 0; max-width: 34em; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
/* Правая часть: ход расчёта и цена */
.pcalc__result { display: flex; flex-direction: column; justify-content: center; border-radius: var(--radius-sm); background: var(--panel, rgba(255,255,255,.08)); padding: var(--card-pad); min-height: 320px; }
.pcalc__idle { text-align: center; color: var(--text-muted); }
.pcalc__idle-icon { display: block; font-family: var(--font-head); font-size: 64px; font-weight: 600; line-height: 1; margin-bottom: 12px; }
/* Ход расчёта — одна строка, сообщения сменяют друг друга; высота панели не меняется. */
.pcalc__log { font-size: 17px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 3em; }
.pcalc__log li { opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; padding-left: 26px; position: relative; }
.pcalc__log li::before { content: ''; position: absolute; left: 0; top: .35em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; animation: pcalc-pulse 1s infinite; }
.pcalc__log li.is-on { opacity: 1; transform: none; }
@keyframes pcalc-pulse { 50% { opacity: 1; } }
.pcalc__price { margin-top: 0; }
.pcalc__price-label { display: block; font-size: 15px; color: var(--text-muted); margin-bottom: 6px; }
.pcalc__price-value { display: block; font-family: var(--font-head); font-size: clamp(48px, 6vw, 84px); font-weight: 700; line-height: 1; letter-spacing: -.03em; color: #fff; }
.card--yellow .pcalc__price-value, .card--grey .pcalc__price-value, .card--white .pcalc__price-value,
.card--milk .pcalc__price-value, .card--sage-light .pcalc__price-value, .card--sage .pcalc__price-value, .card--cream .pcalc__price-value { color: var(--accent); }
.card--custom .pcalc__price-value { color: var(--card-text, #fff); }
.card--text-custom .pcalc__price-value { color: var(--title-color, var(--card-text, #fff)); }
.pcalc__price-note { font-size: 15px; color: var(--text-muted); margin: 14px 0 20px; max-width: 30em; }
/* Режим «в разработке»: плашка над заголовком и сообщение вместо цены. */
.pcalc__soon { margin-bottom: 14px; }
.pcalc__wip-text { font-size: 19px; line-height: 1.45; margin: 0 0 20px; max-width: 26em; }

/* --- Блок «Как проходит» — шаги 01, 02… три в ряд ---------------------------- */
.sgrid { display: grid; gap: var(--gap); grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
/* Высота карточки — по содержимому: ряд берёт высоту самой высокой, воздуха снизу нет. */
.scard { min-height: 0; padding: var(--card-pad); }
.scard__num { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -.02em; margin-bottom: 28px; }
.scard__body { display: block; }
.scard__title { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
.scard__text { font-size: 16px; line-height: 1.5; margin: 0; color: var(--text-muted); }
.scard__term {
	display: inline-block; margin-top: 16px; padding: 8px 14px; border-radius: 10px;
	font-size: 15px; font-weight: 500; line-height: 1.2;
	background: var(--pill-bg, rgba(0,0,0,.09)); color: var(--pill-fg, inherit);
}
.scard__img img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
/* Справа от текста (ключ behind): картинка сразу под заголовком, текст обтекает —
   строки рядом с ней короче, строки ниже — во всю ширину. Бокс — по высоте картинки,
   правый край — на поле карточки (--card-pad), как у всех привязанных картинок. */
.scard--behind .scard__img { float: right; width: 36%; height: auto; margin: 0 0 0 16px; }
.scard--behind .scard__img img { height: auto; object-position: right top; }
/* За текстом: объект в рамке, отступающей от краёв на поле карточки; точка
   выравнивания — flex-переменные (--jx/--ay), размер — % ширины рамки (--bsz),
   прозрачность (--bop). Больше рамки — выходит за неё и обрезается краями карточки. */
.scard--back { overflow: hidden; }
.scard--back .scard__num, .scard--back .scard__body { position: relative; z-index: 1; }
.scard__back { position: absolute; inset: var(--card-pad); z-index: 0; display: flex; justify-content: var(--jx, flex-end); align-items: var(--ay, flex-end); pointer-events: none; }
.scard__back img { flex: none; width: calc(var(--bsz, 60) * 1%); max-width: none; height: auto; opacity: var(--bop, 1); }
/* Ниже текста: картинка в потоке, прижата к низу и правому краю карточки. */
.scard--below .scard__img { margin-top: auto; padding-top: 20px; align-self: flex-end; width: 50%; height: 180px; box-sizing: content-box; }

/* --- Блок «Сцена: уточнение границ» ------------------------------------------
   Картинка участка (прозрачный фон) и контур поверх неё в SVG. Переменная --t
   (0 → 1) приходит из JS по ходу прокрутки: по ней контур меняет цвет с алого
   на графитовый и гаснет заливка. Пропорция сцены — как у картинки, поэтому
   контур всегда совпадает с забором. */
.bscene { padding: var(--card-pad-lg); min-height: 0; gap: var(--card-pad); }
.bscene__head { max-width: 46em; }
.bscene__title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.025em; margin-bottom: 12px; }
.bscene__title em { font-style: normal; color: var(--accent); }
.bscene__lead { margin: 0; font-size: 18px; color: var(--text-muted, var(--fg-muted)); }
.bscene__stage { margin: 0; width: 100%; }
/* Дорожка: её высота — это путь прокрутки, за который контур сходится. Липкий слой
   внутри держит сцену в экране, пока дорожка проходит мимо. */
.bscene__track { height: 290vh; }
.bscene__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
/* Ширина холста выводится из высоты экрана, чтобы сцена целиком помещалась в липкий
   слой: тогда SVG точно совпадает с рисунком, без полей от object-fit. */
/* --ratio — пропорция картинки (ширина / высота), ставится в разметке холста. */
.bscene__canvas { position: relative; width: min(1100px, 100%, calc((100vh - 220px) * var(--ratio))); aspect-ratio: var(--ratio); }
.bscene__img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }
/* Контур лежит под рисунком: забор, дом и деревья его перекрывают. */
.bscene__svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; }
/* Слой эффектов — поверх рисунка, иначе кольца и волна тонут за забором. */
.bscene__fx { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* Сошедшийся контур и блик — белые: чистая выверенная линия, видна и на траве,
   и рядом с тёмным забором, в тон белому заголовку.
   Толщины линий, радиусы колец и размытия заданы для масштаба ~0,7 px экрана на
   единицу картинки (участок на компьютере) и умножаются на --sw: скрипт ставит её
   каждому холсту по его ширине, поэтому на телефоне и в узком окне линии на экране
   той же толщины. Длины отрезков блика — в единицах картинки: доля периметра. */
/* --line-mix — доля цвета «после» в контуре: до 80 % пути он чисто алый и лишь
   на последних 20 % переходит в белый, без долгой бледно-розовой середины. */
.bscene__canvas { --line-done: #ffffff; --line-mix: clamp(0, (var(--t, 0) - .8) * 5, 1); }
/* Кольца в момент, когда угол встаёт на место: три подряд, быстро. */
.bscene__pulses circle { fill: none; stroke: var(--accent); stroke-width: calc(4 * var(--sw, 1)); opacity: 0; }
.bscene__pulses g.is-on circle { animation: bscene-pulse .55s cubic-bezier(.22,.61,.36,1) forwards; }
.bscene__pulses g.is-on circle:nth-child(2) { animation-delay: .13s; }
.bscene__pulses g.is-on circle:nth-child(3) { animation-delay: .26s; }
@keyframes bscene-pulse {
	0%   { r: calc(6px * var(--sw, 1));  opacity: .95; stroke-width: calc(5 * var(--sw, 1)); }
	100% { r: calc(52px * var(--sw, 1)); opacity: 0;   stroke-width: calc(1 * var(--sw, 1)); }
}
/* Блик по контуру в момент полного совпадения: по периметру пробегает светящийся
   отрезок с хвостом — белая сердцевина, ореол и длинный бледный хвост цвета линии.
   Голова у слоёв общая: смещение считается от пробега --wave-run, а не от длины
   отрезка, поэтому слои идут вместе. */
.bscene__wave {
	/* Ручки блика — меняются только здесь. Длины в единицах картинки (её viewBox).
	   --wave-run — путь головы: самый длинный периметр (широкий участок ≈3860)
	   плюс самый длинный отрезок, чтобы хвост успел уйти. --wave-gap не меньше
	   пробега, иначе по контуру побежит второй отрезок. */
	--wave-run:  4800;
	--wave-gap:  4900;
	--wave-time: .9s;    /* сколько бежит блик */
	fill: none; stroke-linejoin: round; stroke-linecap: round; opacity: 0;
	stroke-dasharray: var(--wave-seg) var(--wave-gap);
}
.bscene__wave--tail { --wave-seg: 900; stroke: var(--line-done); stroke-width: calc(14 * var(--sw, 1)); stroke-opacity: .45; filter: blur(calc(10px * var(--sw, 1))); }
.bscene__wave--glow { --wave-seg: 320; stroke: var(--line-done); stroke-width: calc(22 * var(--sw, 1)); filter: blur(calc(8px * var(--sw, 1))); }
.bscene__wave--line { --wave-seg: 220; stroke: #fff; stroke-width: calc(7 * var(--sw, 1)); }
.bscene__wave.is-on { animation: bscene-wave var(--wave-time) cubic-bezier(.4,0,.2,1) forwards; }
/* Оба конца — в px (единицы вида): число и длина между собой не анимируются. */
@keyframes bscene-wave {
	0%   { opacity: 0; stroke-dashoffset: calc(var(--wave-seg) * 1px); }
	10%  { opacity: 1; }
	85%  { opacity: 1; }
	100% { opacity: 0; stroke-dashoffset: calc((var(--wave-seg) - var(--wave-run)) * 1px); }
}
@media (prefers-reduced-motion: reduce) {
	.bscene__pulses g.is-on circle, .bscene__wave.is-on { animation: none; }
	.card--photos__fade { transition: none; }
}
/* Контур: алый пунктир «по ЕГРН» → сплошной белый по забору, толще. Тёмная
   обводка — с самого начала, поэтому линия плотная на любом фоне и в любой момент
   перехода; светлый ореол проявляется к совпадению — отделяет белую линию от травы. */
.bscene__outline {
	fill: color-mix(in srgb, var(--accent) calc((1 - var(--t, 0)) * 12%), transparent);
	stroke: color-mix(in srgb, var(--accent), var(--line-done) calc(var(--line-mix) * 100%));
	stroke-width: calc(5 * var(--sw, 1)); stroke-linejoin: round;
	stroke-dasharray: calc(18 * var(--sw, 1)) calc(12 * var(--sw, 1)); stroke-dashoffset: 0;
	filter: drop-shadow(0 0 calc(1.2px * var(--sw, 1)) #0b4f1f) drop-shadow(0 0 calc(1.2px * var(--sw, 1)) #0b4f1f) drop-shadow(0 0 calc(6px * var(--sw, 1)) rgb(255 255 255 / calc(.55 * var(--line-mix))));
}
.bscene__stage.is-done .bscene__outline { stroke-dasharray: none; stroke-width: calc(7 * var(--sw, 1)); }
/* Кружки — на углах; на промежуточных столбах (is-mid) только в режиме подгонки. */
.bscene__nodes circle { r: calc(9px * var(--sw, 1)); fill: var(--paper); stroke: color-mix(in srgb, var(--accent), var(--line-done) calc(var(--line-mix) * 100%)); stroke-width: calc(4 * var(--sw, 1)); }
.bscene__nodes circle.is-mid { display: none; }
.bscene__stage.is-editing .bscene__nodes circle.is-mid { display: inline; }
/* Режим подгонки (?granitsy=nastroit): вершины крупные и перетаскиваются,
   панель внизу показывает координаты для темы. */
.bscene__stage.is-editing .bscene__track, .bscene__stage.is-calm .bscene__track { height: auto; }
.bscene__stage.is-editing .bscene__sticky, .bscene__stage.is-calm .bscene__sticky { position: static; height: auto; }
.bscene__stage.is-editing .bscene__canvas, .bscene__stage.is-calm .bscene__canvas { width: min(1100px, 100%); }
.bscene__stage.is-editing .bscene__svg { cursor: grab; touch-action: none; z-index: 2; }
.bscene__stage.is-editing .bscene__nodes circle { r: calc(14px * var(--sw, 1)); fill: var(--accent); stroke: var(--paper); stroke-width: calc(3 * var(--sw, 1)); }
.bscene__editor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--c-graphite); color: #fff; }
.bscene__editor code { font-size: 13px; line-height: 1.4; word-break: break-all; flex: 1 1 320px; }
.bscene__editor button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }

/* Легенда: состояние контура и счётчик расхождения. */
.bscene__legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; font-size: 16px; }
.bscene__state {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
	background: var(--inset); font-weight: 600;
}
.bscene__state::before {
	content: ''; width: 12px; height: 12px; border-radius: 50%;
	background: color-mix(in srgb, var(--accent), var(--fg) calc(var(--t, 0) * 100%));
}
.bscene__gap { color: var(--text-muted, var(--fg-muted)); }
.bscene__gap strong { font-variant-numeric: tabular-nums; color: var(--fg); }
.bscene__stage.is-done .bscene__gap strong { color: var(--c-green); }
/* Пункты «что это даёт» — по три в ряд под сценой. */
.bscene__points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--card-pad); }
.bscene__point-title { font-size: 19px; margin-bottom: 6px; }
.bscene__point-text { margin: 0; font-size: 16px; color: var(--text-muted, var(--fg-muted)); }

/* --- Блок «Важно знать» — карточка со ссылкой на статью ----------------------
   Слева блок с картинкой (отступ 16px от краёв карточки), справа заголовок, текст
   и кнопка под ним. Высоту карточки задаёт текст; картинка вписывается в блок
   высотой с карточку и раздвинуть её не может. Минимум 320px — чтобы при коротком
   тексте блок картинки не стал полоской. Без картинки — текст от левого края. */
.notice { min-height: 0; padding: var(--card-pad-lg); display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.notice.has-media { min-height: 320px; padding: var(--card-pad-sm) var(--card-pad-lg) var(--card-pad-sm) var(--card-pad-sm); grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: var(--card-pad); }
.notice.has-media .notice__body { padding: var(--card-pad) 0; }
.notice__body { display: flex; flex-direction: column; align-items: flex-start; }
.notice__title { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin-bottom: 14px; }
.notice__title em { font-style: normal; color: var(--accent); }
.notice__text { font-size: 17px; line-height: 1.5; color: var(--text-muted); margin: 0 0 24px; }
.notice__media { position: relative; align-self: stretch; min-height: 0; border-radius: var(--radius-sm); overflow: hidden; }
.notice__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Объект на прозрачном фоне: без кадрирования, по центру или у нижнего края блока. */
.notice--center .notice__media img { object-fit: contain; }
.notice--bottom .notice__media img { object-fit: contain; object-position: center bottom; }
/* Тип «Фон»: узор позади текста во всю ширину, прижат к низу, верх обрезается краем
   карточки; раскладка — как без картинки. До 720 px — своя картинка (<picture>). */
.notice--back { position: relative; overflow: hidden; }
.notice__back { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.notice__back img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; max-width: none; }
.notice--back .notice__body { position: relative; z-index: 1; }
/* На алой карточке красная кнопка сольётся — белая с красным текстом. */
.card--accent .notice__btn { background: #fff; color: var(--accent); }
.card--accent .notice__btn:hover { background: #ffe9e9; }
/* На жёлтых карточках красная кнопка спорит с фоном — не-целевое действие графитовое. */
.card--cream .notice__btn, .card--yellow .notice__btn { background: var(--c-graphite); color: #fff; }
.card--cream .notice__btn:hover, .card--yellow .notice__btn:hover { background: color-mix(in srgb, var(--c-graphite), white 8%); }

/* Страница работы. */
.case__in { padding: 48px 24px 72px; max-width: 1080px; }
.case__crumbs { font-size: 15px; color: var(--fg-muted); margin-bottom: 20px; }
.case__crumbs a { text-decoration: none; }
.case__crumbs a:hover { color: var(--accent); }
.case__title { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 20px; }
.case__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.case__place { color: var(--fg-muted); }
.case__photo { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; background: var(--c-grey); }
.case__photo img { width: 100%; height: auto; }
.case__facts { margin-bottom: 32px; }
.case__label { display: block; font-size: 14px; color: var(--fg-muted); margin-bottom: 8px; }
.case__text { font-size: 19px; line-height: 1.45; margin: 0; }
/* Рассказ о работе — белая карточка во всю ширину, как «Задача» и «Что сделали» над ней;
   внутри текст как в главах (номера 01, стрелки, подписи к картинкам), строка — не шире
   46em, а картинки — на всю ширину карточки. */
.case__body { min-height: 0; padding: var(--card-pad-lg); margin-bottom: 40px; }
.case__body .case__prose { font-size: 18px; max-width: none; } /* сильнее .art-prose: картинкам — вся ширина карточки */
.case__prose > :not(figure) { max-width: 46em; }
.case__prose h2 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.15; margin: 1.3em 0 .5em; }
.case__prose > h2:first-child { margin-top: 0; }
/* Шаги могут прерываться картинками — нумерация сквозная по всему рассказу. */
.case__body .case__prose { counter-reset: item; }
.case__body .case__prose ol { counter-reset: none; }
.case__text { color: inherit; }
.case__facts .case__label { color: var(--text-muted); }
.case__cta { min-height: 0; }
.case__cta .hero__actions { margin: 8px 0 0; }
.case__cta .btn--ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }

/* --- Фон страницы (поле «Фон страницы» у статьи и услуги) ---------------------
   Класс page-bg-* ставится на body. На тёмном фоне текст вне карточек — белый;
   карточки и вкладыши (--inset) свои цвета не меняют. */
body.page-bg-graphite { --bg: var(--c-graphite); }
body.page-bg-sage { --bg: var(--c-sage); }
body.page-bg-cream { --bg: var(--c-cream); }
body.page-bg-dark { color: #fff; }
.page-bg-dark .site-nav a { color: inherit; }
.page-bg-dark .site-footer__in { border-color: rgba(255,255,255,.18); }
.page-bg-dark .site-footer__note, .page-bg-dark .fact__label, .page-bg-dark .case__crumbs, .page-bg-dark .crumbs, .page-bg-dark .section__lead, .page-bg-dark .case__place { color: rgba(255,255,255,.72); }
.page-bg-dark .facts { border-color: rgba(255,255,255,.18); }

/* --- Статья ------------------------------------------------------------------ */
/* Тело статьи: разделы стоят плотно, как карточки в сетке (--gap); контейнер
   добирает до --block-gap на границах с обложкой, призывом и контактами. */
.art-body { padding-block: calc(var(--block-gap) / 2 - var(--gap) / 2); }
.art-body .section { padding-block: calc(var(--gap) / 2); }
/* Обложка: фото под градиентом, заголовок и рубрика поверх; без фото — белая карточка. */
.art-hero { min-height: 420px; padding: var(--card-pad-lg); justify-content: flex-end; overflow: hidden; }
.art-hero.has-cover { color: #fff; min-height: 520px; }
.art-hero__bg { position: absolute; inset: 0; z-index: 0; }
.art-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Затемнение слева и снизу — там лежит текст; светлые обложки (документы) тоже читаются. */
.art-hero.has-cover .art-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(20,26,30,.82) 0%, rgba(20,26,30,.55) 45%, rgba(20,26,30,.2) 100%), linear-gradient(to top, rgba(20,26,30,.6) 0%, rgba(20,26,30,0) 60%); }
.art-hero__body { position: relative; z-index: 1; max-width: 62%; }
.art-hero__crumbs { font-size: 15px; opacity: .85; margin-bottom: 16px; }
.art-hero__crumbs a { text-decoration: none; }
.art-hero__crumbs a:hover { text-decoration: underline; }
.art-hero__title { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 18px; max-width: 14em; }
.art-hero__meta { font-size: 15px; opacity: .8; margin: 0; }
/* Лид и оглавление в одном ряду: лид на две колонки, оглавление на одну. */
.art-lead { min-height: 0; }
.art-lead__text { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; margin: 0; max-width: 32em; }
.art-toc { min-height: 0; }
.art-toc__title { font-size: 22px; margin-bottom: 14px; }
.art-toc__list { counter-reset: toc; display: flex; flex-direction: column; gap: 10px; }
.art-toc__list li { counter-increment: toc; display: flex; gap: 12px; font-size: 16px; line-height: 1.35; }
.art-toc__list li::before { content: counter(toc, decimal-leading-zero); flex: none; font-family: var(--font-head); font-weight: 600; color: var(--accent); }
.art-toc__list a { text-decoration: none; }
.art-toc__list a:hover { color: var(--accent); }
/* Раздел: липкая подпись слева, текст справа. */
.art-section { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: var(--card-pad-lg); }
.art-section__aside { position: relative; }
.art-section__label { position: sticky; top: 112px; display: block; font-size: 16px; line-height: 1.35; color: var(--fg-muted); padding-left: 22px; }
.art-section__label::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.art-section__title { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 18px; max-width: 20em; }
.art-section__title em { font-style: normal; color: var(--accent); }
/* Типографика текста раздела. */
.art-prose { font-size: 17px; line-height: 1.6; max-width: 40em; }
.art-prose > :first-child { margin-top: 0; }
.art-prose > :last-child { margin-bottom: 0; }
.art-prose h3 { font-size: 21px; line-height: 1.25; margin: 1.5em 0 .5em; }
.art-prose h4 { font-size: 17px; margin: 1.3em 0 .4em; }
.art-prose p { margin: 0 0 1em; }
.art-prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.art-prose strong { font-weight: 600; }
.art-prose ul, .art-prose ol { margin: 0 0 1.2em; padding: 0; list-style: none; }
.art-prose li { position: relative; padding-left: 34px; margin-bottom: .55em; }
.art-prose ul li::before { content: '→'; position: absolute; left: 4px; top: 0; color: var(--accent); font-weight: 600; }
.art-prose ol { counter-reset: item; }
.art-prose ol li { padding-left: 42px; }
.art-prose ol li::before { content: counter(item, decimal-leading-zero); counter-increment: item; position: absolute; left: 0; top: .1em; font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--accent); }
.art-prose figure, .art-prose img { max-width: 100%; }
.art-prose figure { margin: 1.4em 0; }
.art-prose img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.art-prose figcaption { margin-top: 10px; font-size: 14px; color: var(--fg-muted); }
.art-prose blockquote { margin: 1.4em 0; padding: 20px var(--card-pad); border-radius: var(--radius-sm); background: var(--inset); font-size: 18px; }
.art-prose blockquote p:last-child { margin: 0; }
.art-prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.art-prose th, .art-prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.art-prose th { font-weight: 600; }

/* --- Оглавление общей страницы (блок «Оглавление — виды работ») ------------------ */
/* Сетка «Сетки карточек» на 4 колонки, ряд ниже: карточки — навигация, а не витрина. */
.toc__grid { grid-auto-rows: minmax(200px, auto); }
/* Список для телефона: цвет группы, название, под ним цена, стрелка. Цена под
   названием, а не справа: длинные слова («Перераспределение») не выталкивают стрелку. */
.toc__list { display: none; min-height: 0; padding-block: 0; }
.toc__row { display: flex; align-items: center; gap: 12px; padding: calc(var(--card-pad) * .6) 0; color: inherit; text-decoration: none; }
.toc__list li + li .toc__row { border-top: 1px solid var(--rule); }
.toc__dot { flex: none; width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--rule); }
.toc__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toc__name { font-size: 17px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.toc__price { font-size: 15px; color: var(--text-muted); white-space: nowrap; }
.toc__go { flex: none; color: var(--accent); }

/* --- /uslugi/: список услуг по группам ---------------------------------------- */
/* Карточка группы — как раздел статьи: слева название с точкой цвета группы и
   подзаголовок, справа строки услуг (как компактное оглавление на телефоне).
   Виды работ разводящей страницы — вложенным списком с линией слева. */
.crumbs + .section--after-crumbs { padding-top: 0; }
.svc-group__title { display: flex; align-items: flex-start; gap: 10px; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; margin: 0 0 10px; }
.svc-group__title .toc__dot { margin-top: .4em; } /* к первой строке длинного названия */
.svc-group__sub { margin: 0; font-size: 15px; color: var(--text-muted); }
.svc-group__list, .svc-group__children { list-style: none; margin: 0; padding: 0; }
.svc-group__list > li + li { border-top: 1px solid var(--rule); }
.svc-group__list > li:first-child > .toc__row { padding-top: 0; }
.svc-group__list > li:last-child > .toc__row:last-child { padding-bottom: 0; }
.svc-group__children { margin: 0 0 calc(var(--card-pad) * .6) 6px; padding-left: 18px; border-left: 2px solid var(--rule); }
.svc-group__children .toc__row { padding-block: 10px; }
.svc-group__children .toc__name { font-size: 16px; }
.svc-group__text { font-size: 15px; line-height: 1.4; color: var(--text-muted); }

/* --- /raboty/: плашки групп над списком работ ---------------------------------- */
/* Выбранная — графитовая, как кнопки на светлых карточках; число работ — приглушённое.
   Скрытые фильтром карточки: у .card свой display, поэтому [hidden] — явно. */
.cases-filter { margin: 0 0 var(--title-gap); }
.cases-filter .pill.is-on { background: var(--c-graphite); color: #fff; }
.cases-filter__n { margin-left: 2px; opacity: .55; }
.cases-all > [hidden] { display: none; }

/* --- Правовой документ (template-legal.php): политика, согласие ----------------- */
.legal { min-height: 0; padding: var(--card-pad-lg); }
.legal__title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 10px; }
.legal__updated { margin: 0 0 var(--card-pad); font-size: 15px; color: var(--fg-muted); }
.legal__text h2 { font-size: clamp(21px, 2vw, 25px); line-height: 1.25; margin: 1.6em 0 .5em; scroll-margin-top: 110px; }
.legal__text > :first-child { margin-top: 0; }

/* --- Уведомление о cookie: небольшая плашка в правом нижнем углу ------------------ */
/* Не перекрывает контент и не затемняет страницу; на телефоне — внизу во всю ширину. */
.cookie-notice {
	position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: 360px;
	padding: 18px 20px; border-radius: var(--radius-sm); background: var(--paper); color: var(--fg);
	box-shadow: 0 8px 32px rgb(0 0 0 / .14); font-size: 15px; line-height: 1.45;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0 0 12px; }
.cookie-notice a { color: var(--accent); }
.cookie-notice__btn { border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; background: var(--inset); color: var(--fg); cursor: pointer; }
.cookie-notice__btn:hover { background: color-mix(in srgb, var(--inset), black 6%); }
@media (max-width: 720px) {
	.cookie-notice { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* --- Глава общей страницы: раздел статьи + цена, срок и кнопка расчёта слева ------- */
/* Липкой становится вся левая колонка, а не одна подпись: кнопка остаётся под рукой. */
.chapter__aside { position: sticky; top: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--card-pad) * .6); }
.chapter__aside .art-section__label { position: relative; top: auto; }
.chapter__price { display: block; font-family: var(--font-head); font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.chapter__term { display: block; margin-top: 6px; font-size: 15px; color: var(--text-muted); }

/* --- Вопросы с ответами (главы, позже — общий блок) --------------------------------- */
/* Строка вопроса — серая плашка с плюсом, ответ раскрывается под ней (details/summary).
   Ширина — как у текста главы; плашка — цвет вкладышей (--inset), как у цитаты в тексте. */
.faq { max-width: 40em; margin-top: calc(var(--card-pad) * 1.25); }
.faq__title { font-size: 21px; line-height: 1.25; margin: 0 0 14px; }
.faq__item { border-radius: var(--radius-sm); background: var(--inset); }
.faq__item + .faq__item { margin-top: 8px; }
.faq__q {
	display: flex; align-items: center; justify-content: space-between; gap: var(--card-pad-sm);
	padding: var(--card-pad-sm) calc(var(--card-pad-sm) * 1.5); cursor: pointer; list-style: none;
	font-size: 17px; font-weight: 600; line-height: 1.35;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; flex: none; font-size: 26px; font-weight: 400; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq__item[open] > .faq__q::after { transform: rotate(45deg); }
.faq__q:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq__a { padding: 0 calc(var(--card-pad-sm) * 1.5) var(--card-pad-sm); font-size: 16px; }
/* Заметка с автором. */
.art-note { min-height: 0; margin: 0; padding: var(--card-pad-lg); }
.art-note__text { margin: 0; font-family: var(--font-head); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; letter-spacing: -.02em; max-width: 26em; }
.art-note__author { display: flex; align-items: center; gap: 14px; margin-top: 24px; font-size: 15px; line-height: 1.35; opacity: .9; }
.art-note__photo { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; }
.art-note__photo img { width: 100%; height: 100%; object-fit: cover; }
/* Призыв к услуге под статьёй. */
.art-cta { min-height: 0; padding: var(--card-pad-lg); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--card-pad); align-items: center; }
.art-cta__title { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.025em; margin-bottom: 10px; }
.art-cta__title em { font-style: normal; color: var(--accent); }
.art-cta__text { margin: 0; font-size: 17px; opacity: .9; max-width: 36em; }
/* Способы связи: ряд круглых фирменных кнопок мессенджеров, под ними почта и телефон.
   Своя иконка из настроек занимает кружок целиком (has-img). */
.msg { display: flex; flex-direction: column; gap: 14px; }
.msg__row { display: flex; flex-wrap: wrap; gap: 12px; }
.msg__btn {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	color: #fff; background: var(--c-graphite); text-decoration: none; overflow: hidden;
	transition: transform .12s, filter .12s;
}
.msg__btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.msg__btn--whatsapp { background: #25D366; }
.msg__btn--telegram { background: #2AABEE; }
.msg__btn svg { width: 55%; height: 55%; display: block; }
/* Свой логотип показывается как нарисован (круг, скруглённый квадрат, «пузырь») — без обрезки. */
.msg__btn.has-img { background: none; border-radius: 0; overflow: visible; }
.msg__btn.has-img img { width: 100%; height: 100%; object-fit: contain; }
.msg__text { font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.msg__lines { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 1.35; }
.msg__lines a { text-decoration: none; }
.msg__lines a:hover { color: var(--accent); }
/* Крупный вариант — в заметке статьи. */
.msg--lg .msg__row { gap: 14px; }
.msg--lg .msg__btn { width: 64px; height: 64px; }
.msg--lg .msg__text { font-size: 15px; }
.msg--lg .msg__lines { font-size: 17px; gap: 6px; }
.contacts__msg { margin-top: auto; padding-top: 24px; }
/* Заметка со способами связи: текст занимает две трети, блок связи — по центру
   правой трети, кнопки и строки выровнены по центру. */
.art-note.has-msg { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--card-pad-lg); align-items: center; }
.art-note__body { min-width: 0; }
.art-note__msg { justify-self: center; align-items: center; text-align: center; }
.art-note__msg .msg__row { justify-content: center; }

/* Список статей. */
.art-card { min-height: 0; padding: 0; overflow: hidden; text-decoration: none; }
.art-card__media { aspect-ratio: 16 / 10; background: var(--c-grey); }
.art-card__media img, .art-card__media .gcard__ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card__body { padding: var(--card-pad); display: flex; flex-direction: column; }
.art-card__title { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
.art-card:hover .art-card__title { color: var(--accent); }
.art-card__text { margin: 0; font-size: 15px; color: var(--fg-muted); }

/* Подвал. */
.site-footer { padding: calc(var(--block-gap) / 2) 0 48px; }
.site-footer__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--rule); padding-top: 32px; }
.site-footer__note { margin: 0; font-size: 15px; color: var(--fg-muted); }
.site-footer__dev a, .site-footer__note a { color: inherit; }
.site-footer__dev a:hover, .site-footer__note a:hover { color: var(--accent); }

/* --- Адаптив ---------------------------------------------------------------- */
@media (max-width: 1024px) {
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.span-3 { grid-column: span 2; }
	.grid--about > .card--text, .grid--about > .card--photos { grid-column: 1 / -1; }
	.grid--about > .card--stat { grid-column: span 1; }
	.facts { grid-template-columns: repeat(2, 1fr); }
	.site-nav { display: none; }
	.sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	:root { --card-pad: 24px; --card-pad-lg: var(--card-pad); --block-gap: 56px; --title-gap: 20px; }
	body { font-size: 16px; }
	.grid, .grid--4 { grid-template-columns: 1fr; }
	.span-2, .span-3 { grid-column: span 1; }
	.section__title { font-size: 30px; }
	.hero__actions .btn { flex: 1; }
	.card { padding: var(--card-pad); min-height: 0; }
	.card--case { padding: 0; }
	.cases-home {
		display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory;
		margin-inline: calc(var(--wrap-pad) * -1); padding-inline: var(--wrap-pad); scroll-padding-inline: var(--wrap-pad);
		scrollbar-width: none; -webkit-overflow-scrolling: touch;
	}
	.cases-home::-webkit-scrollbar { display: none; }
	.cases-home > .card { flex: 0 0 85%; scroll-snap-align: start; }
	.cases-home > .cases-home__all {
		flex-basis: 60%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
		min-height: 0; color: inherit; text-decoration: none; text-align: center;
	}
	.cases-home__all-title { font-family: var(--font-head); font-size: 22px; font-weight: 600; }
	.cases-home__all .toc__go { font-size: 22px; }
	.cases-home__more { display: none; }
	.cases-home__dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--title-gap); }
	.cases-home__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--rule); cursor: pointer; }
	.cases-home__dot.is-on { background: var(--fg); }
	/* Сетка карточек на телефоне: один столбец, все карточки 1×1, фото 240px. */
	.gcard { padding: 0; }
	.cgrid, .cgrid--2, .cgrid--3, .cgrid--4 { grid-template-columns: 1fr; grid-auto-rows: auto; }
	.gcard--w2, .gcard--w3, .gcard--w4 { grid-column: span 1; }
	.gcard--h2 { grid-row: span 1; }
	.gcard--top .gcard__media { flex: 0 0 auto; height: 240px; min-height: 0; }
	/* Телефон, как у референса: картинка → плашка → заголовок → текст у всех карточек. */
	.gcard__tag--over { display: none; }
	.gcard__tag--mobile { display: inline-block; }
	.gcard__body { padding: var(--card-pad); }
	.gcard__title, .gcard--w2 .gcard__title, .gcard--w3 .gcard__title, .gcard--w4 .gcard__title { font-size: 21px; }
	.pcalc { grid-template-columns: 1fr; gap: var(--card-pad); padding: var(--card-pad-lg); }
	.pcalc__fields { max-width: none; }
	.pcalc__submit { justify-self: stretch; }
	/* Панель результата держит высоту во всех состояниях, чтобы карточка не дёргалась. */
	.pcalc__result { padding: var(--card-pad); min-height: 300px; }
	/* Шаги на телефоне: один столбец; картинка 180px в обоих режимах внизу по центру,
	   в 12px от текста; граница карточки проходит выше её середины: 40 % (72px) внутри,
	   60 % (108px) снаружи. Под внутреннюю часть — отступ карточки снизу, под
	   внешнюю — внешний отступ, чтобы не лечь на следующую карточку. */
	.sgrid { grid-template-columns: 1fr; }
	.scard { padding: var(--card-pad); }
	.scard--behind.has-image, .scard--below.has-image { padding-bottom: 84px; margin-bottom: 108px; }
	.scard--behind .scard__img, .scard--below .scard__img {
		position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 60%); float: none;
		width: 70%; max-width: 300px; height: 180px; margin: 0; padding: 0; z-index: 1;
	}
	.scard__img img, .scard--behind .scard__img img { height: 100%; object-position: center bottom; }
	.scard__back img { width: calc(var(--bszm, 60) * 1%); }
	/* «Важно знать» на телефоне: блок картинки сверху во всю ширину (4:3),
	   под ним заголовок, текст, кнопка во всю ширину. */
	/* Статья на телефоне: подпись раздела над текстом, лид и оглавление столбцом. */
	.art-hero, .art-hero.has-cover { min-height: 360px; padding: var(--card-pad-lg); }
	.art-hero__title { font-size: 30px; }
	.art-hero__body { max-width: none; }
	.art-section { grid-template-columns: 1fr; gap: 12px; }
	.art-section__label { position: static; }
	.chapter__aside { position: static; }
	.toc__grid { display: none; }
	.toc__list { display: block; }
	.art-prose { font-size: 16px; }
	/* Таблица в три колонки шире экрана: длинные слова в ячейках переносятся по слогам. */
	.art-prose th, .art-prose td { hyphens: auto; }
	.art-note { padding: var(--card-pad-lg); }
	.art-note.has-msg { grid-template-columns: 1fr; gap: 20px; }
	.art-note__msg { justify-self: start; align-items: flex-start; text-align: left; }
	.art-note__msg .msg__row { justify-content: flex-start; }
	.msg--lg .msg__btn { width: 56px; height: 56px; }
	.art-cta { grid-template-columns: 1fr; }
	.art-cta .btn { justify-self: stretch; }
	/* Сцена на телефоне: подписи столбиком, пункты в одну колонку. */
	/* Сцена крупнее: выходит за поля карточки, иначе изометрия на телефоне мельчает. */
	.bscene { padding: var(--card-pad); }
	.bscene__canvas { margin-inline: calc(-1 * var(--card-pad)); width: calc(100% + var(--card-pad) * 2); }
	.bscene__track { height: 250vh; }
	.bscene__lead { font-size: 16px; }
	.bscene__points { grid-template-columns: 1fr; gap: 20px; }
	.notice, .notice.has-media { grid-template-columns: 1fr; gap: 0; padding: var(--card-pad-lg); min-height: 0; }
	.notice.has-media { padding: var(--card-pad-sm) var(--card-pad-lg) var(--card-pad-lg); }
	.notice.has-media .notice__body { padding: 20px 0 0; }
	.notice__title { font-size: 26px; }
	.notice__text { font-size: 16px; margin-bottom: 20px; }
	.notice__btn { align-self: stretch; }
	.notice__media { position: relative; align-self: auto; height: auto; aspect-ratio: 4 / 3; }
	/* Свободное размещение на телефоне — свои координаты и размер. */
	.gcard--free .gcard__free img {
		left: calc(var(--mx, 75) * 1%); top: calc(var(--my, 30) * 1%);
		width: calc(var(--msz, 60) * 1%); transform: translate(-50%, -50%) rotate(var(--mrot, 0deg));
	}
	.gcard--free .gcard__body { min-height: 320px; }
	/* «Фон» на телефоне — плитка 4:3, как остальные карточки. */
	.gcard--fill { aspect-ratio: 4 / 3; }
	.gcard--fill .gcard__body { min-height: 0; }
	.lightbox__close, .lightbox__nav { width: 40px; height: 40px; font-size: 26px; }
	.lightbox__close { top: 12px; right: 12px; }
	.lightbox__nav--prev { left: 8px; }
	.lightbox__nav--next { right: 8px; }
	/* Стандартное размещение на телефоне: плашка в левом верхнем углу, картинка в
	   правом, заголовок ровно на --card-pad ниже картинки. Высота картинки = её ширина
	   (--asz % карточки) × пропорция файла (--iar); проценты в padding считаются от
	   ширины карточки, поэтому формула точная. «По центру» и «нижний угол» — только
	   на десктопе: на телефоне картинка всегда в верхнем углу. */
	.gcard--free.gcard--anchor .gcard__free img,
	.gcard--free.gcard--anchor-center .gcard__free img,
	.gcard--free.gcard--anchor-bottom .gcard__free img { top: var(--card-pad); bottom: auto; transform: none; }
	.gcard--anchor .gcard__body {
		min-height: 0;
		padding-top: max(calc(var(--card-pad) * 2 + var(--asz, 40) * var(--iar, 1) * 1%), calc(var(--card-pad) * 2 + 40px));
	}
	.gcard--anchor .gcard__tag { position: absolute; top: var(--card-pad); left: var(--card-pad); margin: 0; }
	.gcard--anchor .gcard__text { margin-top: 0; }
	/* Свободное размещение со своей картинкой для телефона: она — фон на всю ширину,
	   прижат к верху, низ обрезается краем карточки; карточка выше ширины — края по бокам.
	   Ползунки телефона не действуют. */
	.gcard--free.gcard--free-mob .gcard__free img {
		left: 0; top: 0; right: auto; bottom: auto; width: 100%; height: auto; min-height: 100%;
		object-fit: cover; object-position: center top; transform: none;
	}
	.gcard--free-mob.gcard--anchor .gcard__body { min-height: 320px; padding-top: calc(var(--card-pad) * 2 + 40px); }
	/* Первый экран услуги на телефоне — как у референса: объект без подложки
	   стоит справа от плашки и заголовка и выходит за край карточки; плашка
	   и заголовок уступают ему правые 40%. Текст доверия и кнопки — на всю ширину. */
	.svc-hero__card, .svc-hero__card.has-media { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: var(--card-pad-lg); overflow: hidden; }
	.svc-hero__title { font-size: 32px; }
	/* Колонка не шире карточки: длинный текст кнопки переносится, а не раздвигает сетку. */
	.svc-hero__actions .btn { white-space: normal; text-align: center; }
	.svc-hero__card.has-media .svc-hero__tag,
	.svc-hero__card.has-media .svc-hero__title { max-width: 60%; }
	.svc-hero__card.has-media .svc-hero__title { min-height: 200px; }
	.svc-hero__lead { padding: 20px; font-size: 16px; }
	.svc-hero__actions .btn { flex: 1; }
	.svc-hero__media {
		position: absolute; top: 20px; right: -6%; width: 50%; height: 300px;
		background: none; border-radius: 0; padding: 0; min-height: 0;
		display: flex; align-items: flex-start; justify-content: flex-end;
	}
	.svc-hero__media img { width: 100%; height: 100%; max-height: none; object-fit: contain; object-position: right top; }
	/* Фото на всю подложку на телефоне: текстовая колонка «растворяется» в сетке карточки
	   (display: contents), и фото встаёт между текстом доверия и кнопками — блоком 4:3
	   во всю ширину. Промежутки — те же, что у заголовка и текста доверия (их нижние
	   отступы), поэтому зазор сетки обнулён. */
	.svc-hero__card.has-photo { gap: 0; }
	.has-photo .svc-hero__text { display: contents; }
	.has-photo .svc-hero__tag { justify-self: start; }
	.svc-hero__card.has-photo .svc-hero__tag,
	.svc-hero__card.has-photo .svc-hero__title { max-width: none; }
	.svc-hero__card.has-photo .svc-hero__title { min-height: 0; }
	.has-photo .svc-hero__media {
		order: 1; position: relative; top: auto; right: auto; width: 100%; height: auto;
		aspect-ratio: 4 / 3; border-radius: var(--radius-sm); margin-bottom: 28px;
	}
	.has-photo .svc-hero__media img { position: absolute; inset: 0; object-fit: cover; object-position: center; }
	.has-photo .svc-hero__actions { order: 2; }
	/* Фото во всю карточку на телефоне: фон остаётся, градиент идёт сверху вниз
	   (под плашку и заголовок), текст во всю ширину. */
	/* Оформление «фото во всю карточку» на телефоне: фотография заполняет карточку,
	   весь текст лежит поверх неё без подложек — плашка, заголовок и текст доверия
	   идут по небу в верхней части кадра. Между текстом и кнопками — резерв: в нём
	   остаётся открытой фигура из правой части кадра. Кнопки узкие, столбиком у
	   левого края, поэтому на объект не заходят. */
	.svc-hero__card.has-cover { min-height: 0; }
	.has-cover .svc-hero__text { max-width: none; }
	.has-cover .svc-hero__bg img { object-position: right bottom; }
	.has-cover .svc-hero__actions { margin-top: 24vw; flex-direction: column; align-items: stretch; width: min(64%, 200px); }
	/* Кнопки поверх фото: поля поджаты, ширина по тексту — крупный размер на телефоне
	   читается как тяжёлый блок. «Стекло» второй кнопки: заливка цветом карточки на
	   45 %, размытие фона под ней, блик по верхнему краю — на светлой траве контурная
	   кнопка иначе теряется. */
	.has-cover .svc-hero__actions .btn {
		flex: none; width: 100%; padding: 14px 16px;
		font-size: 16px; line-height: 1.25; border-radius: 14px;
	}
	.has-cover .btn--outline {
		background: color-mix(in srgb, var(--card-color) 45%, transparent);
		-webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%);
		box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 25%, transparent),
			inset 0 1px 0 rgba(255,255,255,.35), 0 6px 20px rgba(0,0,0,.18);
	}
	.has-cover .btn--outline:hover { background: color-mix(in srgb, var(--card-color) 60%, transparent); }
	.svc-hero--wide .wrap { padding-inline: calc(var(--gap) / 3); }
	/* «Анимация» на телефоне — та же колонка, что на компьютере: белые заголовок и
	   текст доверия сверху, под ними участок (своя картинка, если задана, — её
	   пропорция --ratio-phone), под участком кнопки столбиком во всю колонку сайта.
	   Экран — во всю высоту под шапкой (72px) по малой высоте окна (svh): адресная
	   строка не обрезает кнопки. Участок растёт, пока хватает ширины и высоты за
	   вычетом кнопок (--phone-actions: отступ, две кнопки по 52px и зазор). Путь
	   короче, как у блока «Сцена». */
	.svc-hero--scene { --scene-path: 150vh; --phone-actions: calc(var(--gap) / 2 * 2 + 52px * 2); }
	.svc-hero__stage { height: calc(100svh - 72px); }
	.svc-hero--scene .svc-hero__lead { max-width: none; }
	.svc-hero__plot-in {
		--plot-h: min(100cqw / (var(--ratio-phone)), 100cqh - var(--phone-actions));
		width: calc(var(--plot-h) * (var(--ratio-phone))); margin: 0 auto;
	}
	.svc-hero__plot-in:has(.bscene__canvas--phone) > .bscene__canvas:not(.bscene__canvas--phone) { display: none; }
	.bscene__canvas--phone { display: block; }
	.svc-hero--scene .svc-hero__actions {
		top: calc(100% + var(--gap) / 2); left: calc((100% - 100cqw) / 2 + 24px); right: calc((100% - 100cqw) / 2 + 24px);
		flex-direction: column; gap: calc(var(--gap) / 2);
	}
	.svc-hero--scene .svc-hero__actions .btn { flex: none; width: 100%; padding-block: 15px; }
	/* Карточка группы на телефоне. С картинкой — как up-advert: заголовок,
	   подзаголовок, картинка, плашки; список прячется, его роль берёт картинка.
	   Без картинки — как КОР: список остаётся, но не длиннее трёх пунктов. */
	.card--group.has-image .card__list { display: none; }
	/* Фон по правилу безопасной зоны: объект в правой трети и внизу — список
	   из трёх пунктов помещается над ним, строки не доходят до правой трети. */
	.card--group.has-cover .card__list { padding-right: 10%; }
	.card--group.has-cover .card__subtitle { padding-right: 20%; }
	.card--group .card__subtitle { margin-bottom: 20px; }
	/* Объект справа на телефоне остаётся справа: заголовок на всю ширину,
	   подзаголовок и плашки — в левых 60%, объект — в зоне 40% от уровня
	   подзаголовка до низа. Список скрыт: под него места нет. */
	.card--group.has-image, .span-1.card--group.has-image { padding-right: var(--card-pad); }
	.card--group.has-image .card__subtitle,
	.card--group.has-image .pills { padding-right: 40%; }
	.card--group.has-image .card__figure {
		position: absolute; left: 60%; top: 22%; bottom: 12px; min-width: 40%;
		margin: 0; display: flex; align-items: flex-end; justify-content: flex-end;
	}
	.card--group.has-image .card__figure img { height: 100%; width: auto; max-width: none; }
	/* Угол на телефоне: та же зона 40% справа, лишнее уходит за край. */
	.card--group.has-corner .card__figure { left: 60%; min-width: 40%; }
	.card__title { font-size: 24px; }
	.card__big { font-size: 36px; }
	.site-header__in { min-height: 72px; gap: 12px; }
	.site-header__phone { display: none; }
	.btn.site-header__call { display: inline-flex; margin-left: auto; padding-inline: 14px; }
	.logo--img img { height: 34px; }
	.form__row { grid-template-columns: 1fr; }
	.thanks__title { font-size: 30px; }
	.thanks__actions { align-self: stretch; }
	.thanks__actions .btn { flex: 1; }
	.site-footer__in { flex-direction: column; align-items: flex-start; }
}
