/**
 * Native public event landing page.
 *
 * The shared shell owns the document and Design Central owns the body-level
 * background. This file owns only the scroll surface and landing composition.
 */

body.nxtorigin-native-landing-page .nxtorigin-native-event-shell__layout,
body.nxtorigin-native-landing-page .nxtorigin-native-event-shell__main {
	background: transparent;
}

body.nxtorigin-native-landing-page .nxtorigin-native-event-shell__layout {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: 1;
}

body.nxtorigin-native-landing-page .nxtorigin-native-landing-main {
	width: 100%;
	height: 100%;
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: auto !important;
	overscroll-behavior-y: contain;
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
	scrollbar-gutter: stable;
	-webkit-overflow-scrolling: touch !important;
}

.nxtorigin-native-landing-content {
	width: 100%;
	min-height: 100%;
}

.nxtorigin-native-landing-content::after {
	content: "";
	display: block;
	width: 100%;
	height: max(32px, env(safe-area-inset-bottom));
	pointer-events: none;
}

.nxtorigin-native-landing {
	--nxtorigin-landing-accent: var(--nx-emerald, #06d6a0);
	--nxtorigin-landing-accent-alt: var(--nx-cyan, #22d3ee);
	width: min(100%, 1480px);
	min-height: 100%;
	margin: 0 auto;
	padding-top: calc(var(--nxtorigin-event-top-reserve, 68px) + clamp(20px, 3vw, 44px));
	padding-bottom: 96px;
	padding-left: clamp(18px, 4vw, 64px);
	padding-right: clamp(18px, 4vw, 64px);
	color: var(--nx-text, #f4f7fb);
}

.nxtorigin-native-landing--conference {
	--nxtorigin-landing-accent: var(--nx-cyan, #22d3ee);
	--nxtorigin-landing-accent-alt: #8b5cf6;
}

.nxtorigin-native-landing--showcase {
	--nxtorigin-landing-accent: var(--nx-amber, #f59e0b);
	--nxtorigin-landing-accent-alt: var(--nx-rose, #f43f5e);
}

.nxtorigin-native-landing-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
	gap: clamp(34px, 6vw, 88px);
	align-items: center;
	min-height: min(720px, calc(100dvh - 220px));
	padding: clamp(24px, 4vw, 54px);
	border: 1px solid rgba(194, 206, 219, 0.14);
	border-radius: 28px;
	background:
		radial-gradient(circle at 4% 4%, color-mix(in srgb, var(--nxtorigin-landing-accent) 14%, transparent), transparent 38%),
		linear-gradient(145deg, rgba(13, 25, 49, 0.78), rgba(5, 12, 26, 0.68));
	box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36);
	-webkit-backdrop-filter: blur(22px) saturate(130%);
	backdrop-filter: blur(22px) saturate(130%);
	overflow: visible;
}

.nxtorigin-native-landing-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(120deg, rgba(255, 255, 255, 0.045), transparent 34% 70%, rgba(255, 255, 255, 0.025));
}

.nxtorigin-native-landing-hero > * {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.nxtorigin-native-landing-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	z-index: 3;
}

.nxtorigin-native-landing-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid color-mix(in srgb, var(--nxtorigin-landing-accent) 34%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--nxtorigin-landing-accent) 10%, transparent);
	color: var(--nxtorigin-landing-accent);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.nxtorigin-native-landing-eyebrow::before {
	content: "";
	display: none;
}

.nxtorigin-live-pulse {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nx-rose, #f43f5e);
	box-shadow: 0 0 0 rgba(244, 63, 94, 0.4);
	animation: nxtorigin-pulse-ring 2s infinite;
}

@keyframes nxtorigin-pulse-ring {
	0% {
		box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(244, 63, 94, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
	}
}

.nxtorigin-native-landing-hero .nxtorigin-event-host {
	margin: 0;
}

.nxtorigin-native-landing-hero .nxtorigin-event-detail-part--name {
	font-size: clamp(42px, 6vw, 78px);
	line-height: 0.98;
}

.nxtorigin-native-landing-hero .nxtorigin-event-detail-part--description {
	max-width: 700px;
}

.nxtorigin-native-landing-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-top: 4px;
}

.nxtorigin-native-landing-hero__visual {
	width: 100%;
}

.nxtorigin-native-landing-hero__visual .hero-visual {
	width: 100%;
	max-width: none;
	margin: 0;
}

.nxtorigin-native-landing-hero__countdown {
	grid-column: 1 / -1;
}

.nxtorigin-native-landing-hero__countdown:empty {
	display: none;
}

.nxtorigin-native-landing-section {
	position: relative;
	margin-top: clamp(32px, 5vw, 64px);
	padding: clamp(22px, 3vw, 38px);
	border: 1px solid rgba(194, 206, 219, 0.12);
	border-radius: 24px;
	background: rgba(7, 16, 33, 0.72);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	-webkit-backdrop-filter: blur(18px) saturate(125%);
	backdrop-filter: blur(18px) saturate(125%);
	scroll-margin-top: 24px;
}

.nxtorigin-native-landing-section > div {
	width: 100%;
	max-width: none;
	margin: 0;
}

.nxtorigin-native-landing-section h2 {
	margin-top: 0;
}

.nxtorigin-native-landing-section--journey {
	display: grid;
	gap: clamp(22px, 3vw, 34px);
	overflow: hidden;
	background:
		radial-gradient(circle at 86% 16%, color-mix(in srgb, var(--nxtorigin-landing-accent-alt) 14%, transparent), transparent 34%),
		linear-gradient(145deg, rgba(10, 25, 47, 0.94), rgba(5, 13, 28, 0.88));
	box-shadow:
		0 34px 90px rgba(0, 0, 0, 0.4),
		0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.nxtorigin-native-landing-section--journey::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(118deg, rgba(255, 255, 255, 0.045), transparent 34% 70%, rgba(255, 255, 255, 0.02));
}

.nxtorigin-native-journey-intro,
.nxtorigin-native-journey-preview {
	position: relative;
	z-index: 1;
}

.nxtorigin-native-journey-intro {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 28px;
}

.nxtorigin-native-journey-intro > div {
	max-width: 760px;
}

.nxtorigin-native-journey-eyebrow {
	display: block;
	margin-bottom: 10px;
	color: var(--nxtorigin-landing-accent-alt);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nxtorigin-native-journey-intro h2 {
	margin-bottom: 10px;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.04;
	letter-spacing: -0.03em;
}

.nxtorigin-native-journey-intro p {
	max-width: 680px;
	margin: 0;
	color: var(--nx-text-muted, #aebbd0);
	font-size: clamp(14px, 1.25vw, 17px);
	line-height: 1.65;
}

.nxtorigin-native-journey-cta {
	box-sizing: border-box;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 10px;
	max-width: 100%;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid color-mix(in srgb, var(--nxtorigin-landing-accent-alt) 52%, transparent);
	border-radius: 12px;
	background: linear-gradient(135deg, var(--nxtorigin-landing-accent), var(--nxtorigin-landing-accent-alt));
	box-shadow: 0 14px 34px color-mix(in srgb, var(--nxtorigin-landing-accent-alt) 20%, transparent);
	color: var(--nx-btn-text, #03111d);
	font-size: 13px;
	font-weight: 850;
	text-decoration: none;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.nxtorigin-native-journey-cta:hover,
.nxtorigin-native-journey-cta:focus-visible {
	box-shadow: 0 18px 42px color-mix(in srgb, var(--nxtorigin-landing-accent-alt) 30%, transparent);
	color: var(--nx-btn-text, #03111d);
	transform: translateY(-2px);
}

.nxtorigin-native-journey-preview {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 14px;
	border: 1px solid rgba(132, 213, 229, 0.17);
	border-radius: 18px;
	background: rgba(3, 11, 24, 0.56);
	box-shadow:
		0 20px 55px rgba(0, 0, 0, 0.34),
		0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.nxtorigin-native-journey-preview__card {
	min-height: 148px;
	padding: 18px;
	border: 1px solid rgba(132, 213, 229, 0.12);
	border-radius: 14px;
	background: linear-gradient(155deg, rgba(18, 42, 67, 0.9), rgba(7, 20, 38, 0.88));
	box-shadow: 0 15px 28px rgba(0, 0, 0, 0.2);
}

.nxtorigin-native-journey-preview__card span {
	display: block;
	margin-bottom: 12px;
	color: var(--nxtorigin-landing-accent-alt);
	font-size: 9px;
	font-weight: 850;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nxtorigin-native-journey-preview__card strong {
	display: block;
	color: var(--nx-text, #f4f7fb);
	font-size: 15px;
	line-height: 1.3;
}

.nxtorigin-native-journey-preview__card p {
	margin: 8px 0 0;
	color: var(--nx-text-muted, #aebbd0);
	font-size: 12px;
	line-height: 1.5;
}

.nxtorigin-native-landing-section--journey.is-locked .nxtorigin-native-journey-preview__card {
	filter: saturate(0.58);
	opacity: 0.68;
}

.nxtorigin-native-landing-section--journey.is-locked .nxtorigin-native-journey-preview__card:nth-child(n + 3) {
	filter: blur(1.5px) saturate(0.4);
	opacity: 0.48;
}

.nxtorigin-native-journey-preview__lock {
	position: absolute;
	inset: auto 50% 12px auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 14px;
	border: 1px solid rgba(125, 231, 222, 0.26);
	border-radius: 999px;
	background: rgba(3, 15, 28, 0.9);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
	color: var(--nx-text, #dffcf7);
	font-size: 11px;
	transform: translateX(50%);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.nxtorigin-native-journey-preview__lock span {
	color: var(--nxtorigin-landing-accent);
}

@media (max-width: 980px) {
	.nxtorigin-native-landing-hero {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.nxtorigin-native-landing-hero__visual {
		max-width: 760px;
		margin: 0 auto;
	}

	.nxtorigin-native-journey-preview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	body.nxtorigin-native-landing-page .nxtorigin-native-landing-main {
		scrollbar-gutter: auto;
	}

	.nxtorigin-native-landing {
		padding: 22px 12px 72px;
	}

	.nxtorigin-native-landing-hero,
	.nxtorigin-native-landing-section {
		border-radius: 18px;
	}

	.nxtorigin-native-landing-hero {
		gap: 26px;
		padding: 24px 18px;
	}

	.nxtorigin-native-landing-hero .nxtorigin-event-detail-part--name {
		font-size: clamp(38px, 13vw, 58px);
	}

	.nxtorigin-native-landing-hero__countdown .nxtorigin-event-detail-part--countdown {
		grid-template-columns: repeat(2, 1fr);
	}

	.nxtorigin-native-landing-hero__countdown .nxtorigin-event-detail-countdown-unit {
		border-top: 1px solid rgba(194, 206, 219, 0.15);
	}

	.nxtorigin-native-landing-hero__countdown .nxtorigin-event-detail-countdown-unit:nth-of-type(odd) {
		border-left: 0;
	}

	.nxtorigin-native-landing-section {
		padding: 20px 14px;
	}

	.nxtorigin-native-journey-intro {
		align-items: stretch;
		flex-direction: column;
		gap: 18px;
	}

	.nxtorigin-native-journey-cta {
		width: 100%;
	}

	.nxtorigin-native-journey-preview {
		grid-template-columns: 1fr;
		padding: 10px;
	}

	.nxtorigin-native-journey-preview__card {
		min-height: 0;
	}

	.nxtorigin-native-landing-section--journey.is-locked .nxtorigin-native-journey-preview__card:nth-child(n + 3) {
		display: none;
	}

	.nxtorigin-native-journey-preview__lock {
		position: relative;
		inset: auto;
		justify-content: center;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.nxtorigin-native-landing-page .nxtorigin-native-landing-main {
		scroll-behavior: auto;
	}
}

/* ---------------------------------------------------------------------------
 * Phones: let the landing page scroll like a page.
 *
 * The Event Resolver viewport contract pins the document and scrolls content
 * inside a bounded shell — correct for the event experience, where a fixed
 * header, side rail and footer frame a workspace. On a phone it is wrong for
 * THIS page: the shell reserves 108px top and 74px bottom of a 100dvh box, so a
 * typical handset gets roughly 485px of usable height (about 330px with the
 * admin bar) and a marketing page arrives as a small window with its own
 * scrollbar inside a frame that cannot move.
 *
 * The landing page is public and read top-to-bottom before anyone has an event
 * to work in, so below 700px it returns to normal document scrolling: the
 * document unlocks, the shell stops being viewport-height, and the header and
 * footer reserves become ordinary flow rather than fixed insets.
 *
 * Scoped to the landing body class on purpose — every other Event Resolver page
 * keeps the bounded contract untouched.
 * ------------------------------------------------------------------------ */
@media (max-width: 700px) {
	/* Root class, not :has() — an unsupported selector here would leave the
	   document locked and the page unscrollable. See
	   nxtorigin_native_landing_root_class(). */
	html.nxtorigin-event-viewport-root.nxtorigin-native-landing-root,
	html.nxtorigin-event-viewport-root.nxtorigin-native-landing-root body.nxtorigin-native-landing-page {
		height: auto;
		min-height: 100%;
		overflow: visible !important;
		overscroll-behavior: auto;
	}

	body.nxtorigin-native-landing-page .nxtorigin-native-event-shell__layout {
		height: auto;
		max-height: none;
		padding-top: 0;
		padding-bottom: 0;
	}

	body.nxtorigin-native-landing-page .nxtorigin-native-event-shell__main,
	body.nxtorigin-native-landing-page .nxtorigin-native-landing-main {
		position: absolute !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		max-height: 100% !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}

	/* The fixed bars overlay the page, so keep clearance for them —
	   as spacing now, not as a height reserve that shrinks the content box. */
	body.nxtorigin-native-landing-page .nxtorigin-native-landing {
		padding-top: 130px;
		padding-bottom: 150px;
	}

	body.admin-bar.nxtorigin-native-landing-page .nxtorigin-native-landing {
		padding-top: 174px;
	}
}

/* ---------------------------------------------------------------------------
 * Small phones (≤480px). The page previously had nothing below 700px, so a
 * 360–430px handset was shown the 700px layout squeezed — hero type set for a
 * tablet, four-across meta, side-by-side buttons and generous padding eating
 * most of the width.
 * ------------------------------------------------------------------------ */
@media (max-width: 480px) {
	.nxtorigin-native-landing {
		padding-left: 12px;
		padding-right: 12px;
		padding-top: 130px;
		padding-bottom: 160px;
	}

	.nxtorigin-native-landing-hero,
	.nxtorigin-native-landing-section {
		padding: 20px 14px;
		border-radius: 16px;
	}

	/* Long event names must wrap rather than push the page sideways. */
	.nxtorigin-native-landing-hero .nxtorigin-event-detail-part--name {
		font-size: clamp(28px, 10.5vw, 40px);
		overflow-wrap: anywhere;
	}

	/* Full-width, stacked calls to action — thumb targets, not a squeezed row. */
	.nxtorigin-native-landing-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.nxtorigin-native-landing-actions > * {
		width: 100%;
	}

	.nxtorigin-native-landing-actions a,
	.nxtorigin-native-landing-actions button {
		justify-content: center;
		width: 100%;
		text-align: center;
	}

	.nxtorigin-native-landing-eyebrow {
		font-size: 11px;
		letter-spacing: 0.08em;
	}

	/* The date/time/timezone strip stacks instead of splitting four ways. */
	.nxtorigin-native-landing-hero .nxtorigin-event-detail-part--meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	/* Nothing inside may set its own floor and force a sideways scroll. */
	.nxtorigin-native-landing img,
	.nxtorigin-native-landing svg,
	.nxtorigin-native-landing table {
		max-width: 100%;
		height: auto;
	}
}

/* ---------------------------------------------------------------------------
 * The landing container must include its padding in its width.
 *
 * Measured: at a 1920px window this box reported 1608px — exactly
 * `width: min(100%, 1480px)` plus its 64px of padding either side. That is
 * content-box behaviour, so the padding is added ON TOP of the width.
 *
 * Harmless at 1920 (1608 fits). At ~1265 the width resolves to 100% = 1265 and
 * the padding adds ~101px on top, so the container is 1366px inside a 1265px
 * window — about 100px of overflow, hidden by `overflow-x: hidden` on the main
 * and therefore showing as a cut right edge rather than a scrollbar.
 *
 * This is why it looked fine at full width and broken at a smaller window, and
 * why four rounds of reasoning about containers and caps never found it: every
 * box WAS the width it claimed, and the padding was the part nobody counted.
 * ------------------------------------------------------------------------ */
.nxtorigin-native-landing,
.nxtorigin-native-landing-content,
.nxtorigin-native-landing-hero,
.nxtorigin-native-landing-section {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------------------
 * The hero stacks above the sections that follow it.
 *
 * The hero and every section below carry `backdrop-filter`, which makes each
 * one its own stacking context at `z-index: auto`. When two elements are both
 * auto, DOM order decides — so "Make this event yours" painted over the hero,
 * and the open "Register As" menu disappeared underneath it. The menu's own
 * z-index could never win that: 50 only competes INSIDE the hero, not against
 * a later sibling that owns its own context.
 *
 * Lifting the hero one step is enough. It only matters where the two overlap,
 * which is only while the dropdown is open.
 * ------------------------------------------------------------------------ */
.nxtorigin-native-landing-hero {
	z-index: 2;
}
