/*
 * Hadof Immersive V24.
 *
 * Replaces split-panel heroes with one uninterrupted visual field and closes
 * the remaining solid-background contrast gaps found in the V22/V23 cascade.
 */

:root {
	--hi24-ink: #0d1823;
	--hi24-ink-soft: #16283a;
	--hi24-copy: #d5dee6;
	--hi24-line-dark: rgba(255, 255, 255, .2);
	--hi24-line-light: #d7e0e6;
	--hi24-orange: #f59b1a;
	--hi24-orange-soft: #ffc568;
	--hi24-orange-dark: #9a4d00;
	--hi24-blue: #245ac4;
	--hi24-blue-soft: #a9c6ff;
}

/* One image, one message, one action: never a left card beside a right image. */
body.hadof-v2-content .hx-hub-hero {
	background: var(--hi24-ink);
	overflow: hidden;
}

body.hadof-v2-content .hx-hub-hero > .hx-hub-hero__grid,
body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) !important;
	grid-template-rows: minmax(clamp(620px, 76vh, 820px), auto);
	margin: 0 !important;
	max-width: none !important;
	min-height: clamp(620px, 76vh, 820px) !important;
	padding: 0 !important;
	position: relative;
	width: 100% !important;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media {
	grid-area: 1 / 1 !important;
	height: 100%;
	margin: 0;
	min-height: inherit !important;
	overflow: hidden;
	position: relative;
	z-index: 0;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media img {
	filter: saturate(1.04) contrast(1.06);
	height: 100% !important;
	inset: 0;
	object-fit: cover !important;
	object-position: center;
	position: absolute;
	width: 100% !important;
	z-index: 0 !important;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media::after {
	background: rgba(7, 16, 25, .1);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 2;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy,
body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
	align-content: center;
	background: linear-gradient(90deg, rgba(7, 16, 25, .96) 0%, rgba(7, 16, 25, .86) 37%, rgba(7, 16, 25, .44) 67%, rgba(7, 16, 25, .12) 100%) !important;
	color: #fff;
	display: grid;
	grid-area: 1 / 1;
	justify-items: start;
	max-width: none !important;
	min-width: 0;
	padding: clamp(4rem, 8vh, 7rem) max(28px, calc((100vw - 1320px) / 2)) !important;
	padding-right: max(28px, 50vw) !important;
	position: relative;
	width: 100%;
	z-index: 3;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy > * {
	max-width: 650px;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy h1,
body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy h1 {
	color: #fff !important;
	font-size: clamp(3.35rem, 5.2vw, 5.8rem);
	hyphens: none;
	letter-spacing: -.045em;
	line-height: .95;
	max-width: 16ch !important;
	overflow-wrap: normal !important;
	text-wrap: balance;
	word-break: keep-all !important;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy > .hx-eyebrow {
	color: var(--hi24-orange-soft) !important;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy > p:not(.hx-eyebrow) {
	color: var(--hi24-copy) !important;
	font-size: clamp(1.05rem, 1.35vw, 1.24rem);
	line-height: 1.62;
	max-width: 48ch;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy .hx-actions > a:not(:first-child),
body.hadof-v2-content .hx-hub-hero .hx-hub-basis {
	display: none !important;
}

body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media figcaption {
	background: rgba(7, 16, 25, .76);
	bottom: 0;
	color: #d5dee6;
	font-size: .72rem;
	left: auto;
	max-width: min(48ch, 48vw);
	padding: .75rem 1rem;
	position: absolute;
	right: 0;
	z-index: 3;
}

/* The evidence chapter is one dark narrative field, not pale framed slices. */
body.hadof-v2-content .hadof-x3-home > #evidence {
	background: var(--hi24-ink) !important;
	color: #fff !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-section-head--split {
	grid-template-columns: minmax(0, 1fr) !important;
	max-width: 900px;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-section-head--split > p {
	justify-self: start !important;
	max-width: 58ch !important;
	width: auto !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence :is(h2, h3) {
	color: #fff !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence :is(.hx-section-head > p, .hx-evidence-grid p) {
	color: var(--hi24-copy) !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-eyebrow,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid span,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid b {
	color: var(--hi24-orange-soft) !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid {
	background: transparent;
	border-block: 1px solid var(--hi24-line-dark);
	gap: 0;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:hover,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:focus-visible {
	background: transparent !important;
	border: 0 !important;
	border-right: 1px solid var(--hi24-line-dark) !important;
	color: #fff !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:last-child {
	border-right: 0 !important;
}

body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:hover,
body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:focus-visible {
	background: var(--hi24-ink-soft) !important;
}

/* Close the remaining solid-surface contrast defects. */
body.hadof-v2-content .hadof-x3-home .hx-route-console[data-hx-route-planner] .hx-route-console__tabs button small,
body.hadof-v2-content .hadof-x3-home .hx-case-list small {
	color: #536276 !important;
}

body.hadof-v2-content .hx-button--dark {
	background: var(--hi24-ink) !important;
	color: #fff !important;
}

body.hadof-v2-content .hx-button--dark:hover,
body.hadof-v2-content .hx-button--dark:focus-visible {
	background: var(--hi24-blue) !important;
}

body.hadof-v2-content .hadof-v2-footer__cta {
	background: var(--hi24-orange) !important;
	color: var(--hi24-ink) !important;
}

body.hadof-v2-content :is(.hx-button, .hadof-button, .hadof-v2-footer__cta) {
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}

/* Small labels must remain readable without turning every module into a card. */
body.hadof-v2-content :is(
	.hadof-v2-risk-map,
	.hx-service-route-grid,
	.hx-freeze-family-map,
	.hx-catalog-acceptance,
	.hx-freeze-fit-grid,
	.hx-freeze-sizing,
	.hx-freeze-gates
) span {
	color: var(--hi24-orange-dark) !important;
}

body.hadof-v2-content .hx-workbench__tabs button span {
	color: var(--hi24-blue-soft) !important;
}

body.hadof-v2-content .hx-workbench.hx-freeze-route .hx-workbench__tabs button span {
	color: var(--hi24-orange-dark) !important;
}

body.hadof-v2-content .hadof-v2-flow__tab[aria-selected="true"] span,
body.hadof-v2-content .hadof-v2-flow__tab.is-active span {
	color: #fff !important;
}

body.hadof-v2-content .hadof-v2-models__summary small {
	color: #4f6070 !important;
}

body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) .hx-evidence-grid span {
	color: var(--hi24-blue) !important;
}

body.hadof-v2-content .hx-section--ink .hx-evidence-grid span {
	color: var(--hi24-blue-soft) !important;
}

body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) .hx-section--ink .hx-evidence-grid span {
	color: var(--hi24-blue-soft) !important;
}

body.hadof-v2-content .hadof-v2-section--white .hadof-v2-evidence span,
body.hadof-v2-content .hx-packaging-acceptance-grid > div > span {
	color: var(--hi24-orange-dark) !important;
}

body.hadof-v2-content .hadof-v2-evidence span {
	color: var(--hi24-orange-dark) !important;
}

body.hadof-v2-content .hadof-v2-section--ink .hadof-v2-risk-map span {
	color: var(--hi24-orange-soft) !important;
}

body.hadof-v2-content .hadof-v2-section--ink .hadof-v2-evidence span {
	color: var(--hi24-orange-soft) !important;
}

body.hadof-v2-content .hx-catalog-aligned.hx-packaging-catalog .hx-packaging-acceptance-grid span {
	color: var(--hi24-orange-dark) !important;
}

body.hadof-v2-content :is(.hadof-v2-section--ink, .hx-section--ink, .hx-event-section--ink) a:not(.hx-button),
body.hadof-v2-content .hx-freeze-package :is(a, b),
body.hadof-v2-content .hx-event-section--ink .hx-event-agenda span,
body.hadof-v2-content .hadof-study-output a:not(.hadof-button) {
	color: var(--hi24-blue-soft) !important;
}

body.hadof-v2-content .hadof-editorial-visual figcaption span {
	color: var(--hi24-copy) !important;
}

body.hadof-v2-content a.hadof-pro-inline-link {
	color: var(--hi24-blue) !important;
}

body.hadof-v2-content :is(.hadof-v2-section--ink, .hx-section--ink, .hx-event-section--ink) a.hadof-pro-inline-link {
	color: var(--hi24-blue-soft) !important;
}

body.hadof-v2-content :is(.hadof-section--muted, .hx-event-prepare) p a {
	color: var(--hi24-blue) !important;
}

@media (max-width: 900px) {
	body.hadof-v2-content .hx-hub-hero > .hx-hub-hero__grid,
	body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__grid {
		grid-template-rows: minmax(clamp(600px, 84svh, 760px), auto);
		min-height: clamp(600px, 84svh, 760px) !important;
	}

	body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy,
	body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
		background: linear-gradient(180deg, rgba(7, 16, 25, .12) 0%, rgba(7, 16, 25, .34) 35%, rgba(7, 16, 25, .94) 72%, rgba(7, 16, 25, .98) 100%) !important;
	}

	body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy,
	body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
		align-content: end;
		padding: clamp(9rem, 34vh, 15rem) max(24px, 6vw) 4rem !important;
	}

	body.hadof-v2-content .hx-hub-hero .hx-hub-hero__copy h1,
	body.hadof-v2-content .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy h1 {
		font-size: clamp(2.55rem, 10vw, 4.15rem);
		max-width: 16ch !important;
	}

	body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media figcaption {
		display: none;
	}

	body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a,
	body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:last-child {
		border-bottom: 1px solid var(--hi24-line-dark) !important;
		border-right: 0 !important;
	}

	body.hadof-v2-content .hadof-x3-home > #evidence .hx-evidence-grid > a:last-child {
		border-bottom: 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.hadof-v2-content .hx-hub-hero .hx-hub-hero__media img {
		transition: none;
	}
}
