/* Shared immersive demonstration scene shell — Earth Windows.
 *
 * Owns ONLY composition, breakpoints, scrim, copy, rail and dock-safe zone.
 * Acoustic and thermal modules keep their effects, state styles and motion.
 */

.ew-demo-scene {
	--ew-demo-copy-inline: clamp(1.25rem, 5vw, 3rem);
	--ew-demo-dock-reserve: 17rem;
	width: 100%;
	background: var(--ew-green-dark);
	color: var(--ew-on-brand);
}

.ew-demo-scene__interactive[hidden] {
	display: none;
}

.ew-demo-scene__stage {
	position: relative;
	width: 100%;
	overflow: clip;
	background: var(--ew-green-dark);
	color: var(--ew-on-brand);
}

.ew-demo-scene__media {
	position: relative;
	width: 100%;
	aspect-ratio: 1672 / 941;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ew-demo-scene__media-plane {
	position: absolute;
	inset: 0;
	width: 100%;
	aspect-ratio: 1672 / 941;
}

.ew-demo-scene__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: none;
}

.ew-demo-scene__copy {
	position: relative;
	z-index: 2;
	display: grid;
	gap: 0.85rem;
	padding: clamp(2rem, 8vw, 4rem) var(--ew-demo-copy-inline) 1.5rem;
	color: var(--ew-on-brand);
	background: var(--ew-green-dark);
}

.ew-demo-scene__copy h2 {
	max-width: 13ch;
	margin: 0;
	font-family: var(--ew-font-display);
	font-size: clamp(2.5rem, 10vw, 4.5rem);
	line-height: 0.94;
	text-wrap: balance;
}

.ew-demo-scene__copy .ew-lede {
	max-width: 34rem;
	margin: 0;
}

/* Component eyebrow/lede colors target light surfaces; on the dark scene
   they inherit the on-brand copy color instead. */
.ew-demo-scene__copy .ew-eyebrow,
.ew-demo-scene__copy .ew-lede {
	color: inherit;
}

.ew-demo-scene__link {
	width: fit-content;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	color: inherit;
	text-underline-offset: 0.35em;
}

.ew-demo-scene__rail {
	position: relative;
	z-index: 3;
	display: grid;
	gap: 1rem;
	padding: 0 var(--ew-demo-copy-inline) calc(7rem + env(safe-area-inset-bottom, 0px));
	color: var(--ew-on-brand);
	background: var(--ew-green-dark);
}

.ew-demo-scene__rail-reserve {
	display: none;
}

.ew-demo-scene__disclaimer {
	max-width: 68rem;
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.5;
	opacity: 0.78;
}

.ew-demo-scene :is(button, a):focus-visible {
	outline: 2px solid var(--ew-brand-orange);
	outline-offset: 4px;
}

/* Service instances keep a compact editorial scale instead of the Home
   cinematic scale, so titles never dominate the section. */
.ew-demo-scene--service .ew-demo-scene__copy h2 {
	font-size: clamp(1.75rem, 5.5vw, 2.6rem);
	line-height: 1.05;
}

@media (min-width: 64em) {
	.ew-demo-scene__stage {
		min-height: max(46rem, 100svh);
	}

	.ew-demo-scene__media {
		position: absolute;
		inset: 0;
		min-height: 100%;
		aspect-ratio: auto;
	}

	.ew-demo-scene__media-plane {
		left: 50%;
		top: 50%;
		right: auto;
		bottom: auto;
		width: max(100%, calc(100svh * 1672 / 941));
		height: auto;
		transform: translate(-50%, -50%);
	}

	.ew-demo-scene__scrim::before,
	.ew-demo-scene__scrim::after {
		content: "";
		position: absolute;
		pointer-events: none;
	}

	.ew-demo-scene__scrim::before {
		inset-block: 0;
		inset-inline-start: 0;
		width: min(56%, 52rem);
		background: linear-gradient(90deg, rgb(0 0 0 / 0.68) 0%, rgb(0 0 0 / 0.38) 58%, transparent 100%);
	}

	.ew-demo-scene--copy-right .ew-demo-scene__scrim::before {
		inset-inline-start: auto;
		inset-inline-end: 0;
		background: linear-gradient(270deg, rgb(0 0 0 / 0.68) 0%, rgb(0 0 0 / 0.38) 58%, transparent 100%);
	}

	.ew-demo-scene__scrim::after {
		inset-inline: 0;
		inset-block-end: 0;
		height: 26%;
		background: linear-gradient(0deg, rgb(0 0 0 / 0.48) 0%, transparent 100%);
	}

	.ew-demo-scene__copy {
		position: absolute;
		left: clamp(3.5rem, 6vw, 7rem);
		top: auto;
		bottom: calc(6.75rem + 7.5rem + env(safe-area-inset-bottom, 0px));
		width: min(34rem, 42vw);
		max-height: min(30rem, calc(100% - 14rem));
		box-sizing: border-box;
		padding: clamp(1.25rem, 2.2vw, 2rem);
		border: 1px solid rgb(255 255 255 / 0.18);
		border-inline-start: 3px solid var(--ew-brand-orange);
		border-radius: 0.2rem 1rem 1rem 0.2rem;
		background: linear-gradient(110deg, rgb(22 40 28 / 0.92), rgb(22 40 28 / 0.72) 76%, transparent);
		box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.16);
		overflow: auto;
	}

	.ew-demo-scene--copy-right .ew-demo-scene__copy {
		left: auto;
		right: clamp(3.5rem, 6vw, 7rem);
	}

	.ew-demo-scene__copy h2 {
		max-width: none;
		font-size: clamp(3.75rem, 5.2vw, 6.25rem);
	}

	.ew-demo-scene__rail {
		position: absolute;
		left: clamp(3.5rem, 6vw, 7rem);
		right: clamp(3.5rem, 6vw, 7rem);
		bottom: calc(6.75rem + env(safe-area-inset-bottom, 0px));
		display: grid;
		grid-template-columns: minmax(0, 1fr) var(--ew-demo-dock-reserve) minmax(0, 1fr);
		align-items: end;
		gap: clamp(1rem, 2vw, 2rem);
		padding: 1.25rem 0 0;
		border-top: 1px solid rgb(255 255 255 / 0.42);
		background: transparent;
	}

	.ew-demo-scene__rail-reserve {
		display: block;
		min-width: var(--ew-demo-dock-reserve);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ew-demo-scene *,
	.ew-demo-scene *::before,
	.ew-demo-scene *::after {
		scroll-behavior: auto;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* Solutions hero (24/10/2026): the demo opens the page edge to edge, with
   the H1 sized as a page title and no extra section spacing above it. */
.ew-demo-scene--hero {
	margin-top: 0;
	padding-top: 0;
}

.ew-demo-scene--hero .ew-demo-scene__copy h1 {
	margin: 0 0 0.6rem;
	max-width: 18ch;
	color: inherit;
	font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.75rem);
	line-height: 1.05;
}
