/* ==========================================================================
   HERO v2
   Podium staging, floating stat cards, editorial type, pill geometry.
   Loaded after hero styles so it supersedes them.
   ========================================================================== */

/* ---- Palette shift ------------------------------------------------------
   The references work because they are soft and warm, not high-contrast.
   Lower the saturation, raise the light.                                  */

:root {
	--nx-hero-bg:     #F7F9FC;
	--nx-hero-bg-2:   #EEF3F9;
	--nx-podium:      #E4EBF4;
	--nx-podium-edge: #D3DEEC;
}

/* ---- Section ------------------------------------------------------------ */

.nx-hero {
	padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(4rem, 2rem + 8vw, 8rem);
	background:
		radial-gradient(80% 60% at 72% 12%, rgba(0, 163, 224, 0.09) 0%, transparent 62%),
		linear-gradient(170deg, var(--nx-hero-bg) 0%, #FDFEFF 70%);
	overflow: visible;
}

/* Softer grid than v1 — barely there */
.nx-hero::before {
	background-image:
		linear-gradient(rgba(11, 42, 91, 0.028) 1px, transparent 1px),
		linear-gradient(90deg, rgba(11, 42, 91, 0.028) 1px, transparent 1px);
	background-size: 72px 72px;
	mask-image: radial-gradient(ellipse 70% 55% at 60% 35%, #000 0%, transparent 72%);
	-webkit-mask-image: radial-gradient(ellipse 70% 55% at 60% 35%, #000 0%, transparent 72%);
}

.nx-hero__inner {
	gap: clamp(var(--nx-space-8), 5vw, var(--nx-space-10));
	align-items: center;
}

@media (min-width: 980px) {
	.nx-hero__inner { grid-template-columns: 1fr 1.02fr; }
}

/* ---- Eyebrow: pill ------------------------------------------------------ */

.nx-hero .nx-eyebrow {
	padding: 0.4375rem 0.9375rem;
	border: 1px solid var(--nx-border);
	border-radius: var(--nx-radius-full);
	background: rgba(255, 255, 255, 0.7);
	color: var(--nx-text-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	backdrop-filter: blur(6px);
}

.nx-hero .nx-eyebrow::before,
.nx-hero .nx-eyebrow::after { content: none; }

/* ---- Headline: editorial ------------------------------------------------
   Tighter leading, bigger scale, and an italic serif accent line. The type
   contrast is what makes the reference layouts feel considered.           */

.nx-hero__title {
	margin-bottom: var(--nx-space-5);
	font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
	line-height: 1.05;
	letter-spacing: -0.032em;
	font-weight: var(--nx-weight-bold);

	/* Flat navy reads cleaner at this size than a gradient */
	background: none;
	-webkit-text-fill-color: currentColor;
	color: var(--nx-navy-900);
}

/* Wrap the accent phrase in <em> for the serif italic treatment */
.nx-hero__title em {
	display: block;
	font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.02em;
	color: var(--nx-blue-600);
}

.nx-hero__sub {
	max-width: 46ch;
	margin-bottom: var(--nx-space-7);
	font-size: var(--nx-text-lg);
	line-height: 1.65;
	color: var(--nx-text-muted);
}

.nx-hero__support { display: none; } /* v1 third paragraph — too much copy */

/* ---- Buttons: pill ------------------------------------------------------ */

.nx-hero .nx-btn {
	border-radius: var(--nx-radius-full);
	padding: 1rem 1.875rem;
	letter-spacing: 0;
	font-size: var(--nx-text-sm);
}

.nx-hero .nx-btn:not(.nx-btn--outline) {
	background: var(--nx-navy-900);
	box-shadow: 0 6px 20px rgba(6, 24, 47, 0.18);
}

.nx-hero .nx-btn:not(.nx-btn--outline):hover {
	background: var(--nx-navy-800);
	box-shadow: 0 12px 28px rgba(6, 24, 47, 0.24);
}

.nx-hero .nx-btn--outline {
	background: var(--nx-white);
	border-color: var(--nx-border);
	color: var(--nx-navy-900);
	box-shadow: var(--nx-shadow-xs);
}

.nx-hero .nx-btn--outline:hover { border-color: var(--nx-navy-800); }

/* ---- Social proof row under the buttons --------------------------------- */

.nx-proof {
	display: flex;
	align-items: center;
	gap: var(--nx-space-4);
	margin-top: var(--nx-space-6);
}

/* Compliance mark. Replaces the stacked avatars a consumer hero would use —
   this product makes no customer claims, so social proof has no place here. */
.nx-proof__mark {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--nx-radius);
	background: rgba(27, 79, 156, 0.09);
	color: var(--nx-blue-600);
}

.nx-proof__mark svg { width: 20px; height: 20px; }

.nx-proof__text {
	font-size: var(--nx-text-sm);
	line-height: 1.4;
	color: var(--nx-text-muted);
}

.nx-proof__text strong {
	display: block;
	color: var(--nx-navy-900);
	font-weight: var(--nx-weight-semibold);
}

/* ==========================================================================
   PODIUM STAGE — product sits on a surface instead of floating
   ========================================================================== */

.nx-podium {
	position: relative;
	display: grid;
	place-items: end center;
	aspect-ratio: 1 / 1.02;
	max-width: 560px;
	margin-inline: auto;
	padding-bottom: 12%;
	perspective: 1400px;
}

/* Soft colour field behind — the Ro "green circle" move */
.nx-podium::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 6%;
	width: 78%;
	aspect-ratio: 1;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(circle at 50% 42%,
		rgba(0, 163, 224, 0.16) 0%,
		rgba(27, 79, 156, 0.10) 45%,
		transparent 72%);
	z-index: 0;
}

/* The podium disc */
.nx-podium__disc {
	position: absolute;
	left: 50%;
	bottom: 8%;
	width: 66%;
	aspect-ratio: 3.4 / 1;
	transform: translateX(-50%);
	border-radius: 50%;
	background: linear-gradient(180deg, var(--nx-podium) 0%, var(--nx-podium-edge) 100%);
	box-shadow:
		0 18px 40px rgba(11, 42, 91, 0.13),
		inset 0 2px 0 rgba(255, 255, 255, 0.7);
	z-index: 1;
}

/* Contact pool where the product meets the disc */
.nx-podium__contact {
	position: absolute;
	left: 50%;
	bottom: 12%;
	width: 34%;
	aspect-ratio: 5 / 1;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center,
		rgba(11, 42, 91, 0.4) 0%,
		rgba(11, 42, 91, 0.12) 45%,
		transparent 72%);
	filter: blur(9px);
	z-index: 2;
	transition: width var(--nx-dur-slow) var(--nx-ease),
	            opacity var(--nx-dur-slow) var(--nx-ease);
}

.nx-podium__product {
	position: relative;
	z-index: 3;
	width: 72%;
	max-width: 100%;
	margin-bottom: 6%;
	filter:
		drop-shadow(0 1px 2px rgba(11, 42, 91, 0.18))
		drop-shadow(0 14px 26px rgba(11, 42, 91, 0.16));
}

.nx-podium__product img { width: 100%; height: auto; }

/* Idle float with inverse contact shadow */
@media (prefers-reduced-motion: no-preference) {
	.nx-podium__product { animation: nx-podium-float 7s var(--nx-ease) infinite; }
	.nx-podium__contact { animation: nx-podium-contact 7s var(--nx-ease) infinite; }
}

@keyframes nx-podium-float {
	50% { transform: translateY(-10px); }
}

@keyframes nx-podium-contact {
	50% { width: 29%; opacity: 0.8; filter: blur(11px); }
}

/* Pointer tilt — subtler than v1 */
@media (pointer: fine) {
	.nx-podium__tilt {
		transform-style: preserve-3d;
		transform:
			rotateX(calc(var(--py, 0) * -6deg))
			rotateY(calc(var(--px, 0) * 9deg));
		transition: transform 500ms var(--nx-ease-out);
	}
	.nx-podium:hover .nx-podium__tilt { transition-duration: 100ms; }
}

@media (prefers-reduced-motion: reduce) {
	.nx-podium__tilt { transform: none !important; }
}

/* ---- Placeholder when no image is set ----------------------------------- */

.nx-podium__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 3 / 5;
	border: 1px dashed var(--nx-border-strong);
	border-radius: var(--nx-radius-lg);
	background: linear-gradient(170deg, rgba(255,255,255,0.9), rgba(240,245,251,0.9));
	color: var(--nx-text-subtle);
	font-family: var(--nx-font-mono);
	font-size: var(--nx-text-xs);
	text-align: center;
	padding: var(--nx-space-5);
}

/* ==========================================================================
   FLOATING STAT CARDS — the single biggest upgrade from the references
   ========================================================================== */

.nx-fcard {
	position: absolute;
	z-index: 4;
	display: flex;
	align-items: flex-start;
	gap: var(--nx-space-3);
	width: max-content;
	max-width: 190px;
	padding: var(--nx-space-4);
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: var(--nx-radius-md);
	box-shadow:
		0 10px 30px rgba(11, 42, 91, 0.11),
		0 2px 6px rgba(11, 42, 91, 0.05);
	backdrop-filter: blur(14px) saturate(160%);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	transition: transform var(--nx-dur) var(--nx-ease-out),
	            box-shadow var(--nx-dur) var(--nx-ease);
}

.nx-fcard:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 42px rgba(11, 42, 91, 0.16);
}

/* Positions — percentages so they track the podium at any size */
.nx-fcard--a { top: 12%; right: -4%; }
.nx-fcard--b { top: 44%; left: -8%; }
.nx-fcard--c { bottom: 20%; right: -2%; }

.nx-fcard__icon {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: var(--nx-radius-sm);
	background: var(--nx-grey-100);
	color: var(--nx-blue-600);
}

.nx-fcard__icon svg { width: 17px; height: 17px; }

.nx-fcard__value {
	display: block;
	font-size: var(--nx-text-xl);
	font-weight: var(--nx-weight-bold);
	line-height: 1.05;
	color: var(--nx-navy-900);
	letter-spacing: -0.02em;
}

.nx-fcard__label {
	display: block;
	margin-top: 2px;
	font-size: 0.6875rem;
	line-height: 1.4;
	color: var(--nx-text-subtle);
}

/* Gentle independent drift so the cards feel alive, not pinned */
@media (prefers-reduced-motion: no-preference) {
	.nx-fcard--a { animation: nx-drift 9s var(--nx-ease) infinite; }
	.nx-fcard--b { animation: nx-drift 11s var(--nx-ease) infinite 0.8s; }
	.nx-fcard--c { animation: nx-drift 10s var(--nx-ease) infinite 1.6s; }
}

@keyframes nx-drift {
	50% { transform: translateY(-8px); }
}

/* Tablet: cards crowd the product, so drop them to a row underneath. */
@media (min-width: 768px) and (max-width: 979px) {
	.nx-fcard {
		position: static;
		max-width: none;
		animation: none !important;
	}

	.nx-hero__fcards {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
		gap: var(--nx-space-3);
		margin-top: var(--nx-space-6);
	}
}

/* Phone: hide them outright. Below ~768px the grid above can only fit one card
   per row, so they stacked into a tall column that pushed the headline and CTAs
   off the first screen. Everything they state — 40 mg, triple agonist, research
   use — is already in the trust bar directly below the hero. */
@media (max-width: 767px) {
	.nx-hero__fcards { display: none; }
}

@media (min-width: 980px) {
	.nx-hero__fcards { position: absolute; inset: 0; pointer-events: none; }
	.nx-hero__fcards .nx-fcard { pointer-events: auto; }
}

/* ==========================================================================
   TRUST BAR — horizontal strip under the hero, not a boxed card
   ========================================================================== */

.nx-trustbar {
	border-top: 1px solid var(--nx-border);
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(8px);
}

.nx-trustbar__inner {
	display: grid;
	gap: var(--nx-space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
	padding-block: var(--nx-space-6);
}

.nx-trustbar__item {
	display: flex;
	align-items: flex-start;
	gap: var(--nx-space-3);
}

.nx-trustbar__icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: var(--nx-radius);
	background: var(--nx-grey-100);
	color: var(--nx-blue-600);
}

.nx-trustbar__icon svg { width: 19px; height: 19px; }

.nx-trustbar__title {
	display: block;
	font-size: var(--nx-text-sm);
	font-weight: var(--nx-weight-semibold);
	color: var(--nx-navy-900);
	line-height: 1.3;
}

.nx-trustbar__text {
	display: block;
	margin-top: 2px;
	font-size: var(--nx-text-xs);
	line-height: 1.5;
	color: var(--nx-text-subtle);
}

@media (min-width: 768px) {
	.nx-trustbar__item + .nx-trustbar__item {
		padding-left: var(--nx-space-5);
		border-left: 1px solid var(--nx-border);
	}
}

/* ==========================================================================
   SECTION RHYTHM
   Nine sections at identical padding reads as a checklist. Vary the density
   so the page has a shape.
   ========================================================================== */

/* Softer, wider dividers between light sections */
.nx-section--alt {
	background: linear-gradient(180deg, #F6F9FC 0%, #FAFCFE 100%);
	border-block: 1px solid rgba(220, 227, 237, 0.7);
}

/* Breathing room around the statement sections */
.nx-section--invert { padding-block: clamp(4.5rem, 3rem + 7vw, 9rem); }

/* The CTA is an inset panel rather than a full-bleed band, so it carries its
   own edge — it needs roughly half the surrounding space the dark bands do. */
.nx-cta { padding-block: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem); }

/* Tighter around dense technical content */
.nx-section:has(.nx-table-wrap) { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }

/* Section heads: left-aligned reads more editorial than everything centred.
   Keep centring only where the grid below is symmetrical. */
.nx-section-head { margin-bottom: clamp(var(--nx-space-6), 3vw, var(--nx-space-9)); }

.nx-section-head h2 {
	font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.375rem);
	line-height: 1.14;
	letter-spacing: -0.022em;
}

.nx-section-head--center { max-width: 56ch; }

/* Serif italic accent available in any heading */
.nx-section-head h2 em {
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	color: var(--nx-blue-600);
}

/* ---- Card differentiation ------------------------------------------------
   Same component three times reads as template. Give each grid a distinct
   treatment via the section prefix.                                       */

/* Numbered cards — no icon tile, an index instead */
.nx-grid--numbered .nx-card { padding-top: var(--nx-space-7); }

.nx-grid--numbered .nx-card__icon { display: none; }

.nx-grid--numbered .nx-card::before {
	counter-increment: nx-card;
	content: counter(nx-card, decimal-leading-zero);
	position: absolute;
	top: var(--nx-space-5);
	right: var(--nx-space-5);
	font-family: var(--nx-font-mono);
	font-size: var(--nx-text-2xl);
	font-weight: var(--nx-weight-bold);
	color: var(--nx-grey-200);
	line-height: 1;
}

.nx-grid--numbered { counter-reset: nx-card; }

/* ---- Full-bleed statement -----------------------------------------------
   One moment on the page that breaks the container.                       */

.nx-statement {
	position: relative;
	padding-block: clamp(5rem, 3rem + 9vw, 10rem);
	background:
		radial-gradient(70% 100% at 20% 0%, rgba(46, 109, 196, 0.4) 0%, transparent 58%),
		radial-gradient(60% 90% at 88% 100%, rgba(0, 163, 224, 0.28) 0%, transparent 58%),
		var(--nx-navy-900);
	overflow: hidden;
}

.nx-statement__inner {
	position: relative;
	z-index: 1;
	/* Was 20ch — that fights the container's own max-width and padding, and
	   collapses to a one-character column. Constrain the heading instead. */
	max-width: 900px;
	margin-inline: auto;
	text-align: center;
}

.nx-statement h2 {
	max-width: 24ch;
	margin-inline: auto;
	margin-bottom: var(--nx-space-6);
	font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.875rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--nx-white);
	text-wrap: balance;
}

/* The serif accent sits on its own line at desktop width */
.nx-statement h2 em { display: block; }

@media (max-width: 600px) {
	.nx-statement h2 { max-width: none; }
	.nx-statement h2 em { display: inline; }
}

.nx-statement h2 em {
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	color: var(--nx-cyan);
}

.nx-statement p {
	max-width: 46ch;
	margin-inline: auto;
	font-size: var(--nx-text-lg);
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.65;
}

/* ---- Mobile -------------------------------------------------------------- */

@media (max-width: 979px) {
	.nx-hero__inner { text-align: left; }
	.nx-hero__media { order: -1; }
	.nx-podium { max-width: 380px; }
}

@media (max-width: 767px) {
	.nx-hero__inner { text-align: center; }
	.nx-hero__sub { margin-inline: auto; }
	.nx-hero .nx-btn-row { justify-content: center; }
	.nx-proof { justify-content: center; }
	.nx-hero__title em { display: inline; }

	/* Copy first. The tablet rule above hoists the product above the text,
	   which on a phone pushed the headline and both CTAs below the fold. */
	.nx-hero__media { order: 0; margin-top: 0; }

	/* The square-ish ratio plus `place-items: end` leaves a tall empty band
	   above the product once the layout is stacked. Shorten the stage. */
	.nx-podium {
		max-width: 300px;
		margin-inline: auto;
		aspect-ratio: 1 / 0.82;
		padding-bottom: 4%;
	}

	/* The hero grid's gap is tuned for a side-by-side desktop split; stacked
	   it leaves a dead band between the proof strip and the product. */
	.nx-hero__inner { gap: var(--nx-space-6); }

	/* Icon and its two lines read as one centred unit rather than a left
	   marker beside centred text. */
	.nx-proof {
		flex-direction: column;
		gap: var(--nx-space-3);
		text-align: center;
	}
}
