/* Ровно — стили темы.
   Порядок: токены → база → общие элементы → шапка и подвал → блоки главной → страницы. */

/* ---------- Токены ---------- */
:root {
	--bg: #F6F7F5;
	--surface: #FFFFFF;
	--ink: #17201C;
	--muted: #5E6A64;
	--line: #DDE2DE;
	--line-strong: #B9C2BD;
	--accent: #1E5B47;
	--accent-hover: #164536;
	--accent-soft: #E3EEE9;
	--tape: #E9C46A;
	--danger: #A3361F;

	--font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

	--fs-small: 0.875rem;
	--fs-body: 1.0625rem;
	--fs-lead: 1.25rem;
	--fs-h3: 1.3125rem;
	--fs-h2: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
	--fs-h1: clamp(2.375rem, 1.3rem + 3.9vw, 4.25rem);

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(64px, 8vw, 120px);
	--r-card: 8px;
	--r-btn: 6px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 var(--fs-body)/1.55 var(--font);
	font-feature-settings: "tnum" 0;
	-webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--tape); color: var(--ink); }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--r-btn); }
.skip-link:focus { top: 8px; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }
.num { font-family: var(--mono); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.muted { color: var(--muted); }

/* Маркер «скотч» под ключевой цифрой */
.tape {
	background: linear-gradient(transparent 62%, var(--tape) 62%, var(--tape) 92%, transparent 92%);
	padding: 0 2px;
}

/* ---------- Кнопки и поля ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px;
	border: 1px solid var(--accent); border-radius: var(--r-btn);
	background: var(--accent); color: #fff;
	font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer;
	transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: var(--fs-small); font-weight: 500; }
.input, .select, .textarea {
	width: 100%; min-height: 48px; padding: 12px 14px;
	border: 1px solid var(--line-strong); border-radius: var(--r-btn);
	background: var(--surface); color: var(--ink); font: inherit;
	transition: border-color .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error .input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--fs-small); }
.field-error:empty { display: none; }

/* Переключатель из кнопок-радио (тариф, фильтры) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 8px; font-size: var(--fs-small); font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label, .chip {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--line-strong); border-radius: var(--r-btn);
	background: var(--surface); color: var(--ink); font-size: .9375rem; cursor: pointer;
	text-decoration: none; transition: border-color .15s, background-color .15s, color .15s;
}
.seg label:hover, .chip:hover { border-color: var(--ink); color: var(--ink); }
.seg input:checked + label, .chip[aria-current="true"], .chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 32px; cursor: pointer; }

/* ---------- Шапка ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: saturate(1.2) blur(8px);
	border-bottom: 1px solid var(--line);
}
.site-header__in { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.03em; }
.logo:hover { color: var(--ink); }
.logo svg { width: 34px; height: 14px; flex: none; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; border-radius: var(--r-btn); font-size: .9688rem; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav .current-menu-item > a, .nav .current_page_item > a, .nav a[aria-current="page"] { color: var(--accent); }
.header-phone { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 1040px) {
	.site-header__in { gap: 12px; min-height: 64px; }
	.header-phone { display: none; }
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
		width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r-btn);
		background: var(--surface); color: var(--ink); cursor: pointer;
	}
	.site-header__in > .btn { display: none; }
	.nav {
		position: fixed; inset: 64px 0 auto 0; margin: 0; padding: 8px var(--gutter) 24px;
		background: var(--bg); border-bottom: 1px solid var(--line);
		display: none;
	}
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; }
	.nav a { padding: 14px 0; font-size: 1.125rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.nav__extra { display: grid; gap: 12px; margin-top: 16px; }
}
@media (min-width: 1041px) { .nav__extra { display: none; } }
.nav__extra .header-phone { display: block; font-size: 1.25rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero h1 { max-width: 12ch; }
.hero__lead { margin-top: 24px; max-width: 34em; font-size: var(--fs-lead); color: var(--muted); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 48px 0 0; padding: 0; }
.stats > div { padding: 0 28px; border-left: 1px solid var(--line-strong); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }
.stats dd { margin: 0; font-family: var(--mono); font-size: 1.625rem; font-weight: 500; letter-spacing: -0.03em; }
.stats > div { display: flex; flex-direction: column; }
.stats dd { order: -1; }

/* Калькулятор-чертёж */
.plan-calc {
	position: relative;
	background-color: var(--surface);
	background-image:
		linear-gradient(var(--grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
		linear-gradient(var(--grid-minor) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
	background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
	--grid-major: rgba(30, 91, 71, .09);
	--grid-minor: rgba(30, 91, 71, .035);
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	padding: 24px;
}
.plan-calc__title { font-size: 1.0625rem; font-weight: 600; }
.plan { margin: 12px 0 8px; aspect-ratio: 4 / 3; }
.plan-calc .plan { aspect-ratio: 16 / 10; margin: 4px -8px 4px; }
.plan svg { width: 100%; height: 100%; overflow: visible; }
.plan .wall { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: miter; }
.plan .part { stroke: var(--ink); stroke-width: 2.5; }
.plan .room-fill { fill: rgba(30, 91, 71, .05); }
.plan .dim { stroke: var(--accent); stroke-width: 1; }
.plan .dim-ext { stroke: var(--accent); stroke-width: .75; stroke-dasharray: 2 3; }
.plan .dim-label { fill: var(--accent); font: 500 13px var(--mono); }
.plan .area-label { fill: var(--ink); font: 500 30px var(--mono); letter-spacing: -1px; }
.plan .rect-anim { transition: all .35s var(--ease); }
.plan-calc__controls { display: grid; gap: 18px; }
.area-row { display: grid; grid-template-columns: 1fr 112px; gap: 16px; align-items: center; }
.area-input { position: relative; }
.area-input .input { padding-right: 40px; font-family: var(--mono); text-align: right; }
.area-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); font-size: .9375rem; pointer-events: none; }
.plan-calc__result {
	display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px;
	margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
.plan-calc__sum { font-family: var(--mono); font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.125rem); font-weight: 500; letter-spacing: -0.04em; }
.plan-calc__days { color: var(--muted); }
.plan-calc__note { width: 100%; color: var(--muted); font-size: var(--fs-small); }
.plan-calc .btn { margin-top: 18px; }

/* ---------- Заголовок секции ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { max-width: 36em; margin-top: 14px; color: var(--muted); font-size: 1.125rem; }
.section-head .link-more { white-space: nowrap; font-weight: 500; }

/* ---------- Тарифы ---------- */
.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.tariffs { grid-template-rows: repeat(6, auto); }
.tariff { position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; padding: 36px 32px 36px; border-right: 1px solid var(--line); }
.tariff:first-child { padding-left: 0; }
.tariff:last-child { border-right: 0; padding-right: 0; }
.tariff--featured::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 4px; background: var(--accent); }
.tariff:first-child.tariff--featured::before { left: 0; }
.tariff__badge { position: absolute; top: -14px; left: 32px; padding: 4px 10px; border-radius: 4px; background: var(--accent); color: #fff; font-size: var(--fs-small); font-weight: 500; }
.tariff h3 a { color: inherit; text-decoration: none; }
.tariff h3 a:hover { color: var(--accent); }
.tariff__desc { margin-top: 10px; color: var(--muted); }
.tariff__price { margin-top: 24px; font-size: 1.75rem; }
.tariff__price small { font-size: 1rem; color: var(--muted); font-family: var(--font); letter-spacing: 0; }
.tariff__days { margin-top: 4px; color: var(--muted); }
.ticks { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tariff .btn { align-self: end; justify-self: start; }
.tariff:first-child .tariff__badge { left: 0; }

/* ---------- Карточка объекта ---------- */
.objects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.object-card__link { display: block; color: inherit; text-decoration: none; }
.object-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.object-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.object-card__media .plan { margin: 0; height: 100%; aspect-ratio: auto; padding: 18px; }
.object-card__link:hover .object-card__media img { transform: scale(1.03); }
.object-card__tag { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: .8125rem; font-weight: 500; }
.object-card__title { margin-top: 16px; font-size: 1.1875rem; transition: color .15s; }
.object-card__link:hover .object-card__title { color: var(--accent); }
.object-card__facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 8px 0 0; }
.object-card__facts div { display: flex; gap: 6px; align-items: baseline; }
.object-card__facts dt { color: var(--muted); font-size: var(--fs-small); }
.object-card__facts dd { margin: 0; font-family: var(--mono); font-size: .9375rem; }

/* ---------- Этапы (тёмная секция) ---------- */
.steps-section { background: var(--ink); color: #E8ECE9; }
.steps-section h2 { color: #fff; }
.steps-section .section-head p { color: #A9B4AE; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: step; border-top: 1px solid #38443F; }
.step { position: relative; padding: 28px 28px 36px 0; border-bottom: 1px solid #38443F; counter-increment: step; }
.step:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid #38443F; }
.step::before { content: counter(step); display: block; margin-bottom: 18px; font: 500 .9375rem var(--mono); color: var(--tape); }
.step h3 { color: #fff; font-size: 1.1875rem; }
.step p { margin-top: 10px; color: #A9B4AE; }
.step__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; font-size: var(--fs-small); color: #CFD7D3; }
.step__meta .num { color: #fff; }

/* ---------- Гарантии ---------- */
.guarantees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.guarantee { padding: 28px 28px 0 0; }
.guarantee + .guarantee { padding-left: 28px; border-left: 1px solid var(--line); }
.guarantee svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 16px; }
.guarantee h3 { font-size: 1.125rem; }
.guarantee p { margin-top: 8px; color: var(--muted); }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.review { display: flex; flex-direction: column; margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.review__stars { display: flex; gap: 2px; color: var(--accent); }
.review__stars svg { width: 16px; height: 16px; }
.review__stars .off { color: var(--line-strong); }
.review blockquote { margin: 16px 0 0; font-size: 1.0625rem; }
.review figcaption { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--fs-small); }
.review figcaption b { font-weight: 600; }
.review figcaption a { color: var(--muted); }
.review figcaption a:hover { color: var(--accent); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
	display: flex; justify-content: space-between; align-items: center; gap: 24px;
	min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none; font-size: 1.125rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 0 22px; max-width: 42em; color: var(--muted); }

/* ---------- Заявка ---------- */
.lead { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.lead__contacts { margin-top: 32px; display: grid; gap: 14px; }
.lead__contacts a { color: var(--ink); font-size: 1.25rem; font-weight: 500; text-decoration: none; }
.lead__contacts a:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .field--wide, .form .seg, .form .form__foot { grid-column: 1 / -1; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__demo { flex: 1 1 260px; color: var(--muted); font-size: var(--fs-small); }
.form__status { grid-column: 1 / -1; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--danger); }
.form-done { display: none; padding: 32px; border: 1px solid var(--accent); border-radius: var(--r-card); background: var(--accent-soft); }
.form-done h3 { display: flex; align-items: center; gap: 12px; }
.form-done svg { width: 28px; height: 28px; color: var(--accent); }
.form-done p { margin-top: 10px; }
.is-sent .form { display: none; }
.is-sent .form-done { display: block; }

/* ---------- Подвал ---------- */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--line); font-size: .9375rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__muted { color: var(--muted); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }
.credit { display: inline-flex; align-items: center; gap: 8px; color: var(--muted) !important; }
.credit:hover { color: var(--accent) !important; }
.credit-mark { display: block; width: 18px; height: 18px; flex: none; color: var(--accent); --ob-cut: var(--bg); }
.credit-mark svg { width: 100%; height: 100%; animation: ouro-turn 24s linear infinite; }
@keyframes ouro-turn { to { transform: rotate(-360deg); } }

/* ---------- Внутренние страницы ---------- */
.page-head { padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.25rem); max-width: 22ch; }
.page-head p { margin-top: 16px; max-width: 40em; color: var(--muted); font-size: 1.125rem; }
.crumbs { margin-bottom: 20px; font-size: var(--fs-small); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.prose { max-width: 42em; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }

/* Фильтр объектов */
.filters { display: grid; gap: 20px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: end; }
.filters__area { display: flex; gap: 8px; align-items: center; }
.filters__area .input { width: 104px; font-family: var(--mono); }
.filters__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.filters__count { font-weight: 500; }
.filters__reset { background: none; border: 0; padding: 10px 0; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
[data-objects] { transition: opacity .2s; }
[data-objects].is-loading { opacity: .45; }
.empty { grid-column: 1 / -1; padding: 56px 0; text-align: left; }
.empty h2 { font-size: 1.5rem; }
.empty p { margin-top: 8px; color: var(--muted); }
.empty .btn { margin-top: 20px; }

/* Страница объекта */
.object-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 40px; align-items: start; }
.ba { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); --pos: 50%; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba__handle::after {
	content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
	border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(23, 32, 28, .25);
	background-image: linear-gradient(90deg, transparent 15px, var(--ink) 15px, var(--ink) 17px, transparent 17px, transparent 27px, var(--ink) 27px, var(--ink) 29px, transparent 29px);
	background-size: 44px 14px; background-position: center; background-repeat: no-repeat;
}
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba__range:focus-visible ~ .ba__handle::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.ba__label { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 4px; background: rgba(23, 32, 28, .78); color: #fff; font-size: .8125rem; pointer-events: none; }
.ba__label--before { left: 12px; }
.ba__label--after { right: 12px; }
.ba--plan { display: grid; place-items: center; padding: 24px; }
.ba--plan .plan { width: min(100%, 560px); margin: 0; }

.params { margin: 0; border-top: 1px solid var(--ink); }
.params div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.params dt { color: var(--muted); }
.params dd { margin: 0; text-align: right; }
.object-aside .btn { margin-top: 24px; }

.object-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; }
.object-body h2 { font-size: 1.5rem; margin-bottom: 14px; }
.estimate { width: 100%; border-collapse: collapse; font-size: 1rem; }
.estimate th, .estimate td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.estimate td { text-align: right; font-family: var(--mono); white-space: nowrap; }
.estimate tfoot th, .estimate tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 600; padding-top: 16px; }
.estimate tfoot td { font-size: 1.25rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-card); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Услуга */
.service-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 56px; align-items: start; }

/* Полный калькулятор */
.calc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.calc__form { display: grid; gap: 32px; }
.calc__group { display: grid; gap: 14px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.calc__group > .label, .calc__group legend { font-weight: 600; font-size: 1.0625rem; }
.counter { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: var(--surface); }
.counter button { width: 48px; height: 48px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink); }
.counter button:hover { color: var(--accent); }
.counter output { min-width: 40px; text-align: center; font-family: var(--mono); }
.counters { display: flex; flex-wrap: wrap; gap: 24px 40px; }
.counters .field { gap: 8px; }
.check { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.check small { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: 2px; }
.check .num { color: var(--muted); font-size: .9375rem; }
.summary { position: sticky; top: 96px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.summary h2 { font-size: 1.25rem; }
.summary .estimate { margin-top: 16px; }
.summary .estimate td, .summary .estimate th { padding: 10px 0; }
.summary__days { margin-top: 12px; color: var(--muted); }
.summary .btn { margin-top: 20px; }
.summary__note { margin-top: 14px; font-size: var(--fs-small); color: var(--muted); }

/* Контакты */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.contacts > div { padding: 24px 24px 24px 0; }
.contacts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.contacts dt { color: var(--muted); font-size: var(--fs-small); }
.contacts dd { margin: 6px 0 0; font-size: 1.25rem; font-weight: 500; }
.contacts dd a { color: var(--ink); text-decoration: none; }
.contacts dd a:hover { color: var(--accent); }
.map-link { display: block; margin-top: 40px; aspect-ratio: 21 / 8; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

/* 404 */
.notfound { padding: var(--section) 0; }
.notfound .num { font-size: clamp(4rem, 10vw, 8rem); color: var(--accent); line-height: 1; }
.notfound h1 { margin-top: 16px; font-size: var(--fs-h2); }
.notfound p { margin-top: 12px; color: var(--muted); }
.notfound .hero__actions { margin-top: 28px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1040px) {
	.hero__grid, .lead__grid, .faq-grid, .object-hero, .service-grid, .calc { grid-template-columns: 1fr; }
	.objects-grid, .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.guarantees { grid-template-columns: repeat(2, 1fr); }
	.guarantee:nth-child(3) { padding-left: 0; border-left: 0; }
	.guarantee { padding-bottom: 28px; }
	.steps { grid-template-columns: repeat(2, 1fr); }
	.step:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
	.step:nth-child(even) { padding-left: 28px; border-left: 1px solid #38443F; }
	.summary { position: static; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	body { font-size: 1rem; }
	.tariffs { grid-template-columns: 1fr; }
	.tariffs { grid-template-rows: none; }
	.tariff, .tariff:first-child, .tariff:last-child { display: flex; flex-direction: column; padding: 36px 0 32px; border-right: 0; border-bottom: 1px solid var(--line); }
	.tariff__badge { left: 0; }
	.objects-grid, .reviews, .object-body, .contacts { grid-template-columns: 1fr; }
	.contacts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
	.steps { grid-template-columns: 1fr; }
	.step:nth-child(even) { padding-left: 0; border-left: 0; }
	.guarantees { grid-template-columns: 1fr; }
	.guarantee + .guarantee { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
	.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.stats > div { padding: 0 12px; }
	.stats dd { font-size: 1.25rem; }
	.form { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: repeat(2, 1fr); }
	.plan-calc { padding: 18px; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.ba { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}
[id] { scroll-margin-top: 88px; }

/* ---------- Мелкие утилиты ---------- */
.section--flush { padding-top: 0; }
.h-sub { font-size: 1.5rem; margin-bottom: 20px; }
.mt-section { margin-top: 40px; }
.narrow { max-width: 720px; }
.faq-note { margin-top: 14px; }
.lead__text { margin-top: 14px; font-size: 1.125rem; max-width: 30em; color: var(--muted); }
.site-footer__about { margin-top: 12px; max-width: 28em; }
.calc__fieldset { border: 0; margin: 0; padding: 0 0 32px; min-width: 0; }
.calc__fieldset legend { padding: 0; margin-bottom: 4px; }
.seg.calc__group legend { font-weight: 600; font-size: 1.0625rem; }
.page-body { padding-bottom: var(--section); }
.calc__form .seg.calc__group { display: flex; flex-wrap: wrap; gap: 8px; }
.calc__form .seg.calc__group legend { width: 100%; margin-bottom: 6px; }

/* ---------- Анимации ----------
   Одна заметная сцена — прорисовка чертежа в hero при загрузке. Остальное отвечает на действия:
   ползунок, фильтр, раскрытие вопросов, отправка формы. При «уменьшить движение» всё отключено. */
.btn:active { transform: translateY(1px); }
.plan .wall, .plan .part { transition: stroke .2s ease; }
.object-card__link:hover .plan .wall, .object-card__link:hover .plan .part { stroke: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
	/* Чертёж «рисуется»: стены → перегородки → размеры → подписи */
	.plan--intro .wall, .plan--intro .part, .plan--intro .dim {
		stroke-dasharray: 1; stroke-dashoffset: 1;
		animation: rv-draw .9s cubic-bezier(.65, 0, .35, 1) forwards;
	}
	.plan--intro .wall { animation-duration: 1.1s; animation-delay: .15s; }
	.plan--intro .part { animation-duration: .5s; animation-delay: .9s; }
	.plan--intro .dim { animation-duration: .45s; animation-delay: 1.25s; }
	.plan--intro .room-fill { opacity: 0; animation: rv-fade .6s ease .9s forwards; }
	.plan--intro .dim-ext, .plan--intro .dim-label { opacity: 0; animation: rv-fade .4s ease 1.45s forwards; }
	.plan--intro .area-label { opacity: 0; animation: rv-fade .5s ease 1.1s forwards; }

	/* «Скотч» приклеивается под цену слева направо */
	.js .tape { background-size: 0% 100%; background-repeat: no-repeat; background-position: 0 0; transition: background-size .7s var(--ease) .2s; }
	.js .tape.is-in { background-size: 100% 100%; }

	/* Этапы отмечаются по порядку: номер загорается, по верхней линии бежит полоса */
	.step:nth-child(1) { --n: 0; } .step:nth-child(2) { --n: 1; } .step:nth-child(3) { --n: 2; }
	.step:nth-child(4) { --n: 3; } .step:nth-child(5) { --n: 4; } .step:nth-child(6) { --n: 5; }
	.step::after {
		content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
		background: var(--tape); transform: scaleX(0); transform-origin: left;
	}
	.js .step::before { color: #6B7872; }
	.js .steps .step::before { transition: color .3s ease calc(var(--n) * 140ms + .25s); }
	.js .steps .step::after { transition: transform .5s var(--ease) calc(var(--n) * 140ms); }
	.js .steps.is-in .step::before { color: var(--tape); }
	.js .steps.is-in .step::after { transform: scaleX(1); }

	/* Новые карточки после фильтра */
	.object-card.is-new { animation: rv-rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

	/* Вопросы раскрываются плавно (браузеры с ::details-content; остальные — как раньше) */
	:root { interpolate-size: allow-keywords; }
	.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
	.faq details[open]::details-content { block-size: auto; }

	/* «Заявка принята»: блок поднимается, галочка дорисовывается */
	.is-sent .form-done { animation: rv-rise .4s var(--ease) both; }
	.is-sent .form-done svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: rv-dash .45s ease .3s forwards; }
	.is-sent .form-done svg circle { stroke-dasharray: 60; stroke-dashoffset: 60; animation: rv-dash .5s ease forwards; }

	/* Мобильное меню выезжает */
	.nav.is-open { animation: rv-drop .25s var(--ease) both; }
}

@keyframes rv-draw { to { stroke-dashoffset: 0; } }
@keyframes rv-dash { to { stroke-dashoffset: 0; } }
@keyframes rv-fade { to { opacity: 1; } }
@keyframes rv-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes rv-drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Услуги: выбор, сравнение, цены ---------- */
.choose { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.choose__item { display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 32px; border-right: 1px solid var(--line); }
.choose__item:first-child { padding-left: 0; }
.choose__item:last-child { padding-right: 0; border-right: 0; }
.choose__item h2 { font-size: 1.375rem; }
.choose__item h2 a { color: inherit; text-decoration: none; }
.choose__item h2 a:hover { color: var(--accent); }
.choose__for { color: var(--muted); }
.choose__facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: auto 0 0; padding-top: 8px; }
.choose__facts div { display: grid; gap: 2px; }
.choose__facts dt { color: var(--muted); font-size: var(--fs-small); }
.choose__facts dd { margin: 0; font-size: 1.0625rem; }
.choose .link-more { font-weight: 500; }
.service-for { font-size: 1.125rem; max-width: 34em; }

.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--ink); contain: paint; } /* paint: закреплённые ячейки не расширяют страницу */
.compare-scroll:focus-visible { outline-offset: 4px; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.compare thead th { font-weight: 600; font-size: .9375rem; }
.compare th[scope="row"], .compare thead th:first-child { text-align: left; font-weight: 400; padding-left: 0; width: 40%; }
.compare th[scope="row"] small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.compare tbody tr:hover { background: var(--surface); }
.compare__mark { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; }
.compare__mark--yes { background: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.compare__mark--part { border: 2px solid var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.compare__mark--no { width: 14px; height: 2px; border-radius: 1px; background: var(--line-strong); }
.compare__label { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.compare__label:empty { display: none; }
.compare--prices td a { display: inline-grid; gap: 2px; padding: 6px 10px; border-radius: var(--r-btn); color: var(--ink); text-decoration: none; }
.compare--prices td a:hover { background: var(--accent-soft); color: var(--accent); }
.compare--prices td small { color: var(--muted); font-size: var(--fs-small); }
.compare--prices th[scope="row"] .num { margin-left: 6px; font-size: .9375rem; }

@media (max-width: 760px) {
	.choose { grid-template-columns: 1fr; }
	.choose__item, .choose__item:first-child, .choose__item:last-child { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
	.compare th[scope="row"] { position: sticky; left: 0; background: var(--bg); z-index: 1; width: auto; min-width: 170px; }
}

/* ---------- Карусель отзывов ---------- */
.carousel { --per: 3; --gap: 28px; --autoplay: 6s; }
.carousel__track {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding: 2px; margin: -2px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { scroll-snap-align: start; display: flex; transition: transform .45s var(--ease); }
.carousel__slide .review { width: 100%; }
.js .carousel__slide:not(.is-visible) { transform: scale(.96); }
.carousel__bar { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.carousel__progress { flex: 1; height: 2px; background: var(--line); overflow: hidden; }
.carousel__progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.carousel.is-playing .carousel__progress span { animation: rv-progress var(--autoplay) linear forwards; }
.carousel.is-held .carousel__progress span { animation-play-state: paused; }
.carousel__count { font-family: var(--mono); font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.carousel__buttons { display: flex; gap: 8px; }
.carousel__btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s;
}
.carousel__btn:hover { border-color: var(--ink); }
.carousel__btn:active { transform: scale(.94); }
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__btn .i-play, .carousel__btn[aria-pressed="true"] .i-pause { display: none; }
.carousel__btn[aria-pressed="true"] .i-play { display: block; }
.carousel__btn[disabled] { opacity: .4; cursor: default; }
@keyframes rv-progress { to { transform: scaleX(1); } }

@media (max-width: 1040px) { .carousel { --per: 2; } }
@media (max-width: 760px) { .carousel { --per: 1.15; --gap: 16px; } .carousel__progress { display: none; } .carousel__bar { justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }
