/*
Theme Name: ТатВыкупАвто
Description: Тема сайта выкупа автомобилей в Казани. Блоки главной редактируются через поля ACF, контакты и цвета — в Настройщике.
Version: 2.18.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tatvykup
*/

/* ---------- Шрифты (лежат в теме, без обращения к внешним серверам) ---------- */

@font-face {
	font-family: "Golos Text";
	src: url("assets/fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
	font-weight: 400 900;
	font-display: swap;
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Golos Text";
	src: url("assets/fonts/golos-text-latin-wght-normal.woff2") format("woff2");
	font-weight: 400 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Onest";
	src: url("assets/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "Onest";
	src: url("assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Переменные ---------- */
/* Цвета логотипа: зелёный «ТАТ» (--primary) и оранжевый «ВЫКУПАВТО» (--accent).
   Они и тёмно-зелёный (--deep) приходят из Настройщика и перекрывают значения ниже. */

:root {
	--primary: #0e9f24;
	--on-primary: #ffffff;
	--accent: #e9591f;
	--on-accent: #ffffff;
	--deep: #0b3a1c;

	--primary-ink: color-mix(in srgb, var(--primary) 78%, black);
	--tint: color-mix(in srgb, var(--primary) 9%, white);
	--tint-line: color-mix(in srgb, var(--primary) 26%, white);
	--accent-light: color-mix(in srgb, var(--accent) 62%, #ffe2a0);

	--ink: #14201a;
	--muted: #5d6a62;
	--page: #f2f5f1;
	--white: #ffffff;
	--surface: #ffffff;
	--line: #dfe6e0;
	--error: #c5311c;

	--font-display: "Onest", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--gutter: clamp(14px, 3.4vw, 48px);
	--section-y: clamp(56px, 8vw, 112px);
	--r-panel: clamp(22px, 2.6vw, 34px);
	--header-space: 104px;
}

/* ---------- Основа ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
	margin: 0;
}

ul,
ol {
	padding: 0;
	list-style: none;
}

a {
	color: var(--primary-ink);
	text-underline-offset: 0.18em;
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

[id] {
	scroll-margin-top: var(--header-space);
}

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

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--white);
	border-radius: 10px;
}

.skip-link:focus {
	top: 12px;
}

.accent {
	color: var(--primary-ink);
}

.section-title {
	max-width: 16em;
	font-family: var(--font-display);
	font-size: clamp(1.875rem, 3.5vw, 3rem);
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.section-title--light {
	color: var(--white);
}

.section-lead {
	max-width: 30em;
	margin-top: 16px;
	font-size: 1.125rem;
	line-height: 1.45;
	color: var(--muted);
}

/* ---------- Кнопки ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 14px 30px;
	border: 0;
	border-radius: 14px;
	font: inherit;
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn svg {
	flex: none;
	width: 20px;
	height: 20px;
}

.btn--accent {
	background: var(--accent);
	color: var(--on-accent);
	box-shadow: 0 10px 22px -12px var(--accent);
}

.btn--accent:hover {
	filter: brightness(1.07);
}

.btn--outline {
	background: var(--surface);
	color: var(--ink);
	box-shadow: inset 0 0 0 1.5px var(--line);
	font-variant-numeric: tabular-nums;
}

.btn--outline:hover {
	box-shadow: inset 0 0 0 1.5px var(--primary);
}

.btn--outline svg {
	color: var(--primary);
}

.btn--small {
	min-height: 48px;
	padding: 10px 22px;
	font-size: 0.9375rem;
}

.btn[disabled] {
	opacity: 0.6;
	cursor: progress;
}

/* ---------- Шапка ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-block: 10px;
	pointer-events: none;
	transition: transform 0.4s cubic-bezier(0.22, 0.7, 0.2, 1);
}

/* При прокрутке вниз шапка уезжает за край экрана, при прокрутке вверх — плавно возвращается. */
.site-header.is-hidden {
	transform: translateY(-115%);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: clamp(14px, 1.8vw, 26px);
	min-height: 72px;
	padding: 10px 12px 10px 20px;
	background: var(--surface);
	border-radius: 22px;
	box-shadow: 0 1px 0 var(--line);
	pointer-events: auto;
	transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled .site-header__bar,
.site-header.is-open .site-header__bar {
	box-shadow: 0 16px 36px -22px rgba(11, 58, 28, 0.45), 0 0 0 1px var(--line);
}

.site-header__brand {
	flex: none;
	display: flex;
	align-items: center;
}

.logo-link {
	display: block;
	text-decoration: none;
}

.site-header__brand img {
	display: block;
	width: auto;
	height: 32px;
	max-width: none;
}

.wordmark {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 750;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ink);
}

.site-nav {
	flex: 1;
	min-width: 0;
}

.site-nav .menu {
	display: flex;
	flex-wrap: nowrap;
	column-gap: 24px;
	white-space: nowrap;
}

.site-nav .menu-item {
	position: relative;
}

.site-nav a {
	display: block;
	padding: 10px 0;
	color: var(--ink);
	font-size: 0.9063rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.15s ease;
}

.site-nav a:hover {
	color: var(--accent);
}

.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current-menu-parent > a,
.site-nav .current-page-ancestor > a {
	color: var(--accent);
}

.site-nav .sub-menu {
	position: absolute;
	left: -18px;
	top: 100%;
	z-index: 5;
	display: none;
	min-width: 270px;
	padding: 10px 18px;
	background: var(--surface);
	border-radius: 16px;
	box-shadow: 0 18px 40px -20px rgba(11, 58, 28, 0.45), 0 0 0 1px var(--line);
}

.site-nav .menu-item:hover > .sub-menu,
.site-nav .menu-item:focus-within > .sub-menu {
	display: block;
}

.site-header__contact {
	flex: none;
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.4vw, 20px);
	margin-left: auto;
}

.site-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
}

.site-header__phone-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	background: var(--tint);
	color: var(--primary-ink);
	border-radius: 50%;
}

.site-header__phone-icon svg {
	width: 18px;
	height: 18px;
}

.site-header__phone-text {
	display: grid;
	line-height: 1.2;
}

.site-header__number {
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.site-header__hours {
	font-size: 0.75rem;
	color: var(--muted);
	white-space: nowrap;
}

.burger {
	flex: none;
	display: none;
	width: 48px;
	height: 48px;
	padding: 0;
	background: var(--page);
	border: 0;
	border-radius: 14px;
	cursor: pointer;
}

.burger__lines,
.burger__lines::before,
.burger__lines::after {
	display: block;
	width: 20px;
	height: 2px;
	margin-inline: auto;
	background: var(--ink);
	border-radius: 2px;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.burger__lines {
	position: relative;
}

.burger__lines::before,
.burger__lines::after {
	content: "";
	position: absolute;
	left: 0;
}

.burger__lines::before {
	top: -6px;
}

.burger__lines::after {
	top: 6px;
}

.burger[aria-expanded="true"] .burger__lines {
	background: transparent;
}

.burger[aria-expanded="true"] .burger__lines::before {
	transform: translateY(6px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__lines::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* Ноутбуки (в том числе 14-дюймовые): шапка уплотняется по шагам, чтобы меню оставалось в одну строку. */
@media (max-width: 1479px) {
	.site-header__hours {
		display: none;
	}

	.site-header__bar {
		gap: 22px;
		padding-left: 18px;
	}

	.site-nav .menu {
		column-gap: 20px;
	}

	.site-header__contact {
		gap: 14px;
	}
}


@media (max-width: 1259px) {
	.site-header__brand img {
		height: 28px;
	}

	.site-nav .menu {
		column-gap: 14px;
	}

	.site-nav a {
		font-size: 0.875rem;
	}
}

@media (max-width: 1179px) {
	:root {
		--header-space: 92px;
	}

	.site-header__bar {
		min-height: 64px;
		padding: 8px 8px 8px 16px;
	}

	.site-header__brand img {
		height: 32px;
	}

	.site-header__phone-icon {
		display: grid;
	}

	.burger {
		display: block;
	}

	.site-nav {
		position: absolute;
		left: 0;
		right: 0;
		top: calc(100% + 8px);
		display: none;
		max-height: calc(100vh - 110px);
		max-height: calc(100dvh - 110px);
		overflow-y: auto;
		padding: 8px 20px 14px;
		background: var(--surface);
		border-radius: 22px;
		box-shadow: 0 18px 40px -20px rgba(11, 58, 28, 0.45), 0 0 0 1px var(--line);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .menu {
		display: block;
		white-space: normal;
	}

	.site-nav a {
		padding: 14px 0;
		font-size: 1.0625rem;
		border-bottom: 1px solid var(--line);
	}

	.site-nav .menu > .menu-item:last-child > a {
		border-bottom: 0;
	}

	.site-nav .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		padding: 0 0 0 16px;
		box-shadow: none;
	}
}

/* То же меню-«бургер» на любом экране, если пункты всё равно не помещаются (класс ставит скрипт). */
.site-header.is-compact .burger {
	display: block;
}

.site-header.is-compact .site-nav {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	display: none;
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	overflow-y: auto;
	padding: 8px 20px 14px;
	background: var(--surface);
	border-radius: 22px;
	box-shadow: 0 18px 40px -20px rgba(11, 58, 28, 0.45), 0 0 0 1px var(--line);
}

.site-header.is-compact .site-nav.is-open {
	display: block;
}

.site-header.is-compact .site-nav .menu {
	display: block;
	white-space: normal;
}

.site-header.is-compact .site-nav a {
	padding: 14px 0;
	font-size: 1.0625rem;
	border-bottom: 1px solid var(--line);
}

.site-header.is-compact .site-nav .menu > .menu-item:last-child > a {
	border-bottom: 0;
}

.site-header.is-compact .site-nav .sub-menu {
	position: static;
	display: block;
	min-width: 0;
	padding: 0 0 0 16px;
	box-shadow: none;
}

@media (max-width: 760px) {
	.site-header__cta {
		display: none;
	}
}

@media (max-width: 480px) {
	.site-header__brand img {
		height: 26px;
	}

	.site-header__phone-text {
		display: none;
	}

	.site-header__phone-icon {
		display: grid;
		width: 48px;
		height: 48px;
		background: var(--accent);
		color: var(--on-accent);
		border-radius: 14px;
	}

	.site-header__phone-icon svg {
		width: 20px;
		height: 20px;
	}
}

/* ---------- Первый экран ---------- */

.hero__panel {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
	align-items: center;
	gap: clamp(28px, 4vw, 64px);
	min-height: min(640px, calc(100vh - 110px));
	padding: clamp(24px, 4.6vw, 68px);
	padding-bottom: calc(clamp(24px, 4.6vw, 68px) + 64px);
	background: linear-gradient(115deg, var(--deep) 0%, color-mix(in srgb, var(--primary) 44%, var(--deep)) 100%);
	color: var(--white);
	border-radius: var(--r-panel);
	overflow: hidden;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hero__video,
.hero__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 22%;
}

/* Фото из комплекта: люди справа, под формой; слева — машины и место под текст. */
.hero__poster[src*="assets/img/hero.webp"] {
	object-position: 50% 30%;
	/* Сдвиг меньше запаса от увеличения (11 %), чтобы по краям не выглядывал фон блока. */
	transform: scale(1.22) translateX(7%);
	transform-origin: 50% 35%;
}

@media (max-width: 899px) {
	.hero__poster[src*="assets/img/hero.webp"] {
		transform: none;
		object-position: 60% 30%;
	}
}

/* Ролик с YouTube: растянут на всю панель с запасом, чтобы не было полей и не виднелись элементы плеера. */
.hero__media {
	container-type: size;
}

.hero__yt {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.9s ease;
}

.hero__yt.is-playing {
	opacity: 1;
}

.hero__yt iframe {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 100%;
	height: 100%;
	width: max(100cqw, 177.78cqh);
	height: max(100cqh, 56.25cqw);
	border: 0;
	transform: translate(-50%, -50%) scale(1.22);
}

/* Зелёная вуаль поверх фото или видео, чтобы текст читался. */
.hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Лёгкая вуаль: фото остаётся видимым, затемнение только слева, под текстом. */
	background: linear-gradient(100deg, color-mix(in srgb, var(--deep) 72%, transparent) 0%, color-mix(in srgb, var(--deep) 40%, transparent) 50%, color-mix(in srgb, var(--deep) 8%, transparent) 100%);
}

.hero__panel:has(.hero__poster) .hero__title,
.hero__panel:has(.hero__poster) .hero__text {
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* На узких экранах текст идёт поверх всего фото — вуаль ровная и плотнее. */
@media (max-width: 899px) {
	.hero__media::after {
		background: linear-gradient(180deg, color-mix(in srgb, var(--deep) 70%, transparent) 0%, color-mix(in srgb, var(--deep) 60%, transparent) 100%);
	}
}

/* На фоне без фото вуаль не нужна — кроме случая, когда поверх уже играет ролик. */
.hero__media:has(.hero__ring):not(:has(.hero__yt.is-playing))::after {
	display: none;
}

/* Поверх ролика — чистое видео без зелёной подложки: только лёгкое нейтральное затемнение
   слева, под текстом, чтобы заголовок читался. Текст дополнительно получает тень. */
.hero__media:has(.hero__video)::after,
.hero__media:has(.hero__yt.is-playing)::after {
	background: linear-gradient(100deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.22) 100%);
}

/* Панель с роликом: тёмный нейтральный фон, пока первый кадр не загрузился. */
.hero__panel:has(.hero__video) {
	background: #171c19;
}

/* Никаких элементов управления и системных значков поверх фонового ролика. */
.hero__video {
	pointer-events: none;
	user-select: none;
}

.hero__video::-webkit-media-controls,
.hero__video::-webkit-media-controls-panel,
.hero__video::-webkit-media-controls-start-playback-button,
.hero__video::-webkit-media-controls-overlay-play-button,
.hero__video::-webkit-media-controls-enclosure {
	display: none !important;
	-webkit-appearance: none;
	opacity: 0;
}

@media (max-width: 899px) {
	.hero__media:has(.hero__video)::after,
	.hero__media:has(.hero__yt.is-playing)::after {
		background: rgba(0, 0, 0, 0.5);
	}
}

.hero__panel:has(.hero__video) .hero__title,
.hero__panel:has(.hero__video) .hero__text,
.hero__panel:has(.hero__yt.is-playing) .hero__title,
.hero__panel:has(.hero__yt.is-playing) .hero__text {
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Кольцо из двух стрелок — мотив логотипа. Видно, пока нет фото или видео. */
.hero__ring {
	position: absolute;
	right: 24%;
	top: 46%;
	width: min(560px, 46%);
	transform: translateY(-50%);
	opacity: 0.16;
}

.hero__ring-a {
	stroke: color-mix(in srgb, var(--primary) 55%, white);
}

.hero__ring-b {
	stroke: var(--accent-light);
}

.hero__ring-head {
	stroke-width: 14;
	stroke-linejoin: round;
}

.hero__ring-a.hero__ring-head {
	fill: color-mix(in srgb, var(--primary) 55%, white);
}

.hero__ring-b.hero__ring-head {
	fill: var(--accent-light);
}

.hero__title {
	max-width: 12em;
	font-family: var(--font-display);
	font-size: clamp(2.25rem, 4.7vw, 4.25rem);
	font-weight: 650;
	line-height: 1.04;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.hero__title .accent {
	color: var(--accent-light);
}

.hero__text {
	max-width: 30em;
	margin-top: clamp(18px, 2.2vw, 28px);
	font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.86);
}

.hero__note {
	display: inline-block;
	margin-top: 18px;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	font-size: 0.9375rem;
	font-weight: 500;
}

.hero__call {
	display: flex;
	align-items: center;
	gap: 14px;
	width: fit-content;
	margin-top: clamp(24px, 3vw, 40px);
	color: var(--white);
	text-decoration: none;
}

.hero__call-icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 50%;
}

.hero__call-icon svg {
	width: 22px;
	height: 22px;
}

.hero__call-label {
	display: block;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.72);
}

.hero__call-number {
	display: block;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 650;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.hero__call:hover .hero__call-number {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.hero__form {
	padding: clamp(20px, 2.2vw, 30px);
	/* Эффект стекла: фон (фото или видео) просвечивает и размывается. */
	background: rgba(255, 255, 255, 0.16);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.32);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
	color: var(--white);
	border-radius: 24px;
}

.hero .hero__form .hero__form-text,
.hero .hero__form label,
.hero .hero__form .consent,
.hero .hero__form .consent a,
.hero .hero__form .form-status {
	color: rgba(255, 255, 255, 0.9);
}

.hero .hero__form input:not([type="checkbox"]),
.hero .hero__form select,
.hero .hero__form textarea {
	background: rgba(255, 255, 255, 0.92);
	border-color: transparent;
}

.hero__form-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.hero__form-text {
	margin-top: 8px;
	margin-bottom: 20px;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--muted);
}

/* Полоса преимуществ: наезжает на нижний край первого экрана. */
.benefits {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: -64px clamp(12px, 3vw, 44px) 0;
	padding: 8px;
	background: var(--surface);
	border-radius: 24px;
	box-shadow: 0 26px 50px -34px rgba(11, 58, 28, 0.5), 0 0 0 1px var(--line);
}

.benefits__item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px;
}

.benefits__item + .benefits__item {
	border-left: 1px solid var(--line);
}

.benefits__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	background: var(--tint);
	color: var(--primary-ink);
	border-radius: 50%;
}

.benefits__icon svg {
	width: 22px;
	height: 22px;
}

.benefits__title {
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.25;
}

.benefits__text {
	margin-top: 4px;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--muted);
}

@media (max-width: 1099px) {
	.benefits {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.benefits__item:nth-child(odd) {
		border-left: 0;
	}

	.benefits__item:nth-child(n + 3) {
		border-top: 1px solid var(--line);
	}
}

@media (max-width: 899px) {
	.hero__panel {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.hero__ring {
		right: -20%;
		top: 24%;
		width: 86%;
	}
}

@media (max-width: 520px) {
	.benefits {
		margin-inline: 8px;
	}

	.benefits__item {
		flex-direction: column;
		gap: 10px;
		padding: 14px;
	}
}

/* ---------- Шаги ---------- */

.steps {
	padding-block: var(--section-y);
}

.steps__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: start;
	gap: clamp(32px, 6vw, 96px);
}

.steps__aside {
	position: sticky;
	top: calc(var(--header-space) + 16px);
}

.steps__aside .btn {
	margin-top: 28px;
}

.steps__note {
	max-width: 30em;
	margin-top: 28px;
	padding: 16px 20px;
	background: var(--tint);
	border-radius: 16px;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.steps__note strong {
	font-weight: 650;
}

.timeline__item {
	position: relative;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: clamp(12px, 1.6vw, 22px);
	padding-bottom: 14px;
}

/* Линия, соединяющая номера шагов. */
.timeline__item::before {
	content: "";
	position: absolute;
	left: 23px;
	top: 48px;
	bottom: 0;
	width: 2px;
	background: var(--tint-line);
}

.timeline__item:last-child {
	padding-bottom: 0;
}

.timeline__item:last-child::before {
	display: none;
}

.timeline__num {
	position: relative;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	background: var(--primary);
	color: var(--on-primary);
	border-radius: 50%;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 650;
}

.timeline__item:last-child .timeline__num {
	background: var(--accent);
	color: var(--on-accent);
}

.timeline__card {
	padding: 22px 26px 24px;
	background: var(--surface);
	border-radius: 20px;
}

.timeline__card--image {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(150px, 250px);
	align-items: center;
	gap: clamp(16px, 2vw, 28px);
	padding-right: 16px;
	padding-block: 16px;
}

.timeline__title {
	margin-bottom: 8px;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.timeline__card p {
	color: var(--muted);
}

.timeline__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 14px;
}

@media (max-width: 899px) {
	.steps__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.steps__aside {
		position: static;
	}
}

@media (max-width: 520px) {
	.timeline__item {
		grid-template-columns: 40px minmax(0, 1fr);
	}

	.timeline__item::before {
		left: 19px;
		top: 40px;
	}

	.timeline__num {
		width: 40px;
		height: 40px;
		font-size: 1.0625rem;
	}

	.timeline__card {
		padding: 18px 18px 20px;
	}

	.timeline__card--image {
		grid-template-columns: minmax(0, 1fr);
		padding: 12px 12px 20px;
	}

	/* На телефоне картинка шага идёт над текстом. */
	.timeline__card--image .timeline__image {
		order: -1;
		aspect-ratio: 16 / 9;
	}

	.timeline__card--image > div {
		padding-inline: 6px;
	}

	.steps__aside .btn {
		width: 100%;
	}
}

/* ---------- Преимущества ---------- */

.trust {
	padding-block: var(--section-y);
	background: var(--surface);
}

.bento {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.3vw, 18px);
	margin-top: clamp(28px, 4vw, 52px);
}

.bento__card {
	display: flex;
	flex-direction: column;
	min-height: 230px;
	padding: clamp(20px, 2.2vw, 30px);
	background: var(--page);
	border-radius: 24px;
}

.bento__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: auto;
	background: var(--surface);
	color: var(--primary-ink);
	border-radius: 50%;
}

.bento__icon svg {
	width: 24px;
	height: 24px;
}

/* Внутренние страницы: заголовок и текст сразу под иконкой, все карточки ровно по верху. */
.bento:not(.bento--six) .bento__icon {
	margin-bottom: 0;
}

.bento:not(.bento--six) .bento__title {
	margin-top: 20px;
}

.bento:not(.bento--six) .bento__card {
	min-height: 0;
}

.bento__title {
	margin-top: 28px;
	margin-bottom: 8px;
	font-family: var(--font-display);
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.bento__card p {
	max-width: 32em;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--muted);
}

/* Шесть карточек: первая и последняя — широкие и цветные. */
.bento--six {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bento--six .bento__card:first-child,
.bento--six .bento__card:last-child {
	grid-column: span 2;
}

.bento--six .bento__card:first-child {
	background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 76%, black), var(--primary));
	color: var(--white);
}

.bento--six .bento__card:last-child {
	background: var(--deep);
	color: var(--white);
}

.bento--six .bento__card:first-child p,
.bento--six .bento__card:last-child p {
	color: rgba(255, 255, 255, 0.84);
}

.bento--six .bento__card:first-child .bento__title,
.bento--six .bento__card:last-child .bento__title {
	font-size: clamp(1.375rem, 2.2vw, 1.875rem);
}

.bento--six .bento__card:last-child .bento__icon {
	background: var(--accent);
	color: var(--on-accent);
}

/* Четыре карточки — в один ряд (без «висящей» четвёртой). */
@media (min-width: 1100px) {
	.bento:has(> .bento__card:nth-child(4):last-child) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 1099px) {
	.bento,
	.bento--six {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.bento,
	.bento--six {
		grid-template-columns: minmax(0, 1fr);
	}

	.bento--six .bento__card:first-child,
	.bento--six .bento__card:last-child {
		grid-column: auto;
	}

	.bento__card {
		min-height: 0;
	}

	.bento__icon {
		margin-bottom: 0;
	}

	.bento__title {
		margin-top: 20px;
	}
}

/* ---------- Оценка ---------- */

.valuation {
	padding-top: var(--section-y);
}

.valuation__panel {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	align-items: center;
	gap: clamp(28px, 5vw, 72px);
	padding: clamp(22px, 4.4vw, 64px);
	background: linear-gradient(110deg, color-mix(in srgb, var(--primary) 72%, black) 0%, var(--primary) 100%);
	color: var(--white);
	border-radius: var(--r-panel);
	overflow: hidden;
}

.valuation__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.22;
	mix-blend-mode: luminosity;
}

.valuation__text {
	max-width: 27em;
	margin-top: 18px;
	font-size: 1.125rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.9);
}

.valuation__call {
	display: grid;
	gap: 2px;
	margin-top: clamp(24px, 3.4vw, 44px);
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.82);
}

.valuation__call a {
	width: fit-content;
	color: var(--white);
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}

.valuation__call a:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
}

.valuation__form {
	padding: clamp(20px, 2.8vw, 36px);
	/* Эффект стекла, как у формы на первом экране. */
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.3);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22);
	color: var(--white);
	border-radius: 24px;
}

.valuation__form label,
.valuation__form .consent,
.valuation__form .consent a,
.valuation__form .car-price,
.valuation__form .lead-form__status {
	color: rgba(255, 255, 255, 0.92);
}

.valuation__form input:not([type="checkbox"]),
.valuation__form select,
.valuation__form textarea {
	background: rgba(255, 255, 255, 0.94);
	border-color: transparent;
}

@media (max-width: 899px) {
	.valuation__panel {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Форма заявки ---------- */

.lead-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lead-form__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
}

.lead-form--quick .lead-form__fields {
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
}

.field--wide {
	grid-column: 1 / -1;
}

@media (max-width: 520px) {
	.lead-form__fields {
		grid-template-columns: minmax(0, 1fr);
	}
}

.field label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.875rem;
	font-weight: 500;
}

.field input,
.field select,
.field textarea {
	display: block;
	width: 100%;
	height: 54px;
	padding: 0 16px;
	background: var(--surface);
	color: var(--ink);
	border: 1.5px solid var(--line);
	border-radius: 12px;
	font: inherit;
	font-size: 1rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
	height: auto;
	min-height: 108px;
	padding-block: 14px;
	resize: vertical;
}

.field select {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2314201a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

.field input::placeholder,
.field textarea::placeholder {
	color: #9aa69e;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
	border-color: var(--tint-line);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.field.has-error input {
	border-color: var(--error);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 14%, transparent);
}

.consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 18px;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--muted);
	cursor: pointer;
}

.consent a {
	color: inherit;
}

.consent input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--primary);
}

.consent.has-error {
	color: var(--error);
}

.lead-form__submit {
	min-width: 230px;
	margin-top: 20px;
}

.lead-form--quick .lead-form__submit {
	width: 100%;
}

@media (max-width: 520px) {
	.lead-form__submit {
		width: 100%;
	}
}

.lead-form__status {
	font-size: 0.9375rem;
	font-weight: 600;
}

.lead-form__status:not(:empty) {
	margin-top: 14px;
}

.lead-form__status.is-error {
	color: var(--error);
}

/* После отправки вместо полей остаётся одно сообщение. */
.lead-form.is-sent > :not(.lead-form__status) {
	display: none;
}

.lead-form.is-sent .lead-form__status {
	margin-top: 0;
	padding: 20px 22px;
	background: var(--tint);
	color: var(--ink);
	border-radius: 14px;
	font-size: 1.0625rem;
}

/* ---------- Вопросы ---------- */

.faq {
	padding-block: var(--section-y);
}

.faq__grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	align-items: start;
	gap: clamp(28px, 5vw, 80px);
}

.faq__aside {
	position: sticky;
	top: calc(var(--header-space) + 16px);
}

.faq__aside .btn {
	margin-top: 26px;
}

.faq__item {
	background: var(--surface);
	border-radius: 18px;
}

.faq__item + .faq__item {
	margin-top: 10px;
}

.faq__question {
	position: relative;
	display: block;
	padding: 24px 76px 24px 26px;
	font-family: var(--font-display);
	font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
	font-weight: 650;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.faq__question::-webkit-details-marker {
	display: none;
}

/* Кружок с плюсом; при раскрытии поворачивается в крестик и становится оранжевым. */
.faq__question::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 38px;
	height: 38px;
	margin-top: -19px;
	background:
		linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
		var(--tint);
	color: var(--primary-ink);
	border-radius: 50%;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq__item[open] > .faq__question::after {
	background-color: var(--accent);
	color: var(--on-accent);
	transform: rotate(45deg);
}

.faq__answer {
	max-width: 46em;
	padding: 0 76px 26px 26px;
	color: var(--muted);
}

@media (max-width: 899px) {
	.faq__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.faq__aside {
		position: static;
	}
}

@media (max-width: 520px) {
	.faq__question {
		padding: 20px 66px 20px 20px;
	}

	.faq__question::after {
		right: 14px;
	}

	.faq__answer {
		padding: 0 20px 22px;
	}
}

/* ---------- Контакты ---------- */

.contacts {
	padding-bottom: var(--section-y);
}

.contacts__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	padding: clamp(22px, 4.4vw, 64px);
	background: var(--surface);
	border-radius: var(--r-panel);
}

.contacts__info .section-title {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.contacts__list {
	display: grid;
	gap: 22px;
	margin-top: clamp(24px, 3vw, 40px);
}

.contacts__list dt {
	margin-bottom: 2px;
	font-size: 0.875rem;
	color: var(--muted);
}

.contacts__list dd {
	font-size: 1.1875rem;
	line-height: 1.35;
}

.contacts__list dd > a:not(.contacts__phone):not(.contacts__route) {
	color: var(--ink);
}

.contacts__phone {
	display: block;
	width: fit-content;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}

.contacts__phone:hover {
	color: var(--primary-ink);
}

.contacts__route {
	display: inline-block;
	margin-left: 10px;
	font-size: 0.9375rem;
	font-weight: 500;
}

.contacts__rating {
	font-family: var(--font-display);
	font-weight: 650;
}

.socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
}

.socials__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 20px;
	color: var(--ink);
	border-radius: 14px;
	box-shadow: inset 0 0 0 1.5px var(--line);
	font-weight: 500;
	text-decoration: none;
	transition: box-shadow 0.15s ease;
}

.socials__link:hover {
	box-shadow: inset 0 0 0 1.5px var(--primary);
}

.socials__link svg {
	width: 20px;
	height: 20px;
	color: var(--primary-ink);
}

.contacts__form {
	padding: clamp(20px, 2.8vw, 36px);
	background: var(--page);
	border-radius: 24px;
}

.contacts__form-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.contacts__form-text {
	margin-top: 8px;
	color: var(--muted);
}

.contacts__form .lead-form {
	margin-top: 22px;
}

.contacts__form .lead-form.is-sent .lead-form__status {
	background: var(--surface);
}

@media (max-width: 899px) {
	.contacts__card {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Текст страницы ---------- */

.page-text {
	padding-bottom: var(--section-y);
}

.prose {
	max-width: 50em;
	font-size: 1.0625rem;
	line-height: 1.6;
}

.prose > * + * {
	margin-top: 1em;
}

.prose h1,
.prose h2,
.prose h3 {
	font-family: var(--font-display);
	font-weight: 650;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.prose h1 {
	font-size: clamp(2.125rem, 4.4vw, 3.5rem);
}

.prose h2 {
	margin-top: 1.6em;
	font-size: clamp(1.5rem, 2.6vw, 2.125rem);
}

.prose h3 {
	margin-top: 1.5em;
	font-size: 1.25rem;
}

.prose ul,
.prose ol {
	padding-left: 1.3em;
}

.prose ul {
	list-style: disc;
}

.prose ol {
	list-style: decimal;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose img {
	border-radius: 18px;
}

.prose__cover {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	margin-bottom: 1.4em;
}

.prose blockquote {
	margin: 1.4em 0;
	padding: 20px 24px;
	background: var(--surface);
	border-left: 4px solid var(--primary);
	border-radius: 0 18px 18px 0;
}

.prose blockquote p {
	margin: 0;
}

.prose blockquote cite {
	display: block;
	margin-top: 12px;
	font-style: normal;
	font-weight: 600;
	color: var(--muted);
}

.prose--intro {
	max-width: 60em;
	margin-bottom: clamp(24px, 3.6vw, 48px);
	font-size: 1.125rem;
}

.prose iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 18px;
}

.prose iframe + iframe {
	margin-top: 1em;
}

/* Сетка видеоотзывов. */
.prose .videos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 1em 0 1.6em;
}

.prose .videos iframe {
	margin: 0;
}

@media (max-width: 599px) {
	.prose .videos {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Таблицы (цены на эвакуатор и т. п.). */
.prose table {
	width: 100%;
	margin: 1.2em 0;
	border-collapse: collapse;
	background: var(--surface);
	border-radius: 18px;
	overflow: hidden;
	font-size: 0.95em;
}

.prose th,
.prose td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.prose th {
	background: color-mix(in srgb, var(--primary) 8%, var(--surface));
	font-weight: 600;
	color: var(--ink);
}

.prose tr:last-child td {
	border-bottom: 0;
}

@media (max-width: 599px) {
	.prose table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

/* Список в несколько колонок (марки) и список районов. */
.prose ul.columns,
.prose .districts {
	columns: 3;
	column-gap: 24px;
	list-style: none;
	padding: 0;
}

.prose ul.columns li,
.prose .districts li {
	break-inside: avoid;
	margin: 0 0 6px;
}

.prose .districts a {
	display: block;
	padding: 8px 12px;
	background: var(--surface);
	border-radius: 10px;
	text-decoration: none;
	color: var(--ink);
}

.prose .districts a:hover {
	color: var(--primary-ink);
}

@media (max-width: 599px) {
	.prose ul.columns,
	.prose .districts {
		columns: 2;
	}
}

/* Блок «Нужной модели нет в списке?» (авто из Китая). */
.ask {
	padding: clamp(8px, 2vw, 24px) 0 clamp(32px, 5vw, 72px);
}

.ask__panel {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(20px, 4vw, 56px);
	padding: clamp(24px, 4.4vw, 56px);
	background: linear-gradient(110deg, var(--deep) 0%, color-mix(in srgb, var(--primary) 55%, var(--deep)) 100%);
	color: var(--white);
	border-radius: var(--r-panel);
}

.ask__title {
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 2.6vw, 2.25rem);
	font-weight: 650;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.ask__text {
	margin-top: 12px;
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, 0.82);
	max-width: 36em;
}

.ask__actions {
	display: grid;
	gap: 12px;
}

.ask__actions .btn {
	justify-content: center;
}

.btn--light {
	background: var(--surface);
	color: var(--deep);
}

.btn--light:hover {
	background: color-mix(in srgb, var(--white) 90%, var(--primary));
}

.btn--light svg {
	width: 20px;
	height: 20px;
}

@media (max-width: 767px) {
	.ask__panel {
		grid-template-columns: minmax(0, 1fr);
	}
}

.catalog__note {
	max-width: 50em;
	margin: 0 0 clamp(20px, 3vw, 36px);
	padding: 14px 18px;
	background: color-mix(in srgb, var(--accent) 10%, var(--surface));
	border-radius: 14px;
	font-size: 0.95rem;
	color: var(--muted);
}

.prose .gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.prose .gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	margin: 0;
}

.prose h4 {
	margin-top: 1.2em;
	font-size: 1.0625rem;
}

.prose h4 + h4,
.prose h3 + h3 {
	margin-top: 0.4em;
}

@media (max-width: 560px) {
	.prose .gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Список новостей и статей. */
.posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.3vw, 18px);
}

.post-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 8px 8px clamp(20px, 2.2vw, 28px);
	overflow: hidden;
	background: var(--surface);
	color: var(--ink);
	border-radius: 24px;
	text-decoration: none;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.post-card__link:hover {
	transform: translateY(-2px);
	background: var(--tint);
}

.post-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	margin-bottom: 18px;
	overflow: hidden;
	background: var(--page);
	border-radius: 18px;
}

.post-card__cover {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.post-card__link:hover .post-card__cover {
	transform: scale(1.03);
}

.post-card__date,
.post-card__title,
.post-card__link p,
.post-card__link .service__more {
	padding-inline: clamp(12px, 1.4vw, 20px);
}

.post-card__date {
	margin-bottom: 10px;
	font-size: 0.8125rem;
	color: var(--muted);
}

.post-card__title {
	margin-bottom: 10px;
	font-family: var(--font-display);
	font-size: 1.1875rem;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.post-card__link p {
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--muted);
}

.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.page-numbers li a,
.page-numbers li span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	background: var(--surface);
	color: var(--ink);
	border-radius: 12px;
	text-decoration: none;
}

.page-numbers li span.current {
	background: var(--primary);
	color: var(--on-primary);
}

@media (max-width: 1099px) {
	.posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.posts {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Внутренние страницы ---------- */

.page-hero {
	padding-block: clamp(20px, 3vw, 36px) clamp(32px, 4.6vw, 64px);
}

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: clamp(18px, 2.6vw, 32px);
	font-size: 0.875rem;
	color: var(--muted);
}

.crumbs a {
	color: var(--muted);
	text-decoration: none;
}

.crumbs a:hover {
	color: var(--primary-ink);
}

.crumbs [aria-current] {
	color: var(--ink);
}

.page-hero__row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.page-hero__title {
	max-width: 14em;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4.2vw, 3.5rem);
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.page-hero__lead {
	max-width: 36em;
	margin-top: 16px;
	font-size: 1.125rem;
	line-height: 1.45;
	color: var(--muted);
}

.page-hero__call {
	flex: none;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 20px 12px 12px;
	background: var(--surface);
	color: var(--ink);
	border-radius: 18px;
	text-decoration: none;
}

.page-hero__call-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	background: var(--tint);
	color: var(--primary-ink);
	border-radius: 50%;
}

.page-hero__call-icon svg {
	width: 22px;
	height: 22px;
}

.page-hero__call-label {
	display: block;
	font-size: 0.8125rem;
	color: var(--muted);
}

.page-hero__call-number {
	display: block;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.page-body {
	padding-bottom: var(--section-y);
}

.page-body--tight {
	padding-bottom: clamp(16px, 2.6vw, 32px);
}

.page-body__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
	align-items: start;
	gap: clamp(28px, 5vw, 80px);
}

.page-aside {
	position: sticky;
	top: calc(var(--header-space) + 16px);
}

.page-aside__card {
	padding: clamp(20px, 2.2vw, 28px);
	background: var(--surface);
	border-radius: 24px;
}

.page-aside__title {
	margin-bottom: 18px;
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.others {
	padding-block: var(--section-y);
	background: var(--surface);
}

.others__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: clamp(24px, 3vw, 40px);
}

.others__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 64px;
	padding: 14px 18px;
	background: var(--page);
	color: var(--ink);
	border-radius: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.others__link:hover {
	background: var(--tint);
}

.others__link svg {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--primary-ink);
}

/* Список услуг. */
.services {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.3vw, 18px);
}

.service__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 220px;
	padding: clamp(20px, 2.2vw, 30px);
	background: var(--surface);
	color: var(--ink);
	border-radius: 24px;
	text-decoration: none;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.service__link:hover {
	transform: translateY(-2px);
	background: var(--tint);
}

.service--accent .service__link {
	background: var(--deep);
	color: var(--white);
}

.service--accent .service__link:hover {
	background: color-mix(in srgb, var(--deep) 85%, var(--primary));
}

.service__cover {
	display: block;
	max-width: none;
	width: calc(100% + 2 * clamp(20px, 2.2vw, 30px));
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: 50% 60%;
	margin: calc(-1 * clamp(20px, 2.2vw, 30px)) calc(-1 * clamp(20px, 2.2vw, 30px)) 18px;
	border-radius: 24px 24px 0 0;
}

.service__title {
	margin-bottom: 10px;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.service__link p {
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--muted);
}

.service--accent .service__link p {
	color: rgba(255, 255, 255, 0.8);
}

.service__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 18px;
	color: var(--primary-ink);
	font-size: 0.9375rem;
	font-weight: 600;
}

.service--accent .service__more {
	color: var(--accent-light);
}

.service__more svg {
	width: 16px;
	height: 16px;
}

/* Карта на странице контактов. */
.map {
	padding-bottom: var(--section-y);
}

.map__frame {
	height: clamp(320px, 42vw, 540px);
	overflow: hidden;
	border-radius: var(--r-panel);
	background: var(--surface);
}

.map__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Каталог авто из Китая ---------- */

.catalog {
	padding-bottom: var(--section-y);
}

.catalog__empty {
	padding: clamp(24px, 4vw, 48px);
	background: var(--surface);
	border-radius: var(--r-panel);
}

.catalog__group + .catalog__group {
	margin-top: clamp(32px, 4.6vw, 64px);
}

.catalog__brand {
	margin-bottom: 18px;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 2.6vw, 2.125rem);
	font-weight: 650;
	letter-spacing: -0.03em;
}

.cars {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.3vw, 18px);
}

.car {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--surface);
	border-radius: 24px;
}

.car__photo {
	aspect-ratio: 4 / 3;
	background: var(--page);
}

.car__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

.car__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--tint-line);
}

.car__placeholder svg {
	width: 64px;
	height: 64px;
	stroke-width: 1.25;
}

.car__photo--empty {
	aspect-ratio: 3 / 1;
}

.car__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 22px 22px;
}

.car__title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.car__specs {
	display: grid;
	gap: 4px;
	margin-top: 12px;
	font-size: 0.875rem;
	color: var(--muted);
}

.car__specs-line {
	min-height: 1.4em;
	margin-top: 8px;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--muted);
}

/* Цена и кнопка друг под другом: кнопка на всю ширину и никогда не обрезается. */
.car__bottom {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
}

.car__price {
	display: block;
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 650;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.car__note {
	display: block;
	margin-top: 2px;
	font-size: 0.8125rem;
	color: var(--muted);
}

.car__cta {
	width: 100%;
	min-height: 46px;
	padding-inline: 16px;
	font-size: 0.9375rem;
	white-space: nowrap;
}

.car-price {
	min-height: 1.4em;
	margin-top: 8px;
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 650;
	color: var(--primary-ink);
}

.car-price:empty {
	display: none;
}

.car.is-highlight {
	box-shadow: 0 0 0 3px var(--accent);
}

@media (max-width: 1099px) {
	.cars,
	.services,
	.others__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 899px) {
	.page-hero__row {
		display: block;
	}

	.page-hero__call {
		display: inline-flex;
		margin-top: 20px;
	}

	.page-body__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.page-aside {
		position: static;
	}
}

@media (max-width: 560px) {
	.cars,
	.services,
	.others__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.car__bottom {
		flex-direction: column;
		align-items: stretch;
	}

	.car__cta {
		width: 100%;
	}
}

/* ---------- Подвал ---------- */

.site-footer {
	padding-block: clamp(40px, 5vw, 72px) 26px;
	background: color-mix(in srgb, var(--deep) 62%, #06110a);
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.9375rem;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.68);
	text-decoration: none;
	transition: color 0.15s ease;
}

.site-footer a:hover {
	color: var(--white);
}

.site-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px clamp(20px, 4vw, 64px);
}

.site-footer__logo {
	display: inline-block;
	margin-bottom: 20px;
	padding: 12px 16px;
	background: var(--surface);
	border-radius: 14px;
}

.site-footer__logo img {
	display: block;
	width: auto;
	height: 30px;
}

.site-footer .site-footer__phone {
	display: block;
	width: fit-content;
	margin-bottom: 4px;
	color: var(--white);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.site-footer__about p {
	margin-top: 6px;
}

.site-footer__heading {
	margin-bottom: 14px;
	color: var(--white);
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 650;
}

.site-footer__links {
	columns: 1;
}

.site-footer__links li + li {
	margin-top: 8px;
}

.site-footer__links a {
	font-size: 0.9375rem;
}

/* Длинная колонка подвала — в два столбца на широких экранах. */
@media (min-width: 900px) {
	.site-footer__col:last-child .site-footer__links {
		columns: 2;
		column-gap: 24px;
	}

	.site-footer__col:last-child .site-footer__links li {
		break-inside: avoid;
	}
}

.site-footer__legal {
	max-width: 76em;
	margin-top: clamp(28px, 4vw, 48px);
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.8125rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.5);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 18px;
	font-size: 0.8125rem;
}

@media (max-width: 767px) {
	.site-footer__top {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Закреплённая панель связи внизу экрана ---------- */

.dock {
	position: fixed;
	left: 50%;
	bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100vw - 16px);
	padding: 7px;
	background: var(--surface);
	border-radius: 22px;
	box-shadow: 0 22px 44px -18px rgba(11, 58, 28, 0.55), 0 0 0 1px var(--line);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 140%);
	transition: transform 0.45s cubic-bezier(0.22, 0.7, 0.2, 1), opacity 0.3s ease, visibility 0s linear 0.45s;
}

.dock.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
	transition: transform 0.45s cubic-bezier(0.22, 0.7, 0.2, 1), opacity 0.3s ease, visibility 0s;
}

.dock__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 50px;
	padding: 8px 16px;
	background: var(--tint);
	color: var(--ink);
	border-radius: 15px;
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.dock__phone:hover {
	background: var(--tint-line);
}

.dock__phone svg {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--primary-ink);
}

.dock__cta {
	min-height: 50px;
	padding: 8px 22px;
	border-radius: 15px;
	font-size: 1rem;
	box-shadow: none;
}

/* Место под панель, чтобы она не закрывала низ подвала. */
.site-footer {
	padding-bottom: calc(26px + 78px);
}

@media (max-width: 640px) {
	.dock {
		left: 8px;
		right: 8px;
		max-width: none;
		transform: translate(0, 140%);
	}

	.dock.is-visible {
		transform: translate(0, 0);
	}

	.dock__phone {
		flex: 1 1 0;
		min-width: 0;
		justify-content: center;
		padding-inline: 8px;
		font-size: 0.9375rem;
	}

	.dock__cta {
		flex: none;
		padding-inline: 14px;
		font-size: 0.9375rem;
	}

	/* Два номера на телефоне не помещаются текстом — остаются кнопки со значком. */
	.dock--two .dock__phone {
		flex: none;
		width: 50px;
		padding: 0;
	}

	.dock--two .dock__phone span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.dock--two .dock__cta {
		flex: 1 1 0;
	}
}

@media (max-width: 380px) {
	.dock__phone {
		gap: 6px;
		padding-inline: 6px;
		font-size: 0.8125rem;
	}

	.dock__phone svg {
		width: 16px;
		height: 16px;
	}

	.dock__cta {
		padding-inline: 10px;
		font-size: 0.875rem;
	}
}

/* Самые узкие телефоны (320 px). */
@media (max-width: 350px) {
	.site-header__bar {
		gap: 8px;
		padding-left: 12px;
	}

	.site-header__brand img {
		height: 22px;
	}

	.dock__phone {
		flex: none;
		width: 50px;
		padding: 0;
	}

	.dock__phone span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	.dock__cta {
		flex: 1 1 0;
	}
}

/* ---------- Без анимации, если так настроено на устройстве ---------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition-duration: 0.01ms !important;
	}
}


/* Фото в тексте без обрезки (эвакуатор). */
.prose .prose__full {
	display: block;
	width: 100%;
	height: auto;
	margin: 1.2em 0;
}

/* Обложка без обрезки (флаг Татарстана). */
.prose__cover--natural {
	aspect-ratio: auto;
	height: auto;
	object-fit: contain;
}

/* Сетка марок с логотипами. */
.prose ul.brands {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
	margin: 1.2em 0 1.6em;
	padding: 0;
	list-style: none;
}

.prose ul.brands li {
	margin: 0;
}

.prose ul.brands a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	height: 100%;
	padding: 14px 8px 12px;
	background: var(--surface);
	border-radius: 14px;
	color: var(--ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	transition: box-shadow 0.15s ease, color 0.15s ease;
}

.prose ul.brands a:hover {
	color: var(--primary-ink);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.prose ul.brands img {
	width: 100%;
	max-width: 104px;
	height: 60px;
	object-fit: contain;
	border-radius: 0;
}

.brands__mono {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--page);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary-ink);
}

/* Логотип марки вместо фото на странице марки. */
.brand-cover {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	margin-bottom: 1.4em;
	background: var(--surface);
	border-radius: 18px;
}

.brand-cover img {
	width: min(56%, 360px);
	height: 58%;
	object-fit: contain;
	border-radius: 0;
}

/* Поле с подробностями (эвакуатор, подготовка) — на всю ширину формы. */
.lead-form .field--details textarea {
	min-height: 84px;
}

/* Под каталогом: «Нужной модели нет в списке?» */
.catalog__more {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px 28px;
	margin-top: clamp(20px, 3vw, 36px);
	padding: clamp(20px, 3vw, 32px);
	background: var(--surface);
	border: 2px dashed color-mix(in srgb, var(--primary) 35%, transparent);
	border-radius: 24px;
}

.catalog__more-title {
	grid-column: 1;
	font-family: var(--font-display);
	font-size: clamp(1.25rem, 2vw, 1.625rem);
	font-weight: 650;
	letter-spacing: -0.02em;
}

.catalog__more p {
	grid-column: 1;
	color: var(--muted);
}

.catalog__more .btn {
	grid-column: 2;
	grid-row: 1 / span 2;
}

@media (max-width: 767px) {
	.catalog__more {
		grid-template-columns: minmax(0, 1fr);
	}

	.catalog__more .btn {
		grid-column: 1;
		grid-row: auto;
		width: 100%;
	}
}

.ask__copy:not(:has(.ask__title)) .ask__text {
	margin-top: 0;
	font-size: clamp(1.125rem, 1.8vw, 1.375rem);
	color: var(--white);
}

/* ---------- Свёрнутое меню на ноутбуках: панель справа, пункты по правому краю ---------- */
@media (min-width: 761px) {
	/* На ноутбуке и планшете панель открывается справа, под кнопкой меню. */
	.site-header.is-compact .site-nav,
	.site-header .site-nav.is-open {
		left: auto;
		width: min(380px, 100%);
	}
}

/* ---------- Переключатель «день / ночь» ---------- */
.theme-toggle {
	display: grid;
	place-items: center;
	flex: none;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--tint);
	color: var(--primary-ink);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
	color: var(--accent);
}

.theme-toggle svg {
	width: 20px;
	height: 20px;
}

.theme-toggle__sun,
[data-theme="dark"] .theme-toggle__moon {
	display: none;
}

[data-theme="dark"] .theme-toggle__sun {
	display: block;
}

.theme-toggle__moon {
	display: block;
}

/* ---------- Тёмная тема ---------- */
[data-theme="dark"] {
	--ink: #e7eee9;
	--muted: #a2b2a8;
	--page: #0d1410;
	--surface: #17211b;
	--line: #29362e;
	--tint: #15291c;
	--tint-line: #23472e;
	--primary-ink: #5fd176;
	color-scheme: dark;
}

[data-theme="dark"] body {
	background: var(--page);
	color: var(--ink);
}

/* Поля ввода в стеклянных формах остаются светлыми — текст в них тёмный. */
[data-theme="dark"] .hero__form input:not([type="checkbox"]),
[data-theme="dark"] .hero__form select,
[data-theme="dark"] .valuation__form input:not([type="checkbox"]),
[data-theme="dark"] .valuation__form select,
[data-theme="dark"] .valuation__form textarea {
	color: #14201a;
}

/* Логотипы марок и фото машин — на светлых плашках, иначе тёмные логотипы не видно. */
[data-theme="dark"] .prose ul.brands a {
	background: #ffffff;
	color: #14201a;
}

[data-theme="dark"] .brand-cover {
	background: #ffffff;
}

[data-theme="dark"] .site-header__brand img {
	filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.6));
}

/* Стеклянные формы (первый экран и нижняя на главной): все поля светлые, текст тёмный — в любой теме. */
.hero__form .field input:not([type="checkbox"]),
.hero__form .field select,
.hero__form .field textarea,
.valuation__form .field input:not([type="checkbox"]),
.valuation__form .field select,
.valuation__form .field textarea {
	background-color: rgba(255, 255, 255, 0.94);
	color: #14201a;
	border-color: transparent;
}

/* Стрелка выпадающего списка в тёмной теме — светлая (кроме стеклянных форм со светлыми полями). */
[data-theme="dark"] .field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23e7eee9' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .hero__form .field select,
[data-theme="dark"] .valuation__form .field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2314201a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Переключатель внутри меню-бургера — только на телефонах; в шапке на телефонах его нет. */
.theme-toggle--menu {
	display: none;
}

@media (max-width: 760px) {
	/* На телефоне переключатель — в шапке, рядом с кнопкой звонка; строка в меню не нужна. */
	.theme-toggle--menu {
		display: none !important;
	}

	.site-header__contact > .theme-toggle--art {
		width: 44px;
		height: 44px;
	}

	.site-header__contact > .theme-toggle--art svg {
		width: 38px;
		height: 38px;
	}

	.theme-toggle--menu-unused {
		display: flex;
		width: 100%;
		height: auto;
		margin-top: 8px;
		padding: 14px 0 6px;
		border-radius: 0;
		background: none;
		color: var(--ink);
		font: inherit;
		font-size: 1.0625rem;
		font-weight: 500;
		border-top: 1px solid var(--line);
	}

	.theme-toggle--menu span {
		align-items: center;
		gap: 10px;
	}

	.theme-toggle--menu .theme-toggle__moon {
		display: inline-flex;
	}

	[data-theme="dark"] .theme-toggle--menu .theme-toggle__moon {
		display: none;
	}

	[data-theme="dark"] .theme-toggle--menu .theme-toggle__sun {
		display: inline-flex;
	}
}

/* Переключатель-картинка: луна со звёздочками / солнце. */
.theme-toggle--art {
	width: 46px;
	height: 46px;
	background: radial-gradient(circle at 35% 30%, #2c3a7a 0%, #141c45 70%);
	box-shadow: 0 6px 18px -8px rgba(20, 28, 69, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.theme-toggle--art svg {
	width: 40px;
	height: 40px;
	transition: transform 0.4s ease;
}

.theme-toggle--art:hover svg {
	transform: rotate(-12deg) scale(1.06);
}

.theme-toggle--art .moon-sparks path {
	transform-box: fill-box;
	transform-origin: center;
	animation: tva-twinkle 2.4s ease-in-out infinite;
}

.theme-toggle--art .moon-sparks path:nth-child(2) {
	animation-delay: 0.8s;
}

.theme-toggle--art .moon-sparks path:nth-child(3) {
	animation-delay: 1.6s;
}

@keyframes tva-twinkle {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.35; transform: scale(0.6); }
}

[data-theme="dark"] .theme-toggle--art {
	background: radial-gradient(circle at 35% 30%, #fff6d6 0%, #ffe39a 75%);
	box-shadow: 0 6px 18px -8px rgba(245, 154, 27, 0.8);
}

[data-theme="dark"] .theme-toggle--art:hover svg {
	transform: rotate(45deg);
}

.theme-toggle--menu svg {
	width: 28px;
	height: 28px;
}

@media (prefers-reduced-motion: reduce) {
	.theme-toggle--art .moon-sparks path {
		animation: none;
	}
}

@media (max-width: 400px) {
	.site-header__contact {
		gap: 8px;
	}

	.site-header__brand img {
		height: 21px;
	}

	.site-header__contact > .theme-toggle--art {
		width: 42px;
		height: 42px;
	}
}

@media (max-width: 370px) {
	.site-header__brand img {
		height: 18px;
	}
}

/* Белые кнопки на зелёных панелях остаются белыми и в тёмной теме. */
.btn--light {
	background: #ffffff;
	color: var(--deep);
}

[data-theme="dark"] .skip-link {
	background: #ffffff;
	color: #14201a;
}




/* ---------- Выпадающее меню (ноутбук в режиме «бургер», планшет, телефон) ---------- */
/* «Главная» и контакты — только в выпадающем меню; в строке меню на широком экране их нет. */
.site-header .site-nav .site-nav__home,
.site-header .site-nav .site-nav__extra {
	display: none;
}

@media (max-width: 1179px) {
	.site-header .site-nav .site-nav__home,
	.site-header .site-nav .site-nav__extra {
		display: block;
	}
}

.site-header.is-compact .site-nav .site-nav__home,
.site-header.is-compact .site-nav .site-nav__extra {
	display: block;
}

.site-nav .site-nav__home {
	padding: 14px 0;
	font-size: 1.0625rem;
	border-bottom: 1px solid var(--line);
}

.site-nav .site-nav__home.is-current {
	color: var(--accent);
}

/* Выпадающая панель (класс is-panel ставит скрипт, когда видна кнопка меню): подпункты свёрнуты,
   раскрывается один раздел; наведение и фокус их не держат — повторное нажатие сворачивает. */
.site-header.is-panel .site-nav .menu-item-has-children > .sub-menu {
	display: none;
}

.site-header.is-panel .site-nav .menu-item-has-children.is-open > .sub-menu {
	display: block;
}

/* Подпункты компактные, чтобы весь список услуг помещался на экран. */
.site-header.is-panel .site-nav .sub-menu {
	padding: 2px 0 6px 16px;
}

.site-header.is-panel .site-nav .sub-menu a {
	padding: 8px 0;
	font-size: 0.96875rem;
	border-bottom: 0;
}

.site-header.is-panel .site-nav .menu > .menu-item > a,
.site-header.is-panel .site-nav .site-nav__home {
	padding: 12px 0;
}

/* Если список всё же длиннее экрана — тень снизу/сверху подсказывает, что панель прокручивается. */
.site-header.is-panel .site-nav {
	background:
		linear-gradient(var(--surface) 30%, rgba(0, 0, 0, 0)) center top,
		linear-gradient(rgba(0, 0, 0, 0), var(--surface) 70%) center bottom,
		radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0)) center top,
		radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0)) center bottom;
	background-color: var(--surface);
	background-repeat: no-repeat;
	background-size: 100% 40px, 100% 40px, 100% 16px, 100% 16px;
	background-attachment: local, local, scroll, scroll;
	overscroll-behavior: contain;
}

.submenu-toggle {
	display: none;
}

@media (max-width: 1179px) {
	.site-nav .menu-item-has-children {
		position: relative;
	}

	.submenu-toggle {
		position: absolute;
		top: 4px;
		right: 0;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--primary-ink);
		cursor: pointer;
	}
}

.site-header.is-compact .site-nav .menu-item-has-children {
	position: relative;
}

.site-header.is-compact .submenu-toggle {
	position: absolute;
	top: 4px;
	right: 0;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--primary-ink);
	cursor: pointer;
}

.submenu-toggle svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.menu-item-has-children.is-open > .submenu-toggle svg {
	transform: rotate(180deg);
}

/* Контакты внизу выпадающего меню. */
.site-nav__extra {
	padding: 14px 0 4px;
	border-top: 1px solid var(--line);
}

.site-nav .site-nav__contact {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border: 0;
	font-size: 1rem;
	color: var(--ink);
}

.site-nav .site-nav__contact svg {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--primary-ink);
}

.site-nav .site-nav__contact--phone span {
	font-weight: 600;
	color: var(--primary-ink);
}

.site-nav__socials {
	display: flex;
	gap: 10px;
	padding-top: 10px;
}

.site-nav .site-nav__socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--tint);
	color: var(--primary-ink);
}

.site-nav .site-nav__socials a:hover {
	color: var(--accent);
}

.site-nav__socials svg {
	width: 22px;
	height: 22px;
}

/* ---------- Переключатель «день / ночь» (ползунок с солнцем и луной) ---------- */
.theme-switch {
	position: relative;
	flex: none;
	width: 68px;
	height: 36px;
	padding: 0;
	margin-left: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	cursor: pointer;
}

.theme-switch__track {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
	background: linear-gradient(180deg, #e8521d 0%, #f0742a 55%, #f8b25a 100%);
	box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.85), 0 3px 10px -4px rgba(0, 0, 0, 0.35);
}

.theme-switch__night {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, #000000 0%, #0b0b0d 60%, #1b1b20 100%);
	opacity: 0;
	transition: opacity 0.5s ease;
}

.theme-switch__star {
	position: absolute;
	width: 2px;
	height: 2px;
	border-radius: 50%;
	background: #ffffff;
	animation: tva-twinkle 2.6s ease-in-out infinite;
}

.theme-switch__star--big {
	width: 3px;
	height: 3px;
	box-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

.theme-switch__star:nth-child(2n) {
	animation-delay: 0.9s;
}

.theme-switch__star:nth-child(3n) {
	animation-delay: 1.7s;
}

.theme-switch__clouds {
	position: absolute;
	right: 3px;
	bottom: 1px;
	width: 34px;
	height: 22px;
	transition: transform 0.5s ease, opacity 0.4s ease;
}

.theme-switch__meteor {
	position: absolute;
	top: 6px;
	left: 30%;
	width: 18px;
	height: 1.5px;
	border-radius: 2px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff);
	opacity: 0;
	transform: rotate(14deg);
	animation: tva-meteor 7s ease-in 2s infinite;
}

@keyframes tva-meteor {
	0%, 86% { opacity: 0; transform: translate(0, 0) rotate(14deg); }
	88% { opacity: 1; }
	96% { opacity: 0; transform: translate(26px, 7px) rotate(14deg); }
	100% { opacity: 0; }
}

.theme-switch__knob {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: radial-gradient(circle at 40% 38%, #fffef2 0%, #fff6c6 55%, #ffe58f 100%);
	box-shadow: 0 0 0 3px rgba(255, 228, 150, 0.55), 0 0 12px rgba(255, 220, 120, 0.8);
	transition: left 0.5s cubic-bezier(0.65, 0, 0.35, 1), background 0.5s ease, box-shadow 0.5s ease;
}

/* Кратеры луны. */
.theme-switch__knob::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background:
		radial-gradient(circle at 66% 30%, #b9bcc8 0 3.2px, transparent 3.6px),
		radial-gradient(circle at 44% 52%, #c3c6d1 0 2.4px, transparent 2.8px),
		radial-gradient(circle at 60% 70%, #b9bcc8 0 2.8px, transparent 3.2px);
	opacity: 0;
	transition: opacity 0.4s ease;
}

[data-theme="dark"] .theme-switch__night {
	opacity: 1;
}

[data-theme="dark"] .theme-switch__clouds {
	opacity: 0;
	transform: translateY(100%);
}

[data-theme="dark"] .theme-switch__knob {
	left: calc(100% - 32px);
	background: radial-gradient(circle at 40% 38%, #ffffff 0%, #eceef4 60%, #d4d7e1 100%);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 10px rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .theme-switch__knob::after {
	opacity: 1;
}

[data-theme="dark"] .theme-switch__track {
	box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.12), 0 3px 10px -4px rgba(0, 0, 0, 0.6);
}

/* Звёзды только ночью. */
.theme-switch__star {
	opacity: 0;
}

[data-theme="dark"] .theme-switch__star {
	opacity: 1;
}

.theme-switch:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

@media (max-width: 760px) {
	.theme-switch {
		width: 60px;
		height: 32px;
		margin-left: 8px;
	}

	.theme-switch__knob {
		width: 24px;
		height: 24px;
	}

	[data-theme="dark"] .theme-switch__knob {
		left: calc(100% - 28px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.theme-switch__knob,
	.theme-switch__night,
	.theme-switch__clouds {
		transition: none;
	}

	.theme-switch__meteor,
	.theme-switch__star {
		animation: none;
	}
}

@media (max-width: 1179px) {
	.site-nav .menu-item-has-children > a {
		padding-right: 48px;
	}
}

.site-header.is-compact .site-nav .menu-item-has-children > a {
	padding-right: 48px;
}

/* Телефон: шапка в одну строку — логотип, звонок, день/ночь, меню. */
@media (max-width: 760px) {
	.site-header__bar {
		gap: 8px;
		padding: 8px 8px 8px 14px;
	}

	.site-header__contact {
		gap: 8px;
	}

	.site-header .site-header__phone-icon {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}

	.burger {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}

	.theme-switch {
		width: 56px;
		height: 30px;
		margin-left: 0;
	}

	.theme-switch__knob {
		top: 3px;
		left: 3px;
		width: 24px;
		height: 24px;
	}

	[data-theme="dark"] .theme-switch__knob {
		left: calc(100% - 27px);
	}

	.theme-switch__clouds {
		width: 28px;
		height: 18px;
	}
}

@media (max-width: 380px) {
	.site-header__brand img {
		height: 18px;
	}
}

/* Планшет: в шапке значок телефона вместо номера, чтобы поместились «Оценить авто», день/ночь и меню. */
@media (min-width: 761px) and (max-width: 940px) {
	.site-header__phone-text {
		display: none;
	}
}

/* Тёмная тема: поля в стеклянных формах (первый экран и низ главной) — тёмные, полупрозрачные. */
[data-theme="dark"] .hero__form .field input:not([type="checkbox"]),
[data-theme="dark"] .hero__form .field select,
[data-theme="dark"] .hero__form .field textarea,
[data-theme="dark"] .valuation__form .field input:not([type="checkbox"]),
[data-theme="dark"] .valuation__form .field select,
[data-theme="dark"] .valuation__form .field textarea {
	background-color: rgba(10, 16, 12, 0.55);
	color: #e7eee9;
	border: 1.5px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .hero__form .field input::placeholder,
[data-theme="dark"] .valuation__form .field input::placeholder,
[data-theme="dark"] .valuation__form .field textarea::placeholder {
	color: rgba(231, 238, 233, 0.55);
}

[data-theme="dark"] .hero__form .field select,
[data-theme="dark"] .valuation__form .field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23e7eee9' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .hero__form .field select option,
[data-theme="dark"] .valuation__form .field select option {
	background: #17211b;
	color: #e7eee9;
}

/* Тёмная тема: чекбоксы в цвет полей — тёмные со светлой рамкой, отмеченные — зелёные с белой галочкой. */
[data-theme="dark"] input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	background: rgba(10, 16, 12, 0.55);
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

[data-theme="dark"] input[type="checkbox"]:hover {
	border-color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] input[type="checkbox"]:checked {
	background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
	border-color: var(--primary);
}

[data-theme="dark"] input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

[data-theme="dark"] .consent.has-error input[type="checkbox"] {
	border-color: var(--error);
}

/* ---------- О нас: социальная ответственность и награды ---------- */
.charity {
	margin-top: 2.4em;
}

.charity__intro {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(20px, 3vw, 36px);
}

.charity__text > :first-child {
	margin-top: 0;
}

.charity__photo {
	position: relative;
	margin: 0;
}

.charity__photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
}

.charity__photo figcaption {
	margin-top: 8px;
	font-size: 0.875rem;
	color: var(--muted);
}

.prose .awards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
	margin: 1.6em 0;
	padding: 0;
	list-style: none;
}

.prose .awards li {
	margin: 0;
}

.awards__item {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	color: var(--ink);
	text-decoration: none;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.awards__item:hover {
	box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.35);
	transform: translateY(-2px);
}

.prose .awards__item img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: #f4f4f2;
	border-radius: 10px;
}

.awards__caption {
	margin-top: 8px;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--muted);
}

.charity__outro {
	padding: 18px 22px;
	background: var(--tint);
	border-left: 4px solid var(--accent);
	border-radius: 0 14px 14px 0;
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ink);
}

@media (max-width: 760px) {
	.charity__intro {
		grid-template-columns: minmax(0, 1fr);
	}

	.charity__photo {
		max-width: 420px;
	}

	.prose .awards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Защита фото: нельзя выделить, перетащить, сохранить долгим нажатием; при печати фото скрыты. */
.is-protected img,
.award-viewer img {
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
	pointer-events: none;
}

.is-protected .charity__photo::after,
.award-viewer__frame::after {
	content: "";
	position: absolute;
	inset: 0;
}

@media print {
	.is-protected img,
	.award-viewer {
		visibility: hidden !important;
	}
}

/* Просмотр награды крупно. */
.award-viewer {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: none;
	place-items: center;
	padding: 24px;
	background: rgba(6, 10, 8, 0.86);
	-webkit-user-select: none;
	user-select: none;
}

.award-viewer.is-open {
	display: grid;
}

.award-viewer__frame {
	position: relative;
	max-width: min(1000px, 100%);
	max-height: 100%;
}

.award-viewer__frame img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 120px);
	max-height: calc(100dvh - 120px);
	border-radius: 12px;
}

.award-viewer__caption {
	margin-top: 10px;
	color: #ffffff;
	font-size: 0.9375rem;
	text-align: center;
}

.award-viewer__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.charity__text p + p,
.charity__text p + ul {
	margin-top: 0.8em;
}

@media (min-width: 761px) {
	.prose .awards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}
}
