/* =============================================================================
   EM3 Open Roles page (/about/careers/open-roles/).
   A cinematic dark hero + the filterable open-roles list (reuses the .em3-cr-roles*
   markup from careers.css) + a closing CTA band. Markup contract: theme/inc/open-roles.php.
   Loads after resources.css + careers.css.
   ========================================================================== */

/* ---- 1. Cinematic dark hero --------------------------------------------- */
.em3-or-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(150px, 19vh, 232px) 0 clamp(44px, 5vw, 72px);
}
.em3-or-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-size: cover;
	background-position: center;
	transform: scale(1.06);
	animation: em3-or-hero-zoom 1.6s ease-out both;
	will-change: transform;
}
@keyframes em3-or-hero-zoom { from { transform: scale(1.13); } to { transform: scale(1.06); } }
/* Once the load zoom settles, open-roles.js adds .is-parallax and the image drifts a few px
   opposite the pointer (offsets via --em3-hero-px/py) — same as the services-page heroes. */
.em3-or-hero.is-parallax .em3-or-hero__bg {
	animation: none;
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
	transform: scale(1.06) translate3d(var(--em3-hero-px, 0px), var(--em3-hero-py, 0px), 0);
}
.em3-or-hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(5, 13, 51, 0.74) 0%, rgba(5, 13, 51, 0.6) 46%, rgba(5, 13, 51, 0.9) 100%),
		radial-gradient(120% 85% at 14% -5%, rgba(46, 93, 255, 0.3), transparent 58%);
}
.em3-or-hero:not(.has-image) .em3-or-hero__scrim {
	background: radial-gradient(125% 95% at 14% -10%, rgba(46, 93, 255, 0.34), transparent 56%);
}
.em3-or-hero__inner {
	position: relative;
}
.em3-or-hero .em3-res-breadcrumb,
.em3-or-hero .em3-res-crumb {
	margin-bottom: 20px;
}
.em3-or-hero__eyebrow {
	margin-bottom: 16px;
}
.em3-or-hero__title {
	margin: 0;
	font-size: clamp(40px, 6vw, 74px);
	line-height: 1.02;
	letter-spacing: -0.025em;
	color: #fff;
}
.em3-or-hero__sub {
	margin: 22px 0 0;
	max-width: 60ch;
	font-size: clamp(16px, 1.45vw, 19px);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}
.em3-or-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 34px;
}
.em3-or-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 44px;
	margin: 46px 0 0;
	padding: 28px 0 0;
	list-style: none;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.em3-or-hero__stat {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.em3-or-hero__statv {
	font-size: clamp(34px, 4vw, 46px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--em3-accent-hot, #6a8aff);
}
.em3-or-hero__statl {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

/* ---- 2. Open-roles section (reuses .em3-cr-head + .em3-cr-roles*) -------- */
.em3-or-roles .em3-cr-head {
	max-width: 720px;
	margin-bottom: clamp(28px, 3.5vw, 44px);
}
.em3-or-roles .em3-cr-head__intro {
	margin: 12px 0 0;
}

/* ---- 3. Closing CTA (white band, readable) ------------------------------ */
.em3-or-cta .em3-cta-block {
	text-align: center;
	max-width: 720px;
	margin: 0 auto;
}
.em3-or-cta .em3-eyebrow { justify-content: center; }
.em3-or-cta h2 { color: var(--em3-ink-navy); }
.em3-or-cta .em3-cta-sub {
	max-width: 56ch;
	margin: 16px auto 0;
	color: var(--em3-charcoal);
	font-size: 17px;
	line-height: 1.55;
}
.em3-or-cta .em3-cta-actions { margin-top: 28px; }

/* ---- 4. Apply modal — the "Send your CV" Gravity Form popup -------------- */
.em3-or-modal {
	position: fixed;
	inset: 0;
	z-index: 10000; /* above the fixed nav (9999) so the header never overlaps the popup */
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(40px, 8vh, 80px) 16px clamp(24px, 5vh, 48px);
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.em3-or-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.em3-or-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(4, 9, 28, 0.62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
.em3-or-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 640px;
	margin: auto;
	background: #fff;
	border-radius: var(--em3-radius-card);
	padding: clamp(26px, 4vw, 44px);
	box-shadow: 0 40px 90px -30px rgba(4, 9, 28, 0.55);
	transform: translateY(14px);
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.em3-or-modal.is-open .em3-or-modal__panel { transform: none; }
.em3-or-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0;
	line-height: 0;
	background: transparent;
	border: 1px solid var(--em3-line-onwhite, #e7ebf3);
	border-radius: var(--em3-radius);
	color: var(--em3-ink-navy);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.em3-or-modal__close:hover,
.em3-or-modal__close:focus { background: var(--em3-ink-navy); color: #fff; border-color: var(--em3-ink-navy); }
.em3-or-modal__close svg { width: 18px; height: 18px; }
.em3-or-modal__head { margin-bottom: 24px; padding-right: 36px; }
.em3-or-modal__head .em3-eyebrow { margin-bottom: 12px; }
.em3-or-modal__head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); color: var(--em3-ink-navy); }
.em3-or-modal__sub { margin: 8px 0 0; color: var(--em3-charcoal); font-size: 15px; line-height: 1.5; }
/* the form sits inside the modal card, so strip the .em3-job-applybox card chrome */
.em3-or-modal .em3-job-applybox { background: none; border: 0; box-shadow: none; padding: 0; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 640px) {
	.em3-or-hero {
		padding-top: clamp(124px, 22vh, 160px);
	}
	.em3-or-hero__stats {
		gap: 32px;
	}
	.em3-or-hero__actions .em3-btn-primary,
	.em3-or-hero__actions .em3-btn-ghost {
		flex: 1 1 auto;
		text-align: center;
		justify-content: center;
	}
}
