/**
 * Hero block
 */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 80vh;
	padding-top: 3rem;
	padding-bottom: 3rem;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	pointer-events: none;
	user-select: none;
	/* Плавное появление, чтобы не было «моргания» между poster и первым кадром */
	animation: heroVideoFadeIn 600ms ease-out both;
}

@keyframes heroVideoFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Экономим трафик и батарею: пользователям, запросившим минимум анимаций, отдаём poster */
@media (prefers-reduced-motion: reduce) {
	.hero__video {
		display: none;
	}
}

.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(15, 15, 16, 0.88) 0%,
		rgba(15, 15, 16, 0.65) 50%,
		rgba(15, 15, 16, 0.35) 100%
	);
	z-index: 1;
}

.hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
}

.hero__title {
	font-family: var(--font-serif);
	font-weight: 300;
	font-size: clamp(2rem, 8vw, 4.5rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 1rem;
	max-width: 20ch;
	color: rgb(var(--color-primary));
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.hero__subtitle {
	font-size: 1.125rem;
	line-height: 1.6;
	color: rgb(var(--color-primary) / 0.85);
	margin: 0 0 2rem;
	max-width: 40ch;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero__cta {
	margin: 0;
}

/* ===== Оффер-бейджи (цена / срок / гарантия) ===== */
.hero__offer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.hero__offer-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.85rem;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: rgb(var(--color-primary));
	background: rgba(198, 168, 122, 0.12);
	border: 1px solid rgba(198, 168, 122, 0.35);
	border-radius: 999px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hero__offer-item--price {
	color: rgb(var(--color-accent));
	background: rgba(198, 168, 122, 0.18);
	border-color: rgba(198, 168, 122, 0.55);
	font-weight: 600;
}

.hero__offer-item::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgb(var(--color-accent));
	box-shadow: 0 0 8px rgba(198, 168, 122, 0.7);
}

/* ===== Маркеры доверия ===== */
.hero__trust {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
}

.hero__trust-item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: rgb(var(--color-primary) / 0.9);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.hero__trust-icon {
	flex-shrink: 0;
	color: rgb(var(--color-accent));
}

/* ===== CTA-группа (две кнопки в ряд) ===== */
.hero__cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.hero__cta-secondary {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* Базовые стили .btn / .btn--primary переехали в assets/css/fx-liquid-glass.css */

@media (min-width: 768px) {
	.hero {
		min-height: 92vh;
		padding-top: 4rem;
		padding-bottom: 4rem;
	}

	.hero__subtitle {
		font-size: 1.25rem;
		margin-bottom: 2.5rem;
	}
}

@media (max-width: 767px) {
	/* На мобильном прижимаем контент к верху hero,
	 * чтобы сама перегородка на видео/постере была видна ниже */
	.hero {
		align-items: flex-start;
		padding-top: 2rem;
		padding-bottom: 1.5rem;
		min-height: 78vh;
	}

	/* Градиент: сильное затемнение сверху (читаемость текста),
	 * почти прозрачно снизу (перегородка «дышит») */
	.hero__overlay {
		background: linear-gradient(
			to bottom,
			rgba(15, 15, 16, 0.82) 0%,
			rgba(15, 15, 16, 0.55) 25%,
			rgba(15, 15, 16, 0.15) 55%,
			rgba(15, 15, 16, 0) 100%
		);
	}

	.hero__title {
		font-size: clamp(1.75rem, 7.5vw, 2.5rem);
		max-width: 18ch;
	}

	.hero__subtitle {
		font-size: 0.9375rem;
		max-width: 34ch;
	}

	.hero__cta .btn,
	.hero__cta-group .btn {
		font-size: 0.6875rem;
	}

	.hero__offer {
		margin-bottom: 1rem;
	}

	.hero__offer-item {
		font-size: 0.7rem;
		padding: 0.3rem 0.7rem;
	}

	.hero__trust {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 1.5rem;
		gap: 0.45rem;
	}

	.hero__trust-item {
		font-size: 0.8125rem;
		max-width: 100%;
	}

	.hero__cta-group {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.hero__cta-group .btn {
		width: 100%;
		justify-content: center;
		padding-inline: 1rem;
		font-size: clamp(0.58rem, 2.7vw, 0.68rem);
		letter-spacing: 0.09em;
		white-space: normal;
		text-align: center;
		line-height: 1.35;
	}

	.hero__cta-secondary svg {
		flex: 0 0 auto;
	}
}

/* На узких экранах подменяем горизонтальный постер на вертикальный,
 * чтобы до загрузки видео не было растянутого кадра. Путь берём из
 * data-poster-portrait и подставляем через CSS var в inline-стиле.
 * Брейкпоинт совпадает с <source media> в block-hero.php.
 */
@media (max-width: 932px) and (orientation: portrait) {
	.hero--has-video[data-poster-portrait] {
		background-image: var(--hero-poster-portrait) !important;
	}
	/* object-position чуть выше центра — перегородка обычно занимает верх кадра */
	.hero__video {
		object-position: center 35%;
	}
}
