/*
 * XGene Stage 8 Visual Polish — 1.13.2
 * Presentation-only refinement: hero typography, header/logo/menu balance,
 * CTA discipline, and site-wide visual consistency. No stored content changes.
 */

:root {
	--xg-hero-display: clamp(2.7rem, 3.95vw, 4.35rem);
	--xg-hero-display-compact: clamp(2.55rem, 3.55vw, 3.95rem);
	--xg-hero-display-feature: clamp(2.85rem, 4.2vw, 4.65rem);
	--xg-hero-leading: 1.015;
	--xg-hero-tracking: -0.047em;
	--xg-header-logo-width: 12.85rem;
	--xg-mobile-logo-width: 10.65rem;
}

/* --------------------------------------------------------------------------
   01. SITE-WIDE HERO TYPOGRAPHY CONTRACT
   Large enough to feel premium, but never allowed to dominate the full fold.
   -------------------------------------------------------------------------- */
.xg-home-hero h1,
.xg-enterprise-hero h1,
.xg-contact-hero h1,
.xg-hub-hero h1,
.xg-methodology-hero h1,
.xg-editorial-hub-hero h1,
.xg-compact-hero h1,
.xg-service-hub-hero__copy h1,
.xg-service-detail-hero__copy h1,
.xg190-hero h1,
.xg120-faq-hero h1,
.xg120-search-hero h1,
.xg111-hero h1,
.xg611-faq-hero__copy h1,
body.page-id-168 .entry-content > .xg-hero h1 {
	font-size: var(--xg-hero-display) !important;
	line-height: var(--xg-hero-leading) !important;
	letter-spacing: var(--xg-hero-tracking) !important;
	text-wrap: balance;
}

/* Flagship homepage can carry a slightly larger statement without reverting
   to the previous 5–6rem scale. */
.xg-home-hero h1 {
	font-size: var(--xg-hero-display-feature) !important;
	max-width: 14ch !important;
}

/* Compact/detail families prioritize comprehension and conversion. */
.xg-contact-hero h1,
.xg-compact-hero h1,
.xg-service-detail-hero__copy h1,
.xg611-faq-hero--single .xg611-faq-hero__copy h1,
.xg-editorial-cover h1 {
	font-size: var(--xg-hero-display-compact) !important;
}

/* Avoid narrow headline measures that create unnecessarily tall heroes. */
.xg-enterprise-hero h1,
.xg-contact-hero h1,
.xg-hub-hero h1,
.xg-methodology-hero h1,
.xg-editorial-hub-hero h1,
.xg-compact-hero h1,
.xg-service-hub-hero__copy h1,
.xg-service-detail-hero__copy h1,
.xg190-hero h1,
.xg120-faq-hero h1,
.xg111-hero h1 {
	max-width: 16ch !important;
}

.xg-editorial-cover h1 { max-width: 20ch !important; }
.xg120-search-hero h1 { max-width: 15ch !important; }

/* Keep hero lead copy clearly subordinate to the headline. */
.xg-enterprise-lead,
.xg-hub-lead,
.xg-contact-hero p:not(.xg-eyebrow),
.xg-compact-hero__content > p:not(.xg-eyebrow),
.xg-service-hub-hero__copy > p:not(.xg-eyebrow),
.xg-service-detail-hero__lead,
.xg190-hero__lead,
.xg120-faq-hero__copy > p:not(.xg-eyebrow),
.xg111-hero__grid > div:first-child > p:not(.xg-eyebrow) {
	font-size: clamp(1.02rem, .98rem + .2vw, 1.18rem) !important;
	line-height: 1.62 !important;
}

/* --------------------------------------------------------------------------
   02. HEADER / LOGO / MAIN NAVIGATION
   Increase perceived authority without sacrificing fit at laptop widths.
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
	:root {
		--xg-header-logo-width: 13.35rem;
		--xg-header-height: 5.55rem;
	}
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		font-size: 1.02rem !important;
		font-weight: 770 !important;
		padding-inline: .82rem !important;
	}
	#ast-desktop-header .main-header-menu > .xg-nav-utility > .menu-link,
	#ast-desktop-header .main-header-menu > .xg-nav-conversion > .menu-link {
		font-size: .96rem !important;
	}
}

/* Preserve breathing room on smaller desktop/laptop widths. */
@media (min-width: 1101px) and (max-width: 1279px) {
	:root { --xg-header-logo-width: 12.1rem; }
	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		font-size: .95rem !important;
		padding-inline: .64rem !important;
	}
	#ast-desktop-header .main-header-menu > .xg-nav-utility {
		margin-left: .2rem !important;
		margin-right: .35rem !important;
	}
}

.site-header .site-logo-img img,
#ast-desktop-header .site-header .custom-logo {
	filter: saturate(.98) contrast(1.02);
}

/* More refined active/hover affordance: present, not decorative. */
#ast-desktop-header .main-header-menu > .menu-item:not(.xg-nav-utility):not(.xg-nav-conversion) > .menu-link::after {
	height: 2px !important;
	bottom: .92rem !important;
	background: linear-gradient(90deg, var(--xg-blue), var(--xg-teal)) !important;
}

/* --------------------------------------------------------------------------
   03. CTA COLOR DISCIPLINE
   Coral remains the scarce conversion accent. Blue/teal carry navigation and
   information; coral appears only where a user is being asked to act.
   -------------------------------------------------------------------------- */
.xg-button--coral,
.xg-button--coral:visited,
#ast-desktop-header .main-header-menu > .xg-nav-conversion > .menu-link,
#ast-desktop-header .main-header-menu > .xg-nav-conversion > .menu-link:visited {
	color: #091f38 !important;
	background: linear-gradient(135deg, #f47a3c 0%, #ee7440 100%) !important;
	border-color: #ee7440 !important;
	box-shadow: 0 7px 18px rgb(244 122 60 / 16%) !important;
}

.xg-button--coral:hover,
.xg-button--coral:focus-visible,
#ast-desktop-header .main-header-menu > .xg-nav-conversion > .menu-link:hover,
#ast-desktop-header .main-header-menu > .xg-nav-conversion > .menu-link:focus-visible {
	color: #091f38 !important;
	background: #dc6129 !important;
	border-color: #dc6129 !important;
	box-shadow: 0 10px 24px rgb(220 97 41 / 20%) !important;
}

/* Avoid an orange-heavy page: secondary actions stay navy/teal/outline. */
.xg-button-row .xg-button--coral + .xg-button--coral {
	background: transparent !important;
	border-color: var(--xg-deep-blue) !important;
	color: var(--xg-deep-blue) !important;
	box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   04. RESPONSIVE HERO ECONOMY
   Mobile copy should lead; no giant heading should consume the first screen.
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
	:root {
		--xg-hero-display: clamp(2.15rem, 8.6vw, 2.95rem);
		--xg-hero-display-compact: clamp(2.05rem, 8.2vw, 2.75rem);
		--xg-hero-display-feature: clamp(2.25rem, 9vw, 3.05rem);
		--xg-hero-leading: 1.04;
		--xg-hero-tracking: -0.04em;
	}
	.xg-home-hero h1,
	.xg-enterprise-hero h1,
	.xg-contact-hero h1,
	.xg-hub-hero h1,
	.xg-methodology-hero h1,
	.xg-editorial-hub-hero h1,
	.xg-compact-hero h1,
	.xg-service-hub-hero__copy h1,
	.xg-service-detail-hero__copy h1,
	.xg190-hero h1,
	.xg120-faq-hero h1,
	.xg120-search-hero h1,
	.xg111-hero h1,
	.xg611-faq-hero__copy h1,
	.xg-editorial-cover h1 {
		max-width: 20ch !important;
	}

	/* Mobile header logo gets a modest increase while preserving menu room. */
	.site-header .site-logo-img img,
	.ast-mobile-header-wrap .custom-logo {
		width: var(--xg-mobile-logo-width) !important;
		max-height: 3.55rem !important;
	}
}

@media (max-width: 420px) {
	:root { --xg-mobile-logo-width: 10.1rem; }
}
