/* Анімації (assets/js/motion.js). Усе — лише з класом .motion-ok на <html>; з «Зменшити рух» або без JS його немає. */

/* Блоки, що «прилітають» збоку, не дають горизонтальної прокрутки */
html, body { overflow-x: clip; }

/* ---------- Поява при прокрутці ---------- */
.motion-ok .rv { transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rv-d, 0ms); }
.motion-ok .rv:not(.is-in) { opacity: 0; transform: translateY(32px); }
.motion-ok .rv.rv--zoom:not(.is-in) { transform: scale(.94); }
/* «збирання» блока: зліва / справа з-за краю */
.motion-ok .rv.rv--left:not(.is-in) { transform: translateX(-160px); }
.motion-ok .rv.rv--right:not(.is-in) { transform: translateX(160px); }
.motion-ok .rv.is-in { opacity: 1; transform: none; }
.motion-ok .rv-done { transition-delay: 0ms; }
@media (max-width: 767px) {
	.motion-ok .rv:not(.is-in) { transform: translateY(20px); }
	.motion-ok .rv.rv--left:not(.is-in) { transform: translateX(-70px); }
	.motion-ok .rv.rv--right:not(.is-in) { transform: translateX(70px); }
}

/* ---------- Цифри: до старту лічильника не показуємо кінцеве число ---------- */
.motion-ok :is(.hero__card b, .hero__badge b, .stats__item b, .adv__big b, .prof .price b, .srv__price b, .win__price b, .bw__item .price b) { opacity: 0; font-variant-numeric: tabular-nums; }
.motion-ok .cnt-ready { opacity: 1 !important; transition: opacity .3s ease; }

/* ---------- Перший екран: текст по черзі, фото проявляється, плашки й етикетка «вистрибують» ---------- */
@keyframes ew-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ew-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ew-zoom { from { transform: scale(1.06); } to { transform: none; } }
@keyframes ew-pop { 0% { opacity: 0; transform: translateY(16px) scale(.9); } 70% { opacity: 1; transform: translateY(-2px) scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes ew-badge { 0% { opacity: 0; transform: rotate(-30deg) scale(.4); } 70% { opacity: 1; transform: rotate(-4deg) scale(1.08); } 100% { opacity: 1; transform: rotate(-8deg) scale(1); } }
.motion-ok .hero__text > * { animation: ew-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.motion-ok .hero__text > :nth-child(2) { animation-delay: .08s; }
.motion-ok .hero__text > :nth-child(3) { animation-delay: .16s; }
.motion-ok .hero__text > :nth-child(4) { animation-delay: .24s; }
.motion-ok .hero__text > :nth-child(5) { animation-delay: .32s; }
.motion-ok .hero__media { animation: ew-fade .9s .1s both; }
.motion-ok .hero__media > img { animation: ew-zoom 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.motion-ok .hero__card { animation: ew-pop .7s cubic-bezier(.2, .8, .3, 1.2) both; }
.motion-ok .hero__card--1 { animation-delay: .45s; }
.motion-ok .hero__card--2 { animation-delay: .6s; }
.motion-ok .hero__card--3 { animation-delay: .75s; }
.motion-ok .hero__badge { animation: ew-badge .8s .35s cubic-bezier(.2, .8, .3, 1.2) both; }
.motion-ok .marquee { animation: ew-fade .8s .5s both; }

/* ---------- Наведення: картки трохи піднімаються (після анімації появи) ---------- */
@media (hover: hover) {
	.motion-ok :is(.prof, .srv, .adv__tile, .about__tile, .hw__item, .win, .door, .mat, .fac, .bw__item):is(:not(.rv), .rv-done) { transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease, border-color .3s ease; }
	.motion-ok :is(.prof, .srv, .adv__tile, .about__tile, .hw__item, .win, .door, .mat, .fac, .bw__item):is(:not(.rv), .rv-done):hover { transform: translateY(-4px); box-shadow: var(--sh-1); }
	.motion-ok .srv__img img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
	.motion-ok .srv:hover .srv__img img { transform: scale(1.05); }
}
.srv__img { overflow: hidden; }
