/* LP Motion Kit: element effects (Advanced tab) and Pro Form validation feedback.
   Loaded on every Elementor page; everything here is scoped to opt-in classes. */

/* Phones and tablets: live backdrop blur on fixed/sticky bars is the classic cause of scroll stutter
   (the GPU re-blurs the page behind them every frame). Switch it off and use a solid background. */
@media (hover: none) and (pointer: coarse) {
	:root { --lpm-bf-off: none; }
}

/* Background video zooms out as the section scrolls in (CSS scroll-driven animation). */
@keyframes lpm-bgzoom { from { scale: var(--lpm-bgzoom, 1.2); } to { scale: 1; } }
@supports (animation-timeline: view()) {
	.lpm-bgzoom-yes > .elementor-background-video-container :is(video, iframe) {
		animation: lpm-bgzoom linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 50%;
	}
}

/* Pro Form: live validation feedback */
[data-lpm-validate] .elementor-field-group { position: relative; }
[data-lpm-validate] .lpm-invalid :is(input, textarea, select).elementor-field-textual { border-color: var(--lpm-err, #c9383d) !important; }
[data-lpm-validate] .lpm-valid :is(input, textarea).elementor-field-textual { padding-inline-end: 2.6em; }
[data-lpm-validate] .lpm-valid::after {
	content: ""; position: absolute; inset-inline-end: .9em; top: calc(var(--lpm-input-mid, 50%) - .6em);
	width: 1.2em; height: 1.2em; background: var(--lpm-ok, #1f8a4c);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 5.8-5.8 1.4 1.4-7.2 7.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.4 14.2-4.2-4.2 1.4-1.4 2.8 2.8 5.8-5.8 1.4 1.4-7.2 7.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	animation: lpm-pop .4s cubic-bezier(.34, 1.8, .64, 1);
}
[data-lpm-validate] .lpm-shake { animation: lpm-shake .4s; }
[data-lpm-validate] .lpm-field-msg { flex-basis: 100%; width: 100%; margin-top: 4px; font-size: .85em; color: var(--lpm-err, #b3261e); }
@keyframes lpm-pop { from { scale: 0; } }
@keyframes lpm-shake { 25% { translate: 6px; } 50% { translate: -5px; } 75% { translate: 3px; } }

@media (prefers-reduced-motion: reduce) {
	.lpm-bgzoom-yes > .elementor-background-video-container :is(video, iframe) { animation: none; }
	[data-lpm-validate] .lpm-shake, [data-lpm-validate] .lpm-valid::after { animation: none; }
}
