/**
 * HTG Hero — styles
 */

.htg-hero {
	position: relative;
	display: flex;
	align-items: center;
	overflow: hidden;
	padding-block: var(--sp-2xl);
	color: var(--c-white);
	/* Break out of any container; the hero is always full-width. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Style variants */
.htg-hero--dark {
	background: var(--c-navy);
	color: var(--c-white);
}

.htg-hero--light-grey {
	background: var(--c-cream-lo);
	color: var(--c-ink);
}

.htg-hero--white {
	background: var(--c-white);
	color: var(--c-ink);
}

/* Heights */
.htg-hero--height-auto   { min-height: auto; }
.htg-hero--height-medium { min-height: 480px; }
.htg-hero--height-large  { min-height: 640px; }

.htg-hero--variant-overview {
	min-height: 988px;
	padding-block: 0;
	background: var(--c-navy);
	color: var(--c-white);
	align-items: flex-start;
}

body.has-flush-hero .htg-hero--variant-overview:first-child,
body.has-flush-hero.admin-bar .htg-hero--variant-overview:first-child {
	padding-top: 0;
}

/* Background animation layer */
.htg-hero__static-bg,
.htg-hero__animation {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.htg-hero__animation {
	z-index: 1;
}

.htg-hero__static-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.htg-hero__animation svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	max-width: none;
}

.htg-hero__overview-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.htg-hero__overview-bg img {
	position: absolute;
	top: -15px;
	left: 50%;
	width: 1808px;
	height: 1017px;
	max-width: none;
	display: block;
	transform: translateX(-50%);
}

/* Overlay layer */
.htg-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

.htg-hero__overlay--navy  { background: var(--c-navy); }
.htg-hero__overlay--black { background: var(--c-ink); }
.htg-hero__overlay--red   { background: var(--c-red); }
.htg-hero__overlay--white { background: var(--c-white); }

/* Content layer */
.htg-hero__inner {
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad-x);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: inherit;
}

.htg-hero--variant-overview .htg-hero__inner {
	justify-content: flex-start;
	min-height: 988px;
	padding-top: 60px;
	padding-bottom: 80px;
}

/* Wide rail: lines the hero copy up with the 1260px service-section rail. */
.htg-hero--inner-wide .htg-hero__inner {
	max-width: calc(1260px + 2 * var(--container-pad-x));
}

.htg-hero__content {
	display: flex;
	flex-direction: column;
	gap: var(--sp-md);
}

.htg-hero--variant-overview .htg-hero__content {
	width: 100%;
	max-width: none;
	gap: 0;
}

.htg-hero--align-center .htg-hero__content {
	align-items: center;
	text-align: center;
	margin-inline: auto;
}

/* Eyebrow + headline + subhead */
.htg-hero__eyebrow {
	margin: 0;
}

.htg-hero--variant-overview .htg-hero__eyebrow {
	margin-bottom: 20px;
	color: var(--c-red);
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.1em;
}

.htg-hero__preheading {
	margin: 0 0 10px;
	font-family: var(--ff-serif);
	font-size: clamp(1.75rem, 2.4vw, 2.25rem);
	line-height: 1.12;
	color: currentColor;
}

.htg-hero__headline {
	margin: 0;
	font-size: clamp(2.5rem, 5vw, 4.5rem); /* 72px max */
	line-height: 1.08;
}

.htg-hero--variant-overview .htg-hero__headline {
	max-width: 1100px;
	font-size: clamp(4.5rem, 6.667vw, 6rem);
	line-height: 1.083333;
}

.htg-hero__subhead {
	font-size: 1.5rem;
	line-height: 1.5;
}

.htg-hero--variant-overview .htg-hero__subhead {
	max-width: 880px;
	margin-top: 28px;
	font-family: var(--ff-serif);
	font-weight: 300;
	font-size: 28px;
	line-height: 42px;
	color: rgba(255, 255, 255, 0.9);
}

.htg-hero__subhead--serif {
	font-family: var(--ff-serif);
	font-size: 26px;
	line-height: 36px;
}

/* Serif measure is set in em so it tracks the larger type (≈ 725px at 26px). */
.htg-hero__content .htg-hero__subhead--serif {
	max-width: 28em;
}

.htg-hero__subhead p {
	margin: 0 0 var(--sp-sm) 0;
}

.htg-hero__subhead p:last-child {
	margin-bottom: 0;
}

/* Subhead width variants */
.htg-hero__content--subhead-narrow .htg-hero__subhead { max-width: 40ch; }
.htg-hero__content--subhead-medium .htg-hero__subhead { max-width: 55ch; }
.htg-hero__content--subhead-wide   .htg-hero__subhead { max-width: 70ch; }

.htg-hero--variant-overview .htg-hero__subhead {
	max-width: 880px;
}

.htg-hero__intro-copy {
	max-width: 720px;
	margin-top: 58px;
	margin-left: 440px;
	font-size: 16px;
	line-height: 28px;
	color: rgba(255, 255, 255, 0.78);
}

.htg-hero__intro-copy p {
	max-width: none;
	margin: 0 0 16px;
}

.htg-hero__intro-copy p:last-child {
	margin-bottom: 0;
}

.htg-hero__intro + .htg-hero__intro {
	margin-top: 24px;
}

.htg-hero__intro--secondary {
	font-weight: var(--fw-medium);
	color: var(--c-white);
}

/*
 * Intro copy on the standard variant sits under the subhead in the same
 * left rail (the 440px offset above is the overview variant's layout).
 */
.htg-hero--variant-standard .htg-hero__intro-copy {
	max-width: 700px;
	margin-top: 44px;
	margin-left: 0;
}

/*
 * Aside placement (PE comp): headline spans the rail, then subhead + CTAs in
 * the left column with the intro paragraphs in a right column beside them.
 */
.htg-hero--intro-aside .htg-hero__content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
	column-gap: 60px;
	align-items: start;
}

/*
 * Explicit rows: (1) eyebrow, (2) headline — both spanning the rail — then
 * (3) subhead and (4) CTAs in the left column with the intro copy occupying
 * rows 3–4 on the right. Rows collapse to zero height when a piece is absent.
 */
.htg-hero--intro-aside .htg-hero__eyebrow,
.htg-hero--intro-aside .htg-hero__preheading {
	grid-column: 1 / -1;
	grid-row: 1;
}

.htg-hero--intro-aside .htg-hero__headline {
	grid-column: 1 / -1;
	grid-row: 2;
}

.htg-hero--intro-aside .htg-hero__subhead {
	grid-column: 1;
	grid-row: 3;
	align-self: start;
}

.htg-hero--intro-aside .htg-hero__ctas {
	grid-column: 1;
	grid-row: 4;
	align-self: start;
	justify-self: start;
}

.htg-hero--intro-aside .htg-hero__intro-copy {
	grid-column: 2;
	grid-row: 3 / span 2;
	max-width: 640px;
	margin-top: 0;
}

.htg-hero--intro-aside .htg-hero__intro--secondary {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 1024px) {
	.htg-hero--intro-aside .htg-hero__content {
		display: block;
	}

	/* Block layout drops the desktop grid rows; restore the heading-to-subhead gap. */
	.htg-hero--intro-aside .htg-hero__subhead {
		margin-top: 24px;
	}

	.htg-hero--intro-aside .htg-hero__intro-copy {
		margin-top: 36px;
	}
}

/* CTA row */
.htg-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-sm);
	margin-top: var(--sp-sm);
}

.htg-hero--align-center .htg-hero__ctas {
	justify-content: center;
}

.htg-hero__cta-arrow {
	display: inline-block;
	transition: transform var(--dur-base) var(--ease-out);
}

.htg-hero__ctas .btn:hover .htg-hero__cta-arrow,
.htg-hero__ctas .btn:focus-visible .htg-hero__cta-arrow {
	transform: translateX(4px);
}

/* Push hero behind sticky transparent header on flush-hero pages */
body.has-flush-hero .htg-hero:first-child {
	padding-top: calc(var(--sp-2xl) + var(--header-height));
}

body.has-flush-hero.admin-bar .htg-hero:first-child {
	padding-top: calc(var(--sp-2xl) + var(--header-height));
}

/* --- Responsive ----------------------------------------------------- */

@media (max-width: 768px) {
	.htg-hero {
		padding-block: 50px;
	}

	/* The line-fan backgrounds are a desktop composition; the mobile comp
	   shows plain navy, so hide them on phones. */
	.htg-hero--bg-fanout-1 .htg-hero__static-bg,
	.htg-hero--bg-fanout-2-converge .htg-hero__static-bg {
		display: none;
	}

	.htg-hero__subhead--serif {
		font-size: 22px;
		line-height: 30px;
	}
	/* Override the .has-flush-hero rule above (spec 0,2,1) so the effective
	   gap from the header to the hero content is 50px on mobile — without
	   this, padding-top stays at calc(sp-2xl + header-height) ≈ 176px. */
	body.has-flush-hero .htg-hero:first-child,
	body.has-flush-hero.admin-bar .htg-hero:first-child {
		padding-top: calc(50px + var(--header-height));
		padding-bottom: 50px;
	}

	.htg-hero--variant-overview {
		min-height: 874px;
		padding-block: 0;
	}

	body.has-flush-hero .htg-hero--variant-overview:first-child,
	body.has-flush-hero.admin-bar .htg-hero--variant-overview:first-child {
		padding-top: 0;
		padding-bottom: 0;
	}

	.htg-hero--variant-overview .htg-hero__inner {
		min-height: 874px;
		padding: 72px 24px 48px;
	}

	.htg-hero__overview-bg img {
		top: -15px;
		left: -173px;
		width: 1808px;
		height: 1017px;
		transform: none;
	}

	.htg-hero--variant-overview .htg-hero__eyebrow {
		margin-bottom: 14px;
		font-size: 11px;
		line-height: 14px;
	}

	.htg-hero__preheading {
		margin-bottom: 8px;
		font-size: 26px;
		line-height: 29px;
	}

	.htg-hero--variant-overview .htg-hero__headline {
		max-width: 342px;
		font-size: 52px;
		line-height: 62px;
	}

	.htg-hero--variant-overview .htg-hero__subhead {
		max-width: 342px;
		margin-top: 24px;
		font-size: 20px;
		line-height: 28px;
	}

	.htg-hero__intro-copy {
		max-width: 342px;
		margin-top: 28px;
		margin-left: 0;
		font-size: 16px;
		line-height: 28px;
	}

	/* Hero CTAs span the rail on phones — per both the GEO/AIO and Podcast comps. */
	.htg-hero__ctas .btn {
		width: 100%;
	}

	.htg-hero__intro + .htg-hero__intro {
		margin-top: 20px;
	}
}

@media (max-width: 1100px) and (min-width: 768px) {
	.htg-hero__intro-copy {
		width: min(62%, 620px);
		max-width: 620px;
		margin-left: auto;
	}
}

@media (max-width: 390px) {
	.htg-hero--variant-overview .htg-hero__headline {
		font-size: 46px;
		line-height: 56px;
	}
}
