/* AAFE Motion Effects — entrance keyframes, hover spotlight. Only transform / opacity / filter / clip-path are animated. */

.aafe-fx-run {
	animation-duration: var(--aafe-fx-dur, 900ms);
	animation-timing-function: var(--aafe-fx-ease, cubic-bezier(.16, 1, .3, 1));
	animation-delay: var(--aafe-fx-delay, 0ms);
	animation-fill-mode: both;
	will-change: transform, opacity;
}

.aafe-fx-run.aafe-fx-blurIn       { animation-name: aafe-fx-blurIn; will-change: opacity, filter; }
.aafe-fx-run.aafe-fx-blurInUp     { animation-name: aafe-fx-blurInUp; will-change: transform, opacity, filter; }
.aafe-fx-run.aafe-fx-revealUp     { animation-name: aafe-fx-revealUp; will-change: clip-path; }
.aafe-fx-run.aafe-fx-revealDown   { animation-name: aafe-fx-revealDown; will-change: clip-path; }
.aafe-fx-run.aafe-fx-revealLeft   { animation-name: aafe-fx-revealLeft; will-change: clip-path; }
.aafe-fx-run.aafe-fx-revealRight  { animation-name: aafe-fx-revealRight; will-change: clip-path; }
.aafe-fx-run.aafe-fx-revealCircle { animation-name: aafe-fx-revealCircle; will-change: clip-path; }
.aafe-fx-run.aafe-fx-flipInX      { animation-name: aafe-fx-flipInX; transform-origin: 50% 0; backface-visibility: hidden; }
.aafe-fx-run.aafe-fx-flipInY      { animation-name: aafe-fx-flipInY; backface-visibility: hidden; }
.aafe-fx-run.aafe-fx-skewUp       { animation-name: aafe-fx-skewUp; transform-origin: 0 100%; }
.aafe-fx-run.aafe-fx-scaleDown    { animation-name: aafe-fx-scaleDown; }

@keyframes aafe-fx-blurIn {
	from { opacity: 0; filter: blur(14px); }
	to   { opacity: 1; filter: blur(0); }
}
@keyframes aafe-fx-blurInUp {
	from { opacity: 0; filter: blur(14px); transform: translate3d(0, var(--aafe-fx-dist, 50px), 0); }
	to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes aafe-fx-revealUp {
	from { opacity: 1; clip-path: inset(100% 0 0 0); }
	to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes aafe-fx-revealDown {
	from { opacity: 1; clip-path: inset(0 0 100% 0); }
	to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes aafe-fx-revealLeft {
	from { opacity: 1; clip-path: inset(0 0 0 100%); }
	to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes aafe-fx-revealRight {
	from { opacity: 1; clip-path: inset(0 100% 0 0); }
	to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes aafe-fx-revealCircle {
	from { opacity: 1; clip-path: circle(0% at 50% 50%); }
	to   { opacity: 1; clip-path: circle(75% at 50% 50%); }
}
@keyframes aafe-fx-flipInX {
	from { opacity: 0; transform: perspective(900px) rotateX(-75deg); }
	to   { opacity: 1; transform: perspective(900px) rotateX(0); }
}
@keyframes aafe-fx-flipInY {
	from { opacity: 0; transform: perspective(900px) rotateY(75deg); }
	to   { opacity: 1; transform: perspective(900px) rotateY(0); }
}
@keyframes aafe-fx-skewUp {
	from { opacity: 0; transform: translate3d(0, var(--aafe-fx-dist, 50px), 0) skewY(7deg); }
	to   { opacity: 1; transform: none; }
}
@keyframes aafe-fx-scaleDown {
	from { opacity: 0; transform: scale(1.18); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Hover: spotlight + glow border ---------- */
.aafe-fx-spot,
.aafe-fx-spot-border {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	transition: opacity .35s ease;
}

.aafe-fx-spot {
	background: radial-gradient(var(--aafe-spot-size, 350px) circle at var(--aafe-spot-x, 50%) var(--aafe-spot-y, 50%), var(--aafe-spot-color, rgba(255, 255, 255, .18)), transparent 70%);
}

.aafe-fx-spot-border {
	padding: var(--aafe-spot-bw, 2px);
	background: radial-gradient(var(--aafe-spot-size, 350px) circle at var(--aafe-spot-x, 50%) var(--aafe-spot-y, 50%), var(--aafe-spot-border, #8b5cf6), transparent 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.aafe-fx-hovering > .aafe-fx-spot,
.aafe-fx-hovering > .aafe-fx-spot-border {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.aafe-fx-run {
		animation: none !important;
	}
}
