/* Full-bleed band: place it in a Section with no horizontal padding. */
.nordemo-page-hero {
	margin-block: 0 72px;
	width: 100%;
	padding: 48px var(--nordemo-gutter);
	background: var(--nordemo-surface-accent);
}

.nordemo-page-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	max-width: var(--nordemo-content-max);
	margin-inline: auto;
}

.nordemo-page-hero__heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
	color: var(--nordemo-primary);
	text-align: center;
}

.nordemo-page-hero__eyebrow {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.0938em;
	text-transform: uppercase;
}

.nordemo-page-hero__title {
	max-width: 846px;
	margin: 0;
	font-size: 48px;
	line-height: 56px;
	color: inherit;
}

.nordemo-page-hero__text {
	max-width: 628px;
}

.nordemo-page-hero--wide .nordemo-page-hero__text {
	max-width: 824px;
}

.nordemo-page-hero__text {
	margin: 0;
	font-size: 20px;
	line-height: 30px;
	color: #000;
	text-align: center;
}

.nordemo-page-hero__text p {
	margin: 0;
}

.nordemo-page-hero__text a {
	font-weight: 600;
	color: inherit;
	text-decoration: underline;
}

.nordemo-page-hero .nordemo-section-divider {
	width: 147px;
}

/*
 * For a band the next block rides up over: it keeps extra room at the bottom so colour still
 * shows beneath the overlapping element, and gives up its own bottom margin to that element.
 */
.nordemo-page-hero--overlap {
	margin-bottom: 0;
	padding-bottom: 64px;
}

.nordemo-page-hero--dark {
	background: var(--nordemo-primary-deep);
}

.nordemo-page-hero--dark .nordemo-page-hero__heading,
.nordemo-page-hero--dark .nordemo-page-hero__text {
	color: var(--nordemo-on-primary);
}

.nordemo-page-hero--dark .nordemo-section-divider {
	background: var(--nordemo-sky);
}

/*
 * Left-aligned on the page background instead of a centred band. Without the band there is
 * nothing to space away from, so the surrounding layout owns the gap below it.
 */
.nordemo-page-hero--left {
	margin-block: 0;
	padding: 0;
	background: none;
}

.nordemo-page-hero--left .nordemo-page-hero__inner,
.nordemo-page-hero--left .nordemo-page-hero__heading {
	align-items: flex-start;
	margin-inline: 0;
}

.nordemo-page-hero--left .nordemo-page-hero__eyebrow,
.nordemo-page-hero--left .nordemo-page-hero__title,
.nordemo-page-hero--left .nordemo-page-hero__text {
	max-width: none;
	text-align: left;
}

/*
 * The media query stays LAST in the file: every variant above shares specificity with these
 * rules, so source order is what decides. A variant added below this block would silently win
 * over its own mobile override — that is exactly the bug this layout once had.
 */
@media (max-width: 991px) {
	/* The band butts against the header, so only the space below it belongs to this block. */
	.nordemo-page-hero {
		margin-block: 0 16px;
	}

	.nordemo-page-hero__heading {
		gap: 4px;
	}

	.nordemo-page-hero__title {
		font-size: 32px;
		line-height: 40px;
	}

	.nordemo-page-hero__text {
		font-size: 17px;
		line-height: 25px;
		color: var(--nordemo-primary);
	}

	/* Restated: the generic mobile margin above would otherwise re-open the gap the
	   overlapping block climbs across. */
	.nordemo-page-hero--overlap {
		margin-bottom: 0;
		padding-bottom: 92px;
	}

	.nordemo-page-hero--left {
		margin-block: 0;
	}
}
