/*
 * Hadof clarity layer V17.
 *
 * Reduces visual ambiguity and repeated full-screen treatments while keeping
 * every decision path, source boundary and progressive interaction available.
 */

:root {
	--hc17-ink: #101a26;
	--hc17-copy: #435367;
	--hc17-muted: #667488;
	--hc17-line: #d7dfe6;
	--hc17-mist: #f2f5f7;
	--hc17-paper: #fff;
	--hc17-orange: #f59b1a;
	--hc17-blue: #235fd2;
	--hc17-shell: min(100% - 48px, 1320px);
}

/* Keep the primary reading rhythm calm and reduce repeated oversized chapters. */
body :is(.hadof-x3, .hx-detail) :is(.hx-section, .hadof-section, .hadof-v2-section) {
	scroll-margin-top: 88px;
}

body .hadof-x3 > .hx-section,
body .hx-detail > :is(.hx-section, .hadof-section, .hadof-v2-section) {
	padding-block: clamp(3.5rem, 5.5vw, 5rem);
}

body :is(.hadof-x3, .hx-detail) :is(.hx-section-head, .hadof-v2-section__head, .hadof-section__head) {
	margin-bottom: clamp(1.8rem, 3vw, 2.6rem);
}

body :is(.hadof-x3, .hx-detail) :is(.hx-section-head, .hadof-v2-section__head, .hadof-section__head) h2 {
	font-size: clamp(2rem, 3vw, 3.15rem);
	line-height: 1.08;
	max-width: 22ch;
}

body :is(.hadof-x3, .hx-detail) :is(.hx-section-head--split, .hadof-v2-section__head) > p {
	max-width: 54ch;
}

/*
 * First-level hubs use a clear editorial split. This intentionally overrides
 * the older high-specificity full-bleed overlay treatment from V6.
 */
body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero {
	background: var(--hc17-mist);
	color: var(--hc17-ink);
	overflow: visible;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
	margin: 0 auto;
	max-width: 1440px;
	min-height: clamp(500px, 57vw, 610px);
	position: relative;
	width: 100%;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__grid::after {
	display: none;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
	align-content: center;
	background: var(--hc17-mist);
	display: grid;
	grid-area: auto;
	margin: 0;
	padding: clamp(3.5rem, 6vw, 5.5rem) clamp(2rem, 5vw, 5.25rem) clamp(3.5rem, 6vw, 5.5rem) max(32px, calc((100vw - 1320px) / 2));
	position: relative;
	width: auto;
	z-index: 1;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy > * {
	max-width: 620px;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy .hx-eyebrow {
	color: #9b4f00 !important;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy h1 {
	color: var(--hc17-ink) !important;
	font-size: clamp(2.75rem, 4.2vw, 4.25rem);
	letter-spacing: -.035em;
	line-height: 1.01;
	max-width: 15ch;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy > p:not(.hx-eyebrow) {
	color: var(--hc17-copy) !important;
	font-size: clamp(1rem, 1.25vw, 1.15rem);
	line-height: 1.65;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media {
	grid-area: auto;
	height: auto;
	margin: 0;
	min-height: inherit;
	position: relative;
	width: auto;
	z-index: 0;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media img,
body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media--contain img {
	background: #dfe5e8;
	height: 100%;
	inset: 0;
	object-fit: cover;
	object-position: center;
	opacity: 1 !important;
	padding: 0;
	position: absolute;
	width: 100%;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media figcaption {
	background: rgba(9, 17, 25, .86) !important;
	bottom: 0;
	color: #e8edf0 !important;
	font-size: .76rem;
	left: 0;
	max-width: 100%;
	padding: .7rem 1rem;
	right: 0;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-actions .hx-button--quiet {
	background: var(--hc17-paper);
	border-color: var(--hc17-line);
	color: var(--hc17-ink);
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis {
	gap: 0;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 1.8rem;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis > span {
	border: 0;
	border-left: 1px solid #c7d0d8;
	color: var(--hc17-copy) !important;
	padding: .15rem .9rem;
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis > span:first-child {
	border-left: 3px solid var(--hc17-orange);
}

body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis b {
	color: var(--hc17-ink) !important;
}

/* Short, useful local navigation without a second visually dominant header. */
body :is(.hadof-x3, .hx-detail) :is(.hx-subnav, .hadof-v2-anchor, .hadof-anchor-nav) {
	box-shadow: 0 8px 24px rgba(16, 26, 38, .05);
}

body .hadof-x3 .hx-subnav a {
	border-right: 1px solid #e2e7eb;
	min-height: 52px;
	padding: .9rem 1.3rem;
}

/* Replace repeated floating-card effects with open, scan-friendly modules. */
body .hadof-x3 :is(.hx-decision-modules, .hx-evidence-grid) > * {
	border-radius: 0;
	box-shadow: none;
}

body .hadof-x3 .hx-decision-modules > * {
	background: transparent;
	border: 0;
	border-top: 3px solid #cad4dc;
	padding: 1.45rem 0 0;
}

body .hadof-x3 .hx-decision-modules > *:first-child {
	border-top-color: var(--hc17-orange);
}

body .hadof-x3 .hx-evidence-grid > * {
	border: 1px solid rgba(255, 255, 255, .16);
	padding: clamp(1.5rem, 2.5vw, 2.25rem);
}

body .hadof-x3 .hx-evidence-grid > * + * {
	border-left: 0;
}

/* Keep detail heroes visual, but avoid full-screen blocks and clipped decision rails. */
body .hx-detail :is(.hadof-v2-hero, .hadof-product-hero, .hadof-pro-hero) {
	min-height: clamp(500px, 58vw, 590px);
}

body .hx-detail :is(.hadof-v2-hero, .hadof-product-hero, .hadof-pro-hero)::after {
	background: linear-gradient(90deg, rgba(7, 13, 18, .91), rgba(7, 13, 18, .62) 43%, rgba(7, 13, 18, .08) 78%);
}

body .hx-detail :is(.hadof-v2-hero h1, .hadof-product-hero h1, .hadof-pro-hero h1) {
	font-size: clamp(2.75rem, 4.6vw, 4.5rem);
	line-height: 1;
}

body .hx-detail .hadof-pro-intent {
	box-shadow: none;
}

body .hx-detail .hadof-pro-intent span {
	border-right-color: rgba(255, 255, 255, .1);
}

/* Supporting pages should introduce the task without a large empty dark slab. */
body .hadof-delivery-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(22rem, .72fr);
	column-gap: clamp(3rem, 7vw, 7rem);
	align-items: end;
	min-height: 0;
	padding-block: clamp(3.5rem, 6vw, 5.25rem);
}

body .hadof-delivery-hero > .hadof-kicker {
	grid-column: 1 / -1;
}

body .hadof-delivery-hero h1 {
	font-size: clamp(3rem, 5vw, 4.65rem);
	max-width: 15ch;
}

body .hadof-delivery-hero > p:last-child {
	max-width: 48ch;
	margin-bottom: .35rem;
}

/* Compact, high-contrast project form with one obvious action path. */
body .hadof-inquiry-dialog {
	border-radius: 14px;
	max-height: min(90dvh, 860px);
	max-width: min(900px, calc(100vw - 2rem));
}

body .hadof-inquiry-dialog::backdrop {
	backdrop-filter: blur(3px);
	background: rgba(8, 16, 25, .68);
}

body .hadof-inquiry-dialog__surface {
	max-height: min(90dvh, 860px);
}

body .hadof-inquiry-dialog__header {
	align-items: center;
	background: var(--hc17-ink);
	border-bottom: 3px solid var(--hc17-orange);
	gap: 1rem;
	padding: 1.05rem clamp(1.25rem, 3vw, 2rem);
}

body .hadof-inquiry-dialog__header > div > span,
body .hadof-inquiry-band .hadof-inquiry-dialog__header > div > span {
	color: #ffb84e !important;
}

body .hadof-inquiry-dialog__header h2,
body .hadof-inquiry-band .hadof-inquiry-dialog__header h2 {
	color: #fff !important;
	font-size: clamp(1.45rem, 2.4vw, 2rem);
	line-height: 1.12;
	margin: .2rem 0 .25rem;
}

body .hadof-inquiry-dialog__header p,
body .hadof-inquiry-band .hadof-inquiry-dialog__header p {
	color: #cbd6df !important;
	font-size: .84rem;
	line-height: 1.4;
	max-width: 68ch;
}

body .hadof-inquiry-dialog__close {
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 6px;
	color: #fff;
	flex-basis: 40px;
	height: 40px;
	width: 40px;
}

body .hadof-inquiry-dialog .hadof-inquiry-form {
	gap: .9rem;
	margin: 0;
	padding: 1.3rem clamp(1.25rem, 3vw, 2rem) 1.5rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__intro {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--hc17-line);
	display: flex;
	gap: .65rem 1.2rem;
	justify-content: space-between;
	padding: 0 0 .8rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__intro b {
	flex: 0 0 auto;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__intro span {
	max-width: 62ch;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__grid {
	column-gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	row-gap: .75rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__contact-number {
	grid-column: auto;
}

body .hadof-inquiry-dialog .hadof-inquiry-form label > span {
	font-size: .78rem;
	line-height: 1.3;
}

body .hadof-inquiry-dialog .hadof-inquiry-form :is(input, select) {
	min-height: 43px;
}

body .hadof-inquiry-dialog .hadof-inquiry-form textarea {
	min-height: 104px;
	resize: vertical;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__message {
	gap: .35rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__context {
	background: var(--hc17-mist);
	padding: .7rem .85rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__consent {
	align-items: flex-start;
	display: grid;
	gap: .65rem;
	grid-template-columns: 18px 1fr;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__consent input {
	height: 18px;
	margin-top: 1px;
	min-height: 18px;
	width: 18px;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__status {
	margin: 0;
	padding: .65rem .8rem;
}

body .hadof-inquiry-dialog .hadof-inquiry-form > button[type="submit"] {
	justify-self: start;
	margin: 0;
	min-width: 220px;
}

body .hadof-inquiry-dialog .hadof-inquiry-form__fallback {
	margin: 0;
}

/* The launch panel carries one concise promise instead of another full form preview. */
body .hadof-inquiry-launch {
	box-shadow: none;
	padding: clamp(1.5rem, 3vw, 2rem);
}

body .hadof-inquiry-launch > p {
	max-width: 46ch;
}

@media (max-width: 900px) {
	:root {
		--hc17-shell: min(100% - 32px, 1320px);
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__grid {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
		grid-area: auto;
		padding: 3.5rem max(24px, 5vw) 3rem;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media {
		grid-area: auto;
		min-height: clamp(270px, 68vw, 430px);
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__media img {
		position: absolute;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis > span:nth-child(n) {
		display: block;
	}

	body .hx-detail :is(.hadof-v2-hero, .hadof-product-hero, .hadof-pro-hero) {
		min-height: 560px;
	}

	body .hx-detail :is(.hadof-v2-hero, .hadof-product-hero, .hadof-pro-hero)::after {
		background: linear-gradient(0deg, rgba(7, 13, 18, .94), rgba(7, 13, 18, .57) 62%, rgba(7, 13, 18, .16));
	}
}

@media (max-width: 640px) {
	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy {
		padding: 2.8rem 16px 2.3rem;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-hero__copy h1 {
		font-size: clamp(2.35rem, 10.5vw, 3rem);
		line-height: 1.03;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-actions {
		align-items: stretch;
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-actions a {
		align-items: center;
		display: flex;
		justify-content: center;
		padding-inline: .8rem;
		text-align: center;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis {
		border-top: 1px solid var(--hc17-line);
		grid-template-columns: 1fr;
		margin-top: 1.5rem;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis > span {
		border-bottom: 1px solid var(--hc17-line);
		border-left: 0;
		padding: .75rem 0;
	}

	body .hadof-x3:not(.hadof-x3-home) > .hx-hub-hero .hx-hub-basis > span:first-child {
		border-left: 0;
	}

	body .hadof-x3 .hx-subnav .hx-shell,
	body .hx-detail :is(.hadof-v2-anchor, .hadof-anchor-nav) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		overflow: visible;
	}

	body .hadof-x3 .hx-subnav a,
	body .hx-detail :is(.hadof-v2-anchor, .hadof-anchor-nav) a {
		align-items: center;
		display: flex;
		min-width: 0;
		white-space: normal;
	}

	body .hx-detail .hadof-pro-intent,
	body .hx-detail .hadof-v2-proofbar__inner {
		display: grid;
		gap: 0;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		overflow: visible;
	}

	body .hx-detail .hadof-pro-intent span,
	body .hx-detail .hadof-v2-proofbar span {
		border-bottom: 1px solid rgba(255, 255, 255, .1);
		flex: none;
		min-width: 0;
		padding: 1rem .85rem;
	}

	body .hx-detail :is(.hadof-v2-hero, .hadof-product-hero, .hadof-pro-hero) {
		min-height: 520px;
	}

	body .hx-detail :is(.hadof-v2-hero h1, .hadof-product-hero h1, .hadof-pro-hero h1) {
		font-size: clamp(2.45rem, 11vw, 3.25rem);
	}

	body .hadof-delivery-hero {
		display: block;
		padding-block: 3.5rem;
	}

	body .hadof-delivery-hero h1 {
		font-size: clamp(2.6rem, 12vw, 3.4rem);
	}

	body .hadof-inquiry-dialog {
		border-radius: 8px;
		max-height: calc(100dvh - 1rem);
		max-width: calc(100vw - 1rem);
	}

	body .hadof-inquiry-dialog__surface {
		max-height: calc(100dvh - 1rem);
	}

	body .hadof-inquiry-dialog__header {
		align-items: flex-start;
		padding: .85rem 1rem;
	}

	body .hadof-inquiry-dialog__header p {
		display: none;
	}

	body .hadof-inquiry-dialog .hadof-inquiry-form {
		gap: .8rem;
		padding: 1rem;
	}

	body .hadof-inquiry-dialog .hadof-inquiry-form__intro {
		display: grid;
		gap: .25rem;
	}

	body .hadof-inquiry-dialog .hadof-inquiry-form__grid {
		grid-template-columns: 1fr;
	}

	body .hadof-inquiry-dialog .hadof-inquiry-form textarea {
		min-height: 120px;
	}

	body .hadof-inquiry-dialog .hadof-inquiry-form > button[type="submit"] {
		justify-self: stretch;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .hadof-inquiry-dialog::backdrop {
		backdrop-filter: none;
	}
}
