/**
 * Nexus Game CTA Band — frontend styles (self-contained in the Client plugin).
 *
 * Mirrors the Lawn vs Mosquitos arcade look: sky-to-grass gradient, drifting
 * clouds, a pulsing sun, the house, a flying mosquito, and a wooden arcade
 * button. Everything is scoped under .nexus-game-cta so it can't leak.
 */
@import url("https://fonts.googleapis.com/css2?family=Bungee&family=Press+Start+2P&display=swap");

.nexus-game-cta {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	min-height: clamp(320px, 34vw, 460px);
	margin: 0;
	padding: clamp(28px, 5vw, 64px) clamp(20px, 6vw, 90px);
	display: flex;
	align-items: center;
	overflow: hidden;
	border-top: 5px solid #2c6b2a;
	border-bottom: 5px solid #5e3b1e;
	background: linear-gradient(180deg, #60c7f7 0%, #93dcff 34%, #9ade79 60%, #6cb04a 100%);
	color: #16311f;
	font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

.nexus-game-cta * {
	box-sizing: border-box;
}

/* ── Animated yard scene (decorative) ─────────────────────────────── */
.nexus-game-cta .ngc-scene {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.nexus-game-cta .ngc-sun {
	position: absolute;
	top: 8%;
	right: 6%;
	width: clamp(90px, 12vw, 170px);
	height: clamp(90px, 12vw, 170px);
	border-radius: 50%;
	background: radial-gradient(circle at 40% 38%, rgba(255, 247, 155, 0.98) 0%, rgba(255, 200, 79, 0.9) 44%, rgba(255, 200, 79, 0) 72%);
	animation: ngcSun 4s ease-in-out infinite;
}

.nexus-game-cta .ngc-cloud {
	position: absolute;
	width: 150px;
	height: 50px;
	border-radius: 50px;
	background: rgba(255, 255, 255, 0.9);
	filter: blur(0.4px);
	opacity: 0.92;
}

.nexus-game-cta .ngc-cloud::before,
.nexus-game-cta .ngc-cloud::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: inherit;
}

.nexus-game-cta .ngc-cloud::before {
	width: 64px;
	height: 64px;
	top: -22px;
	left: 20px;
}

.nexus-game-cta .ngc-cloud::after {
	width: 74px;
	height: 74px;
	top: -30px;
	right: 16px;
}

.nexus-game-cta .ngc-cloud-1 { top: 12%; transform: scale(1); animation: ngcCloudRight 30s linear infinite; }
.nexus-game-cta .ngc-cloud-2 { top: 26%; transform: scale(0.7); animation: ngcCloudLeft 38s linear infinite; animation-delay: -12s; }
.nexus-game-cta .ngc-cloud-3 { top: 6%; transform: scale(0.55); animation: ngcCloudRight 44s linear infinite; animation-delay: -22s; }
.nexus-game-cta .ngc-cloud-4 { top: 34%; transform: scale(0.85); animation: ngcCloudLeft 34s linear infinite; animation-delay: -6s; }

.nexus-game-cta .ngc-ground {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: clamp(54px, 11%, 96px);
}

.nexus-game-cta .ngc-grass {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 42%;
	border-top: 4px solid #2f7b2f;
	background: repeating-linear-gradient(90deg, #85d463 0 14px, #6ebc53 14px 28px);
}

.nexus-game-cta .ngc-dirt {
	position: absolute;
	left: 0;
	right: 0;
	top: 38%;
	bottom: 0;
	border-top: 6px solid #3e7f31;
	background:
		repeating-linear-gradient(90deg, #774c3b 0 18px, #6b4336 18px 36px),
		linear-gradient(180deg, #704736, #4e3028);
}

.nexus-game-cta .ngc-house {
	position: absolute;
	left: clamp(8px, 3vw, 48px);
	bottom: clamp(40px, 9%, 78px);
	width: clamp(120px, 15vw, 220px);
	height: auto;
	filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.22));
}

/* ── Flying mosquito ──────────────────────────────────────────────── */
.nexus-game-cta .ngc-mosquito {
	position: absolute;
	top: 18%;
	right: clamp(8%, 18vw, 26%);
	width: clamp(110px, 13vw, 190px);
	animation: ngcDrift 9s ease-in-out infinite;
}

.nexus-game-cta .ngc-mosquito-svg {
	width: 100%;
	height: auto;
	overflow: visible;
	filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.25));
	animation: ngcHover 0.5s ease-in-out infinite alternate;
}

.nexus-game-cta .ngc-mosquito-flipped {
	transform: translateX(281px) scaleX(-1);
	transform-origin: center;
}

.nexus-game-cta .ngc-mosquito-wings {
	transform-box: view-box;
	transform-origin: 148px 145px;
	animation: ngcWing 0.065s linear infinite alternate;
}

.nexus-game-cta .ngc-mosquito-wing-blur {
	opacity: 0.35;
	filter: blur(1.25px);
	transform-box: view-box;
	transform-origin: 148px 145px;
	animation: ngcWingBlur 0.045s linear infinite alternate;
}

.nexus-game-cta .ngc-mosquito-body {
	transform-box: view-box;
	transform-origin: 145px 145px;
	animation: ngcBodyTilt 0.22s ease-in-out infinite alternate;
}

/* ── Copy + button ───────────────────────────────────────────────── */
.nexus-game-cta .ngc-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(20px, 4vw, 56px);
	flex-wrap: wrap;
}

.nexus-game-cta .ngc-copy {
	flex: 1 1 420px;
	min-width: 0;
	max-width: 720px;
}

.nexus-game-cta .ngc-eyebrow {
	display: inline-block;
	margin: 0 0 12px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #2f7b2f;
	color: #fffbe6;
	font-family: "Press Start 2P", "Courier New", monospace;
	font-size: clamp(0.5rem, 1.1vw, 0.66rem);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 0 3px 0 rgba(16, 39, 17, 0.35);
}

.nexus-game-cta .ngc-title {
	margin: 0 0 10px;
	font-family: "Bungee", Impact, Haettenschweiler, sans-serif;
	font-size: clamp(2rem, 5.4vw, 4.6rem);
	line-height: 0.92;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #fff7bc;
	text-shadow:
		0 3px 0 #214e22,
		3px 3px 0 #214e22,
		-3px 3px 0 #214e22,
		0 7px 0 rgba(16, 39, 17, 0.28);
}

.nexus-game-cta .ngc-title em {
	font-style: normal;
	color: #ff9f6f;
	text-shadow:
		0 3px 0 #6a3218,
		3px 3px 0 #6a3218,
		-3px 3px 0 #6a3218;
}

.nexus-game-cta .ngc-subtitle {
	margin: 0 0 12px;
	max-width: 560px;
	font-size: clamp(1rem, 1.8vw, 1.3rem);
	font-weight: 700;
	color: #16311f;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nexus-game-cta .ngc-desc {
	margin: 0;
	font-size: clamp(0.92rem, 1.4vw, 1.06rem);
	font-weight: 600;
	line-height: 1.5;
	color: #1c3a26;
}

.nexus-game-cta .ngc-desc a {
	color: #0f5132;
	text-decoration: underline;
}

.nexus-game-cta .ngc-actions {
	flex: 0 0 auto;
}

/* ── Arcade wooden button (matches the game's primary button) ─────── */
.nexus-game-cta .ngc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 18px 34px;
	border: 4px solid #69472b;
	border-radius: 12px;
	background: linear-gradient(180deg, #ffe598 0%, #ffc55a 100%);
	box-shadow:
		inset 0 0 0 3px rgba(255, 245, 224, 0.3),
		0 7px 0 #8f643c;
	color: #3a2412;
	font-family: "Press Start 2P", "Courier New", monospace;
	font-size: clamp(0.78rem, 1.5vw, 1.05rem);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform 120ms steps(2), box-shadow 120ms steps(2), filter 120ms ease;
	animation: ngcPulse 3.6s ease-in-out infinite;
}

.nexus-game-cta .ngc-btn:hover,
.nexus-game-cta .ngc-btn:focus-visible {
	transform: translateY(3px);
	box-shadow:
		inset 0 0 0 3px rgba(255, 245, 224, 0.3),
		0 4px 0 #8f643c;
	filter: brightness(1.03);
	animation-play-state: paused;
	opacity: 1;
	outline: none;
}

.nexus-game-cta .ngc-btn[aria-disabled="true"] {
	opacity: 0.6;
	cursor: default;
	pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 880px) {
	.nexus-game-cta {
		min-height: 0;
		text-align: center;
	}

	.nexus-game-cta .ngc-inner {
		flex-direction: column;
		text-align: center;
	}

	.nexus-game-cta .ngc-copy {
		flex-basis: auto;
	}

	.nexus-game-cta .ngc-subtitle,
	.nexus-game-cta .ngc-desc {
		margin-left: auto;
		margin-right: auto;
	}

	.nexus-game-cta .ngc-house {
		opacity: 0.5;
	}

	.nexus-game-cta .ngc-mosquito {
		top: 6%;
		right: 6%;
		width: clamp(80px, 22vw, 130px);
	}
}

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes ngcSun {
	0%, 100% { transform: scale(1); opacity: 0.94; }
	50% { transform: scale(1.06); opacity: 1; }
}

@keyframes ngcCloudRight {
	from { left: -180px; }
	to { left: 100%; }
}

@keyframes ngcCloudLeft {
	from { left: 100%; }
	to { left: -180px; }
}

@keyframes ngcDrift {
	0%, 100% { transform: translate(0, 0) rotate(-3deg); }
	50% { transform: translate(-26px, 14px) rotate(3deg); }
}

@keyframes ngcHover {
	from { transform: translateY(-4px); }
	to { transform: translateY(4px); }
}

@keyframes ngcWing {
	from { transform: rotate(-5deg) scaleX(1) scaleY(1); opacity: 0.95; }
	to { transform: rotate(9deg) scaleX(0.18) scaleY(1.08); opacity: 0.58; }
}

@keyframes ngcWingBlur {
	from { transform: rotate(12deg) scaleX(0.85) scaleY(1); }
	to { transform: rotate(-12deg) scaleX(0.12) scaleY(1.15); }
}

@keyframes ngcBodyTilt {
	from { transform: rotate(-1.8deg); }
	to { transform: rotate(1.8deg); }
}

@keyframes ngcPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
	.nexus-game-cta .ngc-sun,
	.nexus-game-cta .ngc-cloud,
	.nexus-game-cta .ngc-mosquito,
	.nexus-game-cta .ngc-mosquito-svg,
	.nexus-game-cta .ngc-mosquito-wings,
	.nexus-game-cta .ngc-mosquito-wing-blur,
	.nexus-game-cta .ngc-mosquito-body,
	.nexus-game-cta .ngc-btn {
		animation: none !important;
	}
}

/* ── Compact variant ──────────────────────────────────────────────────
   ~40% of the full banner's height with every element, animation, and scene
   component intact — just scaled down so it reads nearly identical. */
.nexus-game-cta.is-compact {
	min-height: clamp(132px, 14vw, 188px);
	padding: clamp(12px, 2.2vw, 26px) clamp(18px, 5vw, 72px);
}

.nexus-game-cta.is-compact .ngc-inner {
	gap: clamp(14px, 3vw, 36px);
}

.nexus-game-cta.is-compact .ngc-eyebrow {
	margin-bottom: 6px;
	padding: 4px 9px;
	font-size: clamp(0.44rem, 0.9vw, 0.56rem);
}

.nexus-game-cta.is-compact .ngc-title {
	margin-bottom: 5px;
	font-size: clamp(1.3rem, 3vw, 2.4rem);
}

.nexus-game-cta.is-compact .ngc-subtitle {
	margin-bottom: 6px;
	font-size: clamp(0.82rem, 1.3vw, 1rem);
}

.nexus-game-cta.is-compact .ngc-desc {
	font-size: clamp(0.78rem, 1.1vw, 0.92rem);
	line-height: 1.4;
}

.nexus-game-cta.is-compact .ngc-btn {
	padding: 11px 22px;
	font-size: clamp(0.66rem, 1.2vw, 0.84rem);
}

/* Scene scaled to match the shorter band. */
.nexus-game-cta.is-compact .ngc-sun {
	width: clamp(56px, 7vw, 100px);
	height: clamp(56px, 7vw, 100px);
}

.nexus-game-cta.is-compact .ngc-cloud {
	width: 92px;
	height: 30px;
}

.nexus-game-cta.is-compact .ngc-cloud::before {
	width: 40px;
	height: 40px;
	top: -14px;
	left: 12px;
}

.nexus-game-cta.is-compact .ngc-cloud::after {
	width: 46px;
	height: 46px;
	top: -20px;
	right: 10px;
}

.nexus-game-cta.is-compact .ngc-house {
	width: clamp(74px, 9vw, 132px);
	bottom: clamp(24px, 7%, 52px);
}

.nexus-game-cta.is-compact .ngc-mosquito {
	top: 12%;
	width: clamp(62px, 8vw, 110px);
}

.nexus-game-cta.is-compact .ngc-ground {
	height: clamp(30px, 7%, 56px);
}

/* ===========================================================================
   Full-screen play modal (frontend, built by play-modal.js)
   Covers the whole viewport; slim top bar + iframe + close-confirm overlay.
   =========================================================================== */
html.nexus-game-modal-open,
body.nexus-game-modal-open {
	overflow: hidden;
}

.nexus-game-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* above sticky headers, cookie bars, etc. */
	display: flex;
	flex-direction: column;
	background: #0b1d12;
}

.nexus-game-modal[hidden] {
	display: none;
}

.nexus-game-modal .ngm-bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 16px;
	background: #0c2a18;
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nexus-game-modal .ngm-title {
	font-weight: 700;
	font-size: clamp(15px, 2.4vw, 19px);
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nexus-game-modal .ngm-close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font: inherit;
	font-weight: 700;
	color: #0c2a18;
	background: #ffd34d;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.12s ease;
}

.nexus-game-modal .ngm-close:hover {
	background: #ffe08a;
	transform: translateY(-1px);
}

.nexus-game-modal .ngm-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.nexus-game-modal .ngm-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #0b1d12;
}

.nexus-game-modal .ngm-confirm {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(4, 12, 8, 0.72);
	backdrop-filter: blur(3px);
}

.nexus-game-modal .ngm-confirm[hidden] {
	display: none;
}

.nexus-game-modal .ngm-confirm-card {
	max-width: 420px;
	width: 100%;
	text-align: center;
	padding: 28px 26px;
	background: #fff;
	color: #14241a;
	border-radius: 16px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.nexus-game-modal .ngm-confirm-card h3 {
	margin: 0 0 8px;
	font-size: 22px;
}

.nexus-game-modal .ngm-confirm-card p {
	margin: 0 0 20px;
	color: #4a5b50;
}

.nexus-game-modal .ngm-confirm-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.nexus-game-modal .ngm-confirm-actions button {
	flex: 1 1 0;
	min-width: 130px;
	padding: 12px 18px;
	font: inherit;
	font-weight: 700;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.12s ease;
}

.nexus-game-modal .ngm-keep {
	color: #0c2a18;
	background: #d8efdc;
}

.nexus-game-modal .ngm-end {
	color: #fff;
	background: #d6453b;
}

.nexus-game-modal .ngm-confirm-actions button:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}
