:root {
	--sbb-feld: #c7ced7;
	--sbb-papier: #fff;
	--sbb-tinte: #000;
	--sbb-grau: #4a505a;
	--sbb-fehler: #8f1016;
	--sbb-rand: max(clamp(16px, 5vw, 80px), calc((100vw - 1440px) / 2));
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body.sbb {
	margin: 0;
	background: var(--sbb-papier);
	color: var(--sbb-tinte);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
	font-weight: 400;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.sbb *, .sbb *::before, .sbb *::after { box-sizing: border-box; }
.sbb img { display: block; max-width: 100%; height: auto; }
.sbb h1, .sbb h2 { margin: 0; font-weight: 700; letter-spacing: -0.022em; }
.sbb a { color: inherit; }
.sbb a:focus-visible, .sbb button:focus-visible, .sbb input:focus-visible, .sbb textarea:focus-visible {
	outline: 3px solid var(--sbb-tinte);
	outline-offset: 3px;
}

/* Kopf und Einstieg: ein durchgehendes Feld in der Hintergrundfarbe des Porträts */
.sbb-kopf {
	background: var(--sbb-feld);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: clamp(20px, 3vw, 36px) var(--sbb-rand);
}
.sbb-logo { width: clamp(220px, 28vw, 400px); }
.sbb-kopf-link { font-weight: 700; text-underline-offset: 0.2em; }

.sbb-start {
	background: var(--sbb-feld);
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1fr) min(44vw, 720px);
	align-items: end;
	column-gap: clamp(24px, 3vw, 56px);
	padding-left: var(--sbb-rand);
}
.sbb-start-text { align-self: center; padding: clamp(24px, 4vw, 64px) 0 clamp(48px, 6vw, 96px); }
.sbb-start h1 { font-size: clamp(1.75rem, 3.2vw, 3.25rem); line-height: 1.12; hyphens: manual; }

.sbb-portraet {
	width: 100%;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%), linear-gradient(to bottom, transparent 0, #000 5%);
	mask-image: linear-gradient(to right, transparent 0, #000 12%), linear-gradient(to bottom, transparent 0, #000 5%);
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

/* Profil */
.sbb-profil {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	column-gap: clamp(24px, 3vw, 56px);
	padding: clamp(64px, 9vw, 136px) var(--sbb-rand);
}
.sbb-profil h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.1; }
.sbb-text { max-width: 36em; }
.sbb-text p { margin: 0 0 1.25em; }
.sbb-text p:last-child { margin-bottom: 0; }

/* Impressum und Datenschutz */
.sbb-recht {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	column-gap: clamp(24px, 3vw, 56px);
	padding: clamp(48px, 7vw, 104px) var(--sbb-rand) clamp(64px, 9vw, 136px);
}
.sbb-recht h1 { font-size: clamp(1.75rem, 2.4vw, 2.5rem); line-height: 1.1; }
.sbb-recht h2 { margin: 2em 0 0.5em; font-size: 1.25em; line-height: 1.25; letter-spacing: -0.01em; }
.sbb-recht .sbb-text > h2:first-child { margin-top: 0; }
.sbb-recht ul { margin: 0 0 1.25em; padding-left: 1.25em; }
.sbb-recht .sbb-text a { text-underline-offset: 0.15em; overflow-wrap: anywhere; }

/* Kontakt */
.sbb-kontakt {
	background: var(--sbb-feld);
	padding: clamp(64px, 9vw, 136px) var(--sbb-rand);
	scroll-margin-top: 0;
}
.sbb-kontakt h2 {
	max-width: 19em;
	font-size: clamp(1.75rem, 3.2vw, 3.25rem);
	line-height: 1.12;
	margin-bottom: clamp(48px, 6vw, 88px);
}

.sbb-formular {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px clamp(24px, 3vw, 56px);
	max-width: 62rem;
}
.sbb-breit { grid-column: 1 / -1; }
.sbb-zeile label { display: block; font-weight: 700; margin-bottom: 4px; }
.sbb-zeile label span { font-weight: 400; color: var(--sbb-grau); }
.sbb-zeile input, .sbb-zeile textarea {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	border-bottom: 2px solid var(--sbb-tinte);
	border-radius: 0;
	background: var(--sbb-papier);
	color: var(--sbb-tinte);
	font: inherit;
	appearance: none;
}
.sbb-zeile textarea { resize: vertical; min-height: 11em; }
.sbb-zeile [aria-invalid="true"] { border-bottom-color: var(--sbb-fehler); }

.sbb-fehler { min-height: 1.5em; margin: 4px 0 8px; font-size: 0.875em; line-height: 1.4; color: var(--sbb-fehler); }

.sbb-absenden { display: flex; flex-wrap: wrap; align-items: center; gap: 16px clamp(24px, 3vw, 40px); }
.sbb-absenden button {
	padding: 16px 36px;
	border: 2px solid var(--sbb-tinte);
	border-radius: 0;
	background: var(--sbb-tinte);
	color: var(--sbb-papier);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.sbb-absenden button:hover { background: var(--sbb-papier); color: var(--sbb-tinte); }
.sbb-absenden button:disabled { opacity: 0.6; cursor: progress; }
.sbb-hinweis { flex: 1 1 18em; margin: 0; font-size: 0.875em; line-height: 1.45; }

.sbb-status { margin: 24px 0 0; font-weight: 700; }
.sbb-status:empty { display: none; }
.sbb-status:focus { outline: none; }
.sbb-status-fehler { color: var(--sbb-fehler); }

/* Spamfalle: für Menschen unsichtbar */
.sbb-falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fuß */
.sbb-fuss {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 32px;
	padding: 28px var(--sbb-rand);
	font-size: 0.875em;
}
.sbb-fuss p { margin: 0; }
.sbb-fuss nav { display: flex; gap: 24px; }
.sbb-fuss a { padding: 6px 0; }

@media (max-width: 1100px) {
	.sbb-recht { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
}

@media (max-width: 760px) {
	.sbb-start { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
	.sbb-start-text { padding: 16px var(--sbb-rand) 32px; }
	.sbb-portraet {
		-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%);
		mask-image: linear-gradient(to bottom, transparent 0, #000 5%);
		-webkit-mask-composite: source-over;
		mask-composite: add;
	}
	.sbb-profil { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
	.sbb-text { hyphens: auto; }
	.sbb-formular { grid-template-columns: minmax(0, 1fr); }
}
