/* Zenit 3D House: home page. Only motion is added; the page's own colors, fonts and layout stay as they are. */

.z3d-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@keyframes z3d-failsafe {
	to { opacity: 1; }
}

/* Hero title waits for the script (it shows on its own after 3 s if the script never runs) */
.z3d-js .zr-house1 .wp-block-cover__inner-container {
	opacity: 0;
	animation: z3d-failsafe 0s linear 3s forwards;
}
.z3d-ready .zr-house1 .wp-block-cover__inner-container,
.z3d-still .zr-house1 .wp-block-cover__inner-container {
	opacity: 1;
	animation: none;
}

/* The 3D picture sits over the original picture, under the dim layer and the title */
.zr-house1 .z3d-hero-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s ease;
}
.zr-house1 .z3d-hero-canvas.is-on {
	opacity: 1;
}

.z3d-hero-title {
	will-change: transform, opacity;
	transform-origin: 50% 50%;
}
.z3d-split {
	display: inline;
}
.z3d-word {
	display: inline-block;
	white-space: nowrap;
}
.z3d-hero-title .z3d-split {
	display: inline-block;
	perspective: 640px;
}
.z3d-hero-title .z3d-ch {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.6em) rotateX(-88deg);
	transform-origin: 50% 100%;
	transition: opacity 0.8s ease, transform 1.1s cubic-bezier(0.2, 0.75, 0.25, 1);
	transition-delay: calc(var(--i, 0) * 45ms + 500ms);
}
.z3d-hero-in .z3d-hero-title .z3d-ch {
	opacity: 1;
	transform: none;
}

/* Section titles: words turn up into place */
.z3d-rv-words .z3d-split {
	display: inline-block;
	perspective: 600px;
}
.z3d-rv-words .z3d-word {
	opacity: 0;
	transform: translateY(0.45em) rotateX(-75deg);
	transform-origin: 50% 100%;
	transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.75, 0.25, 1);
	transition-delay: calc(var(--i, 0) * 110ms);
}
.z3d-rv-words.z3d-in .z3d-word {
	opacity: 1;
	transform: none;
}

/* Band text rises in */
.z3d-rv-rise {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.9s ease, transform 1s cubic-bezier(0.2, 0.75, 0.25, 1);
	transition-delay: var(--z3d-d, 0ms);
}
.z3d-rv-rise.z3d-in {
	opacity: 1;
	transform: none;
}

/* Feature boxes turn up into place, one after another */
.z3d-rv-flip {
	opacity: 0;
	transform: perspective(900px) translateY(34px) rotateX(-32deg);
	transform-origin: 50% 0;
	transition: opacity 0.7s ease, transform 0.95s cubic-bezier(0.2, 0.75, 0.25, 1);
	transition-delay: var(--z3d-d, 0ms);
}
.z3d-rv-flip.z3d-in {
	opacity: 1;
	transform: none;
}

/* ...and lean toward the pointer, with a soft light where it is */
.wp-block-kadence-infobox .kt-blocks-info-box-link-wrap.z3d-tilt {
	position: relative;
	transition: transform 0.6s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.4s ease;
	transform-style: flat;
}
.wp-block-kadence-infobox .kt-blocks-info-box-link-wrap.z3d-tilt.z3d-tilting {
	transition: transform 0.12s ease-out, box-shadow 0.4s ease;
	box-shadow: 0 22px 34px -18px rgba(0, 0, 0, 0.55);
}
.z3d-tilt .kt-blocks-info-box-media {
	transition: transform 0.4s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.z3d-tilt.z3d-tilting .kt-blocks-info-box-media {
	transform: translateY(-4px) scale(1.06);
}
.z3d-sheen {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0) 60%);
	opacity: 0;
	transition: opacity 0.35s ease;
}
.z3d-tilting .z3d-sheen {
	opacity: 1;
}

/* Contact picture moves a little slower than the page */
.z3d-par {
	will-change: transform;
	transform: scale(1.18);
}

/* Reduced motion: everything in place, nothing moves */
.z3d-still .z3d-rv,
.z3d-still .z3d-rv .z3d-word,
.z3d-still .z3d-ch {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
	.z3d-rv,
	.z3d-rv .z3d-word,
	.z3d-ch {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.z3d-js .zr-house1 .wp-block-cover__inner-container {
		opacity: 1;
		animation: none;
	}
}
