/*
 * XGene 1.13.9 — Enterprise Geometry + Mobile Immediate-Render Contract
 * Final Stage 8 geometry authority before Stage 9.
 */

:root {
	--xg139-hero-min: 35.5rem;
	--xg139-hero-pad: clamp(3.25rem, 4.7vw, 5rem);
	--xg139-hero-gap: clamp(3rem, 4.8vw, 5.25rem);
	--xg139-hero-visual: 34rem;
	--xg139-copy-max: 45rem;
}

/* --------------------------------------------------------------------------
   DESKTOP ENTERPRISE GEOMETRY CONTRACT
   One shell, one content anchor, one visual anchor, one vertical rhythm.
   Colors and semantic artwork remain family-specific.
   -------------------------------------------------------------------------- */
@media (min-width: 1101px) {
	.xg-home-hero__grid,
	.xg-service-hub-hero__grid,
	.xg-services-hero__grid,
	.xg-service-detail-hero__grid,
	.xg-enterprise-hero__grid,
	.xg-contact-hero__grid,
	.xg-hub-hero__grid,
	.xg-compact-hero__grid,
	.xg-methodology-hero__grid,
	.xg-editorial-hub-hero__grid,
	.xg190-hero__grid,
	.xg190-knowledge-hero__grid,
	.xg111-hero__grid,
	.xg120-faq-hero__grid,
	.xg120-search-hero__grid,
	.xg611-faq-hero__grid,
	.xg-media-hero__grid {
		box-sizing: border-box !important;
		width: var(--xg-shell) !important;
		max-width: none !important;
		min-height: var(--xg139-hero-min) !important;
		margin-inline: auto !important;
		padding-top: var(--xg139-hero-pad) !important;
		padding-bottom: var(--xg139-hero-pad) !important;
		grid-template-columns: minmax(0, 1.02fr) minmax(28rem, .98fr) !important;
		gap: var(--xg139-hero-gap) !important;
		align-items: center !important;
	}

	/* Keep the primary message locked to the same left-side visual axis. */
	.xg-home-hero__grid > :first-child,
	.xg-service-hub-hero__grid > :first-child,
	.xg-services-hero__grid > :first-child,
	.xg-service-detail-hero__grid > :first-child,
	.xg-enterprise-hero__grid > :first-child,
	.xg-contact-hero__grid > :first-child,
	.xg-hub-hero__grid > :first-child,
	.xg-compact-hero__grid > :first-child,
	.xg-methodology-hero__grid > :first-child,
	.xg-editorial-hub-hero__grid > :first-child,
	.xg190-hero__grid > :first-child,
	.xg190-knowledge-hero__grid > :first-child,
	.xg111-hero__grid > :first-child,
	.xg120-faq-hero__grid > :first-child,
	.xg120-search-hero__grid > :first-child,
	.xg611-faq-hero__grid > :first-child,
	.xg-media-hero__grid > :first-child {
		box-sizing: border-box !important;
		width: 100% !important;
		max-width: var(--xg139-copy-max) !important;
		min-width: 0 !important;
		margin: 0 !important;
		align-self: center !important;
		justify-self: start !important;
	}

	/* Lock all hero semantic visuals to one right-side visual anchor. */
	.xg-home-hero__grid > :last-child,
	.xg-service-hub-hero__grid > :last-child,
	.xg-services-hero__grid > :last-child,
	.xg-service-detail-hero__grid > :last-child,
	.xg-enterprise-hero__grid > :last-child,
	.xg-contact-hero__grid > :last-child,
	.xg-hub-hero__grid > :last-child,
	.xg-compact-hero__grid > :last-child,
	.xg-methodology-hero__grid > :last-child,
	.xg-editorial-hub-hero__grid > :last-child,
	.xg190-hero__grid > :last-child,
	.xg190-knowledge-hero__grid > :last-child,
	.xg111-hero__grid > :last-child,
	.xg120-faq-hero__grid > :last-child,
	.xg120-search-hero__grid > :last-child,
	.xg611-faq-hero__grid > :last-child,
	.xg-media-hero__grid > :last-child {
		box-sizing: border-box !important;
		width: min(100%, var(--xg139-hero-visual)) !important;
		max-width: var(--xg139-hero-visual) !important;
		min-width: 0 !important;
		margin: 0 !important;
		align-self: center !important;
		justify-self: end !important;
	}

	/* Shared typographic and CTA anchors; page-family color remains untouched. */
	.xg-home-hero h1,
	.xg-service-hub-hero h1,
	.xg-services-hero h1,
	.xg-service-detail-hero h1,
	.xg-enterprise-hero h1,
	.xg-contact-hero h1,
	.xg-hub-hero h1,
	.xg-compact-hero h1,
	.xg-methodology-hero h1,
	.xg-editorial-hub-hero h1,
	.xg190-hero h1,
	.xg111-hero h1 {
		margin-top: .28rem !important;
		margin-bottom: 1.15rem !important;
		line-height: .98 !important;
		text-wrap: balance;
	}

	.xg-home-hero .xg-button-row,
	.xg-service-hub-hero .xg-button-row,
	.xg-services-hero .xg-button-row,
	.xg-service-detail-hero .xg-button-row,
	.xg-enterprise-hero .xg-button-row,
	.xg-contact-hero .xg-button-row,
	.xg-hub-hero .xg-button-row,
	.xg-compact-hero .xg-button-row,
	.xg-methodology-hero .xg-button-row,
	.xg-editorial-hub-hero .xg-button-row,
	.xg190-hero .xg-button-row,
	.xg111-hero .xg-button-row {
		margin-top: 1.45rem !important;
		gap: .8rem !important;
	}

	/* Homepage remains the flagship, but its geometry no longer drifts. */
	.xg-b1a-home .xg-home-hero__grid {
		min-height: var(--xg139-hero-min) !important;
		padding-top: var(--xg139-hero-pad) !important;
		padding-bottom: var(--xg139-hero-pad) !important;
		gap: var(--xg139-hero-gap) !important;
		grid-template-columns: minmax(0, 1.02fr) minmax(28rem, .98fr) !important;
	}

	/* Prevent family-specific minimums from shifting the semantic visual vertically. */
	.xg-evidence-visual,
	.xg-service-lifecycle,
	.xg-service-motion,
	.xg-audience-orbit,
	.xg-about-system,
	.xg-contact-signal,
	.xg-book-visual,
	.xg-methodology-visual,
	.xg-hub-signal,
	.xg-services-map,
	.xg190-graph,
	.xg111-media-visual,
	.xg111-media-stage,
	.xg120-semantic-motion,
	.xg121-topic-motion {
		margin-inline: 0 !important;
	}
}

/* --------------------------------------------------------------------------
   MOBILE/TABLET IMMEDIATE RENDER CONTRACT
   No scroll-reveal staging. Essential content is paint-ready immediately.
   Native browser/WordPress image lazy loading remains available for below-fold
   media because removing it globally would make initial page load slower.
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	html.xg-motion-ready [data-xg-reveal],
	html.xg-motion-171 .xg-reveal-eligible,
	html.xg-commercial-110 .xg110-commercial-card,
	.xg-section-motion-item,
	[data-xg-reveal],
	.xg-reveal-eligible,
	.xg110-commercial-card {
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		transition: none !important;
		animation: none !important;
	}

	/* Do not defer painting of ordinary content after the mobile hero. */
	main.site-main section:not([data-xg-desktop-visual]),
	main.site-main article:not([data-xg-desktop-visual]) {
		content-visibility: visible !important;
	}
}
