.bl-hero { --hero-height: auto; }

.bl-hero-inner {
	display: grid;
	align-items: center;
	gap: clamp(2rem, 5vw, 4rem);
	min-height: var(--hero-height, auto);
}

.bl-hero-content { max-width: 660px; }
.bl-hero-content > * + * { margin-top: .9em; }
.bl-hero-content .bl-heading { margin-bottom: .5em; }

/* Длинное слово (артикул, термин, домен) не должно распирать колонку героя. */
.bl-hero-content .bl-heading,
.bl-hero-content .bl-subheading,
.bl-hero-quiz-teaser,
.bl-hero-stat__label,
.bl-hero-slider__slide h3 { overflow-wrap: anywhere; }

.bl-hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.bl-hero-phone {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .55em;
	margin-top: 1.25rem;
	font-weight: 650;
	font-size: 1.0625rem;
	text-decoration: none;
	color: inherit;
	transition: color .2s ease;
}
.bl-hero-phone::before {
	content: "";
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--bl-accent) 15%, transparent);
	flex-shrink: 0;
}
/* Трубка рисуется маской, а не цветной картинкой — иначе иконка не следовала бы за акцентом ниши.
   Слой позиционируется ровно поверх кружка ::before, поэтому у ссылки есть position: relative. */
.bl-hero-phone::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 2.25rem;
	height: 2.25rem;
	transform: translateY(-50%);
	background: var(--bl-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
}
.bl-hero-phone:hover { color: var(--bl-accent); }

/* Медиа-панель героя — с глубиной и рамкой */
.bl-hero-media .bl-media-crop {
	box-shadow: var(--bl-shadow, var(--bl-shadow-hard));
	border-radius: var(--bl-card-radius);
}

/* ---------- classic-split ---------- */
.bl-hero-inner--classic-split { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
	.bl-hero-inner--classic-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.bl-hero-inner--classic-split .bl-hero-media--left { order: -1; }
	/* Картинку не заполнили — текст занимает весь экран, а не половину с дырой справа. */
	.bl-hero-inner--classic-split:not(:has(.bl-hero-media)) { grid-template-columns: minmax(0, 1fr); }
	.bl-hero-inner--slider:not(:has(.bl-hero-slider)) { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- media-bg ---------- */
.bl-hero-inner--media-bg {
	grid-template-columns: minmax(0, 1fr);
	min-height: var(--hero-height, 70vh);
	align-content: center;
}
.bl-hero-vpos-top { align-content: start; padding-top: clamp(2rem, 6vh, 5rem); }
.bl-hero-vpos-bottom { align-content: end; padding-bottom: clamp(2rem, 6vh, 5rem); }

/* ---------- centered ---------- */
.bl-hero-inner--centered { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.bl-hero-inner--centered .bl-hero-content { max-width: 760px; }
.bl-hero-inner--centered .bl-hero-actions { justify-content: center; }
.bl-hero-inner--centered .bl-hero-phone { justify-content: center; }

/* ---------- split-stats ---------- */
.bl-hero-inner--split-stats { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
	.bl-hero-inner--split-stats { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
.bl-hero-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1rem;
}
/* Единственная цифра не должна растягиваться на всю колонку. */
.bl-hero-stats:has(> :only-child) { grid-template-columns: minmax(140px, 260px); }
.bl-hero-stat {
	text-align: center;
	padding: 1.75rem 1rem;
	border-radius: var(--bl-card-radius);
	background: var(--bl-surface);
	border: var(--bl-border-width, 1px) solid var(--bl-border);
}
.bl-bg-image .bl-hero-stat,
.bl-bg-video .bl-hero-stat { backdrop-filter: blur(6px); }
.bl-hero-stat__number {
	display: block;
	font-size: clamp(1.9rem, 3vw, 2.9rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--bl-accent);
}
/* На фото и градиенте акцент теряется — цифра берёт основной цвет текста блока. */
.bl-bg-image .bl-hero-stat__number,
.bl-bg-video .bl-hero-stat__number,
.bl-bg-gradient .bl-hero-stat__number { color: var(--bl-text); }
.bl-hero-stat__label { display: block; font-size: .8125rem; line-height: 1.35; color: var(--bl-muted); margin-top: .5em; }

/* ---------- with-quiz-teaser ---------- */
.bl-hero-quiz-teaser {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	max-width: 100%;
	padding: .75rem 1.25rem;
	border-radius: var(--bl-card-radius);
	background: color-mix(in srgb, var(--bl-accent) 12%, transparent);
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}
.bl-hero-quiz-teaser__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.75em;
	height: 1.75em;
	border-radius: 50%;
	background: var(--bl-accent);
	color: var(--bl-accent-contrast);
	font-weight: 800;
}

/* ---------- slider ---------- */
.bl-hero-inner--slider { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
	.bl-hero-inner--slider { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.bl-hero-slider { position: relative; width: 100%; padding-bottom: 2.5rem; }
.bl-hero-slider__slide h3 { margin: 1rem 0 .75rem; font-size: 1.25rem; font-weight: 700; }
.bl-hero-slider .swiper-pagination { bottom: 0; }

/* ---------- with-form ---------- */
.bl-hero-inner--with-form { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
	.bl-hero-inner--with-form { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}
/* Панель формы живёт по токенам блока: на тёмном герое и при своих стилях
   она перекрашивается вместе с остальным блоком, а не остаётся белой. */
.bl-hero-form {
	background: var(--bl-surface);
	border: var(--bl-border-width, 1px) solid var(--bl-border);
	padding: clamp(1.25rem, 3vw, 1.75rem);
	border-radius: var(--bl-card-radius);
	box-shadow: var(--bl-shadow, var(--bl-shadow-medium));
}
.bl-bg-image .bl-hero-form,
.bl-bg-video .bl-hero-form { backdrop-filter: blur(10px); }
.bl-hero-form .bl-lead-form { max-width: none; }

/* ---------- bg video element positioning (see base.css .bl-bg-video) ---------- */
.bl-hero-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
