/**
 * Sport Automobile – Unterseiten (Fahrzeuge, Finanzierung, Eintausch,
 * Über uns, Kontakt, Rechtliches). Wird nur auf Unterseiten geladen;
 * Tokens, Buttons, Karten und Fusszeile kommen aus style.css.
 */

/* ==========================================================================
   Seitenkopf: dunkles Bild, ca. 60 % der Bildschirmhöhe
   ========================================================================== */

.page-head {
	position: relative;
	display: flex;
	min-height: max(60vh, 480px);
	min-height: max(60svh, 480px);
	overflow: hidden;
	background: var(--black);
}

.page-head__media {
	position: absolute;
	inset: 0;
}

.page-head__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
}

/* Kontakt (Panorama mit vier Fahrzeugen): auf schmalen Bildschirmen den blauen Mercedes ganz zeigen */
@media (max-width: 899.98px) {
	.page-template-page-kontakt .page-head__media img {
		object-position: 64% 55%;
	}
}

/* Oben dunkel für die Kopfzeile, unten in Schwarz für den Titel, links etwas dunkler */
.page-head__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 10, 0.86) 0%, rgba(10, 10, 10, 0.4) 26%, rgba(10, 10, 10, 0.38) 48%, rgba(10, 10, 10, 0.88) 86%, #0a0a0a 100%),
		linear-gradient(90deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0) 70%);
}

.page-head__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 56px;
	padding-top: calc(var(--header-h) + clamp(16px, 2vw, 28px));
	padding-bottom: clamp(44px, 6vw, 88px);
}

/* H1 auf allen Unterseiten gleich gross; «Eintausch / Ankauf.» passt ab Desktop auf eine Zeile */
.page-head__title {
	max-width: none;
	margin: 0;
	color: var(--white);
	font-size: clamp(1.875rem, 1rem + 5vw, 5.75rem);
	font-stretch: 114%;
	font-weight: 760;
	line-height: 1;
	letter-spacing: -0.032em;
	text-wrap: balance;
}

/* Kurzer Satz: weiss, ca. 20 px, höchstens zwei Zeilen. Die zwei Zeilen sind immer
   reserviert, damit Dachzeile und Titel auf allen Seiten an derselben Stelle stehen. */
.page-head__lead {
	max-width: 44ch;
	min-height: 3em;
	margin: clamp(18px, 2vw, 26px) 0 0;
	color: var(--white);
	font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
	line-height: 1.5;
	text-wrap: pretty;
}

@media (max-width: 699.98px) {
	.page-head__lead {
		min-height: 4.5em;
	}
}

/* Sehr kleine Handys: Dachzeile schmaler, damit sie auf allen Seiten einzeilig bleibt */
@media (max-width: 379.98px) {
	.page-head .eyebrow {
		font-stretch: 108%;
		letter-spacing: 0.12em;
	}
}

/* Rechtliches: ohne Bild, schlicht auf Schwarz */
.page-head--plain {
	min-height: 0;
	border-bottom: 1px solid #222;
}

.page-head--plain .page-head__inner {
	gap: clamp(40px, 5vw, 72px);
	padding-top: clamp(28px, 3vw, 44px);
	padding-bottom: clamp(48px, 6vw, 88px);
}

.page-head--plain .page-head__title {
	max-width: 20ch;
	font-size: clamp(2.25rem, 1.3rem + 3.4vw, 4.5rem);
}

/* Brotkrumen */
.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.8125rem;
	line-height: 1.5;
	list-style: none;
}

.breadcrumb li + li::before {
	content: "/";
	margin: 0 10px;
	color: rgba(255, 255, 255, 0.4);
}

.breadcrumb a {
	color: var(--white);
	text-decoration: none;
}

.breadcrumb a:hover {
	text-decoration: underline;
	text-decoration-color: var(--red);
	text-underline-offset: 0.3em;
}

.breadcrumb [aria-current] {
	color: var(--sand);
}

/* ==========================================================================
   Fahrzeuge: Schlussband (Liste und Filter in fahrzeuge.css)
   ========================================================================== */

.cta-band__inner {
	display: grid;
	gap: 36px 64px;
	align-items: end;
}

.cta-band__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cta-band__actions .btn {
	justify-content: flex-start;
	padding-inline: 28px;
}

.btn__num {
	font-weight: 400;
	opacity: 0.85;
}

@media (min-width: 960px) {
	.cta-band__inner {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	}

	.cta-band__actions {
		width: min(100%, 380px);
		margin-left: auto;
	}
}


@media (max-width: 379.98px) {
	.btn__num {
		display: none;
	}
}

/* ==========================================================================
   Finanzierung
   ========================================================================== */

/* Vorteile Finanzierung: kurze Titel auf einer Zeile, ohne Platz für eine zweite */
.advantages--oneline .advantage__title {
	min-height: 0;
}

/* Kleine Laptops: vier schmale Karten, Titel leicht kleiner, damit sie einzeilig bleiben */
@media (min-width: 1080px) and (max-width: 1279.98px) {
	.advantages--oneline .advantage__title {
		font-size: 1.125rem;
	}
}

/* Zwei grosse Karten auf Schwarz */
.offers__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap);
}

@media (min-width: 900px) {
	.offers__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.offer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(22px, 4vw, 56px);
	border: 1px solid #262626;
	background: #141414;
}

.offer__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	width: 100%;
	margin-bottom: clamp(40px, 5vw, 72px);
}

.offer__num {
	color: var(--sand);
	font-size: 0.8125rem;
	font-stretch: 125%;
	font-weight: 500;
	letter-spacing: 0.12em;
}

.offer__partner {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--mute);
	font-size: 0.8125rem;
}

.partner-name {
	color: var(--white);
	font-size: 1rem;
	font-stretch: 112%;
	font-weight: 700;
	letter-spacing: 0.01em;
}

/* Partnerlogos einfarbig weiss */
.partner-logo {
	width: auto;
	height: 26px;
	filter: brightness(0) invert(1);
}

.offer__title {
	margin: 0 0 22px;
	font-size: clamp(1.625rem, 0.8rem + 4.2vw, 4.25rem);
	font-stretch: 114%;
	font-weight: 760;
	line-height: 1;
	letter-spacing: -0.03em;
}

.offer__text {
	max-width: 52ch;
	margin: 0 0 1em;
	color: var(--soft);
	font-size: 1.0625rem;
	text-wrap: pretty;
}

/* Button unten bündig, auch wenn die Texte unterschiedlich lang sind */
.offer__action {
	margin-top: auto;
	padding-top: 20px;
}

.offer__btn {
	max-width: 100%;
	white-space: normal;
}

.offer__btn .icon {
	width: 16px;
	height: 16px;
}

.offer__note {
	margin: 12px 0 0;
	color: var(--soft);
	font-size: 0.8125rem;
}

/* Gesetzlicher Pflichthinweis: gut sichtbar */
.credit-notice {
	margin: clamp(28px, 3vw, 44px) 0 0;
	padding: 20px 24px;
	border-left: 2px solid var(--red);
	background: #141414;
	color: var(--white);
	font-size: clamp(1rem, 0.94rem + 0.3vw, 1.1875rem);
	font-weight: 600;
	line-height: 1.45;
}

.credit-notice--small {
	padding: 6px 0 6px 18px;
	background: none;
	font-size: 0.9375rem;
	font-weight: 500;
}

.service__title {
	max-width: 24ch;
}

.service__text {
	margin-top: clamp(24px, 3vw, 40px);
}

/* Downloads mit Sprachwahl */
.downloads .head-row > div:first-child {
	max-width: 760px;
}

.lang-switch {
	display: inline-flex;
	border: 1px solid rgba(255, 255, 255, 0.45);
}

.lang-switch[hidden] {
	display: none;
}

.lang-switch__btn {
	min-width: 64px;
	height: 48px;
	padding: 0 18px;
	border: 0;
	background: none;
	color: var(--white);
	font: inherit;
	font-size: 0.875rem;
	font-stretch: 125%;
	font-weight: 600;
	letter-spacing: 0.12em;
	cursor: pointer;
}

.lang-switch__btn + .lang-switch__btn {
	border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.lang-switch__btn:hover {
	background: #1c1c1c;
}

.lang-switch__btn[aria-pressed="true"] {
	background: var(--white);
	color: var(--black);
}

.lang-switch__btn:focus-visible {
	outline-offset: -5px;
}

.downloads__grid {
	display: grid;
	gap: 56px var(--gap);
}

@media (min-width: 960px) {
	.downloads__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: clamp(32px, 4vw, 72px);
	}
}

.downloads__partner {
	display: flex;
	align-items: center;
	min-height: 32px;
	margin: 0 0 8px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.downloads__partner .partner-name {
	font-size: 1.25rem;
}

.files {
	margin: 0;
	padding: 0;
	list-style: none;
}

.file {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 18px 0;
	border-bottom: 1px solid #262626;
}

.file[hidden] {
	display: none;
}

.file > .icon {
	width: 30px;
	height: 30px;
	color: var(--red);
	stroke-width: 1.3;
}

.file__title {
	display: block;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.file__meta {
	display: block;
	margin-top: 4px;
	color: var(--mute);
	font-size: 0.8125rem;
}

.file__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: var(--white);
	font-size: 0.875rem;
	font-stretch: 106%;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.file__btn:hover {
	border-color: var(--white);
	background: var(--white);
	color: var(--black);
}

.file__btn .icon {
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
}

@media (max-width: 479.98px) {
	.file {
		gap: 14px;
	}

	.file__btn {
		padding: 0;
	}

	.file__btn-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

/* ==========================================================================
   Eintausch: Einleitung und drei Schritte
   ========================================================================== */

/* Einleitung mittig: Dachzeile und Text zentriert, max. ca. 720 px breit */
.intro__center {
	max-width: 720px;
	margin: clamp(8px, 2vw, 32px) auto 0;
	text-align: center;
}

.intro__text {
	margin: 0;
	color: var(--soft);
	font-size: clamp(1.125rem, 1.05rem + 0.25vw, 1.25rem);
	line-height: 1.75;
	text-wrap: pretty;
}

.intro__text .lead__accent {
	display: block;
	margin-bottom: 8px;
}

/* Erster Satz der Einleitung: etwas grösser, fast schwarz, fett */
.lead__accent {
	color: #111;
	font-size: 1.12em;
	font-weight: 700;
}

.steps {
	display: grid;
	gap: var(--gap);
	margin: clamp(56px, 6vw, 96px) 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.steps__item {
	padding: clamp(28px, 2.6vw, 40px) clamp(24px, 2.2vw, 34px) clamp(32px, 3vw, 44px);
	border-top: 2px solid #111;
	background: #f5f5f5;
}

.steps__num {
	display: block;
	margin-bottom: clamp(28px, 3vw, 48px);
	color: var(--red);
	font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
	font-stretch: 114%;
	font-weight: 250;
	line-height: 0.9;
	letter-spacing: -0.03em;
}

.steps__title {
	margin: 0 0 10px;
	color: #111;
	font-size: clamp(1.25rem, 1.05rem + 0.5vw, 1.5rem);
	font-stretch: 110%;
	font-weight: 650;
	line-height: 1.2;
}

.steps__text {
	margin: 0;
	color: #4a4a4a;
	text-wrap: pretty;
}

/* Formular-Abschnitt: links Kopf, rechts Formular */
.form-layout {
	display: grid;
	gap: 40px clamp(48px, 6vw, 112px);
}

@media (min-width: 1080px) {
	.form-layout {
		grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
		align-items: start;
	}

	.form-layout__head {
		position: sticky;
		top: calc(var(--header-h) + var(--top) + 40px);
	}
}

.form-layout__note {
	margin: 20px 0 0;
	color: var(--mute);
	font-size: 0.875rem;
}

/* ==========================================================================
   Über uns: Werte im Wechsel, Team
   ========================================================================== */

.value__grid {
	display: grid;
	gap: 40px clamp(48px, 6vw, 112px);
	align-items: center;
}

@media (min-width: 1000px) {
	.value__grid {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	}

	.value--reverse .value__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	}

	.value--reverse .value__media {
		order: 2;
	}
}

.value__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.value__num {
	display: block;
	margin-bottom: 22px;
	color: var(--sand);
	font-size: 0.8125rem;
	font-stretch: 125%;
	font-weight: 500;
	letter-spacing: 0.14em;
}

.is-light .value__num {
	color: var(--bronze);
}

.value__title {
	max-width: 13ch;
}

.value__lead {
	max-width: 42ch;
	margin-top: clamp(20px, 2.4vw, 32px);
	font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
}

.team__grid {
	display: grid;
	gap: 40px var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 600px) {
	.team__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.team__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.person__media img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.person__name {
	margin: 18px 0 4px;
	font-size: 1.125rem;
	font-stretch: 108%;
	font-weight: 650;
}

.person__role {
	margin: 0;
	color: var(--mute);
	font-size: 0.9375rem;
}

/* ==========================================================================
   Kontakt: vier grosse Felder, Anfahrt
   ========================================================================== */

.contact-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.contact-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.contact-cards .footer-card {
	padding: clamp(28px, 3vw, 48px);
	border-color: #d4d4d4;
	color: #111;
}

.contact-cards .footer-card .icon,
.contact-cards .footer-card .wa-icon {
	width: 34px;
	height: 34px;
	color: var(--red);
}

.contact-cards .footer-card__label {
	color: #6b6b6b;
}

.contact-cards .footer-card__value {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
}

@media (max-width: 399.98px) {
	.contact-cards .footer-card {
		column-gap: 14px;
		padding: 24px 20px;
	}

	.contact-cards .footer-card__value {
		font-size: 1.0625rem;
		overflow-wrap: anywhere;
	}
}

.contact-cards a.footer-card:hover {
	border-color: #111;
	background: #111;
	color: var(--white);
}

.contact-cards a.footer-card:hover .footer-card__label {
	color: rgba(255, 255, 255, 0.65);
}

.visit__grid {
	display: grid;
	gap: 40px var(--gap);
}

@media (min-width: 1080px) {
	.visit__grid {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		align-items: stretch;
		column-gap: clamp(40px, 5vw, 96px);
	}

	/* Karte so hoch wie der Textblock rechts */
	.visit .map {
		grid-area: auto;
		height: 100%;
		min-height: 0;
		aspect-ratio: auto;
	}
}

.visit__title {
	font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
}

.visit .address {
	margin: 24px 0 0;
	color: #4a4a4a;
	font-size: 1.0625rem;
	line-height: 1.7;
}

.visit__label {
	margin: 36px 0 12px;
	color: #111;
	font-size: 0.75rem;
	font-stretch: 125%;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.visit__btn {
	margin-top: 32px;
}

@media (max-width: 599.98px) {
	.visit__btn {
		width: 100%;
	}
}

/* Kontakt: «Besuchen Sie uns» auf Schwarz, Karte dunkel in Graustufen */
.visit--dark .address {
	color: rgba(255, 255, 255, 0.65);
}

.visit--dark .visit__label {
	color: var(--white);
}

.visit--dark .hours {
	--line: #222;
}

.visit--dark .hours dt {
	color: var(--white);
}

.visit--dark .hours dd {
	color: rgba(255, 255, 255, 0.65);
}

.visit--dark .map {
	background: #161616;
}

.visit--dark .map iframe {
	filter: grayscale(1) invert(0.92) contrast(0.9);
}

/* ==========================================================================
   Rechtliches: lesbare Textbreite, Inhaltsverzeichnis
   ========================================================================== */

.legal {
	padding-top: clamp(56px, 7vw, 112px);
}

.legal__grid {
	display: grid;
	gap: 48px;
}

@media (min-width: 1080px) {
	.legal__grid.has-toc {
		grid-template-columns: minmax(0, 3.6fr) minmax(0, 8.4fr);
		gap: clamp(48px, 6vw, 112px);
		align-items: start;
	}

	.toc {
		position: sticky;
		top: calc(var(--header-h) + var(--top) + 32px);
		max-height: calc(100vh - var(--header-h) - var(--top) - 64px);
		overflow-y: auto;
	}
}

.toc__title {
	margin: 0 0 14px;
	color: #111;
	font-size: 0.75rem;
	font-stretch: 125%;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.toc__list {
	margin: 0;
	padding: 0;
	border-top: 1px solid #e5e5e5;
	list-style: none;
	counter-reset: toc;
}

.toc__list li {
	border-bottom: 1px solid #e5e5e5;
}

.toc__list a {
	display: flex;
	gap: 14px;
	padding: 12px 0;
	color: #111;
	font-size: 0.9375rem;
	line-height: 1.35;
	text-decoration: none;
}

.toc__list a::before {
	content: counter(toc, decimal-leading-zero);
	counter-increment: toc;
	flex: none;
	padding-top: 0.2em;
	color: var(--bronze);
	font-size: 0.75rem;
	font-stretch: 125%;
	font-weight: 500;
}

.toc__list a:hover {
	color: var(--red-fill);
}

.prose {
	max-width: 72ch;
	color: #2a2a2a;
	font-size: 1.0625rem;
	line-height: 1.7;
	overflow-wrap: break-word;
}

.prose h2 {
	margin: 2.2em 0 0.7em;
	color: #111;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-stretch: 110%;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	scroll-margin-top: calc(var(--header-h) + var(--top) + 24px);
}

.prose h3 {
	margin: 1.8em 0 0.5em;
	color: #111;
	font-size: 1.1875rem;
	font-stretch: 106%;
	font-weight: 650;
	line-height: 1.3;
}

.prose h4 {
	margin: 1.5em 0 0.4em;
	color: #111;
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.35;
}

.prose > :first-child {
	margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
	margin: 0 0 1em;
}

.prose ul,
.prose ol {
	padding-left: 1.3em;
}

.prose li + li {
	margin-top: 0.45em;
}

.prose li::marker {
	color: var(--bronze);
	font-weight: 600;
}

.prose a {
	color: #111;
	text-decoration: underline;
	text-decoration-color: var(--red);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	overflow-wrap: anywhere;
}

.prose a:hover {
	color: var(--red-fill);
}

.prose strong {
	color: #111;
	font-weight: 650;
}

.prose .is-note {
	color: #6b6b6b;
	font-size: 0.9375rem;
}
