.hero {
	padding: 28px 0 0;
	color: rgba(255, 255, 255, 0.82);
	overflow: hidden;
	isolation: isolate;
}
.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	min-height: 440px;
	padding-bottom: 48px;
}
.hero--with-bottom .hero__grid {
	padding-bottom: 36px;
}
.hero__content {
	position: relative;
	z-index: 2;
}
.hero__badge {
	margin-bottom: 14px;
}
.hero__title {
	color: #fff;
	font-size: var(--fs-h1);
	line-height: var(--lh-h1);
	letter-spacing: -0.03em;
	font-weight: 700;
}
@media (min-width: 1025px) {
	.hero__title--s {
		font-size: calc(var(--fs-h1) * 0.88);
	}
	/* Макет «Кейс — разработка»: заголовок ≈37 px в две строки, текст занимает больше половины */
	.hero__title--xs {
		font-size: calc(var(--fs-h1) * 0.72);
		line-height: 1.18;
	}
	.hero__grid:has(.hero__title--xs) {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	}
}
.hero__title .accent {
	color: var(--c-accent-2);
}
.hero__lead {
	margin-top: 16px;
	font-size: clamp(18px, 1.7vw, 22px);
	line-height: 1.35;
	color: #fff;
	font-weight: 500;
}
.hero__text {
	margin-top: 18px;
	max-width: 600px;
	font-size: var(--fs-lead);
	line-height: 1.55;
}
.hero__btns {
	margin-top: 28px;
}
.hero__btns .btn--outline {
	min-width: 190px;
}

.hero__visual {
	position: relative;
	z-index: 1;
	padding: 34px 0 24px;
}
.hero__visual .devices {
	max-width: 560px;
}
.hero__image {
	margin-inline: auto;
	max-height: 460px;
	width: auto;
}
.hero__visual:has(.hero__note) {
	padding-top: 84px;
}
.hero__note {
	position: absolute;
	top: 0;
	right: 0;
	width: 230px;
	transform: rotate(-7deg);
	font-size: 27px;
	color: rgba(255, 255, 255, 0.92);
	z-index: 3;
}
.hero__note-arrow {
	width: 70px;
	margin: 4px 0 0 30px;
	color: rgba(255, 255, 255, 0.75);
}
.hero__float {
	position: absolute;
	z-index: 4;
	min-width: 200px;
}
.hero__float--1 {
	right: -10px;
	top: 42%;
}
.hero__float--2 {
	right: -10px;
	top: calc(42% + 108px);
}
.hero__float--3 {
	left: -20px;
	bottom: 6%;
}
.hero__float--4 {
	right: -10px;
	top: 6%;
}
/* Если плашек две, а надписи нет — поднимаем их выше */
.hero__visual:not(:has(.hero__note)) .hero__float--1 {
	top: 22%;
}
.hero__visual:not(:has(.hero__note)) .hero__float--2 {
	top: calc(22% + 108px);
}
.stat-float__label--top {
	margin: 0 0 6px;
}
.hero .stat-float__label--sub {
	max-width: 170px;
	font-size: 11px;
}

/* Плашки столбиком справа (поле «Вид плашек» = тёмные столбиком) */
.hero__visual--float-list .devices {
	margin-left: 0;
	max-width: 88%;
}
/* Макет «Техподдержка»: плашки заходят на ноутбук только краем (~20 px), экран остаётся виден */
@media (min-width: 1025px) {
	.hero__visual--float-list .devices {
		max-width: 70%;
		margin-top: 12px;
	}
}
.hero .hero__float-list {
	position: absolute;
	z-index: 4;
	right: -10px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 250px;
	padding: 0;
}
.hero__float-item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 82px;
	padding: 14px 18px;
	border-radius: var(--radius);
	background: rgba(4, 18, 15, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.hero__float-icon {
	flex: none;
	color: var(--c-accent);
}
.hero__float-icon .icon {
	width: 34px;
	height: 34px;
	stroke-width: 1.6;
}
.hero__float-text {
	color: #fff;
	font-size: var(--fs-card);
	font-weight: 500;
	line-height: 1.35;
}
.hero__float-text b {
	display: block;
	font-size: 20px;
	color: var(--c-accent);
}

/* Фото на правую половину (контакты) */
.hero__photo {
	position: absolute;
	inset: 0 0 0 42%;
	z-index: -1;
}
.hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, var(--c-dark) 0%, rgba(1, 13, 10, 0.55) 30%, rgba(1, 13, 10, 0.15) 70%),
		linear-gradient(0deg, rgba(1, 13, 10, 0.55) 0%, transparent 40%);
}
.hero--visual-photo .hero__grid {
	grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.38fr);
	min-height: 360px;
}

/* Фото фоном за ноутбуком и телефоном (макет «Кейс — контекстная реклама») */
.hero--devices-photo .hero__photo {
	inset: 0 0 0 40%;
}
.hero--devices-photo .hero__photo::after {
	background:
		linear-gradient(90deg, var(--c-dark) 0%, rgba(1, 13, 10, 0.6) 22%, rgba(1, 13, 10, 0.2) 60%, rgba(1, 13, 10, 0.1) 100%),
		linear-gradient(0deg, rgba(1, 13, 10, 0.6) 0%, transparent 35%);
}

/* плашки ниже, на правом нижнем углу ноутбука — как в макете */
@media (min-width: 1025px) {
	.hero--devices-photo .hero__visual:not(:has(.hero__note)) .hero__float--1 {
		top: 44%;
		right: 30px;
	}
	.hero--devices-photo .hero__visual:not(:has(.hero__note)) .hero__float--2 {
		top: calc(44% + 122px);
		right: 30px;
	}
}

/* Плашки поверх фото (кейс без скриншота) */
.hero--visual-photo .hero__visual {
	min-height: 320px;
}

/* Строка пунктов */
.hero-items {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 20px 28px;
	padding: 26px 0 30px;
	border-top: 1px solid var(--c-dark-line);
}
.hero-items__item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	line-height: 1.35;
}
.hero-items__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid rgba(0, 229, 189, 0.55);
	color: var(--c-accent);
	flex: none;
}
.hero-items__icon .icon {
	width: 21px;
	height: 21px;
}
.hero-items__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.hero-items__value {
	color: #fff;
	font-weight: 700;
}
.hero-items__text {
	color: rgba(255, 255, 255, 0.7);
}
/* Крупные цифры (главная) */
.hero-items--stats {
	border-top: 0;
	/* В макете колонки цифр ~270 px, а не на всю ширину */
	grid-template-columns: repeat(4, minmax(0, 270px));
	column-gap: 6px;
	padding-top: 6px;
	padding-bottom: 36px;
}
.hero-items--stats .hero-items__item {
	align-items: flex-start;
}
.hero-items--stats .hero-items__value {
	font-size: clamp(28px, 2.8vw, 40px);
	line-height: 1.1;
	margin-bottom: 6px;
	letter-spacing: -0.02em;
}
.hero-items--stats .hero-items__text {
	font-size: var(--fs-body);
	color: rgba(255, 255, 255, 0.82);
}
/* Слова вместо цифры («Россия и СНГ») — мельче; подписи всех пунктов на одной линии. */
.hero-items--stats .hero-items__value--words {
	font-size: clamp(var(--fs-h3, 20px), 1.8vw, 24px);
	line-height: 1.08;
}
@media (min-width: 641px) {
	.hero-items--stats .hero-items__item {
		align-self: end;
	}
}
/* Иконка + текст (услуги) — подписи в две строки. Макет SEO: круг 48, текст 14 белый */
.hero-items--features .hero-items__item {
	gap: 18px;
	font-size: 14px;
	line-height: 1.4;
}
.hero-items--features .hero-items__icon {
	width: 48px;
	height: 48px;
	border-width: 2px;
	border-color: var(--c-accent);
	box-shadow: 0 0 16px rgba(0, 229, 189, 0.22);
}
.hero-items--features .hero-items__icon .icon {
	width: 24px;
	height: 24px;
	stroke-width: 2;
}
.hero-items--features .hero-items__body {
	gap: 0;
}
.hero-items--features .hero-items__value {
	font-weight: 500;
	color: #fff;
}
.hero-items--features .hero-items__text {
	color: rgba(255, 255, 255, 0.88);
}
/* Факты в первом экране кейса */
.hero-items--facts {
	border-top: 0;
	padding: 4px 0 0;
	margin-top: 24px;
	grid-template-columns: repeat(auto-fit, minmax(120px, auto));
	justify-content: start;
}
.hero-items--facts .hero-items__icon {
	border: 0;
	width: 30px;
	height: 30px;
}
.hero-items--facts .hero-items__icon .icon {
	width: 28px;
	height: 28px;
}
.hero-items--facts .hero-items__value {
	font-size: 15px;
}
.hero-items--facts .hero-items__text {
	font-size: 11px;
}

/* Колонки под описанием: иконка сверху (контакты) */
.hero-items--columns {
	border-top: 0;
	padding: 0;
	margin-top: 34px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 560px;
}
.hero-items--columns .hero-items__item {
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}
.hero-items--columns .hero-items__icon {
	border: 0;
	width: auto;
	height: auto;
}
.hero-items--columns .hero-items__icon .icon {
	width: 36px;
	height: 36px;
	stroke-width: 1.6;
}
.hero-items--columns .hero-items__value {
	font-size: 15px;
}
.hero-items--columns .hero-items__text {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
}
/* ul[class] в base.css обнуляет padding сильнее, чем .hero-items, — повторяем отступы с большей специфичностью */
.hero .hero-items {
	padding: 26px 0 30px;
}
.hero .hero-items--stats {
	padding-top: 6px;
	padding-bottom: 36px;
}
.hero .hero-items--facts {
	padding: 4px 0 0;
}
.hero .hero-items--columns {
	padding: 0;
}

@media (max-width: 1024px) {
	.hero__grid,
	.hero--visual-photo .hero__grid {
		grid-template-columns: 1fr;
		min-height: 0;
		gap: 12px;
	}
	.hero__visual {
		max-width: 620px;
		width: 100%;
		margin: 0 auto;
	}
	.hero__note {
		display: none;
	}
	.hero__visual:has(.hero__note) {
		padding-top: 24px;
	}
	.hero__photo {
		inset: 0;
		opacity: 0.35;
	}
}
@media (max-width: 640px) {
	.hero {
		padding-top: 18px;
	}
	.hero__btns .btn {
		flex: 1 1 100%;
	}
	.hero__float {
		min-width: 0;
		padding: 10px 12px;
		gap: 10px;
	}
	.hero__float .stat-float__value {
		font-size: 20px;
	}
	.hero__float .stat-float__bars {
		display: none;
	}
	.hero__float--1,
	.hero__float--4,
	.hero__visual:not(:has(.hero__note)) .hero__float--1 {
		right: 0;
		top: auto;
		bottom: 0;
	}
	.hero__float--2,
	.hero__float--3 {
		display: none;
	}
	/* Фото фоном: без пустой высоты, плашка — под кнопками */
	.hero--visual-photo .hero__visual {
		min-height: 0;
		padding: 0 0 24px;
	}
	.hero--visual-photo .hero__float {
		position: static;
		width: fit-content;
		margin-left: auto;
	}
	/* Плашка с цифрой — под ноутбуком, а не поверх него */
	.hero__float--1,
	.hero__float--4,
	.hero__visual:not(:has(.hero__note)) .hero__float--1 {
		position: static;
		width: fit-content;
		margin: 14px 0 0 auto;
	}
	/* minmax(0, …): длинные слова не распирают колонку за край экрана */
	.hero-items {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	/* Преимущества услуг — по одному в строку: иконка слева, текст справа */
	.hero-items--features {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}
	.hero-items__text,
	.hero-items__value {
		overflow-wrap: break-word;
	}
}
/* Плашки столбиком: на телефоне — сеткой 2×2 под ноутбуком */
@media (max-width: 640px) {
	.hero__visual--float-list .devices {
		max-width: 100%;
	}
	.hero .hero__float-list {
		position: static;
		transform: none;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		width: auto;
		margin-top: 22px;
	}
	.hero__float-item {
		min-height: 0;
		gap: 10px;
		padding: 12px;
	}
	.hero__float-icon .icon {
		width: 24px;
		height: 24px;
	}
	.hero__float-text {
		min-width: 0;
		font-size: 13px;
		hyphens: auto;
		overflow-wrap: anywhere;
	}
}

/* Без крошек: на макете главной над заголовком строка-подзаголовок, держим её высоту */
@media (min-width: 1025px) {
	.hero__content:not(:has(.crumbs)) {
		padding-top: 46px;
	}
}
/* Планшет и телефон: без крошек (главная) H1 стоял в 8 px под шапкой — даём воздух, как на внутренних */
@media (max-width: 1024px) {
	.hero__content:not(:has(.crumbs)) {
		padding-top: 28px;
	}
	/* Цифры главной — по верху, подписи под ними (подписи разной длины не сдвигают цифры) */
	.hero-items--stats .hero-items__item {
		align-self: start;
	}
}
/* Преимущества первого экрана на планшете: 4 пункта — 2+2, 3 и 6 — по 3 в ряд (не 3+1) */
@media (min-width: 641px) and (max-width: 1024px) {
	.hero-items--features {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.hero-items--features:not(:has(> :nth-child(4))),
	.hero-items--features:has(> :nth-child(6)):not(:has(> :nth-child(7))) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
/* Пункты по 2 в ряд (телефон): нечётный последний — на всю строку */
@media (max-width: 640px) {
	.hero-items:not(.hero-items--features) > :last-child:nth-child(odd):not(:only-child) {
		grid-column: 1 / -1;
	}
}
@media (min-width: 641px) and (max-width: 1024px) {
	.hero-items--features > :last-child:nth-child(odd):not(:only-child):is(:nth-child(5), :nth-child(7)) {
		grid-column: 1 / -1;
	}
}

/* Страницы услуг (с крошками): на макетах крошки и заголовок прижаты к верху, первый экран ≈615 px,
   подзаголовок 16–20 px с шагом строк 25 и узкой колонкой */
@media (min-width: 1025px) {
	.hero:has(.crumbs) .hero__grid {
		min-height: 410px;
	}
	.hero__content:has(.crumbs) {
		align-self: start;
	}
	.hero__content:has(.crumbs) .hero__text {
		max-width: 540px;
		line-height: 1.4;
	}
	.hero:has(.crumbs) .hero__grid {
		padding-bottom: 24px;
	}
	.hero:has(.crumbs) .hero-items:not(.hero-items--stats, .hero-items--facts, .hero-items--columns) {
		padding: 22px 0 24px;
	}
	/* Без полосы снизу («Кейсы», «Контакты»): первый экран ≈490 px */
	.hero:has(.crumbs):not(:has(> .container > .hero-items)) .hero__grid {
		min-height: 384px;
	}
}

/* Кейс «Разработка» (заголовок xs): на макете строки свободнее — заголовок с шагом 54, текст 19/1.7,
   факты с иконками 40, кнопки 57; первый экран ≈600 px */
@media (min-width: 1025px) {
	.hero__title--xs {
		line-height: 1.42;
	}
	.hero:has(.crumbs) .hero__grid:has(.hero__title--xs) {
		padding-bottom: 54px;
	}
	.hero__content:has(.hero__title--xs) .hero__text {
		margin-top: 14px;
		max-width: 650px;
		font-size: 20px;
		line-height: 1.68;
	}
	.hero__content:has(.hero__title--xs) .hero-items--facts {
		margin-top: 40px;
		grid-template-columns: repeat(4, max-content);
		column-gap: 26px;
	}
	.hero__content:has(.hero__title--xs) .hero-items--facts .hero-items__icon,
	.hero__content:has(.hero__title--xs) .hero-items--facts .hero-items__icon .icon {
		width: 40px;
		height: 40px;
	}
	.hero__content:has(.hero__title--xs) .hero-items--facts .hero-items__value {
		font-size: 16px;
	}
	.hero__content:has(.hero__title--xs) .hero-items--facts .hero-items__text {
		font-size: 13px;
		white-space: nowrap;
	}
	.hero__content:has(.hero__title--xs) .hero__btns {
		margin-top: 42px;
	}
	.hero__content:has(.hero__title--xs) .hero__btns .btn {
		min-height: 57px;
		min-width: 236px;
	}
}

/* Кейс «Редизайн» (подзаголовок lead): на макете заголовок 52 с шагом 63, подзаголовок 26/1.4, текст 20/1.37 */
@media (min-width: 1025px) {
	.hero__content:has(.hero__lead) .hero__title {
		line-height: 1.2;
	}
	.hero__content:has(.hero__lead) .hero__lead {
		margin-top: 10px;
		max-width: 560px;
		font-size: 26px;
		line-height: 1.4;
	}
	.hero__content:has(.hero__lead) .hero__text {
		margin-top: 20px;
		max-width: 540px;
		font-size: 20px;
		line-height: 1.37;
	}
	.hero__content:has(.hero__lead) .hero__btns {
		margin-top: 34px;
	}
}

/* Кейс «Контекстная реклама» (заголовок поменьше, без подзаголовка): текст 20/1.45 в четыре строки,
   кнопки 278×52 и 166×52, под кнопками ≈66 до конца экрана (первый экран 600) */
@media (min-width: 1025px) {
	.single-case .hero__content:has(.hero__title--s) .hero__text {
		max-width: 500px;
		font-size: 20px;
		line-height: 1.45;
	}
	.single-case .hero__content:has(.hero__title--s) .hero__btns .btn {
		min-height: 52px;
	}
	.single-case .hero:has(.hero__title--s) .hero__grid {
		padding-bottom: 86px;
	}
}
