/*
 * Infravanta motion layer (v1.6.0).
 * Hero entrances on every page, scroll reveals on the home page, hover polish.
 * Everything here is gated on html.iv-motion, which the head script adds only when
 * the visitor has not asked for reduced motion. Without it, all content shows as normal.
 */

:root {
	--m-ease: cubic-bezier(.22, .61, .36, 1);
	--m-ease-out: cubic-bezier(.16, 1, .3, 1);
	--m-dur: .8s;
}

/* ---------- Hero entrance: home hero + every page header ---------- */
@keyframes iv-rise {
	from { opacity: 0; transform: translate3d(0, 22px, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes iv-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes iv-kenburns {
	from { transform: scale(1.12); }
	to   { transform: scale(1); }
}
@keyframes iv-sheen {
	0%   { transform: translateX(-120%); }
	100% { transform: translateX(220%); }
}
@keyframes iv-grid-drift {
	from { background-position: 0 0, 0 0; }
	to   { background-position: 64px 64px, 64px 64px; }
}

.iv-motion .iv-sh-hero-media img,
.iv-motion .iv-pagehead .iv-bg img {
	animation: iv-kenburns 14s var(--m-ease-out) both;
	transform-origin: 60% 40%;
	will-change: transform;
}

.iv-motion .iv-sh-eyebrow,
.iv-motion .iv-sh-hero-side > *,
.iv-motion .iv-pagehead .iv-wrap > * {
	animation: iv-rise var(--m-dur) var(--m-ease-out) both;
}
.iv-motion .iv-sh-eyebrow { animation-delay: .1s; }

/* Home title: each phrase rises in turn. */
.iv-motion .iv-sh-title > span {
	display: inline-block;
	animation: iv-rise .9s var(--m-ease-out) both;
}
.iv-motion .iv-sh-title > span:nth-child(1) { animation-delay: .22s; }
.iv-motion .iv-sh-title > span:nth-child(2) { animation-delay: .32s; }
.iv-motion .iv-sh-title > span:nth-child(3) { animation-delay: .42s; }
.iv-motion .iv-sh-title > span:nth-child(4) { animation-delay: .52s; }
.iv-motion .iv-sh-title > span:nth-child(5) { animation-delay: .62s; }
.iv-motion .iv-sh-hero-side > *:nth-child(1) { animation-delay: .75s; }
.iv-motion .iv-sh-hero-side > *:nth-child(2) { animation-delay: .88s; }

/* Page headers: breadcrumb, title, intro, extras. */
.iv-motion .iv-pagehead .iv-wrap > *:nth-child(1) { animation-delay: .05s; }
.iv-motion .iv-pagehead .iv-wrap > *:nth-child(2) { animation-delay: .15s; }
.iv-motion .iv-pagehead .iv-wrap > *:nth-child(3) { animation-delay: .27s; }
.iv-motion .iv-pagehead .iv-wrap > *:nth-child(4) { animation-delay: .39s; }

/* A thin lime light sweeps once across each hero after it lands. */
.iv-sh-hero,
.iv-pagehead { position: relative; overflow: hidden; }
.iv-motion .iv-sh-hero::before,
.iv-motion .iv-pagehead::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--s-accent, #B7D635), transparent);
	width: 45%;
	animation: iv-sheen 2.4s 1s var(--m-ease) both;
	pointer-events: none;
}

/* Grid lines on page headers drift slowly. */
.iv-motion .iv-pagehead.iv-gridlines {
	animation: iv-grid-drift 40s linear infinite;
}

/* ---------- Product pages (no hero banner): gallery and details arrive in turn ---------- */
.iv-motion.single-product .woocommerce-breadcrumb,
.iv-motion .single-product .iv-crumbs,
.iv-motion div.product .woocommerce-product-gallery,
.iv-motion div.product .summary > * {
	animation: iv-rise .8s var(--m-ease-out) both;
}
.iv-motion div.product .woocommerce-product-gallery { animation-name: iv-fade; animation-duration: 1s; }
.iv-motion div.product .summary > *:nth-child(1) { animation-delay: .08s; }
.iv-motion div.product .summary > *:nth-child(2) { animation-delay: .16s; }
.iv-motion div.product .summary > *:nth-child(3) { animation-delay: .24s; }
.iv-motion div.product .summary > *:nth-child(4) { animation-delay: .32s; }
.iv-motion div.product .summary > *:nth-child(n+5) { animation-delay: .4s; }

/* ---------- Scroll reveals ---------- */
.iv-motion [data-iv-reveal] {
	opacity: 0;
	transform: translate3d(0, 26px, 0);
	transition: opacity .7s var(--m-ease-out), transform .8s var(--m-ease-out);
	transition-delay: calc(var(--iv-i, 0) * 70ms);
}
.iv-motion [data-iv-reveal="fade"] { transform: none; }
.iv-motion [data-iv-reveal="zoom"] { transform: scale(.96); }
.iv-motion [data-iv-reveal].iv-in {
	opacity: 1;
	transform: none;
}

/* Section titles: the accent rule draws in under the heading. */
.iv-motion .iv-rule {
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .9s .2s var(--m-ease-out);
}
.iv-motion .iv-scenter .iv-rule,
.iv-motion .iv-rule[data-center] { transform-origin: center; }
.iv-motion .iv-in .iv-rule,
.iv-motion .iv-rule.iv-in { transform: scaleX(1); }

/* ---------- Hover polish ---------- */
.iv-coltile img,
.iv-ph img {
	transition: transform .7s var(--m-ease-out);
}
.iv-coltile:hover img,
.iv-coltile:focus-visible img { transform: scale(1.06); }
.iv-srow > li,
.iv-sgrid > li,
ul.products > li {
	transition: transform .35s var(--m-ease-out), box-shadow .35s var(--m-ease-out);
}
.iv-srow > li:hover,
.iv-sgrid > li:hover,
ul.products > li:hover {
	transform: translateY(-4px);
}
.iv-srow > li:hover .iv-ph img,
.iv-sgrid > li:hover .iv-ph img,
ul.products > li:hover .iv-ph img { transform: scale(1.04); }

.iv-sbtn,
.iv-btn {
	transition: transform .25s var(--m-ease-out), box-shadow .25s var(--m-ease-out), background-color .25s, color .25s, border-color .25s;
}
.iv-sbtn:hover,
.iv-btn:hover { transform: translateY(-2px); }
.iv-sbtn:active,
.iv-btn:active { transform: translateY(0); }


/* ---------- Home hero spotlight (v1.6.0) ---------- */
.iv-motion .iv-sh-hero-side > *:nth-child(3) { animation-delay: 1s; }
.iv-motion .iv-hs-slide.is-on { animation: iv-kenburns 9s linear both; }
.iv-motion .iv-hs-name.is-swap > span { animation: iv-swap .6s var(--m-ease-out) both; }
.iv-motion .iv-hs-meta.is-swap { animation: iv-fade .6s .1s both; }
@keyframes iv-swap {
	from { opacity: 0; transform: translate3d(0, 60%, 0); }
	to   { opacity: 1; transform: none; }
}
.iv-motion .iv-hs-bar i.is-run { animation: iv-bar var(--iv-hs-dur, 6s) linear both; }
.iv-motion .iv-hs-paused .iv-hs-bar i.is-run { animation-play-state: paused; }
@keyframes iv-bar { to { transform: scaleX(1); } }

/* Department ticker: one seamless loop; pauses on hover or keyboard focus. */
.iv-motion .iv-ticker-track { animation: iv-marquee 60s linear infinite; }
.iv-motion .iv-ticker:hover .iv-ticker-track,
.iv-motion .iv-ticker:focus-within .iv-ticker-track { animation-play-state: paused; }
@keyframes iv-marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Image bands: About and Why ---------- */
.iv-motion .iv-band .iv-band-bg { animation: iv-drift 28s ease-in-out infinite alternate; }
@keyframes iv-drift {
	from { transform: scale(1.08) translate3d(-1.5%, 0, 0); }
	to   { transform: scale(1.14) translate3d(1.5%, -1%, 0); }
}
.iv-motion .iv-band-mark { animation: iv-marquee 70s linear infinite; }
.iv-motion .iv-frame::before,
.iv-motion .iv-frame::after { transform: scale(0); transition: transform .9s .3s var(--m-ease-out); }
.iv-motion .iv-frame::before { transform-origin: top left; }
.iv-motion .iv-frame::after { transform-origin: bottom right; }
.iv-motion .iv-frame.iv-in::before,
.iv-motion .iv-frame.iv-in::after { transform: scale(1); }

/* Why: cards rise in turn, icons pop, and a lime marker walks across the four cards. */
.iv-why li { position: relative; overflow: hidden; transition: transform .35s var(--m-ease-out), background-color .35s, border-color .35s; }
.iv-why li:hover { transform: translateY(-6px); background-color: rgba(255,255,255,.1); border-color: rgba(183,214,53,.55); }
.iv-motion .iv-why li::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--s-accent, #B7D635);
	transform: scaleX(0); transform-origin: left; animation: iv-walk 8s linear infinite;
}
.iv-motion .iv-why li:nth-child(2)::before { animation-delay: 2s; }
.iv-motion .iv-why li:nth-child(3)::before { animation-delay: 4s; }
.iv-motion .iv-why li:nth-child(4)::before { animation-delay: 6s; }
@keyframes iv-walk {
	0%   { transform: scaleX(0); transform-origin: left; }
	12%  { transform: scaleX(1); transform-origin: left; }
	13%  { transform: scaleX(1); transform-origin: right; }
	25%, 100% { transform: scaleX(0); transform-origin: right; }
}
.iv-motion .iv-why li .iv-icon { transform: scale(.4) rotate(-20deg); opacity: 0; transition: transform .6s var(--m-ease-out), opacity .4s; transition-delay: calc(var(--iv-i, 0) * 90ms + .25s); }
.iv-motion .iv-why li.iv-in .iv-icon { transform: none; opacity: 1; }
.iv-why li:hover .iv-icon { transform: scale(1.12) rotate(-6deg) !important; }

/* ---------- Footer ---------- */
.iv-motion .iv-footer::before { animation: iv-flow 6s ease-in-out infinite; }
@keyframes iv-flow {
	0%   { background-position: -60% 0; }
	100% { background-position: 160% 0; }
}
.iv-motion .iv-wa::before {
	content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366;
	animation: iv-ping 2.6s 3s var(--m-ease-out) infinite; pointer-events: none;
}
@keyframes iv-ping {
	0%   { transform: scale(1); opacity: .8; }
	70%, 100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Reduced motion: switch everything off ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
	[data-iv-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Combo deals (v1.7.0) ---------- */
.iv-motion .iv-deal-chip { animation: iv-rise .8s .05s var(--m-ease-out) both; }
.iv-motion .iv-deal-chip b { animation: iv-pulse 2.4s 1.2s ease-in-out infinite; }
@keyframes iv-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(183,214,53,.6); } 50% { box-shadow: 0 0 0 6px rgba(183,214,53,0); } }
.iv-motion .iv-deal-badge { animation: iv-pop .6s calc(var(--iv-i, 0) * 70ms + .4s) var(--m-ease-out) both; }
@keyframes iv-pop { from { transform: scale(0) rotate(-12deg); } to { transform: none; } }
.iv-motion .iv-deal:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(183,214,53,.55); }
