/* Legal: reuses subpage 3-column layout */
@layer components {
/* Subpage: 3-column layout — nav | content | cta */
[s-subpage] {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) minmax(0, 1000px) minmax(150px, 1fr);
	column-gap: var(--xl);
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: 1rem;
}


/* Sidebar contents: sticky, pushed down to align with content */
[s-subpage] > [s-sidebar] nav,
[s-subpage] > [s-cta-sidebar] [s-cta-button] {
	position: sticky;
	top: 2rem;
	margin-block-start: 6rem;
}

/* Page photo */
[s-page-photo] {
	margin: 0;
	margin-block-start: 4rem;
	width: 100%;
}

[s-page-photo] img {
	width: 100%;
	height: auto;
	border-radius: var(--radius-card);
	object-fit: cover;
}

@media (max-width: 767px) {
	[s-subpage] {
		display: block;
	}
	[s-subpage] > [s-sidebar],
	[s-subpage] > [s-cta-sidebar] {
		display: none;
	}
}

}

/* Legal components */
@layer components {
/* ── Sidebar nav ── */
[s-sidebar] {
	height: 100%;
}

[s-sidebar] nav {
	display: grid;
	grid-template-columns: 1fr;
	row-gap: 2px;
	font-family: var(--body);
	font-weight: var(--weight-medium);
	font-size: var(--sm);
}

[s-sidebar] [s-site-link] {
	display: block;
	padding: 0.5rem 0.75rem;
	color: var(--color-cyan-dark);
	text-decoration-line: underline;
	text-decoration-thickness: 2px;
	text-decoration-style: solid;
	text-decoration-color: var(--color-blue-faint);
	border-radius: 4px;
	transition: all 0.2s ease-in-out;
}

[s-sidebar] [s-site-link]:hover,
[s-sidebar] [s-site-link][data-active] {
	color: var(--color-black);
	background-color: var(--color-blue-faint);
}

@media (max-width: 767px) {
	[s-sidebar] {
		display: none;
	}
}

}
@layer components {
[s-header] {
	--stage-width: minmax(100dvw, 1920px);
	--padding-block: 1.25rem;
	position: relative;
	width: 100%;
	display: grid;
	grid-template-rows: auto 1fr auto auto;
	max-width: var(--stage-width);
	z-index: 10;
	container-type: inline-size;
}

[s-masthead] {
	grid-row: 1;
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-self: start;
	align-items: center;
	padding-block-start: 1rem;
	padding-inline: var(--padding-block);
}

/* Breadcrumb placement on the header grid */
[s-header] > [s-breadcrumb] {
	grid-column: 1 / -1;
	grid-row: 3;
	justify-self: center;
	z-index: 1;

}

[s-header-h1] {
	grid-column: 1 / -1;
	grid-row: 4;
	padding-block-end: min(12dvh, 4rem);
	display: grid;
	grid-gap: var(--xs);
	width: max-content;
	justify-self: center;
	text-align: center;
	line-height: 1;
	color: var(--color-white);
	opacity: 0.8;
	border-radius: var(--radius-2);
	text-shadow:
		1px 1px 3px rgb(10 30 50 / 0.7),
		0 0 20px rgb(10 30 50 / 0.4);
	z-index: 1;

	@media (max-width: 767px) {
		padding-block-end: min(6dvh, 2rem);
		width: 90%;
		text-wrap: balance;
	}
}

[s-header-h2] {
	display: block;
	font-family: var(--serif);
	font-size: min(var(--xxxl), 80cqi / var(--chars, 20) / 0.55);
	font-weight: var(--weight-700);

	@media (max-width: 767px) {
		font-size: clamp(var(--xl), 120cqi / var(--chars, 20) / 0.55, var(--xxl));
		line-height: 1.25;
	}
}

}
@layer components {
[s-breadcrumb] {
	display: flex;
	align-items: center;
	width: fit-content;
	font-family: var(--body);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #fff;
	margin-block-end: 1rem;
	padding: 0.75em 1.75em;
	border-radius: 10rem;
	background-color: rgb(255 255 255 / 0.2);
	border: 1.5px solid rgb(255 255 255 / 0.25);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

[s-breadcrumb] ol {
	list-style: none;
	display: flex;
	align-items: center;
	padding: 0;
	margin: 0;
}

[s-breadcrumb] li {
	padding: 0;
	display: flex;
	align-items: center;
}

[s-breadcrumb] li + li::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-inline: 0.5em;
	opacity: 0.35;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E")
		no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E")
		no-repeat center / contain;
}

[s-breadcrumb] a {
	color: #fff;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 200ms ease-out;
}

[s-breadcrumb] a:hover {
	opacity: 1;
}

[s-breadcrumb] li:last-child a {
	opacity: 1;
}

@media (max-width: 767px) {
	[s-breadcrumb] {
		font-size: 0.65rem;
		margin-block-end: 0.75rem;
		max-width: 90vw;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	[s-breadcrumb] ol {
		white-space: nowrap;
	}
}

}
@layer components {
[s-hero] {
	position: relative;
	grid-column: 1 / -1;
	grid-row: 1 / -1;
	width: 100%;
	aspect-ratio: 8/5;
	max-height: 90dvh;
	z-index: -1;

	&[s-hero~="compact"] {
		aspect-ratio: 3/1.55;

		@media (max-width: 767px) {
			aspect-ratio: 1 / 1.2;
		}
	}

	@media (max-width: 767px) {
		aspect-ratio: 1 / 1.2;
	}

	&::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(to bottom, oklch(20% 0.04 230 / 0.45) 0%, transparent 30%), linear-gradient(to top, oklch(20% 0.04 230 / 0.45) 0%, transparent 30%);
		pointer-events: none;
	}

	[s-hero-img] {
		object-fit: cover;
		width: 100%;
		height: 100%;
	}
}

}
@layer components {
[s-headline] {
	--max-width: min(45ch, 85%);
	text-align: center;
	font-family: var(--serif);
	font-weight: var(--weight-800);
	font-size: var(--md);
	text-wrap: balance;
	max-width: var(--max-width);
	margin-inline: auto;
	color: rgb(0 0 0 / 0.87);

	&[s-headline~="standalone"] {
		margin-block-end: var(--md);
		font-size: var(--lg);

		@media (max-width: 767px) {
			margin-block-end: var(--xs);
		}
	}

	&[s-headline~="outro"] {
		margin-block-start: var(--xxl);
		margin-block-end: var(--sm);
	}

	&[s-headline="hidden"] {
		display: none;
	}

	&[s-headline="sibling"] {
		margin-block-start: var(--lg);
		margin-block-end: var(--xs);

		@media (max-width: 767px) {
			margin-block-end: var(--xs);
		}
	}

	/*&[s-headline="border-top"] {
        padding-top: var(--lg);
        border-top: 1px solid var(--color-cyan);
        border-bottom: 0;
    }*/

	@media (max-width: 767px) {
		font-size: var(--md);
		line-height: 1.2;
		margin-block-start: var(--xxl);
		padding-inline: var(--padding-inline);
	}
}

}
@layer components {
[s-page-text] {
	margin-inline: auto;
	--max-width: min(80ch, 90%);
	--_clamp-height: 205px;
	justify-self: center;
	row-gap: var(--sm);
	font-family: var(--body);
	font-size: var(--base);
	font-weight: var(--weight-regular);
	line-height: var(--body-line-height);
	max-width: var(--max-width);
	color: rgb(0 0 0 / 0.67);

	&:has(+ [s-grid]) {
		margin-block-end: var(--base);
	}

	@media (min-width: 768px) and (max-width: 1024px) {
		--max-width: 60ch;
	}

	[s-text] {
		* + * {
			margin-top: 1rem;
		}
	}
}

}
