/* ==========================================================================
   Page hero — full-bleed image, glass header floats over it
   ========================================================================== */

.eit-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: #0b1020;

	/* Inner pages: half the viewport. The front page overrides this below. */
	min-height: 50vh;
	min-height: 50svh;

	/* Top padding clears the floating header; bottom is plain breathing room. */
	padding-block:
		calc(var(--eit-header-h) + (var(--eit-header-gap) * 2) + clamp(24px, 4vh, 56px))
		clamp(44px, 7vh, 90px);
}

/* Front page only: a full-screen hero.
   svh is the "smallest viewport height", so the hero does not jump as mobile
   browser chrome slides in and out; vh above it is the fallback. */
body.home .eit-hero {
	min-height: 100vh;
	min-height: 100svh;
}

body.admin-bar .eit-hero { padding-top: calc(var(--eit-header-h) + (var(--eit-header-gap) * 2) + 32px + clamp(24px, 4vh, 56px)); }

/* ---------- Background artwork ---------- */

.eit-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.eit-hero__img,
.eit-hero__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* The clip is the background: no still is rendered behind it, so there is
   nothing to fade from and nothing that could be seen first. The section's own
   dark background covers the moment before the first frame decodes. */
.eit-hero__video,
.eit-hero__poster {
	position: absolute;
	inset: 0;
	z-index: -2;
	pointer-events: none;
}

/* The poster image sits under the clip (see hero.php) and fills the banner
   the same way the video does. */
.eit-hero__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Over a moving picture the copy needs more cover than it does over a still,
   but holding the right-hand side light is the whole point — the video has to
   stay visible. So the ramp starts heavier and clears sooner. */
.eit-hero--video::after {
	background:
		linear-gradient(
			90deg,
			rgba(6, 9, 22, .94) 0%,
			rgba(6, 9, 22, .86) 26%,
			rgba(6, 9, 22, .52) 55%,
			rgba(6, 9, 22, .16) 80%,
			rgba(6, 9, 22, .06) 100%
		);
}

/* A second, very light wash top and bottom: it keeps the glass header legible
   over a bright frame and settles the buttons against the footer of the hero,
   without touching the middle where the picture does its work. */
.eit-hero--video::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		180deg,
		rgba(6, 9, 22, .38) 0%,
		rgba(6, 9, 22, 0) 26%,
		rgba(6, 9, 22, 0) 68%,
		rgba(6, 9, 22, .40) 100%
	);
}

/* Legibility wash — strongest behind the copy on the left. */
.eit-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		90deg,
		rgba(8, 10, 26, .93) 0%,
		rgba(8, 10, 26, .74) 40%,
		rgba(8, 10, 26, .30) 72%,
		rgba(8, 10, 26, .14) 100%
	);
}

/* No image chosen yet — a deep gradient instead of a flat block. */
.eit-hero--no-image {
	background: linear-gradient(118deg, #121a3c 0%, #271c50 48%, #3a2350 100%);
}
.eit-hero--no-image::after { background: none; }

/* ---------- Copy ---------- */

.eit-hero__inner {
	position: relative;
	width: 100%;
	max-width: var(--eit-wrap);
	margin-inline: auto;
	padding-inline: clamp(18px, 3vw, 30px);
}

.eit-hero__title {
	margin: 0;
	max-width: 19ch;
	color: #fff;
	font-size: clamp(32px, 5.2vw, 62px);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.eit-hero__desc {
	margin: clamp(16px, 2.4vh, 26px) 0 0;
	max-width: 52ch;
	color: rgba(255, 255, 255, .86);
	font-size: clamp(16px, 1.45vw, 20px);
	line-height: 1.62;
}

/* Side by side, wrapping rather than shrinking once the row runs out of room. */
.eit-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: clamp(24px, 3.2vh, 38px);
}

/* ---------- Tablet / mobile ---------- */

@media (max-width: 900px) {
	.eit-hero__title { max-width: 100%; }
	.eit-hero__desc { max-width: 60ch; }
}

@media (max-width: 767px) {
	/* Front page on a phone: the hero is the screen minus the logo strip under
	   it, so the first view shows the hero and the strip of client logos
	   together. --eit-logos-h is the strip's height with a little to spare;
	   the floor keeps the copy from being squeezed on a short screen. */
	body.home .eit-hero {
		--eit-logos-h: 220px;
		min-height: max(500px, calc(100vh - var(--eit-logos-h)));
		min-height: max(500px, calc(100svh - var(--eit-logos-h)));
	}

	/* Inner pages' heights stay at 50vh here too — only the wash changes.
	   A side-to-side wash stops working on a narrow column, so go vertical. */
	.eit-hero::after {
		background: linear-gradient(
			180deg,
			rgba(8, 10, 26, .72) 0%,
			rgba(8, 10, 26, .86) 60%,
			rgba(8, 10, 26, .93) 100%
		);
	}
}
