/**
 * Homepage sections.
 * Only loaded on the front page — see inc/enqueue.php.
 */

/* ---- Hero ---------------------------------------------------------------- */

.pstv-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 660px;
	background-image: var(--pstv-hero-image, none);
	background-size: cover;
	background-position: center 38%;
	background-color: var(--pstv-sky);
	overflow: hidden;
}

/* A soft wash, not a blurred panel: just enough to hold the headline's
   contrast over the photograph, fading out well before the subject. */
.pstv-hero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		96deg,
		rgba(224, 240, 250, 0.82) 0%,
		rgba(224, 240, 250, 0.58) 26%,
		rgba(224, 240, 250, 0.18) 44%,
		rgba(224, 240, 250, 0) 58%
	);
}

.pstv-hero__inner {
	position: relative;
	width: 100%;
	max-width: 620px;
	padding: var(--pstv-space-section) 0 var(--pstv-space-section) var(--pstv-gutter);
}

.pstv-hero__body {
	max-width: 505px;
	padding-top: 26px;
}

.pstv-hero__cta {
	margin-top: 34px;
}

/* Outline badges. Decorative — the claims they repeat are in the copy. */
.pstv-hero__badges {
	position: absolute;
	top: 92px;
	inset-inline-start: 430px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.pstv-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	width: 132px;
	height: 132px;
	border: 1px solid var(--pstv-navy);
	border-radius: 50%;
	text-transform: uppercase;
	/* The rings sit straight on the photograph, so a soft white wash lifts them
	   off whatever happens to be behind. */
	background: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Safari on older iOS and Firefox with the flag off get no blur at all, so the
   wash has to carry the contrast on its own there. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.pstv-badge { background: rgba(255, 255, 255, 0.74); }
}

.pstv-badge--offset {
	margin-inline-start: 48px;
}

.pstv-badge__num { font-size: 2rem; font-weight: 700; line-height: 1; }
.pstv-badge__sm  { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; }
.pstv-badge__xs  { font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.05em; }
.pstv-badge__md  { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }

@media (max-width: 1200px) {
	.pstv-hero__badges {
		inset-inline-start: 38%;
	}
}

@media (max-width: 900px) {
	/* The photograph still fills the band; the wash turns vertical so the copy
	   sits on the calm lower half. */
	.pstv-hero {
		background-position: 62% 22%;
		min-height: 560px;
	}

	.pstv-hero__scrim {
		background: linear-gradient(
			180deg,
			rgba(224, 240, 250, 0) 0%,
			rgba(224, 240, 250, 0.55) 34%,
			rgba(224, 240, 250, 0.94) 56%,
			rgba(224, 240, 250, 0.98) 100%
		);
	}

	.pstv-hero__inner {
		max-width: none;
		padding: 190px var(--pstv-gutter-mobile) var(--pstv-space-lg);
		background: none;
	}

	.pstv-hero__badges {
		top: 18px;
		inset-inline-end: 16px;
		gap: 10px;
	}

	.pstv-badge {
		width: 92px;
		height: 92px;
	}

	.pstv-badge__num { font-size: 1.375rem; }
	.pstv-badge__sm  { font-size: 0.5rem; }
	.pstv-badge__xs  { font-size: 0.4375rem; }
	.pstv-badge__md  { font-size: 0.5625rem; }

	.pstv-badge--offset { display: none; }

	.pstv-hero .pstv-claims {
		gap: 8px;
		justify-content: space-between;
		padding-top: 28px;
	}

	.pstv-hero .pstv-claims__item {
		width: auto;
		flex: 1 1 0;
		font-size: 0.5625rem;
	}

	.pstv-hero .pstv-claims__item svg {
		width: 34px;
		height: 34px;
	}

	.pstv-hero__cta {
		width: 100%;
	}
}

/* ---- Product rows --------------------------------------------------------- */

.pstv-row {
	padding: var(--pstv-space-section) 0;
}

.pstv-row__intro {
	gap: 14px;
}

.pstv-row__body {
	max-width: 830px;
}

.pstv-row__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pstv-grid-gap-tight);
	margin: 0;
	padding: 48px 0 0;
	list-style: none;
}

/* Pods sit in a narrower band than sachets in the comp. */
.pstv-row--pod .pstv-row__grid {
	max-width: 720px;
	margin-inline: auto;
	padding-top: 44px;
}

.pstv-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--pstv-flavour);
	color: #fff;
	text-align: center;
}

.pstv-card__media {
	display: block;
	width: 100%;
}

.pstv-card__media img {
	width: 100%;
	display: block;
}

.pstv-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 16px 40px;
}

.pstv-card__title {
	margin: 0;
	font-size: 1.3125rem;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.pstv-row--pod .pstv-card__title {
	font-size: 1.03125rem;
}

.pstv-card__title a {
	color: #fff;
}

.pstv-card__title a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* White, not a tint. The tinted variants in the comp sit at ~2.6:1 on orange. */
.pstv-card__benefit,
.pstv-card__goal,
.pstv-card__inside {
	margin: 6px 0 0;
	color: #fff;
	font-size: 0.90625rem;
	font-weight: 700;
}

.pstv-card__inside-label {
	margin: 12px 0 0;
	color: #fff;
	font-size: 0.8125rem;
	font-style: italic;
	font-weight: 400;
}

.pstv-card__inside {
	font-size: 0.78125rem;
	font-weight: 400;
}

.pstv-card .pstv-btn {
	margin-top: 22px;
}

.pstv-row__cta {
	display: flex;
	justify-content: center;
	padding-top: var(--pstv-space-md);
}

@media (max-width: 767px) {
	.pstv-row__grid,
	.pstv-row--pod .pstv-row__grid {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 26px;
	}

	/* Pods stay three-up on mobile — they are small, square and read fine. */
	.pstv-row--pod .pstv-row__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pstv-row--pod .pstv-card__body {
		padding: 12px 6px 20px;
	}

	.pstv-row--pod .pstv-card__title {
		font-size: 0.71875rem;
	}

	.pstv-row--pod .pstv-card__goal,
	.pstv-row--pod .pstv-card__inside-label,
	.pstv-row--pod .pstv-card__inside {
		font-size: 0.65625rem;
	}

	.pstv-row--pod .pstv-card .pstv-btn {
		width: 100%;
		padding-inline: 8px;
		font-size: 0.625rem;
		letter-spacing: 0.1em;
	}

	.pstv-row__cta .pstv-btn {
		width: 100%;
	}
}

/* ---- Sky band --------------------------------------------------------------- */

.pstv-athlete {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 520px;
	background-image: var(--pstv-athlete-image, none);
	background-size: cover;
	background-position: center 30%;
	background-color: var(--pstv-sky);
	overflow: hidden;
}

.pstv-athlete__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		272deg,
		rgba(206, 232, 247, 0.9) 0%,
		rgba(206, 232, 247, 0.62) 28%,
		rgba(206, 232, 247, 0.18) 46%,
		rgba(206, 232, 247, 0) 60%
	);
}

.pstv-athlete__seal {
	position: absolute;
	top: 46px;
	inset-inline-start: 48%;
	animation: pstv-spin 22s linear infinite;
}

.pstv-athlete__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	width: 100%;
	max-width: calc(var(--pstv-container) + var(--pstv-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--pstv-gutter);
	align-items: flex-end;
	text-align: end;
}

.pstv-athlete__panel > * {
	max-width: 540px;
}

.pstv-athlete__panel .pstv-btn {
	margin-top: 12px;
}

@media (max-width: 900px) {
	.pstv-athlete {
		min-height: 520px;
		background-position: 62% 22%;
	}

	.pstv-athlete__scrim {
		background: linear-gradient(
			180deg,
			rgba(206, 232, 247, 0) 0%,
			rgba(206, 232, 247, 0.55) 32%,
			rgba(206, 232, 247, 0.95) 54%,
			rgba(206, 232, 247, 0.98) 100%
		);
	}

	.pstv-athlete__seal {
		display: none;
	}

	.pstv-athlete__panel {
		align-items: stretch;
		text-align: start;
		padding-block: 210px var(--pstv-space-md);
	}

	.pstv-athlete__panel .pstv-btn {
		align-self: stretch;
	}
}

/* ---- Retailers ---------------------------------------------------------------- */

.pstv-retailers {
	padding: var(--pstv-space-section) 0;
}

.pstv-retailers .pstv-center {
	gap: 12px;
}

.pstv-retailers__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 48px;
	margin: 0;
	padding: 34px 0 0;
	list-style: none;
}

.pstv-retailers__list img {
	max-height: 44px;
	width: auto;
	object-fit: contain;
}

@media (max-width: 767px) {
	.pstv-retailers__list {
		gap: 28px;
	}

	.pstv-retailers__list img {
		max-height: 30px;
	}
}

/* The pods explainer the client added under "Choose your boost". */
.pstv-row__subheading {
	margin: 26px 0 0;
	font-size: clamp(1.125rem, 0.95rem + 0.8vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--pstv-navy);
	text-wrap: balance;
}

.pstv-row__note {
	max-width: 760px;
	margin: 12px auto 0;
	font-size: 1rem;
	color: var(--pstv-grey);
	text-wrap: pretty;
}

/* The form takes the place the add-to-cart button used to hold in the card,
   so the pod cards can still stretch their button to the full card width. */
.pstv-card__body .pstv-quick-add {
	align-self: stretch;
	display: flex;
	justify-content: center;
}
