/* Standalone landing gateway
 *
 * The gateway is a deliberate shell state: the normal scene and navigation stay
 * preloaded in the DOM, while this layer owns the complete first viewport.
 */
html:has(body.nxs-app-shell-theme .nxs-shell.is-landing),
body.nxs-app-shell-theme:has(.nxs-shell.is-landing),
body.nxs-app-shell-theme:has(.nxs-shell.is-landing) .wp-site-blocks,
body.nxs-app-shell-theme:has(.nxs-shell.is-landing) .wp-site-blocks > main {
	background: #000 !important;
}

.nxs-shell.is-landing {
	--nxs-landing-viewport-height: var(--nxs-shell-viewport-height, calc(100dvh - var(--wp-admin--admin-bar--height, 0px)));
	background: #000;
	color: #fff;
	height: var(--nxs-landing-viewport-height);
	min-height: 0;
	overflow: hidden;
}

.nxs-shell.is-landing::before,
.nxs-shell.is-landing::after {
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 10035;
}

.nxs-shell.is-landing::before {
	background:
		linear-gradient(rgb(87 205 155 / 0.055) 1px, transparent 1px),
		linear-gradient(90deg, rgb(63 207 182 / 0.045) 1px, transparent 1px);
	background-position: center;
	background-size: clamp(2.75rem, 6vw, 5.5rem) clamp(2.75rem, 6vw, 5.5rem);
	-webkit-mask-image: radial-gradient(circle at center, #000 0 20%, transparent 72%);
	mask-image: radial-gradient(circle at center, #000 0 20%, transparent 72%);
	opacity: 0.42;
}

.nxs-shell.is-landing::after {
	background:
		radial-gradient(circle at 50% 54%, rgb(87 205 155 / 0.13), transparent 22%),
		radial-gradient(circle at 50% 54%, rgb(80 185 212 / 0.07), transparent 42%);
	opacity: 0.72;
}

.nxs-shell.is-landing :is(
	.nxs-shell__background,
	.nxs-shell__chrome,
	.nxs-shell__menu-scrim,
	.nxs-shell__skip-link
) {
	opacity: 0 !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

.nxs-shell.is-landing .nxs-shell__reader {
	bottom: 0 !important;
	height: 100% !important;
	inset: 0 !important;
	left: 0 !important;
	max-width: none !important;
	position: absolute !important;
	top: 0 !important;
	transform: none !important;
	width: 100% !important;
	z-index: 10040;
}

.nxs-shell.is-landing .nxs-shell__scroll {
	box-sizing: border-box;
	display: grid;
	gap: 0;
	grid-template-rows: minmax(0, 1fr) auto;
	height: 100%;
	overflow: hidden;
	padding: 0;
	scrollbar-gutter: auto;
}

/* The entry scrolls independently on short screens; the native footer keeps
 * its own bottom row. No fixed overlay, footer cloning or JS positioning. */
.nxs-shell.is-landing .nxs-shell__page-body {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: clamp(1.35rem, 3vh, 2.35rem);
	justify-content: safe center;
	min-height: 0;
	min-width: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scroll-padding: 1rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	padding:
		max(1.25rem, env(safe-area-inset-top))
		max(1rem, env(safe-area-inset-right))
		max(1.25rem, env(safe-area-inset-bottom))
		max(1rem, env(safe-area-inset-left));
}

.nxs-shell.is-landing .nxs-shell__page-body > * { flex: 0 0 auto; }

.nxs-shell.is-landing .nxs-shell__footer {
	margin: 0;
	max-height: calc(var(--nxs-landing-viewport-height) * 0.4);
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
}

/* The gateway needs a slim legal/brand line, not the full institutional card.
 * The native, editable provider block remains on ordinary content pages. */
.nxs-shell.is-landing .nxs-shell__footer .mth-site-footer {
	background: #0d1511;
	border: 0;
	border-top: 1px solid var(--mth-line);
	border-radius: 0;
	box-shadow: none;
	color: #e9f8f3;
}
.nxs-shell.is-landing .mth-footer-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0 1rem;
	padding: 0.25rem 0.75rem;
}
.nxs-shell.is-landing .mth-footer-brand {
	display: none;
	flex: 1 1 10rem;
	justify-content: center;
	gap: 0;
}
.nxs-shell.is-landing .mth-footer-brand > :is(.wp-block-site-logo, .wp-block-image, img),
.nxs-shell.is-landing .mth-footer-brand > p:not(.mth-footer-title),
.nxs-shell.is-landing .mth-footer-copy {
	display: none;
}
.nxs-shell.is-landing .mth-footer-title {
	flex: 0 1 auto;
	font-size: 0.75rem;
	line-height: 1.4;
}
.nxs-shell.is-landing .mth-footer-title a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.nxs-shell.is-landing nav.mth-footer-nav {
	flex: 0 1 auto;
	width: auto;
	padding-top: 0;
	border: 0;
}
.nxs-shell.is-landing .mth-footer-nav,
.nxs-shell.is-landing .mth-footer-nav .wp-block-navigation__container {
	justify-content: center;
}
@container nexus-footer (min-width: 30rem) {
	.nxs-shell.is-landing .mth-footer-brand { display: flex; }
}

.nxs-shell.is-landing .nxs-shell__reader-head {
	align-self: center;
	clip: auto;
	clip-path: none;
	height: auto;
	inline-size: auto;
	margin: 0;
	max-inline-size: min(92vw, 54rem);
	overflow: visible;
	padding: 0 !important;
	position: relative;
	text-align: center;
	white-space: normal;
	width: auto !important;
}

.nxs-shell.is-landing .nxs-shell__eyebrow {
	display: none;
}

.nxs-shell.is-landing .nxs-shell__reader-head h1 {
	color: #fff !important;
	font: 560 clamp(1.45rem, 3.3vw, 2.75rem)/1.05 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	letter-spacing: 0.035em;
	overflow: visible;
	text-shadow:
		0 0 0.4rem rgb(255 255 255 / 0.22),
		0 0 1.35rem rgb(87 205 155 / 0.42);
	text-wrap: balance;
	white-space: normal;
}

.nxs-shell.is-landing :is(
	.nxs-shell__reader,
	.nxs-shell__scroll,
	.nxs-shell__content,
	.nxs-content-container,
	.nxs-shell__landing-media,
	.nxs-shell__landing-media .wp-block-image
) {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.nxs-shell.is-landing .nxs-shell__content,
.nxs-shell.is-landing .nxs-content-container,
.nxs-shell.is-landing .nxs-shell__landing-media {
	box-sizing: border-box;
	display: grid !important;
	height: auto;
	margin: 0 !important;
	min-height: 0;
	min-width: 0;
	padding: 0 !important;
	place-items: center;
	width: auto !important;
}

.nxs-shell.is-landing .nxs-shell__landing-media {
	align-self: start;
	animation: nxs-landing-float 6.5s ease-in-out infinite;
	max-width: min(92vw, 36rem);
	width: min(92vw, 36rem) !important;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.nxs-shell.is-landing .nxs-shell__landing-media .wp-block-image {
	border-radius: 0 !important;
	margin: 0 !important;
	max-height: none;
	max-inline-size: 100%;
	max-width: 100%;
	padding: 0 !important;
	min-width: 0;
	width: 100% !important;
}

.nxs-shell.is-landing .nxs-shell__landing-link,
.nxs-shell.is-landing .wp-block-image > .nxs-shell__landing-link {
	align-items: center;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none !important;
	color: #fff;
	cursor: pointer;
	display: grid !important;
	gap: clamp(0.85rem, 2vh, 1.25rem);
	justify-items: center;
	max-height: none;
	max-inline-size: 100%;
	max-width: 100%;
	min-width: 0;
	text-decoration: none;
	transform-origin: 50% 50%;
	transition: filter 220ms ease, transform 220ms ease;
	width: 100% !important;
}

.nxs-shell.is-landing .nxs-shell__landing-link::after {
	align-items: center;
	background: linear-gradient(135deg, rgb(8 25 19 / 0.78), rgb(3 18 15 / 0.9));
	border: 1px solid rgb(87 205 155 / 0.72);
	border-radius: 999px;
	box-shadow:
		0 0 0 1px rgb(63 207 182 / 0.08) inset,
		0 0 1.4rem rgb(87 205 155 / 0.18);
	color: #fff;
	content: attr(data-nxs-action) "  →";
	display: inline-flex;
	font: 720 0.76rem/1 ui-sans-serif, system-ui, sans-serif;
	justify-content: center;
	letter-spacing: 0.13em;
	min-height: 2.85rem;
	padding: 0.15rem 1.1rem 0.15rem 1.25rem;
	text-transform: uppercase;
	transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
	white-space: nowrap;
}

.nxs-shell.is-landing .nxs-shell__landing-link:focus-visible {
	border-radius: 0.75rem;
	outline: 3px solid #57cd9b;
	outline-offset: 0.65rem;
}

.nxs-shell.is-landing .nxs-shell__landing-media img {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	display: block;
	filter:
		drop-shadow(0 0 0.55rem rgb(87 205 155 / 0.36))
		drop-shadow(0 0 1.7rem rgb(63 207 182 / 0.16));
	height: auto;
	max-block-size: min(45dvh, 25rem);
	max-inline-size: min(70vw, 30rem);
	margin-inline: auto;
	object-fit: contain;
}

.nxs-shell.is-landing .nxs-shell__landing-media figcaption {
	display: none;
}

.nxs-shell.is-landing .nxs-shell__landing-model {
	aspect-ratio: 1;
	height: auto;
	margin-inline: auto;
	width: min(70vw, 24rem, calc(var(--nxs-landing-viewport-height) * 0.42));
}

.nxs-shell.is-landing .nxs-shell__landing-model > img {
	height: 100%;
	max-block-size: none;
	max-inline-size: 100%;
	width: 100%;
}

.nxs-shell.is-landing .nxs-shell__loading {
	display: none !important;
}

@keyframes nxs-landing-float {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(0, -0.55rem, 0); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.nxs-shell.is-landing .nxs-shell__landing-link:hover {
		filter: drop-shadow(0 0 1.2rem rgb(87 205 155 / 0.48));
		transform: translate3d(0, -0.18rem, 0) scale(1.018);
	}

	.nxs-shell.is-landing .nxs-shell__landing-link:hover::after {
		background: linear-gradient(135deg, rgb(20 65 47 / 0.88), rgb(4 28 23 / 0.94));
		border-color: #57cd9b;
		box-shadow:
			0 0 0 1px rgb(80 185 212 / 0.15) inset,
			0 0 1.8rem rgb(87 205 155 / 0.34);
	}
}

.nxs-shell.is-landing-departing::before {
	animation: nxs-gateway-grid-collapse 640ms cubic-bezier(0.64, 0, 0.24, 1) both;
}

.nxs-shell.is-landing-departing::after {
	animation: nxs-gateway-flash 640ms cubic-bezier(0.64, 0, 0.24, 1) both;
}

.nxs-shell.is-landing-departing .nxs-shell__reader-head {
	animation: nxs-gateway-title-exit 420ms ease both;
}

.nxs-shell.is-landing-departing .nxs-shell__landing-media {
	animation: nxs-gateway-enter 640ms cubic-bezier(0.64, 0, 0.24, 1) both;
	pointer-events: none;
}

@keyframes nxs-gateway-grid-collapse {
	0% { background-size: clamp(2.75rem, 6vw, 5.5rem) clamp(2.75rem, 6vw, 5.5rem); opacity: 0.42; }
	64% { background-size: 1.15rem 1.15rem; opacity: 0.82; }
	100% { background-size: 0.2rem 0.2rem; opacity: 0; }
}

@keyframes nxs-gateway-flash {
	0% { opacity: 0.72; transform: scale(1); }
	58% { opacity: 1; transform: scale(1.06); }
	100% { opacity: 0; transform: scale(1.18); }
}

@keyframes nxs-gateway-title-exit {
	to { filter: blur(0.55rem); opacity: 0; transform: translateY(-0.75rem); }
}

@keyframes nxs-gateway-enter {
	0% { filter: brightness(1); opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
	52% { filter: brightness(1.75) saturate(1.35); opacity: 1; transform: translate3d(0, 0, 0) scale(1.06); }
	100% { filter: brightness(2) blur(0.8rem); opacity: 0; transform: translate3d(0, 0, 0) scale(0.62); }
}

@media (max-width: 782px) {
	.nxs-shell.is-landing .nxs-shell__page-body {
		gap: clamp(1.15rem, 3.5vh, 1.75rem);
	}

	.nxs-shell.is-landing .nxs-shell__reader-head h1 {
		font-size: clamp(1.35rem, 7vw, 2rem);
	}

	.nxs-shell.is-landing .nxs-shell__landing-media {
		max-width: 90vw;
		width: 90vw !important;
	}

	.nxs-shell.is-landing .nxs-shell__landing-media img {
		max-block-size: min(40dvh, 18rem);
		max-inline-size: min(72vw, 20rem);
	}

	.nxs-shell.is-landing .nxs-shell__landing-link::after {
		font-size: 0.72rem;
		min-height: 2.85rem;
	}
}

@media (max-height: 500px) and (orientation: landscape) {
	.nxs-shell.is-landing .nxs-shell__page-body {
		gap: 0.6rem;
		flex-direction: row;
		align-items: safe center;
	}

	.nxs-shell.is-landing .nxs-shell__reader-head {
		align-self: safe center;
		flex: 0 1 40%;
	}

	.nxs-shell.is-landing .nxs-shell__landing-media {
		align-self: safe center;
		max-width: 45vw;
	}

	.nxs-shell.is-landing .nxs-shell__landing-model {
		width: min(38vw, 18rem, calc(var(--nxs-landing-viewport-height) * 0.32));
	}

	.nxs-shell.is-landing .nxs-shell__landing-media img {
		max-block-size: calc(var(--nxs-landing-viewport-height) * 0.38);
		max-inline-size: min(42vw, 18rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nxs-shell.is-landing .nxs-shell__landing-media,
	.nxs-shell.is-landing-departing::before,
	.nxs-shell.is-landing-departing::after,
	.nxs-shell.is-landing-departing .nxs-shell__reader-head,
	.nxs-shell.is-landing-departing .nxs-shell__landing-media {
		animation: none !important;
		transform: none !important;
		will-change: auto;
	}
}
