/*
 * Hadof Content System 2.0.7
 * Final visual-integrity layer for public pages.
 * It binds foreground color to the actual component background and restores
 * visible technical-parameter disclosures after the cumulative design layers.
 */

:root {
	--hv7-ink: #101923;
	--hv7-copy: #526173;
	--hv7-dark-copy: #d5dde3;
	--hv7-orange: #ff9f1c;
	--hv7-mist: #f3f5f6;
}

/* Explicit dark surfaces: never allow an inherited dark foreground. */
body :is(
	.hadof-delivery-hero,
	.hadof-company-hero,
	.hadof-contact-hero,
	.hadof-study-hero,
	.hadof-case-hero,
	.hadof-v2-hero,
	.hadof-pro-hero,
	.hx-section--ink,
	.hadof-v2-section--ink,
	.hadof-inquiry-band
) {
	color: #fff;
}

body :is(
	.hadof-delivery-hero,
	.hadof-company-hero,
	.hadof-contact-hero,
	.hadof-study-hero,
	.hadof-case-hero,
	.hadof-v2-hero,
	.hadof-pro-hero,
	.hx-section--ink,
	.hadof-v2-section--ink,
	.hadof-inquiry-band
) :is(h1, h2, h3, h4, strong, dt) {
	color: #fff !important;
}

body :is(
	.hadof-delivery-hero,
	.hadof-company-hero,
	.hadof-contact-hero,
	.hadof-study-hero,
	.hadof-case-hero,
	.hadof-v2-hero,
	.hadof-pro-hero,
	.hx-section--ink,
	.hadof-v2-section--ink,
	.hadof-inquiry-band
) :is(p, li, dd, small) {
	color: var(--hv7-dark-copy) !important;
}

body :is(
	.hadof-delivery-hero,
	.hadof-company-hero,
	.hadof-contact-hero,
	.hadof-study-hero,
	.hadof-case-hero,
	.hadof-v2-hero,
	.hadof-pro-hero,
	.hx-section--ink,
	.hadof-v2-section--ink,
	.hadof-inquiry-band
) :is(.hadof-kicker, .hadof-eyebrow, .hadof-v2-eyebrow, .hx-eyebrow) {
	color: #fff1d8 !important;
}

body :is(.hx-section--ink, .hadof-v2-section--ink, .hadof-inquiry-band) :is(.hx-button--ghost, .hx-button--quiet, .hadof-button--secondary) {
	background: rgba(255, 255, 255, .1);
	color: #fff !important;
}

/* Inquiry launch and dialog surfaces are light panels inside a dark CTA band. */
body .hadof-inquiry-band :is(.hadof-inquiry-launch, .hadof-inquiry-form) {
	color: var(--hv7-ink);
}

body .hadof-inquiry-band :is(.hadof-inquiry-launch, .hadof-inquiry-form) :is(h2, h3, h4, strong, b, dt, label, summary) {
	color: var(--hv7-ink) !important;
}

body .hadof-inquiry-band :is(.hadof-inquiry-launch, .hadof-inquiry-form) :is(p, span, li, dd, small) {
	color: var(--hv7-copy) !important;
}

/*
 * Component surfaces used by the legacy and V3 page families.  These rules
 * are deliberately component-scoped: several dark sections contain white
 * data panels, so a blanket descendant color would make one side unreadable.
 */
body :is(
	.hx-feature__copy,
	.hx-news-feature__copy,
	.hx-event-hero__copy,
	.hx-event-section--ink,
	.hadof-water-system__copy,
	.hadof-verification-band,
	.hadof-equipment-window > div:first-child,
	.hadof-study-output,
	.hx-project,
	.hadof-brief-submit
) {
	color: #fff;
}

body :is(
	.hx-feature__copy,
	.hx-news-feature__copy,
	.hx-event-hero__copy,
	.hx-event-section--ink,
	.hadof-water-system__copy,
	.hadof-verification-band,
	.hadof-equipment-window > div:first-child,
	.hadof-study-output,
	.hx-project,
	.hadof-brief-submit
) :is(h1, h2, h3, h4, strong, b, dt) {
	color: #fff !important;
}

body :is(
	.hx-feature__copy,
	.hx-news-feature__copy,
	.hx-event-hero__copy,
	.hx-event-section--ink,
	.hadof-water-system__copy,
	.hadof-verification-band,
	.hadof-equipment-window > div:first-child,
	.hadof-study-output,
	.hx-project,
	.hadof-brief-submit
) :is(p, li, dd, small) {
	color: #e3eaf0 !important;
}

body :is(
	.hx-feature__copy,
	.hx-news-feature__copy,
	.hx-event-hero__copy,
	.hx-event-section--ink,
	.hadof-water-system__copy,
	.hadof-verification-band,
	.hadof-equipment-window > div:first-child,
	.hadof-study-output,
	.hx-project,
	.hadof-brief-submit
) :is(.hadof-kicker, .hadof-eyebrow, .hadof-v2-eyebrow, .hx-eyebrow) {
	color: #fff1d8 !important;
}

/* White and pale panels nested inside dark sections use the normal ink set. */
body :is(
	.hadof-v2-flow__copy,
	.hadof-v2-models__data,
	.hadof-pro-model-browser__panels article,
	.hadof-evidence-window__intro,
	.hadof-evidence-window__items article,
	.hadof-configuration-map aside,
	.hx-faq-block details,
	.hadof-faq details
) {
	color: var(--hv7-ink);
}

body :is(
	.hadof-v2-flow__copy,
	.hadof-v2-models__data,
	.hadof-pro-model-browser__panels article,
	.hadof-evidence-window__intro,
	.hadof-evidence-window__items article,
	.hadof-configuration-map aside,
	.hx-faq-block details,
	.hadof-faq details
) :is(h2, h3, h4, strong, b, dt, summary) {
	color: var(--hv7-ink) !important;
}

body :is(
	.hadof-v2-flow__copy,
	.hadof-v2-models__data,
	.hadof-pro-model-browser__panels article,
	.hadof-evidence-window__intro,
	.hadof-evidence-window__items article,
	.hadof-configuration-map aside,
	.hx-faq-block details,
	.hadof-faq details
) :is(p, li, dd, small) {
	color: var(--hv7-copy) !important;
}

body :is(.hadof-v2-flow__copy, .hadof-evidence-window__intro) :is(.hadof-eyebrow, .hadof-v2-eyebrow, .hx-eyebrow),
body .hadof-pro-model-browser__panels article > div > span {
	color: #b35d00 !important;
}

body :is(.hx-faq-block, .hadof-faq) details,
body :is(.hx-faq-block, .hadof-faq) details[open] {
	background: var(--hv7-mist) !important;
}

body :is(.hx-faq-block, .hadof-faq) details > :not(summary) {
	color: var(--hv7-copy) !important;
}

body .hx-project .hx-eyebrow {
	color: #fff1d8 !important;
}

body .hadof-v2-open-item {
	background: #fff5e8;
	color: #26343f !important;
}

body .hadof-v2-open-item :is(b, strong) {
	color: var(--hv7-ink) !important;
}

/* The rendered parameter shortcode is an always-visible decision module. */
body .hadof-parameters {
	background: var(--hv7-mist);
	color: var(--hv7-ink);
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}

body .hadof-parameters__grid {
	display: grid !important;
	opacity: 1 !important;
	visibility: visible !important;
}

body .hadof-parameters__grid > div {
	background: transparent;
	min-width: 0;
	opacity: 1 !important;
	visibility: visible !important;
}

body .hadof-parameters__grid dt {
	color: #4e5d6d !important;
}

body .hadof-parameters__grid dd {
	color: var(--hv7-ink) !important;
	overflow-wrap: anywhere;
}

/* The delivery page previously inherited near-black copy on its dark hero. */
body .hadof-delivery-hero {
	min-height: 0;
	padding-block: clamp(4rem, 7vw, 6rem);
}

body .hadof-delivery-hero h1 {
	font-size: clamp(3rem, 5.2vw, 5rem);
	letter-spacing: -.04em;
	line-height: 1;
	max-width: 18ch;
}

body .hadof-delivery-hero > p:last-child {
	font-size: clamp(1rem, 1.3vw, 1.15rem);
	line-height: 1.7;
	max-width: 78ch;
}

/* Light section headings stay dark even when an older dark module was reused. */
body :is(.hx-section--white, .hx-section--mist, .hadof-section--muted) > .hx-shell > .hx-section-head :is(h2, h3),
body :is(.hx-section--white, .hx-section--mist, .hadof-section--muted) > .hx-section-head :is(h2, h3),
body [data-hadof-module="models-and-parameters"] > .hx-shell > .hx-section-head :is(h2, h3) {
	color: var(--hv7-ink) !important;
}

body :is(.hx-section--white, .hx-section--mist, .hadof-section--muted) > .hx-shell > .hx-section-head > p,
body :is(.hx-section--white, .hx-section--mist, .hadof-section--muted) > .hx-section-head > p,
body [data-hadof-module="models-and-parameters"] > .hx-shell > .hx-section-head > p {
	color: var(--hv7-copy) !important;
}

/* Technical models and parameters must remain visible at every breakpoint. */
body [data-hadof-module="models-and-parameters"] .hx-model-group > header :is(h3, p),
body [data-hadof-module="models-and-parameters"] .hx-model-disclosure summary,
body [data-hadof-module="models-and-parameters"] .hx-model-disclosure summary b,
body [data-hadof-module="models-and-parameters"] .hx-model-disclosure dd {
	color: var(--hv7-ink) !important;
}

body [data-hadof-module="models-and-parameters"] .hx-model-group > header p,
body [data-hadof-module="models-and-parameters"] .hx-model-disclosure summary :is(small, em),
body [data-hadof-module="models-and-parameters"] .hx-model-disclosure dt {
	color: #4e5d6d !important;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure {
	background: #edf1f2;
	border-color: transparent;
	border-radius: 0;
	opacity: 1;
	visibility: visible;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure summary {
	background: transparent;
	cursor: pointer;
	min-height: 68px;
	opacity: 1;
	visibility: visible;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure[open] {
	background: #fff;
	box-shadow: inset 4px 0 0 var(--hv7-orange), 0 14px 34px rgba(16, 25, 35, .07);
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure[open] > dl {
	background: var(--hv7-mist);
	display: grid !important;
	opacity: 1 !important;
	visibility: visible !important;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure dl > div {
	min-width: 0;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure dt {
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
}

body [data-hadof-module="models-and-parameters"] .hx-model-disclosure dd {
	font-size: .93rem;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* Keep layout density deliberate without collapsing narrative sections. */
body :is(.hx-section, .hadof-section) {
	padding-block: clamp(3.75rem, 7vw, 6.5rem);
}

body .hx-section-head--split {
	align-items: start;
}

body .hx-section-head--split > p {
	font-size: clamp(.96rem, 1.25vw, 1.08rem);
	line-height: 1.7;
}

@media (max-width: 760px) {
	body .hadof-delivery-hero {
		padding-block: 3.5rem;
	}

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

	body [data-hadof-module="models-and-parameters"] .hx-model-disclosure summary {
		display: grid;
		gap: .35rem;
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	body [data-hadof-module="models-and-parameters"] .hx-model-disclosure[open] > dl {
		grid-template-columns: 1fr !important;
		padding: 1rem;
	}
}
