/**
 * Главная страница Термо.РУС
 */

/* ——— Hero: full-bleed media ——— */
.termo-hero--media {
	min-height: min(84vh, 46rem);
	display: flex;
	align-items: center;
	padding-block: clamp(3.25rem, 6vh, 5.5rem);
}

.termo-hero--media .termo-container {
	position: relative;
	z-index: 2;
	/* не перебивать ширину .termo-container — иначе текст липнет к краю */
}

.termo-hero--media .termo-hero__media img {
	object-position: 82% center;
	transform: scale(1.03);
	transform-origin: 85% 50%;
	animation: termo-hero-pan 26s ease-in-out infinite alternate;
	will-change: transform;
}

.termo-hero--media .termo-hero__overlay {
	background:
		linear-gradient(
			90deg,
			rgba(42, 18, 12, 0.9) 0%,
			rgba(42, 18, 12, 0.8) 32%,
			rgba(42, 18, 12, 0.4) 52%,
			rgba(42, 18, 12, 0.1) 68%,
			transparent 82%
		);
}

.termo-hero--media .termo-hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--termo-space-5);
	width: min(100%, 34rem);
	max-width: 34rem;
	margin: 0;
	padding: 0;
	text-align: left;
}

.termo-hero--media .termo-hero__brand {
	display: block;
	margin: 0;
	font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
	font-weight: var(--termo-font-weight-medium);
	letter-spacing: 0.01em;
	line-height: 1.15;
	color: #fff;
}

.termo-hero--media .termo-hero__brand .termo-brand__mark {
	color: #fff;
}

.termo-hero--media .termo-hero__brand .termo-brand__dot {
	color: #f4ebe6;
}

.termo-hero--media h1 {
	color: #fff;
	font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.1rem);
	line-height: 1.35;
	max-width: 22em;
	margin: 0;
	hyphens: none;
	-webkit-hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
	text-wrap: balance;
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.termo-hero--media .termo-hero__lead {
	margin: 0;
	max-width: 30rem;
	font-size: var(--termo-font-size-lg);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.94);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
}

.termo-hero--media .termo-hero__actions {
	margin: var(--termo-space-2) 0 0;
	gap: var(--termo-space-3) var(--termo-space-4);
}

@keyframes termo-hero-pan {
	from {
		transform: scale(1.03) translate3d(0, 0, 0);
	}
	to {
		transform: scale(1.07) translate3d(-1.2%, 0, 0);
	}
}

/* ——— Reveal motion ——— */
.termo-reveal {
	opacity: 0;
	transform: translate3d(0, 1.1rem, 0);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--termo-reveal-delay, 0ms);
}

.termo-reveal.is-in,
.termo-hero .termo-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* Hero: меньший сдвиг, чтобы строки не наезжали друг на друга при появлении */
.termo-hero .termo-reveal {
	transform: translate3d(0, 0.55rem, 0);
}

.termo-hero.is-ready .termo-reveal {
	opacity: 1;
	transform: none;
}

/* ——— Cycle: производство → … ——— */
.termo-cycle {
	padding-block: var(--termo-section-gap);
	background:
		radial-gradient(120% 80% at 0% 0%, rgba(44, 36, 32, 0.05), transparent 55%),
		radial-gradient(90% 70% at 100% 20%, rgba(74, 34, 34, 0.05), transparent 50%),
		var(--termo-color-bg);
	border-bottom: 1px solid rgba(227, 207, 196, 0.5);
}

.termo-section__intro--center {
	margin-inline: auto;
	text-align: center;
}

.termo-cycle__track {
	display: grid;
	gap: var(--termo-space-5);
	counter-reset: termo-cycle;
}

@media (min-width: 900px) {
	.termo-cycle__track {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--termo-space-4);
		position: relative;
	}

	.termo-cycle__track::before {
		content: "";
		position: absolute;
		top: 4.6rem;
		left: 8%;
		right: 8%;
		height: 1px;
		background: linear-gradient(
			90deg,
			transparent,
			var(--termo-color-border-strong) 12%,
			var(--termo-color-border-strong) 88%,
			transparent
		);
		pointer-events: none;
		z-index: 0;
		transform: scaleX(0.2);
		transform-origin: left center;
		transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.termo-cycle.is-lined .termo-cycle__track::before {
		transform: scaleX(1);
	}
}

.termo-cycle__item {
	position: relative;
	z-index: 1;
	counter-increment: termo-cycle;
}

.termo-cycle__media {
	position: relative;
	margin: 0 0 var(--termo-space-4);
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--termo-color-bg-soft);
}

.termo-cycle__media::after {
	content: counter(termo-cycle);
	position: absolute;
	left: var(--termo-space-3);
	bottom: var(--termo-space-3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	height: 1.75rem;
	padding-inline: 0.35rem;
	background: var(--termo-color-brand-dark);
	color: #fff;
	font-size: var(--termo-font-size-sm);
	font-weight: var(--termo-font-weight-medium);
	line-height: 1;
}

.termo-cycle__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.termo-cycle__item:hover .termo-cycle__media img {
	transform: scale(1.04);
}

.termo-cycle__item h3 {
	margin-bottom: var(--termo-space-2);
	font-size: var(--termo-font-size-lg);
}

.termo-cycle__item p {
	margin: 0;
	font-size: var(--termo-font-size-sm);
	color: var(--termo-color-text-muted);
}

.termo-cycle__price {
	margin: var(--termo-space-7) auto 0;
	max-width: 46rem;
	text-align: center;
	font-size: var(--termo-font-size-lg);
	color: var(--termo-color-text-strong);
	padding: var(--termo-space-5) var(--termo-space-4) 0;
	border-top: 1px solid var(--termo-color-border);
}

.termo-cycle__price::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	margin: 0 auto var(--termo-space-4);
	background: var(--termo-color-accent);
}

/* ——— Directions split (не карточки) ——— */
.termo-directions-section .termo-split {
	display: grid;
	gap: var(--termo-space-7);
}

.termo-split__item {
	display: grid;
	gap: var(--termo-space-5);
	align-items: center;
}

@media (min-width: 800px) {
	.termo-split__item {
		grid-template-columns: 1.15fr 1fr;
		gap: var(--termo-space-6);
	}

	.termo-split__item:nth-child(even) .termo-split__media {
		order: 2;
	}
}

.termo-split__media {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--termo-color-bg-soft);
}

.termo-split__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.termo-split__item:hover .termo-split__media img {
	transform: scale(1.035);
}

.termo-split__body h3 {
	margin-bottom: var(--termo-space-3);
}

.termo-split__body p {
	color: var(--termo-color-text-muted);
	margin-bottom: var(--termo-space-5);
	max-width: 34rem;
}

/* ——— Advantage band ——— */
.termo-advantage {
	position: relative;
	color: var(--termo-color-text-on-dark);
	padding-block: clamp(3rem, 2.5rem + 3vw, 5rem);
	overflow: hidden;
}

.termo-advantage__media,
.termo-advantage__veil {
	position: absolute;
	inset: 0;
}

.termo-advantage__media {
	z-index: 0;
}

.termo-advantage__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% center;
	transform: scale(1.04);
}

.termo-advantage__veil {
	z-index: 1;
	background:
		linear-gradient(
			100deg,
			rgba(44, 36, 32, 0.94) 0%,
			rgba(44, 36, 32, 0.82) 48%,
			rgba(44, 36, 32, 0.5) 100%
		);
}

.termo-advantage__inner {
	position: relative;
	z-index: 2;
	max-width: 40rem;
}

.termo-advantage .termo-section__intro {
	margin-bottom: var(--termo-space-5);
}

.termo-advantage .termo-section__intro h2,
.termo-advantage .termo-section__intro p {
	color: #fff;
}

.termo-advantage .termo-section__intro p {
	opacity: 0.9;
}

.termo-advantage__list {
	list-style: none;
	margin: 0 0 var(--termo-space-6);
	padding: 0;
}

.termo-advantage__list li {
	position: relative;
	padding: var(--termo-space-3) 0 var(--termo-space-3) 1.35em;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	font-size: var(--termo-font-size-lg);
}

.termo-advantage__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1.15em;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: #f4ebe6;
}

/* ——— Steps home accent ——— */
.termo-steps--home .termo-steps__item {
	position: relative;
}

@media (min-width: 720px) {
	.termo-steps--home {
		position: relative;
	}

	.termo-steps--home::before {
		content: "";
		position: absolute;
		top: 0.85rem;
		left: 0.85rem;
		right: 0.85rem;
		height: 1px;
		background: var(--termo-color-border);
		z-index: 0;
	}

	.termo-steps--home .termo-steps__item {
		z-index: 1;
	}

	.termo-steps--home .termo-steps__item::before {
		position: relative;
		z-index: 1;
		box-shadow: 0 0 0 0.35rem var(--termo-color-bg);
	}
}

/* ——— Works gallery ——— */
.termo-works__grid {
	display: grid;
	gap: var(--termo-space-4);
}

@media (min-width: 800px) {
	.termo-works__grid {
		grid-template-columns: 1.35fr 1fr;
		grid-template-rows: auto auto;
		gap: var(--termo-space-5);
	}

	.termo-works__item--wide {
		grid-row: span 2;
	}

	.termo-works__item--wide img {
		height: 100%;
		min-height: 100%;
	}
}

.termo-works__item {
	margin: 0;
	position: relative;
	overflow: hidden;
	background: #2c2420;
	aspect-ratio: 4 / 3;
}

.termo-works__item--wide {
	aspect-ratio: auto;
	min-height: 18rem;
}

.termo-works__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.termo-works__item:hover img {
	transform: scale(1.04);
}

.termo-works__item figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: var(--termo-space-5) var(--termo-space-4) var(--termo-space-4);
	background: linear-gradient(transparent, rgba(42, 18, 12, 0.88));
	color: #fff;
	display: grid;
	gap: 0.2rem;
}

.termo-works__item figcaption strong {
	font-size: var(--termo-font-size-base);
	font-weight: var(--termo-font-weight-medium);
}

.termo-works__item figcaption span {
	font-size: var(--termo-font-size-sm);
	opacity: 0.88;
}

.termo-cta-fallback {
	text-align: center;
}

/* ——— Callback / Получить расчёт (структура как у shamr, токены Термо) ——— */
.termo-callback__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
	align-items: start;
}

.termo-callback__intro {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.termo-callback__variant {
	margin: 0 0 var(--termo-space-3);
	font-size: var(--termo-font-size-sm);
	font-weight: var(--termo-font-weight-medium);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--termo-color-brand-dark);
}

.termo-callback__intro h2 {
	margin: 0 0 var(--termo-space-3);
}

.termo-callback__lead {
	margin: 0;
	max-width: 40ch;
	font-size: var(--termo-font-size-lg);
	color: var(--termo-color-text-muted);
}

.termo-callback__checklist {
	list-style: none;
	margin: var(--termo-space-6) 0 0;
	padding: 0;
	display: grid;
	gap: var(--termo-space-3);
}

.termo-callback__checklist li {
	display: flex;
	align-items: flex-start;
	gap: var(--termo-space-3);
	font-size: var(--termo-font-size-base);
	color: var(--termo-color-text-strong);
	line-height: 1.45;
}

.termo-callback__check {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	margin-top: 0.1rem;
	color: var(--termo-color-cta);
}

.termo-callback__check svg {
	width: 1rem;
	height: 1rem;
}

.termo-callback__map {
	width: 100%;
	margin-top: var(--termo-space-6);
	height: 20rem;
	overflow: hidden;
	border: 1px solid var(--termo-color-border);
	background: var(--termo-color-bg);
}

.termo-callback__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.termo-callback__hint {
	margin: var(--termo-space-5) 0 0;
	font-size: var(--termo-font-size-sm);
	color: var(--termo-color-text-muted);
}

.termo-callback__hint a {
	color: var(--termo-color-text-strong);
	font-weight: var(--termo-font-weight-medium);
	text-decoration: none;
	border-bottom: 1px solid rgba(51, 51, 51, 0.25);
}

.termo-callback__hint a:hover,
.termo-callback__hint a:focus-visible {
	color: var(--termo-color-brand-dark);
	border-bottom-color: var(--termo-color-brand-dark);
}

.termo-callback__form-wrap {
	min-width: 0;
	padding: var(--termo-space-1) 0 var(--termo-space-1) clamp(1.5rem, 1rem + 2vw, 2.5rem);
	border-left: 1px solid var(--termo-color-border);
}

.termo-callback__form-wrap .mav-form-wrapper,
.termo-callback__form-wrap .mav-form,
.termo-callback__form {
	display: grid;
	gap: var(--termo-space-5);
	max-width: 100%;
	min-width: 0;
}

.termo-callback__form-wrap .mav-field {
	display: grid;
	gap: var(--termo-space-2);
	min-width: 0;
}

.termo-callback__form-wrap .mav-field label {
	font-size: var(--termo-font-size-sm);
	font-weight: var(--termo-font-weight-medium);
	color: var(--termo-color-text-muted);
}

.termo-callback__form-wrap .mav-field input,
.termo-callback__form-wrap .mav-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.65em 0;
	border: 0;
	border-bottom: 1px solid var(--termo-color-border);
	border-radius: 0;
	background: transparent;
	color: var(--termo-color-text);
	font: inherit;
	box-sizing: border-box;
	transition: border-color var(--termo-transition);
}

.termo-callback__form-wrap .mav-field textarea {
	min-height: 7.5rem;
	resize: vertical;
}

.termo-callback__form-wrap .mav-field input:focus,
.termo-callback__form-wrap .mav-field textarea:focus {
	outline: none;
	border-bottom-color: var(--termo-color-cta);
	box-shadow: none;
}

.termo-callback__form-wrap .mav-field button[type="submit"] {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: var(--termo-space-1);
	padding: 0.85em 1.5em;
	border: 1px solid var(--termo-color-cta);
	border-radius: var(--termo-radius);
	background: var(--termo-color-cta);
	color: #fff;
	font: inherit;
	font-weight: var(--termo-font-weight-medium);
	cursor: pointer;
	transition:
		background-color var(--termo-transition),
		border-color var(--termo-transition);
}

.termo-callback__form-wrap .mav-field button[type="submit"]:hover,
.termo-callback__form-wrap .mav-field button[type="submit"]:focus-visible {
	background: var(--termo-color-brand-dark);
	border-color: var(--termo-color-brand-dark);
}

.termo-callback__form-wrap .mav-field button[type="submit"]:focus-visible {
	outline: none;
	box-shadow: var(--termo-focus-ring);
}

.termo-callback__form-wrap .mav-message {
	margin-top: var(--termo-space-3);
	font-size: var(--termo-font-size-sm);
}

.termo-callback__form-wrap .mav-message.success,
.termo-callback__form-wrap .mav-success-message:not([style*="display:none"]) {
	color: #1f6b3a;
}

.termo-callback__form-wrap .mav-message.error {
	color: var(--termo-color-price);
}

.termo-callback__note {
	margin: var(--termo-space-4) 0 0;
	font-size: var(--termo-font-size-sm);
	line-height: 1.45;
	color: var(--termo-color-text-muted);
}

.termo-callback__fallback {
	margin: 0;
}

@media (max-width: 900px) {
	.termo-callback__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--termo-space-6);
	}

	.termo-callback__form-wrap {
		padding: var(--termo-space-6) 0 0;
		border-left: 0;
		border-top: 1px solid var(--termo-color-border);
	}

	.termo-callback__map {
		height: 16rem;
	}
}

@media (max-width: 720px) {
	/* Текст → форма → карта/контакты */
	.termo-callback__grid {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	.termo-callback__intro {
		display: contents;
	}

	.termo-callback__variant {
		order: 1;
	}

	.termo-callback__intro h2 {
		order: 2;
	}

	.termo-callback__lead {
		order: 3;
		margin-bottom: var(--termo-space-5);
	}

	.termo-callback__checklist {
		order: 4;
		margin: 0 0 var(--termo-space-5);
	}

	.termo-callback__form-wrap {
		order: 5;
		margin-bottom: var(--termo-space-5);
	}

	.termo-callback__map {
		order: 6;
		margin-top: 0;
	}

	.termo-callback__hint {
		order: 7;
		margin-top: var(--termo-space-4);
	}
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
	.termo-hero--media .termo-hero__media img,
	.termo-cycle__media img,
	.termo-split__media img,
	.termo-works__item img {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}

	.termo-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.termo-cycle__track::before {
		transition: none;
		transform: none;
	}
}

@media (max-width: 720px) {
	.termo-hero--media {
		min-height: min(86vh, 42rem);
		align-items: flex-end;
		padding-bottom: clamp(2.5rem, 6vh, 3.5rem);
	}

	.termo-hero--media .termo-hero__media img {
		object-position: 72% center;
	}

	.termo-hero--media .termo-hero__overlay {
		background:
			linear-gradient(
				180deg,
				rgba(42, 18, 12, 0.2) 0%,
				rgba(42, 18, 12, 0.55) 40%,
				rgba(42, 18, 12, 0.92) 100%
			);
	}

	.termo-hero--media .termo-hero__inner {
		width: 100%;
		max-width: 100%;
		gap: var(--termo-space-4);
	}
}
