@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

.aafe-spaced-text-banner-wrapper h1,
.aafe-spaced-text-banner-wrapper h2,
.aafe-spaced-text-banner-wrapper h3,
.aafe-spaced-text-banner-wrapper h4,
.aafe-spaced-text-banner-wrapper h5,
.aafe-spaced-text-banner-wrapper h6 {
	font-family: 'Sora', sans-serif;
}
.aafe-spaced-text-banner-wrapper p,
.aafe-spaced-text-banner-wrapper span,
.aafe-spaced-text-banner-wrapper li,
.aafe-spaced-text-banner-wrapper a {
	font-family: 'Inter', sans-serif;
}

.aafe-spaced-text-banner-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	/* Removed static background image styles, now handled by dynamic layers */
	overflow: hidden;
}

.aafe-spaced-text-banner-wrapper::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2; /* Above active background, below text */
	pointer-events: none;
	transition: background-color 0.4s ease, opacity 0.4s ease;
}

/* Background Layers for Liquid Hover */
.aafe-spaced-text-banner__backgrounds {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.aafe-spaced-text-banner__bg-layer {
	position: absolute;
	inset: -10%; /* General safe area for transforms */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	pointer-events: none;
	opacity: 0;
	z-index: 0;
}

.aafe-spaced-text-banner__bg-layer.is-active {
	opacity: 1;
	z-index: 1;
}

/* 1. Cinematic Blur Focus */
.aafe-spaced-text-banner-wrapper[data-bg-anim="blur-focus"] .aafe-spaced-text-banner__bg-layer {
	filter: blur(20px);
	transform: scale(1.15);
	transition: opacity 1s cubic-bezier(0.21, 0.83, 0.26, 1), filter 1.2s cubic-bezier(0.21, 0.83, 0.26, 1), transform 3s cubic-bezier(0.19, 1, 0.22, 1);
}
.aafe-spaced-text-banner-wrapper[data-bg-anim="blur-focus"] .aafe-spaced-text-banner__bg-layer.is-active {
	filter: blur(0px);
	transform: scale(1);
}

/* 2. Soft Curtain Wipe */
.aafe-spaced-text-banner-wrapper[data-bg-anim="soft-wipe-up"] .aafe-spaced-text-banner__bg-layer {
	clip-path: inset(100% 0 0 0);
	transform: scale(1.05) translateY(5%);
	transition: opacity 0.8s ease, clip-path 1.2s cubic-bezier(0.7, 0, 0.3, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.aafe-spaced-text-banner-wrapper[data-bg-anim="soft-wipe-up"] .aafe-spaced-text-banner__bg-layer.is-active {
	clip-path: inset(0 0 0 0);
	transform: scale(1) translateY(0%);
}

/* 3. Liquid Circle Expand */
.aafe-spaced-text-banner-wrapper[data-bg-anim="liquid-circle"] .aafe-spaced-text-banner__bg-layer {
	clip-path: circle(0% at 50% 50%);
	transform: scale(1.1);
	transition: opacity 0.6s ease, clip-path 1.4s cubic-bezier(0.85, 0, 0.15, 1), transform 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.aafe-spaced-text-banner-wrapper[data-bg-anim="liquid-circle"] .aafe-spaced-text-banner__bg-layer.is-active {
	clip-path: circle(150% at 50% 50%);
	transform: scale(1);
}

/* 4. Elegant Diagonal Shift */
.aafe-spaced-text-banner-wrapper[data-bg-anim="diagonal-shift"] .aafe-spaced-text-banner__bg-layer {
	transform: translate(8%, 8%) scale(1.1);
	transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.aafe-spaced-text-banner-wrapper[data-bg-anim="diagonal-shift"] .aafe-spaced-text-banner__bg-layer.is-active {
	transform: translate(0%, 0%) scale(1);
}

/* 5. Deep Pull Zoom */
.aafe-spaced-text-banner-wrapper[data-bg-anim="deep-pull"] .aafe-spaced-text-banner__bg-layer {
	transform: scale(1.4);
	transition: opacity 1.2s cubic-bezier(0.21, 0.83, 0.26, 1), transform 2.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.aafe-spaced-text-banner-wrapper[data-bg-anim="deep-pull"] .aafe-spaced-text-banner__bg-layer.is-active {
	transform: scale(1);
}

/* Words Interactions */
.aafe-spaced-text-banner__word {
	cursor: pointer;
	transition: opacity 0.4s ease, color 0.4s ease, text-shadow 0.4s ease;
	position: relative;
	z-index: 2;
	color: var(--aafe-word-color, #ffffff);
}

.aafe-spaced-text-banner-wrapper.is-hovering-word .aafe-spaced-text-banner__word {
	opacity: var(--aafe-inactive-opacity, 0.5);
}

.aafe-spaced-text-banner-wrapper.is-hovering-word .aafe-spaced-text-banner__word.is-hovered {
	opacity: 1;
	color: var(--aafe-word-hover-color, var(--aafe-word-color, #ffffff));
}

/* Default Heading Sizes */
.aafe-spaced-text-banner__heading {
	margin: 0;
	padding: 0;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1;
	z-index: 10;
	position: relative;
	width: 100%;
	display: flex;
	justify-content: var(--aafe-text-alignment, space-between);
	align-items: center;
	flex-wrap: wrap;
}

/* Hover Effect System */
.aafe-spaced-text-banner-wrapper * {
	transition: all var(--aafe-transition, 300ms) ease;
}

/* Overlay for hover */
.aafe-spaced-text-banner-wrapper::before {
	content: '';
	position: absolute;
	inset: 0;
	background-color: transparent;
	opacity: 0;
	z-index: 1;
	transition: opacity var(--aafe-transition, 300ms) ease;
	pointer-events: none;
}

.aafe-spaced-text-banner-wrapper[data-hover="overlay"]:hover::before {
	opacity: 1; /* Configured by control */
}

/* Lift */
.aafe-spaced-text-banner-wrapper[data-hover="lift"]:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Scale */
.aafe-spaced-text-banner-wrapper[data-hover="scale"]:hover {
	transform: scale(var(--aafe-hover-scale, 1.03));
}

/* Glow */
.aafe-spaced-text-banner-wrapper[data-hover="glow"]:hover {
	box-shadow: 0 0 0 3px #4F46E5, 0 8px 30px rgba(79,70,229,0.25);
}

/* Border Pop */
.aafe-spaced-text-banner-wrapper[data-hover="border-pop"]:hover {
	border-color: #4F46E5;
	transform: scale(1.01);
}

/* Shine */
.aafe-spaced-text-banner-wrapper[data-hover="shine"] {
	overflow: hidden;
}
.aafe-spaced-text-banner-wrapper[data-hover="shine"]::after {
	content: '';
	position: absolute;
	top: 0;
	left: -75%;
	width: 50%;
	height: 100%;
	background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
	transform: skewX(-25deg);
	transition: none;
	z-index: 5;
	pointer-events: none;
}
.aafe-spaced-text-banner-wrapper[data-hover="shine"]:hover::after {
	left: 125%;
	transition: left 0.6s ease;
}

/* Flip */
.aafe-spaced-text-banner-wrapper[data-hover="flip"]:hover {
	transform: rotateY(180deg);
}

@media (max-width: 1024px) {
	.aafe-spaced-text-banner__heading { font-size: 32px; }
}
@media (max-width: 767px) {
	.aafe-spaced-text-banner__heading { font-size: 26px; }
}
