/**
 * 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;
}

.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%;
	}
}

/* ---- Splits ---------------------------------------------------------------- */

.pstv-split__panel {
	position: relative;
}

.pstv-split__seal {
	position: absolute;
	top: 52px;
	inset-inline-start: -64px;
	animation: pstv-spin 22s linear infinite;
}

.pstv-split__heading {
	padding-top: 20px;
}

.pstv-split__body {
	max-width: 500px;
	padding-top: 24px;
}

.pstv-split__cta {
	margin-top: 32px;
	align-self: flex-start;
}

@keyframes pstv-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.pstv-split__seal,
	.pstv-athlete__seal {
		animation: none;
	}
}

@media (max-width: 900px) {
	.pstv-split__seal {
		display: none;
	}

	.pstv-split__cta {
		width: 100%;
		align-self: stretch;
	}
}

/* ---- 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;
	}
}

/* ---- Testimonials ------------------------------------------------------------- */

.pstv-testimonials {
	background: var(--pstv-ice);
	padding: var(--pstv-space-section) 0;
}

.pstv-testimonials__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	font-size: clamp(1.75rem, 0.9rem + 2.7vw, 2.75rem);
	line-height: 1.18;
	text-align: center;
	text-transform: uppercase;
}

.pstv-testimonials__title strong { font-weight: 700; }
.pstv-testimonials__title span   { font-weight: 300; }

.pstv-testimonials__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 26px;
	max-width: 1000px;
	margin-inline: auto;
	margin: 0;
	padding: 54px 0 0;
	list-style: none;
}

.pstv-quote {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 30px 32px 26px;
	background: #fff;
}

.pstv-quote__text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.7;
	text-wrap: pretty;
}

.pstv-quote__cite {
	font-size: 0.6875rem;
	font-style: normal;
	letter-spacing: 0.04em;
	color: var(--pstv-grey);
	text-align: center;
}

@media (max-width: 900px) {
	.pstv-testimonials__grid {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 28px;
	}
}

/* A split with no photograph runs the colour panel full width rather than
   leaving half the band empty. */
.pstv-split--no-media {
	grid-template-columns: minmax(0, 1fr);
}

.pstv-split--no-media .pstv-split__seal {
	inset-inline-start: auto;
	inset-inline-end: 60px;
}
