/* ==================================================================== */
/* Motion — resting states                                              */
/*                                                                      */
/* Everything here is scoped to html.insplus-motion, a class added by a  */
/* tiny inline script in <head> and ONLY when the visitor has not asked  */
/* for reduced motion. Consequences:                                     */
/*                                                                      */
/*   1. Reduced motion never hides anything: the class is never added.   */
/*   2. Neither does a failure: if GSAP 404s or throws, the head script  */
/*      drops the class after 2s and the page appears. Nothing here may  */
/*      hide content that JS is the only way to reveal. (The 2s counts   */
/*      from DOMContentLoaded; motion.js waits for the DOM too.)         */
/*   3. It is set in <head>, before first paint, so content never        */
/*      flashes in and then vanishes as the animation initialises.       */
/*                                                                      */
/* Selectors live here, not as attributes in templates, so the layer is  */
/* additive: delete this file, motion.js and insplus_motion_boot() and   */
/* the markup is untouched.                                              */
/* ==================================================================== */

/* --- Hero, on load -------------------------------------------------- */

.insplus-motion .section--hero__heading,
.insplus-motion .section--hero__text,
.insplus-motion .section--hero__card .button,
.insplus-motion .section--hero__device,
.insplus-motion .section--hero__badge {
	opacity: 0;
}

/* SplitText's line masks are exactly one line-height tall and clip; at
   80/80 that beheads descenders (the g in "right."). Give each mask room
   below, pulled back by the same amount so the stack doesn't grow. */
.insplus-motion .insplus-mask-line-mask {
	padding-bottom: 0.2em;
	margin-bottom: -0.2em;
}

/* The photo settles from an enlargement — to 1.1, not 1, so the 5%
   scroll drift never uncovers the band behind it. */
.insplus-motion .section--hero__media {
	transform: scale( 1.16 );
	transform-origin: 70% 50%;
}

/* --- Section content, on scroll ------------------------------------- */

.insplus-motion .section-head,
.insplus-motion .section--categories__list > li,
.insplus-motion .section--features__heading,
.insplus-motion .section--features__item,
.insplus-motion .section--features__plus,
.insplus-motion .section--features__action,
.insplus-motion .section--brands__item,
.insplus-motion .section--delivery__copy > *,
.insplus-motion .map-pin,
.insplus-motion .section--delivery__map > .delivery-zone,
.insplus-motion .map-office,
/* Only the bestsellers row: motion.js reveals tabs inside [data-product-tabs]
   and nothing else, so a bare .product-tabs hid the product page's
   information tabs for good (bit once). */
.insplus-motion [data-product-tabs] .product-tabs,
.insplus-motion .advice-panel,
.insplus-motion .advice-panel__copy > *,
.insplus-motion .section--link-cards__list > li,
.insplus-motion .section--split-list__media,
.insplus-motion .section--split-list__heading,
.insplus-motion .plus-list__item,
.insplus-motion .section--split-list__action,
.insplus-motion .photo-card {
	opacity: 0;
}

/* Product cards are NOT hidden here: the tabs show and hide them after
   the section has already revealed, so motion.js fades them itself. */

/* The house device builds up from the ground. */
.insplus-motion .advice-panel__device {
	clip-path: inset( 100% 0 0 0 );
}

/* Link-card photos are enlarged so they can settle as the card arrives. */
.insplus-motion .link-card__media img {
	transform: scale( 1.08 );
	transform-origin: center;
}

/* Split-list and photo-band photos settle the same way. */
.insplus-motion .section--split-list__media img,
.insplus-motion .section--photo-card__media img {
	transform: scale( 1.08 );
	transform-origin: center;
}
