/* ============================================================
   3angular — Designsystem
   Palette aus dem Logo: Weinrot #800020 (Akzent, Links, Buttons),
   Schwarz #111111 (Text), Weiß (Hintergrund), Grau #555555
   (Fließtext in Prosa), Hell #f4f4f4 (Flächen), Linie #e2e2e2
   (Rahmen). Überschriften in Space Grotesk, Fließtext in Inter.

   Seitenaufbau: body > header > nav, main > header (Hero), section…,
   main > footer (Kontakt-CTA), body > footer. Jede zweite Sektion liegt auf
   hellem Grund; Karten und Panels nehmen die jeweils andere Fläche.
   Rechtstexte sind main > article.
   ============================================================ */

@font-face {
	font-family: 'Inter';
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	src: url('fonts/InterVariable.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
	src: url('fonts/InterVariable-Italic.woff2') format('woff2');
}

@font-face {
	font-family: 'Space Grotesk';
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
	src: url('fonts/SpaceGrotesk-Variable.woff2') format('woff2');
}

:root {
	--ta-rot: #800020;
	--ta-rot-dunkel: #5c0017;
	--ta-tinte: #111111;
	--ta-grau: #555555;
	--ta-weiss: #ffffff;
	--ta-hell: #f4f4f4;
	--ta-linie: #e2e2e2;
	--ta-display: 'Space Grotesk', system-ui, sans-serif;
	--ta-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	/* Inhaltsspalte: volle Breite mit 2rem Rand, ab 1264px zentriert 1200px */
	--ta-rand: max(2rem, calc((100% - 1200px) / 2));
	--ta-abstand: 1.5rem;
	/* Fläche für Karten und Panels; getönte Sektionen setzen sie auf Weiß */
	--ta-flaeche: var(--ta-hell);
}

/* ---------- Grundlagen ---------- */

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

body {
	margin: 0;
	font-family: var(--ta-body);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ta-tinte);
	background: var(--ta-weiss);
	-webkit-font-smoothing: antialiased;
	/* clip statt hidden: erzeugt keinen Scroll-Container, position:sticky
	   der Navigation bleibt intakt */
	overflow-x: clip;
}

h1, h2, h3 {
	font-family: var(--ta-display);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

h1, h2, h3, p, ul { margin: 0; }

address { font-style: normal; }

img { max-width: 100%; height: auto; }

a {
	color: var(--ta-rot);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

::selection { background: var(--ta-rot); color: var(--ta-weiss); }

:focus-visible {
	outline: 3px solid var(--ta-rot);
	outline-offset: 2px;
}

/* Lange deutsche Komposita brechen an Silbengrenzen statt mitten im Wort
   (html lang="de", der Browser trennt nach Wörterbuch); Umbrüche erst ab
   acht Buchstaben, mindestens vier je Seite */
h1, h2, h3, p, li {
	-webkit-hyphens: auto;
	hyphens: auto;
	-webkit-hyphenate-limit-before: 4;
	-webkit-hyphenate-limit-after: 4;
	hyphenate-limit-chars: 8 4 4;
}

/* Navigation, Buttons und Marke bleiben ungetrennt */
nav a,
.ta-button,
.ta-marke,
.ta-eyebrow {
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* Blockabstand: Geschwister in Sektionen, Spalten, Panels und Prosa */
section > * + *,
main > footer > * + *,
.ta-spalten > div > * + *,
main > header > div > * + *,
.ta-panel > * + *,
main > article > * + * { margin-top: var(--ta-abstand); }

/* ---------- Sektionen ---------- */

section,
main > footer { padding: 5.5rem var(--ta-rand); }

/* Anker-Sprünge landen unterhalb der klebenden Navigationsleiste */
section[id] { scroll-margin-top: 4rem; }

/* Jede zweite Sektion auf hellem Grund */
main > section:nth-of-type(even) {
	background: var(--ta-hell);
	--ta-flaeche: var(--ta-weiss);
}

/* Kaum getönter Abschluss (Kontakt-CTA): warmes Grau mit einem Hauch Weinrot */
main > footer { background: #f6eeee; }
main > footer p:not(.ta-eyebrow) { color: var(--ta-grau); }

@media (max-width: 767px) {
	section,
	main > footer { padding: 3.5rem 1.25rem; }
}

/* Eyebrow: kurze Auszeichnungszeile in Weinrot über Sektionsüberschriften */
.ta-eyebrow {
	font-family: var(--ta-display);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ta-rot);
}

/* H2 mit kurzem Strich in Weinrot darunter */
section h2,
main > footer h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }

section h2::after,
main > footer h2::after {
	content: "";
	display: block;
	width: 3.25rem;
	height: 4px;
	background: var(--ta-rot);
	margin-top: 0.9rem;
}

.ta-lead {
	color: var(--ta-grau);
	font-size: 1.125rem;
	max-width: 44rem;
}

/* Freistehende Absätze und Listen in Sektionen bleiben lesbar schmal */
section > p:not(.ta-eyebrow),
main > footer > p:not(.ta-eyebrow),
section > ul { max-width: 46rem; }

/* Abstand zwischen dem Kartenraster und dem folgenden Block (Buttons);
   folgt direkt eine weitere Kartenreihe, gilt nur der Blockabstand */
.ta-karten + :not(.ta-karten) { margin-top: 3rem; }

/* ---------- Navigation ---------- */

body > header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--ta-linie);
}

nav {
	padding: 0.75rem var(--ta-rand);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.ta-marke {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-family: var(--ta-display);
	font-weight: 600;
	font-size: 1.3rem;
	color: var(--ta-tinte);
	text-decoration: none;
}

.ta-marke img { height: 2rem; width: auto; }

nav ul {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	list-style: none;
	padding: 0;
}

nav ul a:not(.ta-button) {
	color: var(--ta-tinte);
	font-size: 0.95rem;
	font-weight: 500;
	padding: 0.5rem 0.9rem;
	text-decoration: none;
	white-space: nowrap;
	display: inline-block;
}

nav ul a:not(.ta-button):hover { color: var(--ta-rot); }

nav a[aria-current="page"] {
	color: var(--ta-rot);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

nav .ta-button { font-size: 0.9rem; padding: 0.5rem 1rem; }

/* Luft zwischen letztem Menüpunkt und dem Kontakt-Button */
@media (min-width: 992px) {
	nav .ta-button { margin-left: 1.25rem; }
}

nav button {
	display: none;
	background: none;
	border: 1px solid var(--ta-linie);
	border-radius: 0.375rem;
	padding: 0.45rem 0.6rem;
	cursor: pointer;
}

nav button span {
	display: block;
	width: 1.4rem;
	height: 2px;
	background: var(--ta-tinte);
	margin: 0.3rem 0;
}

@media (max-width: 991px) {
	nav { padding: 0.75rem 1.25rem; }

	nav button { display: block; }

	/* Klappmenü: script.js schaltet die Klasse „offen“ und aria-expanded */
	nav ul {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		padding-bottom: 0.75rem;
	}

	nav ul.offen { display: flex; }

	nav ul a:not(.ta-button) { padding: 0.6rem 0.25rem; }

	nav .ta-button { align-self: flex-start; }
}

/* ---------- Buttons ---------- */

.ta-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ta-abstand);
}

.ta-buttons--mitte { justify-content: center; }

.ta-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--ta-body);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.6;
	padding: 0.75rem 1.4rem;
	border-radius: 8px;
	border: 1.5px solid transparent;
	background: var(--ta-rot);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ta-button:hover { background: var(--ta-rot-dunkel); color: #fff; }

.ta-button--outline {
	border-color: var(--ta-tinte);
	color: var(--ta-tinte);
	background: transparent;
}

.ta-button--outline:hover {
	border-color: var(--ta-rot);
	color: var(--ta-rot);
	background: transparent;
}

@media (max-width: 575px) {
	.ta-buttons { width: 100%; }

	.ta-buttons .ta-button,
	nav .ta-button {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}

/* ---------- Hero (main > header): Text links, Bild rechts ---------- */

main > header {
	padding: 5rem var(--ta-rand) 5.5rem;
	display: grid;
	grid-template-columns: 55fr 45fr;
	gap: 3rem;
	align-items: center;
}

@media (max-width: 767px) {
	main > header { padding: 2rem 1.25rem 3.5rem; }
}

main > header h1 {
	font-size: clamp(2.2rem, 4vw, 3.2rem);
	-webkit-hyphens: manual;
	hyphens: manual;
}

main > header .ta-lead { max-width: none; }

main > header img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 16px;
}

@media (max-width: 781px) {
	main > header { grid-template-columns: 1fr; gap: 1.5rem; }

	main > header img { aspect-ratio: 16 / 9; }
}

/* ---------- Karten ---------- */

/* Karten einer Reihe sind gleich breit und gleich hoch; lange Wörter
   brechen, statt die Reihe zu sprengen */
.ta-karten {
	display: flex;
	gap: var(--ta-abstand);
}

.ta-karten > article {
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: anywhere;
	border-radius: 12px;
	padding: 1.5rem 1.6rem;
	background: var(--ta-flaeche);
	display: flex;
	flex-direction: column;
}

@media (max-width: 781px) {
	.ta-karten { flex-wrap: wrap; }

	.ta-karten > article { flex-basis: 100%; }
}

.ta-karten .ta-eyebrow { font-size: 0.7rem; margin-bottom: 0.6rem; }

/* Kartentitel trennen nur an weichen Trennstellen (U+00AD im Inhalt) */
.ta-karten h3 {
	font-size: 1.2rem;
	margin: 0 0 0.6rem;
	-webkit-hyphens: manual;
	hyphens: manual;
}

.ta-karten p,
.ta-karten address { color: var(--ta-grau); font-size: 0.95rem; }

.ta-karten p + p,
.ta-karten p + ul { margin-top: 0.75rem; }

.ta-karten ul { padding-left: 1.1rem; }

.ta-karten li { font-size: 0.95rem; margin-bottom: 0.35rem; }

/* ---------- Zweispaltige Sektionen (Text links, Panel rechts) ---------- */

/* Spalten oben ausrichten: das Panel umschließt nur seine Liste */
.ta-spalten {
	display: grid;
	grid-template-columns: 45fr 55fr;
	gap: 3rem;
	align-items: start;
}

main > header > div,
.ta-spalten > div { min-width: 0; overflow-wrap: anywhere; }

/* Textspalte mit Zwischenüberschriften (Projekte: Aufgabe, Im Betrieb) */
.ta-spalten h3 { font-size: 1.1rem; }

.ta-spalten p + h3 { margin-top: 1.6rem; }

.ta-spalten > div:not(.ta-panel) p:not(.ta-eyebrow) { color: var(--ta-grau); }

/* Beginnt die Textspalte mit einem Eyebrow, rückt das Panel auf die Höhe
   der Überschrift (Eyebrow-Zeile plus deren Abstand); gestapelt entfällt das */
.ta-spalten:has(> div:first-child > .ta-eyebrow:first-child) .ta-panel {
	margin-top: calc(0.78rem * 1.6 + var(--ta-abstand));
}

@media (max-width: 781px) {
	.ta-spalten { grid-template-columns: 1fr; gap: 1.25rem; }

	.ta-spalten:has(> div:first-child > .ta-eyebrow:first-child) .ta-panel { margin-top: 0; }
}

/* Panel: Liste in einem Kasten */
.ta-panel {
	background: var(--ta-flaeche);
	border-radius: 12px;
	padding: 1.6rem 1.8rem;
}

.ta-panel h3 { font-size: 1.05rem; }

.ta-panel h3 + ul { margin-top: 0.6rem; }

/* Nachfolgende Unterabschnitte im Panel */
.ta-panel ul + h3 { margin-top: 1.6rem; }

/* ---------- Listen innerhalb von Sektionen ---------- */

section ul {
	color: var(--ta-grau);
	padding-left: 1.2rem;
}

section li { margin-bottom: 0.4rem; }

/* ---------- Einblende-Animation beim Scrollen (script.js setzt ta-sichtbar) ---------- */

@media (prefers-reduced-motion: no-preference) {
	main > section,
	main > footer {
		opacity: 0;
		transform: translateY(16px);
		transition: opacity 0.5s ease, transform 0.5s ease;
	}

	main > .ta-sichtbar { opacity: 1; transform: none; }
}

/* ---------- Seitenfuß ---------- */

body > footer {
	background: var(--ta-tinte);
	color: #b9b1b1;
	padding: 2.5rem var(--ta-rand);
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

body > footer a { color: #fff; }
body > footer a:hover { color: #d98f8f; }

body > footer .ta-marke {
	gap: 0.6rem;
	color: #fff;
	font-size: 1.1rem;
}

/* Das transparente SVG lässt sich für den dunklen Grund weiß invertieren */
body > footer .ta-marke img {
	height: 1.7rem;
	filter: brightness(0) invert(1);
}

/* ---------- Rechtstexte (main > article) ---------- */

main > article { padding: 4rem var(--ta-rand); }

main > article > * { max-width: 46rem; }

@media (max-width: 767px) {
	main > article { padding: 3rem 1.25rem; }
}

main > article h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 2rem; }

main > article h1::after {
	content: "";
	display: block;
	width: 3.25rem;
	height: 4px;
	background: var(--ta-rot);
	margin-top: 1rem;
}

main > article h2 { font-size: 1.35rem; margin-top: 2.2rem; }

main > article h3 { font-size: 1.1rem; margin-top: 1.6rem; }

main > article p,
main > article li,
main > article address { color: var(--ta-grau); }

main > article li { margin-bottom: 0.5rem; }

main > article strong { color: var(--ta-tinte); }
