/* =========================================================
   Global Page Hero
   ========================================================= */

.jpd-page-hero {
	overflow: hidden;
	background: #fff;
}

.jpd-page-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	width: min(1536px, 100%);
	min-height: clamp(370px, 34vw, 500px);
	margin-inline: auto;
}

.jpd-page-hero__copy {
	position: relative;
	z-index: 1;
	padding:
		clamp(40px, 6vw, 92px)
		clamp(24px, 5vw, 92px);
}

.jpd-page-hero__title {
	margin: 0;
	color: #15256e;
	font-size: clamp(2rem, 3.1vw, 2.75rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-transform: uppercase;
}

.jpd-page-hero__subtitle {
	margin: .35rem 0 0;
	color: #0755a0;
	font-size: clamp(1.25rem, 2.2vw, 2rem);
	font-weight: 500;
	line-height: 1.2;
	text-transform: uppercase;
}

.jpd-page-hero__desc {
	max-width: 34rem;
	margin: 1rem 0 0;
	color: #161616;
	font-size: clamp(1rem, 1.35vw, 1.35rem);
	line-height: 1.5;
}


/* =========================================================
   Hero Media
   ========================================================= */

.jpd-page-hero__media {
	position: relative;
	align-self: stretch;
	min-width: 0;
	overflow: hidden;
	box-sizing: border-box;
	background: #fff;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.jpd-page-hero__media.is-loaded {
	opacity: 1;
}

.jpd-page-hero__media-inner {
	position: relative;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 2.5rem;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}


/* ── Fades ───────────────────────────────────────────────── */

.jpd-page-hero__media::before {
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(
			to right,
			#fff 0%,
			rgba(255, 255, 255, 0) 18%,
			rgba(255, 255, 255, 0) 82%,
			#fff 100%
		),
		linear-gradient(
			to bottom,
			#fff 0%,
			rgba(255, 255, 255, 0) 18%
		);
	content: '';
	pointer-events: none;
}

.jpd-page-hero__media::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	height: 22%;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0),
		#fff 88%
	);
	content: '';
	pointer-events: none;
}


/* ── Canvas (visible banner) ─────────────────────────────── */

.jpd-page-hero__media-canvas {
	display: block;
	width: 100%;
	height: 100%;
	background: #fff;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}

/*
 * Source <video> is taken off the visual layout so browsers (Opera,
 * Chrome, Edge, Firefox) cannot attach a media HUD / next / pop-out
 * overlay to it. Frames are painted onto the canvas instead.
 */
.jpd-page-hero__media-video {
	position: fixed;
	left: -10000px;
	top: 0;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	opacity: 0;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
}


/* ── Images ──────────────────────────────────────────────── */

.jpd-page-hero__media-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center right;
	background: #fff;
}


/* ── Video fallback ──────────────────────────────────────── */

.jpd-page-hero__media-img--fallback {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center right;
	background: #fff;
}

.jpd-page-hero__media-img--fallback[hidden] {
	display: none;
}


/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	.jpd-page-hero__media-video,
	.jpd-page-hero__media-canvas {
		display: none;
	}
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 768px) {

	.jpd-page-hero__inner {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.jpd-page-hero__copy {
		padding: 38px 20px 16px;
	}

	.jpd-page-hero__media {
		height: auto;
	}

	.jpd-page-hero__media-inner {
		width: 100%;
		height: auto;
		padding: 0;
	}

	.jpd-page-hero__media-canvas {
		width: 100%;
		height: auto;
		aspect-ratio: 1536 / 1024;
	}

	.jpd-page-hero__media-img {
		width: 100%;
		height: auto;
		object-fit: contain;
		object-position: center;
	}

	.jpd-page-hero__media-img--fallback {
		position: static;
		width: 100%;
		height: clamp(230px, 66vw, 390px);
		object-fit: contain;
		object-position: center;
	}

	.jpd-page-hero__media::before,
	.jpd-page-hero__media::after {
		pointer-events: none;
	}
}