/*
 * Schicht 10: Basis. Elementare Typografie, Fokus, Medien, Bewegung.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--lg-header-height) + 1rem);
}

body {
	margin: 0;
	background-color: var(--lg-color-white);
	color: var(--lg-color-black);
	font-family: var(--lg-font-body);
	font-size: var(--lg-step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--lg-font-display);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.01em;
	margin: 0 0 var(--lg-space-4);
	text-wrap: balance;
	/* Grosse Displaytypografie darf niemals mitten im Wort umbrechen. */
	overflow-wrap: normal;
	hyphens: none;
}

h1 {
	font-size: var(--lg-step-3);
	font-weight: 900;
}

h2 {
	font-size: var(--lg-step-2);
}

h3 {
	font-size: var(--lg-step-1);
}

p {
	margin: 0 0 var(--lg-space-4);
	text-wrap: pretty;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--lg-color-bordeaux);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--lg-color-deep-bordeaux);
}

/* Sichtbarer Fokus in jedem Farbkontext. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--lg-focus-width) solid var(--lg-ctx-focus, var(--lg-focus-color));
	outline-offset: var(--lg-focus-offset);
	border-radius: var(--lg-radius-small);
}

img,
svg,
video,
picture {
	max-width: 100%;
	height: auto;
	display: block;
}

.lg-svg {
	display: block;
	max-width: 100%;
	height: auto;
}

hr {
	border: 0;
	border-top: 1px solid var(--lg-ctx-line, var(--lg-line-soft));
	margin: var(--lg-space-7) 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

::selection {
	background-color: var(--lg-color-bordeaux);
	color: var(--lg-color-white);
}

/* Skip Link. Block Themes geben ihn per Core aus, hier wird er markengerecht gestylt. */
.skip-link,
.skip-link.screen-reader-text {
	background-color: var(--lg-color-black);
	color: var(--lg-color-white);
	font-family: var(--lg-font-body);
	font-weight: 600;
	padding: var(--lg-space-3) var(--lg-space-5);
	border-radius: 0 0 var(--lg-radius-small) 0;
	z-index: 200;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	margin: 0;
	position: static;
	width: auto;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
