/* AfriAgentic motion layer (brand v2). Paired with aa-motion.js. */

/* Scroll reveals: only below-the-fold blocks, only once the script has run. */
html.aa-motion .aa-m {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition: opacity .8s cubic-bezier(.16, .8, .24, 1), transform .9s cubic-bezier(.16, .8, .24, 1);
	transition-delay: var(--aa-m-delay, 0ms);
}
html.aa-motion .aa-m.aa-m-in {
	opacity: 1;
	transform: none;
}

/* Cinematic hero: the photo moves to its own layer and drifts slowly. */
.aa-kb-host {
	position: relative;
	overflow: hidden;
	background-image: none !important;
}
.aa-kb {
	position: absolute;
	inset: -6% 0 -6% 0;
	z-index: 0;
	background-size: cover;
	background-repeat: no-repeat;
	transform: translate3d(0, var(--aa-plx-y, 0px), 0) scale(1.04);
	will-change: transform;
	pointer-events: none;
}
.aa-kb.aa-kb-on {
	animation: aa-kb-drift 26s ease-in-out infinite alternate;
}
@keyframes aa-kb-drift {
	from { transform: translate3d(0, var(--aa-plx-y, 0px), 0) scale(1.04); }
	to   { transform: translate3d(-1.5%, var(--aa-plx-y, 0px), 0) scale(1.12); }
}
.aa-kb-host::before { z-index: 1 !important; }
.aa-kb-host > .e-con,
.aa-kb-host > .e-con-inner { position: relative; z-index: 2; }

/* Hero copy arrives in sequence on load. */
.aa-kb-host .elementor-widget-heading,
.aa-kb-host .elementor-widget-text-editor,
.aa-kb-host .elementor-widget-button {
	animation: aa-rise 1s cubic-bezier(.16, .8, .24, 1) both;
}
.aa-kb-host .elementor-widget-heading { animation-delay: .1s; }
.aa-kb-host .elementor-widget-text-editor { animation-delay: .25s; }
.aa-kb-host .elementor-widget-button { animation-delay: .4s; }
@keyframes aa-rise {
	from { opacity: 0; transform: translate3d(0, 24px, 0); }
	to   { opacity: 1; transform: none; }
}

/* Parallax inside framed photos (desktop only, set by the script). */
img.aa-plx {
	transform: translate3d(0, var(--aa-plx-y, 0px), 0) scale(1.12);
}
.aa-photo:hover img.aa-plx,
.aa-card:hover .aa-card-media img.aa-plx {
	transform: translate3d(0, var(--aa-plx-y, 0px), 0) scale(1.17);
	transition: transform .8s cubic-bezier(.16, .8, .24, 1);
}

@media (max-width: 1024px) {
	.aa-kb.aa-kb-on { animation-duration: 34s; }
}

@media (prefers-reduced-motion: reduce) {
	html.aa-motion .aa-m { opacity: 1; transform: none; transition: none; }
	.aa-kb.aa-kb-on { animation: none; }
	.aa-kb-host .elementor-widget-heading,
	.aa-kb-host .elementor-widget-text-editor,
	.aa-kb-host .elementor-widget-button { animation: none; }
	img.aa-plx { transform: none; }
}
