/* Reset + foundations + nav + footer */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-m);
	line-height: 1.55;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: var(--tracking-tight);
	margin: 0 0 var(--space-4);
}

p {
	margin: 0 0 var(--space-4);
}

a {
	color: inherit;
}

button {
	font: inherit;
	cursor: pointer;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--ink);
	color: var(--white);
	padding: var(--space-2) var(--space-4);
	z-index: 100;
}

.skip-link:focus {
	left: 0;
}

/* Layout primitives */

.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.container--narrow {
	max-width: var(--container-narrow);
}

/* Affiliate dashboard: a comfortable, cohesive width (wider than reading prose). */
.affiliate-dashboard {
	max-width: 68rem;
}

/* Full-width rounded section card floating on the page bg */
.section-card {
	width: calc(100% - 2 * var(--gutter));
	margin: var(--gutter) auto;
	border-radius: var(--radius-l);
	background: var(--card);
	overflow: hidden;
}

.section-card__inner {
	padding: clamp(2.5rem, 5vw, 5rem) clamp(1.25rem, 4vw, 4.5rem);
}

.eyebrow {
	font-size: var(--text-xs);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--gray);
	margin-bottom: var(--space-4);
}

.display-title {
	font-size: var(--text-2xl);
}

.section-lede {
	color: var(--gray);
	max-width: 34rem;
}

.dashed-rule {
	border: 0;
	border-top: 1px dashed var(--line);
	width: 14rem;
	margin: var(--space-5) 0;
}

/* Section header row: huge title left, aside right */
.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-6);
	margin-bottom: var(--space-6);
	flex-wrap: wrap;
}

/* Buttons */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: 1em 2em;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--white);
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.button:hover {
	transform: translateY(-1px);
}

.button--primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--white);
}

.button--primary:hover {
	background: var(--accent-deep);
}

.button--outline {
	border-color: var(--ink);
	background: transparent;
}

.button--block {
	display: flex;
	width: 100%;
}

/* Micro CTA: LEARN MORE (→) */
.micro-cta {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	font-size: var(--text-xs);
	font-weight: 500;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	text-decoration: none;
}

.micro-cta__arrow {
	display: inline-grid;
	place-items: center;
	width: 2em;
	height: 2em;
	border: 1px solid currentColor;
	border-radius: 50%;
	transition: transform 0.2s var(--ease-out);
}

.micro-cta:hover .micro-cta__arrow {
	transform: translateX(3px);
}

.link-cta {
	font-size: var(--text-s);
	font-weight: 500;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.link-cta:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Stat rows */

.stat-row {
	display: flex;
	gap: 0;
	margin-block: var(--space-6);
}

.stat {
	padding-inline: var(--space-5);
	border-left: 1px solid var(--line);
}

.stat:first-child {
	padding-left: 0;
	border-left: 0;
}

.stat__value {
	display: block;
	font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem);
	font-weight: 600;
	letter-spacing: var(--tracking-tight);
	line-height: 1;
}

.stat__label {
	display: block;
	max-width: 8rem;
	font-size: var(--text-xs);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--gray);
	margin-top: var(--space-2);
	line-height: 1.5;
}

/* Chips */

.chip {
	display: inline-block;
	font-size: var(--text-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: var(--radius-pill);
	padding: 0.35em 0.9em;
}

.chip--green {
	background: var(--green-tint);
	color: var(--green-text);
}

.chip--outline {
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--gray);
}

/* Floating pill nav */

/* Announcement bar — full-width deep-blue strip above the floating nav (matches
   the .nasal-delivery gradient). One message shows at a time and crossfades to
   the next every few seconds (see nav.js). Hidden on checkout (see header.php).

   Fixed min-height + flex centering: the single line sits in the middle of a
   comfortably tall bar, so no font-metric quirk (WebKit renders Hanken Grotesk
   higher in its box than Chromium) can push it into a clipping edge. */
.announce-bar {
	position: relative;
	z-index: 60; /* above the sticky header (50) and the hero, which pulls up with a negative margin and would otherwise paint over the bar */
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	color: #fff;
	font-size: clamp(0.6rem, 3vw, 0.82rem);
	font-weight: 700;
	line-height: 1.2;
	/* No overflow clip: Safari paints this webfont's glyphs above their metric
	   box, and any clip cuts the tops. The tall min-height + centering keeps the
	   text (and its ink overflow) well inside the bar. No horizontal overflow at
	   our breakpoints, so nothing to clip. */
	background:
		radial-gradient(130% 320% at 85% 0%, #40566f 0%, transparent 55%),
		linear-gradient(100deg, #2b3c4f 0%, #1c2836 62%, #161f2b 100%);
}

.announce-bar__viewport {
	position: relative;
	width: 100%;
	max-width: var(--container);
	min-height: 1.2em;
}

/* Messages overlap (absolute) and crossfade. Absolute = they don't affect the
   bar's height, and there's no clipping box around the text. */
.announce-bar__item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	letter-spacing: 0.02em;
	opacity: 0;
	transition: opacity 0.5s ease;
}

/* The active message (markup marks the first item is-active, so it shows even
   if JS never runs). */
.announce-bar__item.is-active {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.announce-bar__item {
		transition: none;
	}
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding: var(--space-3) var(--gutter) 0;
	pointer-events: none;
}

.site-header__pill {
	pointer-events: auto;
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-6);
	max-width: var(--container);
	margin-inline: auto;
	padding: var(--space-2) var(--space-3) var(--space-2) var(--space-6);
	border-radius: var(--radius-pill);
	background: transparent;
	transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out);
}

.site-header.is-scrolled .site-header__pill {
	background: color-mix(in srgb, #9a9a96 55%, transparent);
	backdrop-filter: blur(14px);
	box-shadow: 0 2px 16px rgb(19 21 19 / 0.12);
}

.site-header.is-scrolled .site-header__pill,
.site-header.is-scrolled .site-header__pill a {
	color: var(--white);
}

.site-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.site-logo__img {
	height: 1.7rem;
	width: auto;
}

.site-logo__img--white {
	display: none;
}

.site-header.is-scrolled .site-logo__img--blue {
	display: none;
}

.site-header.is-scrolled .site-logo__img--white {
	display: block;
}

.primary-nav__list {
	display: flex;
	gap: var(--space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav__list a {
	text-decoration: none;
	font-size: 1.0625rem;
	font-weight: 500;
	padding: 0.55em 1.05em;
	border-radius: var(--radius-pill);
	transition: background 0.2s var(--ease-out);
}

.primary-nav__list a:hover {
	background: rgb(19 20 23 / 0.07);
}

.site-header.is-scrolled .primary-nav__list a:hover {
	background: rgb(255 255 255 / 0.22);
}

/* Desktop: true viewport centering (flex auto-margins skew toward the lighter side). */
@media (min-width: 48.0625rem) {
	.primary-nav {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.primary-nav__footer {
		display: none;
	}
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin-left: auto;
}

.cart-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: none;
	border: 0;
	padding: var(--space-2);
	color: inherit;
}

.cart-button svg {
	width: 22px;
	height: 22px;
}

.cart-button__count {
	position: absolute;
	top: -2px;
	right: -4px;
	display: grid;
	place-items: center;
	line-height: 1;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 2px 0.2rem 0;
	border-radius: var(--radius-pill);
	background: var(--white);
	color: var(--ink);
	border: 1px solid var(--line);
	font-size: 0.65rem;
	font-weight: 600;
}

.header-shop-all {
	background: var(--white);
	color: var(--ink) !important;
	border-radius: var(--radius-pill);
	padding: 1em 1.9em;
	font-size: var(--text-s);
	font-weight: 500;
	text-decoration: none;
	box-shadow: 0 1px 4px rgb(19 21 19 / 0.1);
}

.nav-toggle {
	display: none;
	background: none;
	border: 0;
	padding: var(--space-2);
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ink);
	position: relative;
	content: "";
	transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out), background 0.2s var(--ease-out);
}

.nav-toggle__bar::before {
	position: absolute;
	top: -7px;
}

.nav-toggle__bar::after {
	position: absolute;
	top: 7px;
}

/* Footer — deep green card with giant wordmark */

.site-footer {
	width: 100%;
	margin: 0;
}

.site-footer__panel {
	position: relative;
	z-index: 2;
	border-radius: 0;
	background: var(--green-deep);
	color: #eef1ea;
	overflow: hidden;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(4, 1fr);
	padding: clamp(2.5rem, 4vw, 4rem) clamp(1.25rem, 4vw, 4rem) var(--space-6);
}

.site-footer__col {
	padding-inline: var(--space-5);
	border-left: 1px solid rgb(255 255 255 / 0.08);
}

.site-footer__col:first-child {
	padding-left: 0;
	border-left: 0;
}

.site-footer__logo {
	margin: 0 0 var(--space-6);
}

.site-footer__logo img {
	height: 2.1rem;
	width: auto;
}

.site-footer__tagline {
	font-size: var(--text-xs);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: rgb(255 255 255 / 0.55);
	max-width: 22rem;
	line-height: 2;
}

.site-footer__heading {
	font-size: var(--text-xs);
	font-weight: 500;
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: rgb(255 255 255 / 0.5);
	margin: 0 0 var(--space-5);
}

.site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--space-3);
}

.site-footer__list a {
	color: rgb(255 255 255 / 0.85);
	text-decoration: none;
	font-size: var(--text-s);
}

.site-footer__list a:hover {
	color: var(--white);
}

.site-footer__disclaimer {
	padding: var(--space-5) clamp(1.25rem, 4vw, 4rem) 0;
	font-size: var(--text-xs);
	line-height: 1.55;
	color: #dfe4ea;
	max-width: 96ch;
}

.site-footer__disclaimer strong {
	color: #f2f4f6;
	font-weight: 600;
}

.site-footer__legalline {
	padding: var(--space-4) clamp(1.25rem, 4vw, 4rem);
	font-size: var(--text-xs);
	color: rgb(255 255 255 / 0.5);
}

/* Bubble-image band tucked under the panel's rounded bottom corners, with the
   wordmark overlaid (Feel-Peptides style: hard rounded cutoff, no fade). */
.site-footer__hero {
	position: relative;
	z-index: 1;
	margin-top: 0;
	border-radius: 0;
	overflow: hidden;
	isolation: isolate;
}

.site-footer__hero-img {
	display: block;
	width: 100%;
	height: clamp(14rem, 24vw, 22rem);
	object-fit: cover;
	object-position: center 40%;
}

.site-footer__wordmark {
	position: absolute;
	left: clamp(1.25rem, 4vw, 4rem);
	bottom: clamp(1.25rem, 3vw, 2.5rem);
	z-index: 2;
	user-select: none;
}

.site-footer__wordmark img {
	display: block;
	width: min(70vw, 30rem);
	height: auto;
	opacity: 0.92;
}

/* Forms */

input[type="text"],
input[type="email"],
input[type="search"] {
	font: inherit;
}

/* Mobile */

@media (max-width: 60rem) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-6) 0;
	}

	.site-footer__col:first-child {
		grid-column: 1 / -1;
	}

	.stat-row {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
	}

	.stat {
		padding-inline: var(--space-3);
	}

	.stat:first-child {
		padding-left: 0;
		border-left: 0;
	}
}

@media (max-width: 48rem) {
	.nav-toggle {
		display: block;
	}

	.header-shop-all {
		display: none;
	}

	/* Full-screen frosted overlay (Peaked mobile menu) — animated */
	.primary-nav {
		display: flex;
		flex-direction: column;
		justify-content: center;
		position: fixed;
		inset: 0;
		z-index: 45;
		/* Opaque frosted panel (no live backdrop-blur) — keeps the frosted tint
		   but opens instantly; a full-screen blur was the ~0.5-1s open lag. */
		background:
			radial-gradient(30rem 24rem at 15% 20%, rgb(190 215 238 / 0.45), transparent 60%),
			radial-gradient(26rem 22rem at 85% 75%, rgb(205 226 243 / 0.4), transparent 60%),
			rgb(250 252 255 / 0.985);
		color: var(--ink);
		padding: 6rem var(--space-5) max(env(safe-area-inset-bottom), var(--space-5));
		opacity: 0;
		visibility: hidden;
		transform: translateY(-1.5rem);
		pointer-events: none;
		transition:
			opacity 0.35s var(--ease-out),
			transform 0.4s var(--ease-out),
			visibility 0s linear 0.4s;
	}

	body.nav-open .primary-nav {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
		transition:
			opacity 0.35s var(--ease-out),
			transform 0.45s var(--ease-out),
			visibility 0s;
	}

	.primary-nav__list {
		flex-direction: column;
		gap: 0;
	}

	/* Staggered items */
	.primary-nav__list li,
	.primary-nav__footer {
		opacity: 0;
		transform: translateY(0.9rem);
		transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-out);
	}

	body.nav-open .primary-nav__list li,
	body.nav-open .primary-nav__footer {
		opacity: 1;
		transform: translateY(0);
	}

	body.nav-open .primary-nav__list li:nth-child(1) { transition-delay: 0.08s; }
	body.nav-open .primary-nav__list li:nth-child(2) { transition-delay: 0.14s; }
	body.nav-open .primary-nav__list li:nth-child(3) { transition-delay: 0.2s; }
	body.nav-open .primary-nav__list li:nth-child(4) { transition-delay: 0.26s; }
	body.nav-open .primary-nav__list li:nth-child(5) { transition-delay: 0.32s; }
	body.nav-open .primary-nav__footer { transition-delay: 0.36s; }

	.primary-nav__list li {
		border-bottom: 1px solid var(--line);
	}

	body.nav-open .primary-nav__list a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-radius: 0;
		background: none;
		padding: 0.85em 0;
		font-size: 2rem;
		font-weight: 600;
		letter-spacing: var(--tracking-tight);
		color: var(--ink);
	}

	body.nav-open .primary-nav__list a::after {
		content: "→";
		font-size: 1.4rem;
		font-weight: 400;
		color: var(--gray);
	}

	.primary-nav__footer {
		margin-top: auto;
		display: grid;
		gap: var(--space-3);
		padding-top: var(--space-6);
	}

	.primary-nav__cta {
		display: block;
		text-align: center;
		padding: 1.1em;
		border-radius: var(--radius-pill);
		background: var(--card);
		border: 1px solid var(--line);
		color: var(--ink);
		font-weight: 600;
		font-size: var(--text-m);
		text-decoration: none;
	}

	.primary-nav__cta--primary {
		background: var(--ink);
		border-color: var(--ink);
		color: var(--white);
	}

	/* Header stays readable above the light overlay, even when scrolled */
	body.nav-open .site-header__pill {
		background: transparent !important;
		box-shadow: none !important;
		backdrop-filter: none !important;
	}

	body.nav-open .site-header .site-logo__img--white {
		display: none !important;
	}

	body.nav-open .site-header .site-logo__img--blue {
		display: block !important;
	}

	/* Logo + actions must sit above the overlay (it is a sibling inside the pill) */
	.site-logo,
	.header-actions {
		position: relative;
		z-index: 46;
	}

	body.nav-open .header-actions {
		color: var(--ink) !important;
	}

	/* The scrolled pill is light on mobile (no dark glass), so everything on it
	   must be dark: keep the blue logo, and force header icons + nav links to
	   ink (the base scrolled rule turns them white, which hides the cart icon
	   and makes the open menu's text illegible). */
	.site-header.is-scrolled .site-logo__img--blue {
		display: block;
	}
	.site-header.is-scrolled .site-logo__img--white {
		display: none;
	}
	.site-header.is-scrolled .site-header__pill,
	.site-header.is-scrolled .site-header__pill a,
	.site-header.is-scrolled .header-actions {
		color: var(--ink);
	}

	/* Hamburger becomes an X */
	body.nav-open .nav-toggle__bar {
		background: transparent;
	}

	body.nav-open .nav-toggle__bar::before {
		top: 0;
		transform: rotate(45deg);
	}

	body.nav-open .nav-toggle__bar::after {
		top: 0;
		transform: rotate(-45deg);
	}

	body.nav-open {
		overflow: hidden;
	}
}

/* ══════════ Mobile tap targets ══════════ */

@media (max-width: 48rem) {
	/* Hamburger: slim visual, 44px hit area. */
	.nav-toggle {
		min-width: 44px;
		min-height: 44px;
		padding: 0.8rem 0.6rem;
		margin: -0.55rem -0.35rem;
	}

	.link-cta {
		display: inline-block;
		padding-block: 0.6rem;
	}

	.site-footer__list a {
		display: inline-block;
		padding-block: 0.45rem;
	}

	.site-footer__list li {
		margin-bottom: var(--space-1);
	}
}
