/* PageCraft motion effects. Classes come from the element's Advanced → Motion Effects options. */

/* Hover effects */

.pc-hover-lift,
.pc-hover-grow,
.pc-hover-shrink,
.pc-hover-glow,
.pc-hover-tilt {
	--pc-hover-color: rgba(79, 70, 229, .45);
	transition: transform .35s cubic-bezier(.2, .8, .3, 1), box-shadow .35s ease;
}

.pc-hover-lift:hover {
	transform: translateY(-8px);
	box-shadow: 0 24px 48px -18px var(--pc-hover-color);
}

.pc-hover-grow:hover {
	transform: scale(1.04);
}

.pc-hover-shrink:hover {
	transform: scale(.96);
}

.pc-hover-glow:hover {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-hover-color) 50%, transparent), 0 18px 44px -10px var(--pc-hover-color);
}

/* motion.js sets the angles from the pointer position. */
.pc-hover-tilt {
	transform: perspective(900px) rotateX(var(--pc-tilt-x, 0deg)) rotateY(var(--pc-tilt-y, 0deg));
	transition: transform .2s ease-out, box-shadow .35s ease;
	will-change: transform;
}

/* Scroll effects: motion.js sets these, using the independent `translate`, `scale` and
   `opacity` properties so they combine with hover transforms and entrance animations. */

.pc-scroll-fx {
	translate: 0 var(--pc-scroll-y, 0px);
	scale: var(--pc-scroll-scale, 1);
	opacity: var(--pc-scroll-opacity, 1);
	will-change: translate, scale, opacity;
}

/* Sticky */

.pc-sticky-top {
	position: sticky;
	top: var(--pc-sticky-offset, 0px);
	z-index: 99;
	transition: background-color .3s ease, box-shadow .3s ease;
}

/* Keep clear of the WordPress toolbar (it is only fixed from 601px wide). */
@media (min-width: 601px) {
	body.admin-bar .pc-sticky-top {
		top: calc(var(--pc-sticky-offset, 0px) + var(--wp-admin--admin-bar--height, 32px));
	}
}

/* No shadow unless "Shadow When Stuck" is on. */
.pc-sticky-top.pc-sticky-shadow-yes.pc-is-stuck {
	box-shadow: 0 10px var(--pc-sticky-shadow-blur, 30px) -12px var(--pc-sticky-shadow-color, rgba(15, 23, 42, .25));
}

@media (prefers-reduced-motion: reduce) {
	.pc-hover-lift:hover,
	.pc-hover-grow:hover,
	.pc-hover-shrink:hover,
	.pc-hover-tilt {
		transform: none;
	}

	.pc-scroll-fx {
		translate: none;
		scale: none;
		opacity: 1;
	}
}
