/* Daybreak signature motion (inc/motion.php, assets/js/motion.js).
   Loaded only with Pro Settings > Home page > Page animations on. Every rule sits behind
   html.lb-js (set before paint, and never with reduced motion) and body.lb-motion-plus, so
   without either the design is exactly as before. Builds on the design's reveal: agent.js
   marks elements .lb-reveal and adds .is-in as they come into view. */

.lb-js .lb-motion-plus {
	--lb-mp-ease: cubic-bezier(0.16, 1, 0.3, 1);      /* long, soft settle */
	--lb-mp-curtain: cubic-bezier(0.77, 0, 0.18, 1);  /* photo curtains */
}

/* --- Headlines, word by word ------------------------------------------------
   motion.js wraps each word: .lb-w clips, .lb-w__i rises into it. The padding/negative
   margin pair keeps descenders and italics from being clipped without moving the text. */

.lb-js .lb-motion-plus .lb-w {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding: 0 0.06em 0.16em;
	margin: 0 -0.06em -0.16em;
}

.lb-js .lb-motion-plus .lb-w__i {
	display: inline-block;
	transform: translateY(112%) rotate(3deg);
	transform-origin: 0 100%;
	transition: transform 1100ms var(--lb-mp-ease) calc(var(--lb-w, 0) * 55ms + var(--lb-w-base, 0ms));
}

/* Home hero: hidden until motion.js has split it; a failsafe shows it after 1.6 s regardless. */
.lb-js .lb-motion-plus .lb-hero--home .lb-hero__heading {
	animation: lb-mp-failsafe 1ms linear 1600ms both;
}

.lb-js .lb-motion-plus .lb-hero--home .lb-hero__heading.lb-split {
	animation: none;
	opacity: 1;
	--lb-w-base: 180ms;
}

.lb-js .lb-motion-plus .lb-hero__heading.lb-words-in .lb-w__i { transform: none; }

@keyframes lb-mp-failsafe {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* The eyebrow opens up as it arrives; the search follows the headline. */
.lb-js .lb-motion-plus .lb-hero--home .lb-hero__eyebrow {
	animation: lb-mp-eyebrow 1200ms var(--lb-mp-ease) 60ms both;
}

.lb-js .lb-motion-plus .lb-hero--home .lb-hero__sub    { animation-delay: 520ms; }
.lb-js .lb-motion-plus .lb-hero--home .lb-finder       { animation-delay: 680ms; animation-duration: 1100ms; }

@keyframes lb-mp-eyebrow {
	from { opacity: 0; letter-spacing: 0.32em; }
	to   { opacity: 1; }
}

/* Section headings: words rise when agent.js reveals the heading block. */
.lb-js .lb-motion-plus .e-con.lb-heading .lb-split { --lb-w-base: 140ms; }
.lb-js .lb-motion-plus .e-con.lb-heading.is-in .lb-split .lb-w__i { transform: none; }

/* Their eyebrow slides in from the left. */
.lb-js .lb-motion-plus .e-con.lb-heading.lb-reveal .lb-eyebrow {
	opacity: 0;
	translate: -28px 0;
}

.lb-js .lb-motion-plus .e-con.lb-heading.lb-reveal.is-in .lb-eyebrow {
	opacity: 1;
	translate: 0 0;
	transition: opacity 800ms var(--lb-mp-ease) 40ms, translate 1000ms var(--lb-mp-ease) 40ms;
}

/* --- Home hero: settle and parallax ----------------------------------------
   The photo/video settles from a slight zoom. While scrolling past, it drifts down at a third
   of the scroll inside the media box (which clips it), so the hero itself is never clipped and
   the search suggestions can still drop below it. Individual translate/scale properties add to
   any transform the media already uses. */

.lb-js .lb-motion-plus .lb-hero--home .lb-hero__media { overflow: hidden; }

.lb-js .lb-motion-plus .lb-hero--home .lb-hero__media > * {
	translate: 0 var(--lb-par, 0px);
	animation: lb-mp-settle 2600ms var(--lb-mp-ease) both;
	will-change: translate;
}

.lb-js .lb-motion-plus .lb-hero--home .lb-hero__inner {
	translate: 0 var(--lb-par-in, 0px);
	opacity: var(--lb-par-fade, 1);
}

@keyframes lb-mp-settle {
	from { scale: 1.14; opacity: 0.35; }
	to   { scale: 1; opacity: 1; }
}

/* --- Cards: further, softer, one after another -------------------------------- */

.lb-js .lb-motion-plus :is(.lb-stat, .lb-service-card, .lb-area, .lb-listing, .lb-review, .lb-post-card, .lb-journey__step).lb-reveal {
	transform: translateY(44px) scale(0.965);
	filter: blur(8px);
}

.lb-js .lb-motion-plus :is(.lb-stat, .lb-service-card, .lb-area, .lb-listing, .lb-review, .lb-post-card, .lb-journey__step).lb-reveal.is-in {
	transform: none;
	filter: none;
	transition: opacity 900ms ease calc(var(--lb-delay, 0ms) * 1.6),
	            transform 1200ms var(--lb-mp-ease) calc(var(--lb-delay, 0ms) * 1.6),
	            filter 900ms ease calc(var(--lb-delay, 0ms) * 1.6);
}

/* Community photos settle inside their cards as the card arrives (scale adds to the hover zoom). */
.lb-js .lb-motion-plus .lb-area.lb-reveal .lb-area__img { scale: 1.16; }

.lb-js .lb-motion-plus .lb-area.lb-reveal.is-in .lb-area__img {
	scale: 1;
	transition: scale 1800ms var(--lb-mp-ease) calc(var(--lb-delay, 0ms) * 1.6), transform 1200ms var(--lb-ease);
}

/* The valuation band glides in from the side. */
.lb-js .lb-motion-plus .lb-valueband.lb-reveal { transform: translateX(64px); }

.lb-js .lb-motion-plus .lb-valueband.lb-reveal.is-in {
	transform: none;
	transition: opacity 900ms ease, transform 1300ms var(--lb-mp-ease);
}

/* --- Photos: a curtain opens upward while the picture settles ------------------ */

.lb-js .lb-motion-plus .lb-intro__photo.lb-reveal {
	opacity: 1;
	transform: none;
	clip-path: inset(100% 0 0 0);
}

.lb-js .lb-motion-plus .lb-intro__photo.lb-reveal img { scale: 1.18; }

.lb-js .lb-motion-plus .lb-intro__photo.lb-reveal.is-in {
	clip-path: inset(0 0 0 0);
	transition: clip-path 1400ms var(--lb-mp-curtain) 80ms;
}

.lb-js .lb-motion-plus .lb-intro__photo.lb-reveal.is-in img {
	scale: 1;
	transition: scale 2000ms var(--lb-mp-ease) 80ms;
}

/* --- Buttons: a sheen sweeps across on hover (pointer devices only) ----------- */

@media (hover: hover) {
	.lb-js .lb-motion-plus :is(.lb-btn:not(.lb-btn--quiet) .elementor-button, a.lb-btn-inline--solid) {
		position: relative;
		overflow: hidden;
		isolation: isolate;
	}

	.lb-js .lb-motion-plus :is(.lb-btn:not(.lb-btn--quiet) .elementor-button, a.lb-btn-inline--solid)::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: -1;
		background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
		transform: translateX(-120%);
		pointer-events: none;
	}

	.lb-js .lb-motion-plus :is(.lb-btn:not(.lb-btn--quiet) .elementor-button, a.lb-btn-inline--solid):hover::after {
		transform: translateX(120%);
		transition: transform 900ms var(--lb-mp-ease);
	}
}
