/**
 * Seven Hero — accessible hero banner styles.
 *
 * Scoped to the .sh-hero block. No @layer is used on purpose: as a drop-in
 * module the styles must win against a host template's unlayered base CSS,
 * which would otherwise beat any layered rule regardless of specificity.
 */

.sh-hero,
.sh-hero *,
.sh-hero *::before,
.sh-hero *::after {
	box-sizing: border-box;
}

.sh-hero {
	/* Layout tokens */
	--sh-max-inline: 75rem;
	--sh-content-max: 42rem;
	--sh-pad-block: clamp(3rem, 8vw, 7rem);
	--sh-pad-inline: clamp(1.25rem, 5vw, 3.5rem);
	--sh-gap: clamp(0.75rem, 2vw, 1.25rem);
	--sh-radius: 0.5rem;
	--sh-border-w: 2px;

	/* Typography tokens */
	--sh-title-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
	--sh-text-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
	--sh-eyebrow-size: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem);

	/* Call-to-action tokens */
	--sh-cta-min-h: 2.75rem;
	--sh-cta-pad-block: 0.625rem;
	--sh-cta-pad-inline: 1.375rem;
	--sh-accent: #0a4bbf;
	--sh-accent-hover: #073a94;
	--sh-accent-text: #ffffff;

	/* Focus ring — light inner + dark outer keeps it visible on any backdrop */
	--sh-focus-width: 3px;
	--sh-focus-offset: 2px;
	--sh-focus-color: #ffffff;
	--sh-focus-halo: #000000;

	/* Colour tokens (overridden per text theme below) */
	--sh-color-text: #ffffff;
	--sh-color-text-muted: rgba(255, 255, 255, 0.92);
	--sh-bg: #1b2330;
	--sh-overlay-rgb: 0, 0, 0;
	--sh-overlay-opacity: 0.55;
	--sh-text-shadow: none;
	--sh-secondary-hover-bg: rgba(255, 255, 255, 0.14);

	position: relative;
	display: grid;
	align-items: center;
	min-block-size: max(26rem, 60vh);
	padding-block: var(--sh-pad-block);
	padding-inline: var(--sh-pad-inline);
	overflow: clip;
	isolation: isolate;
	background-color: var(--sh-bg);
	color: var(--sh-color-text);
}

/* Media + overlay fill the whole block, content sits above both */
.sh-hero__media,
.sh-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.sh-hero__media {
	z-index: 0;
}

.sh-hero__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.sh-hero__overlay {
	z-index: 1;
	background-color: rgba(var(--sh-overlay-rgb), var(--sh-overlay-opacity));
}

.sh-hero__inner {
	position: relative;
	z-index: 2;
	inline-size: 100%;
	max-inline-size: var(--sh-max-inline);
	margin-inline: auto;
}

.sh-hero__content {
	display: flex;
	flex-direction: column;
	gap: var(--sh-gap);
	max-inline-size: var(--sh-content-max);
	text-shadow: var(--sh-text-shadow);
}

.sh-hero__eyebrow {
	margin: 0;
	font-size: var(--sh-eyebrow-size);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sh-color-text-muted);
}

.sh-hero__title {
	margin: 0;
	font-size: var(--sh-title-size);
	font-weight: 700;
	line-height: 1.1;
	text-wrap: balance;
	color: var(--sh-color-text);
}

.sh-hero__text {
	margin: 0;
	max-inline-size: 60ch;
	font-size: var(--sh-text-size);
	line-height: 1.6;
	text-wrap: pretty;
	color: var(--sh-color-text);
}

.sh-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sh-gap);
	margin-block-start: calc(var(--sh-gap) * 0.5);
}

.sh-hero__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-block-size: var(--sh-cta-min-h);
	padding-block: var(--sh-cta-pad-block);
	padding-inline: var(--sh-cta-pad-inline);
	border: var(--sh-border-w) solid transparent;
	border-radius: var(--sh-radius);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sh-hero__cta--primary {
	background-color: var(--sh-accent);
	border-color: var(--sh-accent);
	color: var(--sh-accent-text);
}

.sh-hero__cta--primary:hover {
	background-color: var(--sh-accent-hover);
	border-color: var(--sh-accent-hover);
}

.sh-hero__cta--secondary {
	background-color: transparent;
	border-color: currentColor;
	color: var(--sh-color-text);
}

.sh-hero__cta--secondary:hover {
	background-color: var(--sh-secondary-hover-bg);
}

.sh-hero__cta:hover {
	transform: translateY(-1px);
}

.sh-hero__cta:focus-visible {
	outline: var(--sh-focus-width) solid var(--sh-focus-color);
	outline-offset: var(--sh-focus-offset);
	box-shadow: 0 0 0 calc(var(--sh-focus-width) + var(--sh-focus-offset)) var(--sh-focus-halo);
}

/* Horizontal alignment of the content column */
.sh-hero--align-start .sh-hero__content {
	margin-inline-end: auto;
	align-items: flex-start;
	text-align: start;
}

.sh-hero--align-center .sh-hero__content {
	margin-inline: auto;
	align-items: center;
	text-align: center;
}

/* Block height presets */
.sh-hero--height-s {
	min-block-size: max(20rem, 40vh);
}

.sh-hero--height-m {
	min-block-size: max(26rem, 60vh);
}

.sh-hero--height-l {
	min-block-size: max(32rem, 80vh);
}

.sh-hero--height-full {
	min-block-size: 100vh;
	min-block-size: 100svh;
}

/* Overlay strength presets */
.sh-hero--overlay-none {
	--sh-overlay-opacity: 0;
}

.sh-hero--overlay-subtle {
	--sh-overlay-opacity: 0.35;
}

.sh-hero--overlay-medium {
	--sh-overlay-opacity: 0.55;
}

.sh-hero--overlay-strong {
	--sh-overlay-opacity: 0.72;
}

/* Text themes: light text on a dark scrim, or dark text on a light scrim */
.sh-hero--text-light {
	--sh-color-text: #ffffff;
	--sh-color-text-muted: rgba(255, 255, 255, 0.92);
	--sh-bg: #1b2330;
	--sh-overlay-rgb: 0, 0, 0;
	--sh-text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	--sh-secondary-hover-bg: rgba(255, 255, 255, 0.14);
}

.sh-hero--text-dark {
	--sh-color-text: #14181f;
	--sh-color-text-muted: rgba(20, 24, 31, 0.86);
	--sh-bg: #eef1f5;
	--sh-overlay-rgb: 255, 255, 255;
	--sh-text-shadow: none;
	--sh-secondary-hover-bg: rgba(0, 0, 0, 0.08);
}
