/* ==========================================================================
   Alles is Water — animaties (paneel "Animatie") en knop-hover.
   Waarden per blok komen als CSS-variabelen binnen; standaarden uit theme.json
   (settings.custom.motion → --wp--custom--motion--*).
   ========================================================================== */

:root {
	--aiw-ease: var(--wp--custom--motion--easing, cubic-bezier(0.22, 1, 0.36, 1));
}

/* ---------- Knoppen: vulling van links naar rechts ----------------------- */
.wp-block-button__link {
	--aiw-button-fill-default: var(--wp--preset--color--accent-1);
	background-image: linear-gradient(
		var(--aiw-button-fill, var(--aiw-button-fill-default)),
		var(--aiw-button-fill, var(--aiw-button-fill-default))
	);
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: 0% 100%;
	transition:
		background-size var(--wp--custom--motion--button-duration, 450ms) var(--aiw-ease),
		color 250ms ease;
}
.wp-block-button__link.has-accent-1-background-color {
	--aiw-button-fill-default: var(--wp--preset--color--contrast);
}
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	background-size: 100% 100%;
	color: var(--aiw-button-text, var(--wp--preset--color--base)) !important;
}

/* ---------- Verschijnen bij scrollen -------------------------------------- */
.aiw-reveal {
	--_d: var(--aiw-distance, var(--wp--custom--motion--distance, 40px));
	transition-property: opacity, translate, scale, clip-path;
	transition-duration: var(--aiw-duration, var(--wp--custom--motion--duration, 800ms));
	transition-delay: var(--aiw-delay, 0ms);
	transition-timing-function: var(--aiw-ease);
}
.aiw-js .aiw-reveal:not(.is-inview) { opacity: 0; }
.aiw-js .aiw-reveal--fade-up:not(.is-inview) { translate: 0 var(--_d); }
.aiw-js .aiw-reveal--from-left:not(.is-inview) { translate: calc(-1 * var(--_d)) 0; }
.aiw-js .aiw-reveal--from-right:not(.is-inview) { translate: var(--_d) 0; }
.aiw-js .aiw-reveal--zoom-in:not(.is-inview) { scale: 0.92; }
.aiw-js .aiw-reveal--unveil:not(.is-inview) { opacity: 1; clip-path: inset(100% 0 0 0); }
.aiw-reveal--unveil { clip-path: inset(0 0 0 0); }

/* ---------- Parallax (JS zet --aiw-py) ------------------------------------ */
[data-aiw-parallax] {
	transform: translate3d(0, var(--aiw-py, 0px), 0);
	will-change: transform;
}

/* ---------- Hover op afbeeldingen ---------------------------------------- */
.aiw-hover--zoom img,
.aiw-hover--lift img,
.aiw-hover--tilt img,
.wp-block-cover.aiw-hover--zoom .wp-block-cover__image-background {
	transition: scale 700ms var(--aiw-ease), rotate 700ms var(--aiw-ease), translate 500ms var(--aiw-ease), filter 500ms ease;
}
.aiw-hover--zoom img:hover,
.wp-block-cover.aiw-hover--zoom:hover .wp-block-cover__image-background { scale: 1.05; }
.aiw-hover--lift img:hover {
	translate: 0 -8px;
	filter: drop-shadow(0 18px 24px rgb(15 85 105 / 0.25));
}
.aiw-hover--tilt img:hover { rotate: -2deg; scale: 1.03; }

/* ---------- Levende swirl (pseudo-elementen van de swirl-stijlen) -------- */
.wp-block-group.is-style-swirl::before,
.wp-block-image.is-style-oval-swirl::before,
.wp-block-cover.is-style-swirl::after {
	translate: 0 var(--aiw-swirl-py, 0px);
	transform-origin: 50% 45%;
}
.aiw-swirl--breathe.is-style-swirl::before,
.aiw-swirl--breathe.is-style-oval-swirl::before,
.aiw-swirl--breathe.is-style-swirl.wp-block-cover::after {
	animation: aiw-swirl-breathe var(--wp--custom--motion--swirl-duration, 7s) ease-in-out infinite alternate;
}
.aiw-swirl--drift.is-style-swirl::before,
.aiw-swirl--drift.is-style-oval-swirl::before,
.aiw-swirl--drift.is-style-swirl.wp-block-cover::after {
	animation: aiw-swirl-drift calc(var(--wp--custom--motion--swirl-duration, 7s) * 2) ease-in-out infinite alternate;
}

/* Ovaal: swirl draait licht mee bij hover */
.wp-block-image.is-style-oval-swirl::before { transition: rotate 900ms var(--aiw-ease); }
.wp-block-image.is-style-oval-swirl:hover::before { rotate: 6deg; }

@keyframes aiw-swirl-breathe {
	from { scale: 1; rotate: 0deg; }
	to { scale: 1.035; rotate: -2.5deg; }
}
@keyframes aiw-swirl-drift {
	from { rotate: -5deg; }
	to { rotate: 5deg; }
}

/* ---------- Minder beweging ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.aiw-js .aiw-reveal:not(.is-inview) { opacity: 1; translate: none; scale: none; clip-path: none; }
	*, *::before, *::after {
		animation: none !important;
		transition-duration: 1ms !important;
	}
	[data-aiw-parallax] { transform: none; }
}

/* Inkomende blokken van links/rechts mogen geen horizontale scroll veroorzaken. */
html, body { overflow-x: clip; }
