/*
 * Base: reset, typography and accessibility helpers.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem; /* anchors land below the header */
}

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

body {
	margin: 0;
	font-family: var(--ff-body);
	font-size: var(--fs-body);
	line-height: 1.5;
	color: var(--c-ink);
	background: var(--c-surface);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

/* German has very long compound words (developer notes, section 1). */
:lang(de) {
	hyphens: auto;
	-webkit-hyphens: auto;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--ff-heading);
	font-weight: 500;
	line-height: 1.2;
	color: var(--c-text);
	text-wrap: balance;
}

p,
ul,
ol,
figure,
blockquote {
	margin: 0;
}

p {
	text-wrap: pretty;
}

a {
	color: var(--c-brand);
	text-underline-offset: 0.15em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

/* Text styles from Figma, usable as classes on any element. */
.t-display { font-family: var(--ff-heading); font-weight: 500; font-size: var(--fs-display); line-height: 1.15; }
.t-heading { font-family: var(--ff-heading); font-weight: 500; font-size: var(--fs-heading); line-height: 1.2; }
.t-card-title { font-family: var(--ff-heading); font-weight: 500; font-size: var(--fs-card-title); line-height: 1.25; }
.t-tagline { font-family: var(--ff-heading); font-weight: 600; font-size: var(--fs-tagline); }
.t-eyebrow {
	font-family: var(--ff-body);
	font-weight: 600;
	font-size: var(--fs-eyebrow);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--c-brand);
}
.t-body { font-family: var(--ff-body); font-size: var(--fs-body); }

/* Accessibility */
:focus-visible {
	outline: 2px solid var(--c-accent-1);
	outline-offset: 3px;
}

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: var(--space-12);
	left: var(--space-12);
	z-index: 1000;
	width: auto;
	height: auto;
	padding: var(--space-12) var(--space-16);
	margin: 0;
	clip: auto;
	background: var(--c-surface);
	color: var(--c-brand);
	border-radius: var(--radius-sm);
}

/* Certificate names must not break ("ISO 9001"). */
.nowrap {
	white-space: nowrap;
}
