/* GSAP Animations for Elementor */

/* Split-text pieces must be inline-block so transforms apply. */
.egsap-piece {
	display: inline-block;
	will-change: transform, opacity, filter;
}

.egsap-word-wrap {
	display: inline-block;
	white-space: nowrap;
}

.egsap-line {
	display: block;
}

/* Prevent a flash of un-animated content before JS runs.
   Only applied when JS is present, and only to entrance triggers;
   the handler clears these once the tween starts. */
.js [data-egsap="1"][data-egsap-trigger="load"],
.js [data-egsap="1"][data-egsap-trigger="scroll"] {
	opacity: 0;
}

/* Editor: always show, the handler manages playback on change. */
.elementor-editor-active [data-egsap="1"] {
	opacity: 1;
}

/* Elementor (and some themes) apply a CSS transition that includes `opacity`
   and `transform` to widgets / their inner container. When GSAP writes inline
   opacity each frame, that CSS transition eases toward each written value,
   stretching a 0.3s GSAP fade into the transition's (often ~0.9s) duration.
   Force those transitions off on GSAP-driven elements and their inner nodes so
   GSAP's timing is the only thing in play. */
[data-egsap="1"],
[data-egsap="1"] > .elementor-widget-container,
[data-egsap="1"].elementor-widget > .elementor-widget-container,
[data-egsap="1"] .egsap-piece {
	transition-property: background, background-color, border, border-color, border-radius, box-shadow, color, fill !important;
}

/* Belt and braces: while an entrance is mid-flight the handler adds this class,
   which removes transitions entirely so nothing competes with the tween. */
.egsap-animating,
.egsap-animating > .elementor-widget-container,
.egsap-animating .egsap-piece {
	transition: none !important;
}
