/*
 * PoolSense Home Hero — GLB homepage above-the-fold
 * Design: XD "Poolsense Quick Launch R2" — "/" artboards (1400 desktop, 390 mobile)
 */

.ps-home-hero {
	position: relative;
	min-height: 684px;
	overflow: hidden;
	color: #fff;
	font-family: 'Work Sans', sans-serif;
	text-align: left;
}

/* Theme pads the first block in <main> to clear the header; this hero sits under the header instead */
#pxMainContent > .ps-home-hero {
	padding: 0 !important;
	margin-top: 0 !important;
}

.ps-home-hero *,
.ps-home-hero *::before,
.ps-home-hero *::after {
	box-sizing: border-box;
}

.ps-home-hero__bg,
.ps-home-hero__bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ps-home-hero__bg img {
	object-fit: cover;
	object-position: center bottom;
}

.ps-home-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 88px 20px 0;
}

.ps-home-hero__eyebrow {
	margin: 0 0 12px;
	padding: 3px 10px;
	border-radius: 8px;
	background: #ffd103;
	color: #202a5d;
	font-size: 16px;
	line-height: 23px;
	font-weight: 600; /* Work Sans SemiBold per XD */
}

.ps-home-hero .ps-home-hero__title {
	margin: 0;
	max-width: 360px;
	font-family: 'Syncopate', sans-serif;
	font-weight: 700;
	font-size: 38px;
	line-height: 42px;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 0 10px #003a70; /* XD drop shadow */
}

.ps-home-hero__sub {
	margin: 3px 0 0;
	max-width: 300px;
	font-size: 20px;
	line-height: 26px;
	font-weight: 700;
	color: #ffd103;
	text-shadow: 0 0 10px #003a70; /* XD drop shadow */
}

.ps-home-hero__product {
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-start;
	margin-top: 39px;
}

.ps-home-hero__family {
	display: block;
	width: 258px; /* +9% (client 2026-11-17) */
	max-width: none;
	height: auto;
	margin: 27px 0 0 -9px;
}

.ps-home-hero__logo {
	display: block;
	width: 231px;
	max-width: none;
	height: auto;
	margin: 3px 0 0 -6px;
}

.ps-home-hero__btn {
	display: inline-block;
	margin-top: 15px;
	padding: 6px 20px 5px;
	border-radius: 10px;
	background: #ffd103;
	color: #202a5d;
	font-size: 14px;
	line-height: 25px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ps-home-hero__btn:hover,
.ps-home-hero__btn:focus-visible {
	background: #fff;
	color: #202a5d;
	box-shadow: 0 3px 12px rgba(0, 40, 77, 0.35);
}

.ps-home-hero__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

@media (min-width: 768px) {
	.ps-home-hero {
		min-height: 776px;
	}

	.ps-home-hero__bg img {
		object-position: center center;
	}

	.ps-home-hero__inner {
		max-width: 1400px;
		margin: 0 auto;
		padding: 132px 50px 0 110px;
	}

	.ps-home-hero__eyebrow {
		margin: 0 0 14px 4px;
	}

	.ps-home-hero .ps-home-hero__title {
		max-width: 600px;
		font-size: 44px;
		line-height: 50px;
	}

	.ps-home-hero__sub {
		max-width: 520px;
		margin: 10px 0 0 4px;
		font-size: 24px;
		line-height: 33.6px;
	}

	.ps-home-hero__product {
		position: relative;
		display: block;
		width: 680px;
		margin: 40px 0 0 -65px;
	}

	.ps-home-hero__family {
		width: 458px; /* +9% */
		margin: 0;
	}

	.ps-home-hero__brand {
		position: absolute;
		left: 300px;
		top: 26px;
	}

	.ps-home-hero__logo {
		width: 290px;
		margin: 0;
	}

	.ps-home-hero__btn {
		margin: 24px 0 0 150px;
	}
}

/* Tablet (no XD artboard): not enough room for product + logo + the phone in the background, so stack the logo/button above the product like mobile */
@media (min-width: 768px) and (max-width: 1023px) {
	.ps-home-hero__product {
		display: flex;
		flex-direction: column-reverse;
		align-items: flex-start;
		width: auto;
		margin: 32px 0 0 -6px;
	}

	.ps-home-hero__brand {
		position: static;
	}

	.ps-home-hero__logo {
		width: 280px;
	}

	.ps-home-hero__btn {
		margin: 16px 0 0 6px;
	}

	.ps-home-hero__family {
		width: 436px; /* +9% */
		margin-top: 28px;
	}
}

@media (min-width: 1200px) {
	.ps-home-hero__eyebrow {
		margin-bottom: 18px;
	}

	.ps-home-hero .ps-home-hero__title {
		font-size: 50px;
	}

	.ps-home-hero__product {
		margin-top: 36px;
	}

	.ps-home-hero__sub {
		max-width: none;
		font-size: 27px;
	}

	.ps-home-hero__family {
		width: 537px; /* +9% */
	}

	.ps-home-hero__brand {
		left: 340px;
		top: 21px;
	}

	.ps-home-hero__logo {
		width: 331px;
	}

	.ps-home-hero__btn {
		margin: 30px 0 0 176px;
	}
}

/* Client feedback 2026-11-16 (desktop, ≥1024 where the phone in the photo is visible beside the copy):
   - PoolSense logo centred above the phone in the photo, its bottom ("SMART POOL TECHNOLOGY") level with the bottom
     of "REIMAGINED."
   - Learn More directly under the yellow "Introducing…" line
   - packaging shifted right: the large box's left edge lines up with the "G" of "GLB" in the yellow line
   - "Coming January 2027": thin white box with blue copy, right of the thumb tip
   The photo is cover-scaled and centred, so the phone sits at a fixed offset from the hero's centre line (1400 art:
   phone x 878–1033, centre 955.5 = centre + 255.5; thumb tip ~x 1040 / y 420) — logo and pill are placed from 50%. */
@media (min-width: 1024px) {
	.ps-home-hero__inner {
		padding-top: 175px; /* the eyebrow no longer sits above the headline */
	}

	.ps-home-hero__product,
	.ps-home-hero__brand {
		display: contents;
	}

	.ps-home-hero__eyebrow {
		position: absolute;
		top: 418px;
		left: calc(50% + 378px);
		margin: 0;
		padding: 2px 12px;
		border-radius: 8px;
		background: #fff;
		color: #003a70;
		font-size: 18px;
		line-height: 24px;
		box-shadow: 0 2px 8px rgba(0, 40, 77, 0.25);
		white-space: nowrap;
	}

	.ps-home-hero__logo {
		position: absolute;
		top: 177px; /* 1024–1199: logo 290 wide (art ends at 85 of 93), "REIMAGINED." (44px) ends at y ~262 */
		left: calc(50% + 255.5px - 145px);
		width: 290px;
		margin: 0;
	}

	.ps-home-hero__btn {
		order: 1;
		margin: 20px 0 0 4px;
	}

	.ps-home-hero__family {
		order: 2;
		width: 458px; /* +9% (client 2026-11-17); margins scaled so the box edge still lines up with the "G" */
		margin: -30px 0 0 111px; /* PNG has ~47px of empty space above the box; "G" at x 257 − box edge 33 − 110 */
	}
}

/* 1024–1279: not enough room right of the thumb for the one-line pill — stack it on two lines, a little closer in */
@media (min-width: 1024px) and (max-width: 1279px) {
	.ps-home-hero__eyebrow {
		top: 408px;
		left: calc(50% + 350px);
		font-size: 16px;
		line-height: 20px;
		padding: 4px 12px;
		text-align: center;
		white-space: normal;
		width: 140px; /* "Coming" / "January 2027" */
	}
}

@media (min-width: 1200px) {
	.ps-home-hero__inner {
		padding-top: 179px; /* headline stays at y 179, where it sat under the eyebrow */
	}

	.ps-home-hero__logo {
		top: 171px; /* art ends at row 97 of 106 → bottom of art at 268 = bottom of "REIMAGINED." */
		left: calc(50% + 255.5px - 165.5px);
		width: 331px;
	}

	.ps-home-hero__family {
		width: 537px; /* +9% */
		margin-top: -34px; /* PNG has ~54px of empty space above the box: box top 20px under the button */
		margin-left: 122px; /* "G" at x 274.9 − box edge 42.5px into the PNG − 110 inner padding */
	}
}

/* Featured products carousel dots — new homepage only (this file loads only on pages using the PoolSense hero).
   All dots the same size; the active dot slightly bigger. Overrides the theme's graduated nth-of-type scaling. */
.pxblock--featured-products .colored-bands .slick-dots > li > button {
	transform: scale(0.8) !important;
}

.pxblock--featured-products .colored-bands .slick-dots > li.slick-active > button {
	transform: scale(1) !important;
}

/* phones narrower than 360: the 38px XD headline ("REIMAGINED.") doesn't fit — scale the 390 composition down */
@media (max-width: 359px) {
	.ps-home-hero {
		zoom: 0.82;
	}
}

/* wide screens: the photo keeps scaling with the width while the 1400 XD content didn't (content looked small and the
   photo cropped) — scale the whole composition in steps, same tiers as the Poolife heroes */
@media (min-width: 1500px) and (max-width: 1649px) {
	.ps-home-hero {
		zoom: 1.1;
	}
}

@media (min-width: 1650px) and (max-width: 1799px) {
	.ps-home-hero {
		zoom: 1.2;
	}
}

@media (min-width: 1800px) and (max-width: 2199px) {
	.ps-home-hero {
		zoom: 1.25;
	}
}

@media (min-width: 2200px) {
	.ps-home-hero {
		zoom: 1.5;
	}
}

/* Header (scoped: this file only loads on the new PoolSense pages). The last nav item's dropdown ("Contact Us") opens
   50px right of its item, so around 768-900 it runs past the window (1px sideways scroll at 768, menu cut off on hover).
   Anchor it to the item's right edge at those widths. Apply site-wide at launch. */
@media (min-width: 768px) and (max-width: 899px) {
	.site-header .site-header__nav #menu-main-menu > li:last-child > .sub-menu {
		left: auto;
		right: 0;
	}
}
