/*
 * Kopf- und Fusszeile.
 *
 * Farben, Schrift und Abstaende kommen aus tokens.css. Alle Regeln haengen an
 * eigenen Klassen (mq-*) statt an header/footer - so bleiben sie auch dann
 * eindeutig, wenn spaeter fremdes CSS dazukommt.
 */

/* ------------------------------------------------------- Sprungmarke -- */

/*
 * Sichtbar erst bei Tastaturfokus. Ohne sie muss man sich durch die gesamte
 * Navigation tabben, bevor der Inhalt drankommt.
 */
.mq-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 16px;
	background: var(--mq-yellow);
	color: var(--mq-dark);
	font-family: var(--mq-font);
	text-decoration: none;
}

.mq-skip-link:focus {
	left: 0;
}

/* ------------------------------------------------------------ Inhalt -- */

.mq-main {
	font-family: var(--mq-font);
	font-weight: 350;
	color: var(--mq-dark);
}

.mq-404 {
	padding: 96px var(--mq-gut);
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: flex-start;
}

/* ----------------------------------------------------------------- Logo -- */

.mq-logo {
	display: flex;
	align-items: center;
	gap: 11px;
	flex: none;
	color: #fff;
	text-decoration: none;
}

.mq-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	flex: none;
}

.mq-logo__text {
	font-family: var(--mq-font);
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: #fff;
}

/* ------------------------------------------------------------- Kopfzeile -- */

.mq-header {
	background: var(--mq-dark);
	color: #fff;
	font-family: var(--mq-font);
	font-weight: 350;
}

.mq-header--sticky {
	position: sticky;
	top: 0;
	z-index: 50;
}

.mq-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 16px var(--mq-gut);
	min-height: var(--mq-header-h);
}

.mq-header__menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 32px;
	flex: 1;
	min-width: 0;
}

.mq-nav {
	display: flex;
	gap: 32px;
	font-size: 16px;
	min-width: 0;
	flex-shrink: 1;
}

.mq-nav__link {
	position: relative;
	padding-bottom: 2px;
	white-space: nowrap;
	color: #fff;
	text-decoration: none;
}

/* Unterstreichung im Hover in Teal - gleiche Sprache wie auf der Landingpage. */
.mq-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 1px;
	width: 0;
	background: var(--mq-teal-bright);
	transition: width 0.2s ease;
}

.mq-nav__link:hover,
.mq-nav__link.is-current {
	color: var(--mq-teal-bright);
}

.mq-nav__link:hover::after,
.mq-nav__link.is-current::after {
	width: 100%;
}

.mq-header__cta {
	display: flex;
	gap: 16px;
	align-items: center;
	flex: none;
}

/* --------------------------------------------------------------- Burger -- */

.mq-burger {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: #fff;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.mq-burger__box {
	position: relative;
	display: block;
	width: 22px;
	height: 16px;
}

/*
 * Drei Striche aus einem Element: der mittlere ist die Box selbst, oben und
 * unten sind Pseudoelemente. Im offenen Zustand verschwindet der mittlere und
 * die beiden aeusseren kippen zum Kreuz.
 */
.mq-burger__bar,
.mq-burger__bar::before,
.mq-burger__bar::after {
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.mq-burger__bar {
	top: 7px;
}

.mq-burger__bar::before {
	content: "";
	top: -7px;
}

.mq-burger__bar::after {
	content: "";
	top: 7px;
}

.mq-burger[aria-expanded="true"] .mq-burger__bar {
	background: transparent;
}

.mq-burger[aria-expanded="true"] .mq-burger__bar::before {
	transform: translateY(7px) rotate(45deg);
}

.mq-burger[aria-expanded="true"] .mq-burger__bar::after {
	transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------- Fusszeile -- */

.mq-footer {
	background: var(--mq-dark);
	color: #fff;
	font-family: var(--mq-font);
	font-weight: 350;
	padding: 48px var(--mq-gut);
}

.mq-footer__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 32px;
	padding-bottom: 64px;
}

.mq-footer__nav {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
}

.mq-footer__nav a,
.mq-footer__legal a {
	color: #fff;
	text-decoration: none;
}

.mq-footer__nav a:hover,
.mq-footer__legal a:hover {
	color: var(--mq-teal-bright);
}

.mq-footer__cta {
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

.mq-footer__copy {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--mq-muted);
	text-align: center;
}

.mq-footer__legal {
	display: flex;
	gap: 32px;
	justify-content: center;
	flex-wrap: wrap;
	font-size: 14px;
	padding-top: 12px;
}

/* ----------------------------------------------------------------- Fokus -- */

/*
 * --mq-teal-deep ist der einzige Teal-Ton, der auf Weiss (5,4:1) und auf dem
 * Lila (3,7:1) die Kontrastschwelle nimmt - deshalb ueberall derselbe Ring.
 */
.mq-header a:focus-visible,
.mq-header button:focus-visible,
.mq-footer a:focus-visible {
	outline: 2px solid var(--mq-teal-deep);
	outline-offset: 3px;
}

/* ------------------------------------------------------------ Umbrueche -- */

@media (max-width: 900px) {
	.mq-burger {
		display: inline-flex;
	}

	.mq-header__inner {
		flex-wrap: wrap;
		gap: 12px;
	}

	/*
	 * Geschlossen wird das Panel per hidden-Attribut aus dem Fluss genommen
	 * (siehe shell.js) - so ist es auch fuer Screenreader und Tastatur weg.
	 */
	.mq-header__menu {
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 8px;
		padding: 8px 0 16px;
	}

	.mq-header__menu[hidden] {
		display: none;
	}

	.mq-nav {
		flex-direction: column;
		gap: 4px;
	}

	.mq-nav__link {
		padding: 12px 0;
		font-size: 18px;
	}

	/* Die Unterstreichung laeuft im Stapel ins Leere - dort reicht die Farbe. */
	.mq-nav__link::after {
		display: none;
	}

	.mq-header__cta .mq-btn {
		width: 100%;
	}

	.mq-footer__top {
		flex-direction: column;
		padding-bottom: 40px;
	}

	.mq-footer__legal {
		gap: 16px 24px;
	}
}

@media (max-width: 340px) {
	.mq-logo img {
		max-height: 26px;
	}

	.mq-logo__text {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mq-nav__link::after,
	.mq-burger__bar,
	.mq-burger__bar::before,
	.mq-burger__bar::after {
		transition: none;
	}
}
