/**
 * Motion layer — the source design's reveal.js, applied to the Elementor site.
 *
 * Timings and curves are the design's own: blocks rise 26px over 1s on
 * cubic-bezier(.16,.84,.3,1), rules draw from the left over 1.1s, photographs
 * settle from 106% over 2.4s, nav items drop in 8px. motion.js decides what
 * moves and when; this file only says how.
 *
 * Everything here is gated on html.lj-motion, which is only set when the
 * visitor has not asked for reduced motion.
 */

@keyframes lj-m-rise {
	from { opacity: 0; transform: translateY(26px); }
	to   { opacity: 1; transform: none; }
}

@keyframes lj-m-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes lj-m-rule {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

@keyframes lj-m-pan {
	from { transform: scale(1.06); }
	to   { transform: scale(1); }
}

@keyframes lj-m-nav {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: none; }
}

/* Waiting to be revealed. */
.lj-motion .lj-m-hide {
	opacity: 0;
}

.lj-motion .lj-m-in {
	animation: lj-m-rise 1s cubic-bezier(.16, .84, .3, 1) both;
}

.lj-motion .lj-m-in-fade {
	animation: lj-m-fade 1.2s ease both;
}

.lj-motion .lj-m-rule {
	transform-origin: left center;
	animation: lj-m-rule 1.1s cubic-bezier(.16, .84, .3, 1) both;
}

.lj-motion .lj-m-pan {
	animation: lj-m-pan 2.4s cubic-bezier(.2, .7, .2, 1) both;
}

.lj-motion .lj-m-nav {
	animation: lj-m-nav .8s cubic-bezier(.16, .84, .3, 1) both;
}

/* The header is hidden from the first paint so it cannot flash in and then
   jump to its entrance; motion.js starts the entrance straight away, and
   html.lj-motion-done (added after a few seconds, or at once without
   JavaScript support) releases anything that was never started. */
.lj-motion:not(.lj-motion-done) .xpro-theme-builder-header .elementor-widget-xpro-site-logo:not(.lj-m-nav),
.lj-motion:not(.lj-motion-done) .xpro-theme-builder-header a.menu-link:not(.lj-m-nav) {
	opacity: 0;
}

/* A photograph that settles needs its frame to clip the extra 6%. */
.lj-m-clip {
	overflow: hidden;
}

/* Elementor's own entrance classes are retired in favour of this layer; make
   sure nothing it would have hidden stays hidden. */
.lj-motion .elementor-invisible.lj-m-owned {
	visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
	.lj-motion .lj-m-hide {
		opacity: 1;
	}

	.lj-motion .lj-m-in,
	.lj-motion .lj-m-in-fade,
	.lj-motion .lj-m-rule,
	.lj-motion .lj-m-pan,
	.lj-motion .lj-m-nav {
		animation: none;
	}
}

/* ==================== Hover details ==================== */
/* Values from the source design. Several targets are styled inline by their
   Elementor HTML widgets, which is why the hover states need !important. */

/* Header logo grows a touch instead of fading. */
.xpro-theme-builder-header .elementor-widget-xpro-site-logo img {
	transition: transform .5s cubic-bezier(.16, .84, .3, 1), opacity .5s ease;
	transform-origin: left center;
}

.xpro-theme-builder-header .elementor-widget-xpro-site-logo a:hover img {
	transform: scale(1.05);
	opacity: 1 !important;
}

/* Footer text links turn bronze. */
#xpro-theme-builder-footer a:not([aria-label]) {
	transition: color .35s ease;
}

#xpro-theme-builder-footer a:not([aria-label]):hover,
#xpro-theme-builder-footer a:not([aria-label]):focus-visible {
	color: #B08D5F !important;
}

/* Footer icons: the bronze ring firms up and a soft bronze wash fills it. */
#xpro-theme-builder-footer .elementor-widget-html a[aria-label] {
	transition: border-color .4s ease, background-color .4s ease, transform .4s cubic-bezier(.16, .84, .3, 1);
}

#xpro-theme-builder-footer .elementor-widget-html a[aria-label]:hover,
#xpro-theme-builder-footer .elementor-widget-html a[aria-label]:focus-visible {
	border-color: #B08D5F !important;
	background-color: rgba(176, 141, 95, .12) !important;
	transform: translateY(-2px);
}

/* Contact: the WhatsApp button warms on hover exactly like "Send message". */
.elementor-element-b5b5269 a {
	transition: background-color .45s ease;
}

.elementor-element-b5b5269 a:hover,
.elementor-element-b5b5269 a:focus-visible {
	background: #3A3733 !important;
}

@media (prefers-reduced-motion: reduce) {
	.xpro-theme-builder-header .elementor-widget-xpro-site-logo a:hover img,
	#xpro-theme-builder-footer .elementor-widget-html a[aria-label]:hover {
		transform: none;
	}
}

/* ==================== Accessibility: focus indicators ==================== */
/* Restore visible keyboard focus (bronze outline) on all interactive elements.
   Xpro's plugin stylesheet sets outline:0 on its own widgets; the !important
   here wins that fight for keyboard-only users. */

:focus-visible {
	outline: 2px solid #B08D5F;
	outline-offset: 3px;
}

/* Xpro removes outlines on its own widgets — restore them. */
[class*="elementor-widget-xpro"] a:focus-visible,
[class*="elementor-widget-xpro"] button:focus-visible {
	outline: 2px solid #B08D5F !important;
	outline-offset: 3px !important;
}

/* Dark buttons need an inset ring so the outline shows against the dark fill. */
.elementor-button:focus-visible,
.wpforms-submit:focus-visible,
button:focus-visible {
	outline: 2px solid #B08D5F !important;
	outline-offset: 3px !important;
}

/* Remove default outline where focus-visible is unsupported to avoid double rings. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
	outline: none;
}

/* ==================== Back-to-top button ==================== */
/* On mobile the Xpro back-to-top button sits at bottom-right and can cover
   the index numeral on the last card row. Nudge it up so it clears the
   cards without overlapping the content at all viewport widths. */
@media (max-width: 767px) {
	.xpro-back-to-top,
	.elementor-widget-xpro-back-to-top {
		bottom: 72px !important;
	}
}

/* ==================== Screen-reader-only helper ==================== */
/* Used for the portfolio page H1 and any future SR-only content. */
.lj-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==================== Filter row on small phones ==================== */
/* The portfolio filter row overflows horizontally on phones narrower than
   about 430px because the Commercial button cannot fit. Wrap instead. */

@media (max-width: 500px) {
	.elementor-widget-shortcode .elementor-shortcode,
	.lj-filters {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 8px !important;
	}
}
