/* ==========================================================================
   APL — дизайн-система
   Минимализм · бенто-сетка · акцентная типографика · тёмная тема · стекло
   ========================================================================== */

/* ---------- 0. Шрифт Manrope — хранится локально (fonts/manrope, лицензия OFL) ----------
   Вариативный: один файл на все начертания 400–800. Браузер скачивает
   только те поднаборы, символы которых есть на странице (unicode-range). */
@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../../fonts/manrope/manrope-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../../fonts/manrope/manrope-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../../fonts/manrope/manrope-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Токены ---------- */
:root {
	--bg: #f5f5f7;
	--surface: #ffffff;
	--surface-2: #f0f1f4;
	--text: #0c0d10;
	--muted: #5d6170;
	--line: rgba(12, 14, 22, .08);
	--line-strong: rgba(12, 14, 22, .14);

	--accent: #2b41db;          /* фирменный синий */
	--accent-2: #6a3df0;        /* для градиентов */
	--accent-ink: #ffffff;
	--accent-soft: rgba(43, 65, 219, .09);
	--hot: #e3262f;             /* фирменный красный — точечно */

	--glass: rgba(255, 255, 255, .64);
	--glass-line: rgba(255, 255, 255, .75);
	--glass-blur: saturate(180%) blur(18px);

	--shadow-sm: 0 1px 2px rgba(16, 20, 40, .04), 0 6px 20px -8px rgba(16, 20, 40, .06);
	--shadow-lg: 0 2px 6px rgba(16, 20, 40, .04), 0 30px 60px -20px rgba(16, 20, 40, .22);
	--shadow-accent: 0 18px 40px -16px rgba(43, 65, 219, .55);

	--r-xl: 32px;
	--r-lg: 26px;
	--r-md: 18px;
	--r-sm: 12px;
	--r-pill: 999px;

	--container: 1240px;
	--narrow: 820px;
	--gutter: clamp(16px, 4vw, 40px);
	--gap: clamp(12px, 1.4vw, 18px);
	--pad: clamp(22px, 2.8vw, 40px);
	--section: clamp(72px, 11vw, 150px);

	--font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--ease-spring: cubic-bezier(.34, 1.56, .64, 1);

	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0a0b0e;
	--surface: #13151a;
	--surface-2: #1b1e25;
	--text: #f3f4f7;
	--muted: #9ba1ae;
	--line: rgba(255, 255, 255, .07);
	--line-strong: rgba(255, 255, 255, .14);

	--accent: #7b8bff;
	--accent-2: #a77bff;
	--accent-ink: #0a0b0e;
	--accent-soft: rgba(123, 139, 255, .13);
	--hot: #ff5a62;

	--glass: rgba(19, 21, 26, .62);
	--glass-line: rgba(255, 255, 255, .08);

	--shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
	--shadow-lg: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 70px -20px rgba(0, 0, 0, .8);
	--shadow-accent: 0 18px 40px -16px rgba(123, 139, 255, .45);

	color-scheme: dark;
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: clamp(16px, .2vw + 15.4px, 17.5px);
	line-height: 1.6;
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	transition: background-color .4s var(--ease), color .4s var(--ease);
	overflow-x: hidden;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: fixed;
	top: 12px; left: 12px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: var(--r-pill);
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 600;
	transform: translateY(-150%);
	transition: transform .2s;
}
.skip-link:focus { transform: none; }

.site-main:focus { outline: none; }

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }

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

/* Мягкое фоновое свечение — даёт глубину стеклу. */
.ambient {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	overflow: hidden;
}
.ambient span {
	position: absolute;
	width: 60vmax;
	height: 60vmax;
	border-radius: 50%;
	filter: blur(90px);
	opacity: .35;
	will-change: transform;
}
.ambient span:first-child {
	top: -30vmax; right: -20vmax;
	background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
	animation: drift 26s ease-in-out infinite alternate;
}
.ambient span:last-child {
	bottom: -35vmax; left: -25vmax;
	background: radial-gradient(circle, var(--accent-2) 0%, transparent 65%);
	opacity: .22;
	animation: drift 32s ease-in-out infinite alternate-reverse;
}
[data-theme="dark"] .ambient span { opacity: .22; }
[data-theme="dark"] .ambient span:last-child { opacity: .14; }

@keyframes drift {
	to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); }
}

/* ---------- 3. Типографика ---------- */
.display {
	font-size: clamp(2.25rem, 1.2rem + 5.2vw, 6rem);
	font-weight: 800;
	line-height: .98;
	letter-spacing: -.045em;
}
.display--page { font-size: clamp(2.4rem, 1.3rem + 4vw, 4.75rem); max-width: 16ch; }

.h-section {
	font-size: clamp(2rem, 1.1rem + 3vw, 3.6rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.04em;
}
.h-card {
	font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -.03em;
}

.lead {
	font-size: clamp(1.06rem, .95rem + .45vw, 1.3rem);
	line-height: 1.55;
	color: var(--muted);
	max-width: 56ch;
}

.accent-text {
	background: linear-gradient(100deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.eyebrow,
.kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--accent);
}
.kicker {
	padding: 7px 14px 7px 12px;
	border-radius: var(--r-pill);
	background: var(--accent-soft);
	letter-spacing: .04em;
	text-transform: none;
	font-size: .9rem;
	font-weight: 600;
}
.dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--hot);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--hot) 20%, transparent);
	animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- 4. Кнопки ---------- */
.btn {
	--btn-bg: var(--surface);
	--btn-fg: var(--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	min-height: 46px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-weight: 650;
	font-size: .98rem;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .35s var(--ease-spring), box-shadow .3s var(--ease), background-color .3s, color .3s, border-color .3s;
}
.btn .icon { transition: transform .35s var(--ease-spring); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn--sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.04rem; }

.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); box-shadow: var(--shadow-accent); }
.btn--primary:hover { box-shadow: 0 22px 46px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--ghost { --btn-bg: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--surface); border-color: transparent; box-shadow: var(--shadow-sm); }
.btn--light { --btn-bg: #fff; --btn-fg: #0c0d10; }
.btn--glass {
	--btn-bg: rgba(255, 255, 255, .14);
	--btn-fg: #fff;
	border-color: rgba(255, 255, 255, .28);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.btn--glass:hover { --btn-bg: rgba(255, 255, 255, .22); }

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px; height: 42px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	cursor: pointer;
	transition: transform .35s var(--ease-spring), background-color .3s, border-color .3s;
}
.icon-btn:hover { transform: rotate(-12deg) scale(1.06); }
.icon-btn .icon { width: 19px; height: 19px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 5. Шапка ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: 12px;
}
.header-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 66px;
	padding: 8px 8px 8px 10px;
	border: 1px solid var(--glass-line);
	border-radius: var(--r-pill);
	background: var(--glass);
	-webkit-backdrop-filter: var(--glass-blur);
	backdrop-filter: var(--glass-blur);
	box-shadow: var(--shadow-sm);
	transition: box-shadow .4s var(--ease), background-color .4s;
}
.site-header.is-scrolled .header-bar { box-shadow: var(--shadow-lg); }
.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; } }

.brand {
	display: inline-flex;
	align-items: center;
	flex: none;
	padding: 4px 10px;
	border-radius: var(--r-pill);
	transition: opacity .25s;
}
.brand:hover { opacity: .85; }
.brand__logo { width: auto; height: 40px; }
/* Светлая тема — фирменные цвета, тёмная — белая надпись. */
.brand__logo--dark { display: none; }
[data-theme="dark"] .brand__logo--light { display: none; }
[data-theme="dark"] .brand__logo--dark { display: block; }
.footer-brand .brand { padding: 0; }
.footer-brand .brand__logo { height: 48px; }

.nav { margin-inline: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__list a {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	border-radius: var(--r-pill);
	font-weight: 600;
	font-size: .96rem;
	color: var(--muted);
	transition: color .25s, background-color .25s;
}
.nav__list a:hover { color: var(--text); background: var(--accent-soft); }
.nav__list .current-menu-item > a,
.nav__list .current-menu-ancestor > a,
.nav__list .current_page_item > a { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }

.nav__list .menu-item-has-children { position: relative; }
.nav__list .menu-item-has-children > a::after {
	content: "";
	width: 6px; height: 6px;
	margin-left: 8px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}
.nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 240px;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--glass-line);
	border-radius: var(--r-md);
	background: color-mix(in srgb, var(--surface) 97%, transparent); /* внутри стеклянной шапки вложенный blur не работает */
	box-shadow: var(--shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px) scale(.98);
	transform-origin: top left;
	transition: opacity .25s var(--ease), transform .3s var(--ease), visibility .25s;
}
.nav__list .sub-menu a { display: flex; width: 100%; border-radius: var(--r-sm); }
.nav__list .menu-item-has-children:hover > .sub-menu,
.nav__list .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* Переключатель языков — сегментированный контрол */
.lang-switch ul {
	display: flex;
	gap: 2px;
	padding: 3px;
	list-style: none;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface-2);
}
.lang-switch a {
	display: grid;
	place-items: center;
	min-width: 36px;
	height: 34px;
	padding: 0 8px;
	border-radius: var(--r-pill);
	font-size: .78rem;
	font-weight: 750;
	letter-spacing: .04em;
	color: var(--muted);
	transition: color .25s, background-color .25s, box-shadow .25s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-current { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.lang-switch--mobile { display: none; }
.nav__cta-mobile, .nav-toggle { display: none; }

.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__close { display: block; }
.nav-open .nav-toggle__open { display: none; }

/* ---------- 6. Бенто-сетка и карточки ---------- */
.bento {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--gap);
}

.card {
	--mx: 50%;
	--my: 50%;
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: var(--pad);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s, background-color .4s;
}
/* «Прожектор» за курсором */
.card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(420px circle at var(--mx) var(--my), var(--accent-soft), transparent 60%);
	opacity: 0;
	transition: opacity .4s var(--ease);
	pointer-events: none;
}
.card:hover::before { opacity: 1; }

.card.is-link,
.card:has(.stretched) { cursor: pointer; }
.card.is-link:hover,
.card:has(.stretched):hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--line-strong);
}

.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.card--accent {
	border-color: transparent;
	background:
		radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--hot) 55%, transparent) 0%, transparent 45%),
		radial-gradient(90% 80% at 0% 100%, #7c4dff 0%, transparent 60%),
		linear-gradient(140deg, #2b41db 0%, #1d2aa8 100%);
	color: #fff;
	box-shadow: var(--shadow-accent);
}
.card--accent::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 60%); }
.card--accent .lead, .card--accent p { color: rgba(255, 255, 255, .82); }

.card--glass {
	border-color: var(--glass-line);
	background: var(--glass);
	-webkit-backdrop-filter: var(--glass-blur);
	backdrop-filter: var(--glass-blur);
}

.card-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: .85rem;
	font-weight: 650;
	color: var(--muted);
}
.card-label .icon { color: var(--accent); }

.round-arrow {
	position: absolute;
	top: var(--pad);
	right: var(--pad);
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--surface-2);
	color: var(--text);
	transition: transform .5s var(--ease-spring), background-color .3s, color .3s;
}
.round-arrow .icon { width: 18px; height: 18px; }
.card:hover .round-arrow { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }

.tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 11px;
	border-radius: var(--r-pill);
	background: var(--accent-soft);
	color: var(--accent);
	font-size: .8rem;
	font-weight: 700;
	position: relative;
	z-index: 2;
}

/* ---------- 7. Секции ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(20px, 3vw, 36px); }
.section--after-hero { padding-top: clamp(16px, 2.5vw, 28px); }

.section-head {
	display: grid;
	gap: 14px;
	max-width: 760px;
	margin-bottom: clamp(32px, 4.5vw, 56px);
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
	max-width: none;
}
.section-head--row > div:first-child { display: grid; gap: 14px; }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 54ch; }

/* ---------- 8. Первый экран ---------- */
.hero-bento { grid-auto-rows: minmax(150px, auto); grid-auto-flow: dense; }

.hero-main {
	grid-column: span 8;
	grid-row: span 2;
	justify-content: flex-end;
	gap: clamp(18px, 2.2vw, 28px);
	min-height: clamp(440px, 52vw, 600px);
	padding: clamp(28px, 4vw, 56px);
}
.hero-main .kicker { align-self: flex-start; margin-bottom: auto; }
.hero-main .actions { margin-top: 6px; }

.hero-visual {
	grid-column: span 4;
	grid-row: span 1;
	min-height: 270px;
	align-items: center;
	justify-content: center;
	perspective: 900px;
}

.hero-contact { grid-column: span 4; justify-content: flex-end; }
.hero-contact__phone {
	font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
}

.stat { grid-column: span 3; justify-content: flex-end; min-height: 190px; }
.stat__num {
	font-size: clamp(3rem, 2rem + 3vw, 4.6rem);
	font-weight: 800;
	line-height: .9;
	letter-spacing: -.05em;
	font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--muted); font-weight: 600; max-width: 18ch; }

.hero-news { grid-column: span 6; justify-content: flex-end; min-height: 190px; }
.hero-news__title {
	font-size: clamp(1.2rem, 1rem + .7vw, 1.55rem);
	font-weight: 700;
	letter-spacing: -.025em;
	line-height: 1.2;
	max-width: 30ch;
	padding-right: 56px;
}

/* Лёгкий 3D-элемент: стопка стеклянных плиток */
.stack {
	position: relative;
	width: min(230px, 80%);
	aspect-ratio: 1.25;
	transform-style: preserve-3d;
	transform: rotateX(54deg) rotateZ(-38deg) translate3d(var(--px, 0px), var(--py, 0px), 0);
	transition: transform .6s var(--ease);
}
.stack__tile {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	padding: 16px 18px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 22px;
	background: linear-gradient(150deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .08));
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 30px 40px -18px rgba(5, 8, 40, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
	color: #fff;
	font-weight: 700;
	font-size: .95rem;
	animation: float 7s ease-in-out infinite;
}
.stack__tile .icon { width: 22px; height: 22px; opacity: .9; }
.stack__tile--1 { transform: translateZ(64px); }
.stack__tile--2 { transform: translateZ(32px); animation-delay: -1.2s; opacity: .85; }
.stack__tile--3 { transform: translateZ(0); animation-delay: -2.4s; opacity: .65; }
.stack__logo {
	margin-bottom: auto;
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -.05em;
	line-height: 1;
}
@keyframes float {
	50% { translate: 0 0 14px; }
}

/* ---------- 9. Услуги ---------- */
.service-card { grid-column: span 6; padding: 0; gap: 0; }
.services-grid > :nth-child(4n + 1),
.services-grid > :nth-child(4n + 4) { grid-column: span 7; }
.services-grid > :nth-child(4n + 2),
.services-grid > :nth-child(4n + 3) { grid-column: span 5; }
.services-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }

.service-card__media {
	position: relative;
	margin: 10px 10px 0;
	border-radius: calc(var(--r-lg) - 8px);
	overflow: hidden;
	height: clamp(220px, 20vw, 290px);
	padding: 18px;
	background:
		radial-gradient(60% 70% at 50% 60%, var(--accent-soft), transparent 70%),
		var(--surface-2);
}
/* Коробки программ: целиком, без обрезки */
.service-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 18px 24px rgb(0 0 0 / .12));
	transition: transform 1s var(--ease);
}
.service-card__price {
	margin-top: 6px;
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}
/* Цена на странице услуги */
.price-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 18px;
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
}
.price-badge strong { font-size: 1.25rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.service-card:hover .service-card__media img { transform: scale(1.045); }
.service-card__body {
	display: grid;
	gap: 8px;
	padding: clamp(20px, 2.4vw, 30px) clamp(22px, 2.8vw, 34px) clamp(24px, 2.8vw, 34px);
	padding-right: 84px;
}
.service-card__title {
	font-size: clamp(1.25rem, 1rem + .8vw, 1.65rem);
	font-weight: 750;
	letter-spacing: -.03em;
}
.service-card .round-arrow { top: auto; bottom: clamp(22px, 2.6vw, 32px); right: clamp(22px, 2.6vw, 32px); }

/* 3D-наклон (включается скриптом только на устройствах с мышью) */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt.is-tilting { transition: transform .15s linear, box-shadow .5s var(--ease); }

/* ---------- 10. Записи ---------- */
.posts-grid > .post-card { grid-column: span 4; }
.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(1) { grid-column: span 8; }
.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(1) .post-card__title { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.2rem); max-width: 22ch; }

/* Последний неполный ряд на главной растягиваем, чтобы не было «дыр». */
@media (min-width: 1101px) {
	.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(3n):last-child { grid-column: 1 / -1; }
	.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(3n + 1):not(:first-child):last-child,
	.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(3n):nth-last-child(2) { grid-column: span 6; }
	.posts-grid:not(.posts-grid--archive) > .post-card:only-child { grid-column: 1 / -1; }
}

.post-card { min-height: 260px; }
.post-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--muted);
	font-size: .88rem;
	font-weight: 600;
}
.post-card__title {
	font-size: clamp(1.15rem, 1rem + .4vw, 1.35rem);
	font-weight: 750;
	letter-spacing: -.025em;
	line-height: 1.22;
}
.post-card__excerpt { color: var(--muted); font-size: .97rem; }
.more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 6px;
	font-weight: 700;
	font-size: .93rem;
	color: var(--accent);
}
.more .icon { transition: transform .35s var(--ease-spring); }
.post-card:hover .more .icon { transform: translateX(4px); }

.post-card.is-hidden { display: none; }
.post-card.is-shown { animation: pop .5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Чипсы-фильтры */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
	font-weight: 650;
	font-size: .92rem;
	color: var(--muted);
	cursor: pointer;
	transition: color .25s, background-color .25s, border-color .25s, transform .3s var(--ease-spring);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: transparent; }
.chip__count { font-size: .78rem; opacity: .6; }

/* ---------- 11. Клиенты: бегущая лента ---------- */
.marquee {
	display: flex;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
	display: flex;
	flex: none;
	gap: var(--gap);
	padding-right: var(--gap);
	list-style: none;
	animation: marquee calc(var(--count, 8) * 4.5s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

.logo-tile {
	display: grid;
	place-items: center;
	width: clamp(150px, 16vw, 210px);
	height: clamp(84px, 9vw, 108px);
	padding: 16px 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: #fff;            /* логотипы клиентов рассчитаны на белый фон */
	transition: transform .4s var(--ease-spring), box-shadow .4s;
}
.logo-tile img {
	max-height: 100%;
	width: auto;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .7;
	transition: filter .4s, opacity .4s;
}
.logo-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.logo-tile:hover img { filter: none; opacity: 1; }
[data-theme="dark"] .logo-tile { background: #e9eaee; border-color: transparent; }

/* ---------- 12. Призыв ---------- */
.cta-card {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 32px;
	padding: clamp(32px, 5vw, 72px);
	border-radius: var(--r-xl);
}
.cta-card__text { display: grid; gap: 16px; max-width: 640px; }
.cta-card__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 13. Внутренние страницы ---------- */
.page-hero { padding-top: clamp(36px, 6vw, 80px); }
.page-hero .display { margin-block: 14px 18px; }
.page-hero .chips { margin-top: 28px; }

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	font-size: .88rem;
	font-weight: 600;
	color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	font-size: .9rem;
	font-weight: 600;
}
.entry-meta time { display: inline-flex; align-items: center; gap: 6px; }

.entry-media {
	margin: 0 0 var(--gap);
	border-radius: var(--r-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	background: var(--surface);
}
.entry-media img { width: 100%; }
/* Коробка программы на странице услуги: в натуральную величину, по центру */
.single-offers .entry-media {
	display: grid;
	place-items: center;
	padding: clamp(20px, 4vw, 44px);
	background:
		radial-gradient(55% 65% at 50% 60%, var(--accent-soft), transparent 70%),
		var(--surface-2);
}
.single-offers .entry-media img {
	width: auto;
	max-width: 100%;
	max-height: 420px;
	object-fit: contain;
	filter: drop-shadow(0 22px 30px rgb(0 0 0 / .14));
}

.entry-body { padding: clamp(24px, 4.5vw, 60px); }
.entry-cta {
	margin-top: var(--gap);
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}

.empty-state { align-items: flex-start; }

/* Контакты */
.contacts-grid { align-items: stretch; }
.contact-card { grid-column: span 4; min-height: 180px; justify-content: space-between; }
.contact-card__list { list-style: none; display: grid; gap: 4px; }
.contact-card__list a,
.contact-card__addr {
	font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem);
	font-weight: 750;
	letter-spacing: -.025em;
	line-height: 1.3;
}
.contact-card__list a:hover { color: var(--accent); }

.map-card {
	grid-column: span 6;
	min-height: 460px;
	padding: 0;
}
.map-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
[data-theme="dark"] .map-card iframe { filter: invert(.92) hue-rotate(180deg) saturate(.6); }

.form-card { grid-column: span 6; }
.contacts-content { grid-column: 1 / -1; }

/* Поля формы с «плавающими» подписями */
.contact-form { display: grid; gap: 14px; margin-top: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; }
.field input,
.field textarea {
	width: 100%;
	min-height: 58px;
	padding: 24px 16px 8px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-md);
	background: var(--surface);
	outline: none;
	transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field label {
	position: absolute;
	top: 18px;
	left: 17px;
	color: var(--muted);
	font-size: .98rem;
	pointer-events: none;
	transform-origin: left top;
	transition: transform .25s var(--ease), color .25s;
}
.field input:focus,
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); color: var(--accent); }
.field.is-invalid input { border-color: var(--hot); }

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

.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.form-status { font-weight: 600; font-size: .95rem; }
.form-status.is-ok { color: #16a34a; }
.form-status.is-error { color: var(--hot); }
[data-theme="dark"] .form-status.is-ok { color: #4ade80; }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* Поиск */
.search-form {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 520px;
	margin-top: 22px;
	padding: 6px 6px 6px 18px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-pill);
	background: var(--surface);
	transition: border-color .25s, box-shadow .25s;
}
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-form .icon { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 8px 0; }

/* 404 */
.notfound { grid-column: 1 / -1; align-items: flex-start; gap: 20px; padding: clamp(32px, 6vw, 80px); }
.notfound__code {
	font-size: clamp(6rem, 3rem + 14vw, 14rem);
	font-weight: 800;
	line-height: .8;
	letter-spacing: -.07em;
	background: linear-gradient(120deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Пагинация */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
	font-weight: 700;
}
.pagination .page-numbers.current { background: var(--text); color: var(--bg); border-color: transparent; }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 14. Контент записей ---------- */
.prose { font-size: 1.06rem; line-height: 1.75; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.9em; letter-spacing: -.03em; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.prose h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 750; }
.prose img { border-radius: var(--r-md); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.prose blockquote {
	margin-inline: 0;
	padding: 18px 24px;
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--r-md) var(--r-md) 0;
	background: var(--accent-soft);
	font-size: 1.1rem;
}
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin-block: 2em; }
.prose table {
	display: block;
	width: 100% !important;  /* перебиваем width/height, зашитые редактором */
	height: auto !important;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	font-size: .97rem;
	line-height: 1.45;
}
.prose table tbody, .prose table thead { display: table; width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose tr:first-child td, .prose th { font-weight: 700; background: var(--surface-2); }
.prose tr:hover td { background: var(--accent-soft); }
.prose td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Прайс с заголовком таблицы: первая строка тела — обычная, цены справа */
.prose .price-table tbody tr:first-child td { font-weight: inherit; background: none; }
.prose .price-table tbody tr:hover td { background: var(--accent-soft); }
.prose .price-table th:last-child, .prose .price-table td:last-child { text-align: right; }
.prose .price-table tbody tr td:last-child { font-weight: 700; }
.prose iframe { width: 100%; border: 0; border-radius: var(--r-md); }

/* Вводный абзац в контенте: <p class="lead"> */
.prose p.lead { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.55; color: var(--text); max-width: none; }
.prose p.lead strong { color: var(--accent); }

/* Список-сетка с галочками: <ul class="grid-list"> */
.prose ul.grid-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	padding: 0;
	list-style: none;
}
.prose ul.grid-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface-2);
	font-weight: 650;
	line-height: 1.3;
	transition: transform .3s var(--ease-spring), border-color .3s;
}
.prose ul.grid-list li:hover { transform: translateY(-2px); border-color: var(--accent); }
.prose ul.grid-list li::before {
	content: "";
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b41db' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center / 15px no-repeat;
}
[data-theme="dark"] .prose ul.grid-list li::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8bff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E");
}
.prose ul.grid-list + p { color: var(--muted); }
@media (max-width: 520px) { .prose ul.grid-list { grid-template-columns: 1fr; } }
.prose .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.4em; }
.prose .aligncenter { margin-inline: auto; }

/* ---------- 15. Подвал ---------- */
.site-footer { padding-block: clamp(56px, 7vw, 96px) 28px; }
.footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: clamp(28px, 4vw, 60px);
	padding: var(--pad);
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	background: var(--surface);
}
.footer-brand { display: grid; gap: 18px; align-content: start; max-width: 42ch; }
.footer-title {
	margin-bottom: 14px;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}
.footer-list { list-style: none; display: grid; gap: 8px; font-weight: 600; }
.footer-list a { transition: color .2s; }
.footer-list a:hover { color: var(--accent); }
.footer-list .muted { font-weight: 500; }
.footer-bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 22px 8px 0;
	font-size: .9rem;
	color: var(--muted);
}
.to-top:hover { color: var(--accent); }

/* ---------- 16. Появление при скролле ---------- */
.js .reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s var(--ease), transform .9s var(--ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }
/* После появления скрипт снимает класс .reveal — дальше работают обычные hover-эффекты. */

/* ---------- 17. Адаптив ---------- */
@media (max-width: 1100px) {
	.hero-main { grid-column: 1 / -1; grid-row: auto; min-height: 0; padding-top: 48px; }
	.hero-main .kicker { margin-bottom: 18px; }
	.hero-visual, .hero-contact { grid-column: span 6; }
	.stat { grid-column: span 6; }
	.hero-news { grid-column: 1 / -1; }

	.services-grid > .service-card:nth-child(n) { grid-column: span 6; }
	.services-grid > .service-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

	.posts-grid > .post-card:nth-child(n) { grid-column: span 6; }
	.posts-grid:not(.posts-grid--archive) > .post-card:nth-child(1) { grid-column: 1 / -1; }

	.contact-card { grid-column: span 6; }
	.contact-card:nth-child(3) { grid-column: 1 / -1; }
	.map-card, .form-card { grid-column: 1 / -1; }
	.map-card { min-height: 340px; }
}

@media (max-width: 900px) {
	.header-cta { display: none; }
	.nav-toggle { display: inline-grid; }

	.nav {
		position: absolute;
		top: calc(100% + 8px);
		left: var(--gutter);
		right: var(--gutter);
		display: grid;
		gap: 12px;
		padding: 14px;
		border: 1px solid var(--glass-line);
		border-radius: var(--r-lg);
		background: color-mix(in srgb, var(--surface) 97%, transparent);
		box-shadow: var(--shadow-lg);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px) scale(.98);
		transform-origin: top center;
		transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .3s;
	}
	.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav__list a { padding: 14px 16px; font-size: 1.1rem; color: var(--text); }
	.nav__list .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0 12px;
		border: 0;
		background: none;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.nav__list .sub-menu a { font-size: 1rem; color: var(--muted); }
	.nav__cta-mobile { display: inline-flex; min-height: 52px; }
	.lang-switch--desktop { display: none; }
	.lang-switch--mobile { display: block; padding: 4px 16px 0; }
	.lang-switch--mobile ul { display: inline-flex; }
	.lang-switch--mobile a { min-width: 52px; height: 40px; font-size: .9rem; }
	.header-actions { margin-left: auto; }

	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	.bento > *,
	.bento > .card:nth-child(n),
	.services-grid > .service-card:nth-child(n),
	.posts-grid > .post-card:nth-child(n) { grid-column: 1 / -1; }

	.hero-main { padding: 28px 22px; }
	.hero-main .actions .btn { flex: 1 1 100%; }
	.stat { min-height: 150px; }
	.hero-visual { min-height: 230px; }

	.field-row { grid-template-columns: 1fr; }
	.contact-card { min-height: 0; }
	.cta-card { flex-direction: column; align-items: stretch; }
	.cta-card__actions .btn { flex: 1 1 100%; }
	.entry-cta { flex-direction: column; align-items: flex-start; }

	.brand { padding: 4px 6px; }
	.brand__logo { height: 32px; }

	.footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 18. Доступность: меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	.js .reveal { opacity: 1; transform: none; }
	.marquee { overflow-x: auto; }
}

/* Если браузер не умеет backdrop-filter — делаем стекло плотнее. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	:root { --glass: rgba(255, 255, 255, .95); }
	[data-theme="dark"] { --glass: rgba(19, 21, 26, .96); }
}

/* Печать */
@media print {
	.site-header, .site-footer, .ambient, .entry-cta, .marquee { display: none !important; }
	body { background: #fff; color: #000; }
	.card { box-shadow: none; border-color: #ddd; }
}
