/*
 * Motion layer — shared by both design styles.
 * Everything that hides content waits for html.burra-anim, which is only added
 * (inline, in <head>) when JavaScript runs, animations are enabled in the
 * Customizer and the visitor hasn't asked for reduced motion.
 */

:root {
	--ease-out: cubic-bezier(.16, 1, .3, 1);      /* expo out — calm, expensive feel */
	--ease-spring: cubic-bezier(.34, 1.56, .64, 1);
	--reveal-dur: 1s;
}

/* ---------- Always-on hover polish (cheap, no hidden states) ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* Button sheen */
	.btn { position: relative; overflow: hidden; isolation: isolate; }
	.btn::after {
		content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
		background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
		transform: translateX(-120%); transition: transform .9s var(--ease-out);
	}
	.btn:hover::after { transform: translateX(120%); }
	.btn .icon { transition: transform .45s var(--ease-out); }
	.btn:hover .icon-arrow-right { transform: translateX(4px); }
	.btn:hover .icon-phone { animation: burra-ring .7s ease-in-out; }

	/* Menu underline grows from the centre (Modern Green) */
	.design-classic .site-nav .menu > li > a { position: relative; }
	.design-classic .site-nav .menu > li > a::before {
		content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
		background: var(--lime); transform: scaleX(0); transition: transform .45s var(--ease-out);
	}
	.design-classic .site-nav .menu > li > a:hover::before { transform: scaleX(1); }

	/* Cards: slower, smoother zoom + lift */
	.card__media img { transition: transform 1.2s var(--ease-out), filter .6s var(--ease-out); }
	.card__link:hover .card__media img { transform: scale(1.08); }
	.design-earthy .card__link .card__media { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
	.design-earthy .card__link:hover .card__media { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(51, 39, 29, .16); }
	.design-earthy .card__title { transition: color .4s var(--ease-out); }
	.design-earthy .card__link:hover .card__title { color: var(--terracotta); }

	/* Gallery hover */
	.gallery-item img { transition: transform 1.1s var(--ease-out), filter .5s var(--ease-out); }
	.gallery-item a:hover img { transform: scale(1.07); }
	.design-classic .gallery-caption { transition: transform .5s var(--ease-out), opacity .5s var(--ease-out); }
	.design-classic .gallery-item a:hover + .gallery-caption,
	.design-classic .gallery-item:hover .gallery-caption { transform: translateY(-4px); }

	/* Sidebar range links slide */
	.range-nav a .icon { transition: transform .4s var(--ease-out), opacity .4s; }
	.range-nav a:hover .icon { transform: translateX(4px); opacity: .8; }

	/* Header shrinks once you scroll */
	.site-header__inner { transition: min-height .5s var(--ease-out); }
	.custom-logo { transition: max-height .5s var(--ease-out); }
	@media (min-width: 1201px) {
		.design-classic .site-header.is-stuck .site-header__inner,
		.design-earthy .site-header.is-stuck .site-header__inner { min-height: 68px; }
		.site-header.is-stuck .custom-logo { max-height: 52px; }
	}

	/* Earthy: drifting wave edge on page banners */
	.design-earthy .page-banner::after { animation: burra-wave 14s linear infinite; }

	/* Lightbox opens with a soft zoom */
	.lightbox .lightbox__img { transition: transform .6s var(--ease-out), opacity .4s; }
	.lightbox:not(.is-open) .lightbox__img { transform: scale(.94); opacity: 0; }
}

@keyframes burra-ring {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(-14deg); }
	40% { transform: rotate(12deg); }
	60% { transform: rotate(-8deg); }
	80% { transform: rotate(5deg); }
}
@keyframes burra-wave { to { -webkit-mask-position: -240px bottom; mask-position: -240px bottom; } }
@keyframes burra-float {
	0%, 100% { transform: rotate(-9deg) translateY(0); }
	50% { transform: rotate(-5deg) translateY(-8px); }
}

/* ---------- Entrance + scroll reveals (only with html.burra-anim) ---------- */

/* Page fade-in */
.burra-anim body { animation: burra-fade .7s ease-out both; }
@keyframes burra-fade { from { opacity: 0; } }

/* Header drops in */
.burra-anim .site-header { animation: burra-drop .9s var(--ease-out) .05s both; }
@keyframes burra-drop { from { transform: translateY(-100%); opacity: 0; } }

/* Split headings: each word rises out of a mask */
.burra-anim .split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .02em .02em .22em; margin: -.02em -.02em -.22em; }
.burra-anim .split-words .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + var(--base, 150ms)); }
.burra-anim .split-words.is-in .w > span { transform: none; }

/* Hero supporting copy */
.burra-anim .hero__content > :not(.hero__title) {
	opacity: 0; transform: translateY(22px);
	transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.burra-anim .hero.is-in .hero__content > .eyebrow { transition-delay: .1s; }
.burra-anim .hero.is-in .hero__content > .hero__text { transition-delay: .65s; }
.burra-anim .hero.is-in .hero__content > .hero__actions { transition-delay: .8s; }
.burra-anim .hero.is-in .hero__content > :not(.hero__title) { opacity: 1; transform: none; }

/* Hero photo — Modern Green: slow settle from a zoom */
.burra-anim .design-classic .hero__img { transform: scale(1.14); transition: transform 2.6s var(--ease-out); }
.burra-anim .design-classic .hero.is-in .hero__img { transform: scale(1.02); }

/* Hero photo — Warm & Earthy: the arch wipes up, inset pops, badge spins in then floats */
.burra-anim .design-earthy .hero__img { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease-out) .15s; }
.burra-anim .design-earthy .hero.is-in .hero__img { clip-path: inset(0 0 0 0); }
.burra-anim .design-earthy .hero__inset { transform: scale(.4); opacity: 0; transition: transform 1s var(--ease-spring) .9s, opacity .5s ease .9s; }
.burra-anim .design-earthy .hero.is-in .hero__inset { transform: none; opacity: 1; }
.burra-anim .design-earthy .hero__badge { opacity: 0; transform: rotate(-120deg) scale(.3); transition: transform 1.1s var(--ease-spring) 1.2s, opacity .4s ease 1.2s; }
.burra-anim .design-earthy .hero.is-in .hero__badge { opacity: 1; transform: rotate(-9deg); }
.burra-anim .design-earthy .hero.is-floating .hero__badge { animation: burra-float 6s ease-in-out infinite; transition: none; }

/* Feature strip items cascade in */
.burra-anim .features__list li { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(1s + var(--i, 0) * 110ms); }
.burra-anim .features.is-in .features__list li { opacity: 1; transform: none; }
.burra-anim .features__list .icon { transition: transform .8s var(--ease-spring); transition-delay: calc(1.25s + var(--i, 0) * 110ms); transform: scale(.4) rotate(-30deg); }
.burra-anim .features.is-in .features__list .icon { transform: none; }

/* Page banner */
.burra-anim .page-banner .breadcrumbs { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--ease-out) .1s, transform .9s var(--ease-out) .1s; }
.burra-anim .page-banner.is-in .breadcrumbs { opacity: 1; transform: none; }

/* Generic reveal: fade + rise, staggered by --i */
.burra-anim [data-reveal] {
	opacity: 0; transform: translateY(34px);
	transition: opacity var(--reveal-dur) var(--ease-out), transform var(--reveal-dur) var(--ease-out);
	transition-delay: calc(var(--i, 0) * 80ms);
}
.burra-anim [data-reveal="left"] { transform: translateX(-40px); }
.burra-anim [data-reveal="right"] { transform: translateX(40px); }
.burra-anim [data-reveal="scale"] { transform: scale(.94); }
.burra-anim [data-reveal].is-in { opacity: 1; transform: none; }

/* Photo wipe: the image is uncovered from the bottom while it settles from a zoom */
.burra-anim [data-reveal-img] img { clip-path: inset(100% 0 0 0); transform: scale(1.18); transition: clip-path 1.2s var(--ease-out), transform 1.6s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + 80ms); }
.burra-anim [data-reveal-img].is-in img { clip-path: inset(0 0 0 0); transform: none; }
.burra-anim [data-reveal-img].is-in img:hover { transition-delay: 0s; }

/* Parallax target (set by JS) */
.burra-anim .js-parallax { will-change: transform; }

/* Print and fallbacks: never leave content hidden */
@media print {
	.burra-anim [data-reveal], .burra-anim [data-reveal-img] img, .burra-anim .split-words .w > span,
	.burra-anim .hero__content > *, .burra-anim .features__list li { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
