/* UFA site motion — scroll reveal, header, micro-interactions */

@keyframes ufa-motion-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ufa-motion-scale {
	from {
		opacity: 0;
		transform: scale(0.97);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes ufa-header-drop {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ufa-ken-burns {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.06);
	}
}

@media (prefers-reduced-motion: no-preference) {
	html.ufa-motion-js .ufa-sh__bar {
		animation: ufa-header-drop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	html.ufa-motion-js .ufa-sh {
		transition: padding 0.25s ease;
	}

	html.ufa-motion-js .ufa-sh.is-scrolled .ufa-sh__bar {
		box-shadow:
			0 1px 0 rgba(255, 255, 255, 0.98) inset,
			0 -2px 8px rgba(148, 163, 184, 0.22) inset,
			0 10px 28px rgba(15, 23, 42, 0.14);
	}

	html.ufa-motion-js .ufa-reveal {
		opacity: 0;
		transform: translateY(18px);
		transition:
			opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
		transition-delay: var(--ufa-reveal-delay, 0ms);
		will-change: opacity, transform;
	}

	html.ufa-motion-js .ufa-reveal--scale {
		transform: scale(0.97);
	}

	html.ufa-motion-js .ufa-reveal.is-visible {
		opacity: 1;
		transform: none;
	}

	html.ufa-motion-js .ufa-semipo__cover-img,
	html.ufa-motion-js .ufa-ya__usp-slide.is-active img {
		animation: ufa-ken-burns 20s ease-out forwards;
	}

	html.ufa-motion-js .ufa-semipo__card {
		transition: transform 0.28s ease, box-shadow 0.28s ease;
	}

	html.ufa-motion-js .ufa-semipo__card:hover {
		transform: translateY(-4px);
		box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
	}

	html.ufa-motion-js .ufa-ipo011__stat {
		transition: transform 0.25s ease, box-shadow 0.25s ease;
	}

	html.ufa-motion-js .ufa-ipo011__stat:hover {
		transform: translateY(-2px);
	}

	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__grid .ufa-ya__card.ufa-reveal,
	html.ufa-motion-js body.ufa-nov-all-ufa-page .ufa-ya__grid .ufa-ya__card.ufa-reveal {
		animation: none !important;
	}

	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__cover,
	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__filter--ya,
	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__offers,
	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__offer,
	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-ya__ipoteka,
	html.ufa-motion-js body.ufa-nov-leninsky-page .ufa-len-navcalc-section,
	html.ufa-motion-js body.ufa-nov-leninsky-jk-page .ufa-jk__gallery,
	html.ufa-motion-js body.ufa-nov-leninsky-jk-page .ufa-jk__card,
	html.ufa-motion-js body.ufa-nov-leninsky-jk-page .ufa-jk__plans {
		animation: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.ufa-motion-js .ufa-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
