/*
Theme Name: Garage Europa
Theme URI: https://garage-europa.ch
Author: Onepath
Description: Auftritt der Garage Europa GmbH in Neuheim ZG. Werkstattschild als Marke, Öffnungszeiten aus einer Quelle, kein Formular – die Nummer steht im Mittelpunkt.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: garage-europa
*/

/* ---------------------------------------------------------------- Grundlage */

:root {
	--schwarz: #15181D;
	--nacht: #12233E;
	--papier: #F3F2EE;
	--blau: #1B4B9B;
	--gold: #F2C014;
	--grau: #6A6B70;
	--linie: rgba(21, 24, 29, 0.16);

	--rand: clamp(1.1rem, 4vw, 4rem);
	--breit: 72rem;
	--schmal: 44rem;

	--schild: var(--wp--preset--font-family--schild, "Arial Narrow", sans-serif);
	--fliess: var(--wp--preset--font-family--text, sans-serif);
}

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

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

body {
	margin: 0;
	background: var(--papier);
	color: var(--schwarz);
	font-family: var(--fliess);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
	font-family: var(--schild);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	margin: 0;
	text-wrap: balance;
	hyphens: auto;
	overflow-wrap: break-word;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--blau);
	color: #FFFFFF;
	padding: 0.75rem 1.25rem;
	font-weight: 600;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- Band und Kopf */

.band {
	background: var(--nacht);
	color: #D5DAE4;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.3rem 1.5rem;
	padding: 0.45rem var(--rand);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
}

.band p { margin: 0; }
.band__status { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.band__status.ist-offen { color: #8FD694; }
.band__status.ist-zu { color: var(--gold); }

.status__punkt {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}

.kopf {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--papier);
	border-bottom: 1px solid var(--linie);
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.7rem var(--rand);
}

.kopf__marke { display: block; flex: none; }
.kopf__marke svg { width: clamp(10rem, 19vw, 13.5rem); height: auto; display: block; }

/* Silhouette im Auftakt: zeigt auf den ersten Blick, worum es geht. */
.auto {
	position: absolute;
	inset: 0;
	color: var(--gold);
	opacity: 0.34;
	pointer-events: none;
	z-index: 0;
}

.auto svg { width: 100%; height: 100%; display: block; }

.nav { margin-left: auto; }

.klapp-knopf {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 0.28rem;
	width: 2.75rem;
	height: 2.5rem;
	padding: 0 0.55rem;
	background: none;
	border: 2px solid var(--schwarz);
	cursor: pointer;
}

.klapp-knopf span[aria-hidden] { display: block; height: 2px; background: var(--schwarz); }
.klapp-knopf[aria-expanded="true"] { background: var(--schwarz); }
.klapp-knopf[aria-expanded="true"] span[aria-hidden] { background: var(--papier); }

.nav ul {
	display: flex;
	gap: clamp(1rem, 2.5vw, 2.25rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav a {
	font-family: var(--schild);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	padding-bottom: 0.15rem;
	border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav .current-menu-item > a { border-bottom-color: var(--blau); }

.kopf__tel {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--blau);
	color: #FFFFFF;
	text-decoration: none;
	font-family: var(--schild);
	font-size: 1.0625rem;
	letter-spacing: 0.06em;
	padding: 0.5rem 1rem;
	border: 2px solid var(--blau);
	flex: none;
}

.kopf__tel:hover { background: var(--schwarz); border-color: var(--schwarz); }

/* ----------------------------------------------------------------- Abschnitte */

.streifen {
	padding: clamp(3rem, 8vh, 6rem) var(--rand);
}

.streifen--dunkel {
	background: var(--nacht);
	color: var(--papier);
	background-image: repeating-linear-gradient(135deg, rgba(242, 192, 20, 0.12) 0 14px, transparent 14px 44px);
}

.mitte { max-width: var(--breit); margin-inline: auto; }

.ueberschrift {
	font-size: clamp(1.9rem, 4.4vw, 3.1rem);
	max-width: 22ch;
}

.vorlauf {
	font-family: var(--schild);
	font-size: 0.875rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--blau);
	margin: 0 0 0.6rem;
}

.streifen--dunkel .vorlauf,
.held .vorlauf { color: var(--gold); }

.gross { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); }

/* ------------------------------------------------------------------- Auftakt */

.held {
	position: relative;
	background: var(--nacht);
	color: var(--papier);
	padding: clamp(2.5rem, 7vh, 5rem) var(--rand) clamp(8rem, 20vh, 14rem);
	background-image: var(--foto, repeating-linear-gradient(135deg, rgba(242, 192, 20, 0.10) 0 16px, transparent 16px 52px));
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.held::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 35, 62, 0.95) 0%, rgba(18, 35, 62, 0.86) 45%, rgba(18, 35, 62, 0.62) 100%);
	z-index: 0;
}

.held > *:not(.auto) { position: relative; z-index: 1; }

.held__inhalt { max-width: var(--breit); margin-inline: auto; }

.held h1 {
	font-size: clamp(2rem, min(6.2vw, 8.4vh), 4.5rem);
	max-width: 17ch;
	margin-bottom: 1rem;
}

.held h1 em { font-style: normal; color: var(--blau); }

.held__satz {
	max-width: 46ch;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	color: #D8D5CE;
}

.held__reihe {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 2rem;
}

/* -------------------------------------------------------------- Bausteine */

.status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--schild);
	font-size: 0.9375rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid currentColor;
	padding: 0.35rem 0.85rem;
	margin: 0;
}

.status--offen { color: #2F7D3A; }
.status--zu { color: var(--blau); }
.streifen--dunkel .status--offen,
.held .status--offen { color: #8FD694; }
.held .status--zu { color: var(--gold); }

.tel {
	font-family: var(--schild);
	font-size: 1.125rem;
	letter-spacing: 0.06em;
	text-decoration: none;
	border-bottom: 2px solid var(--blau);
	white-space: nowrap;
}

.tel--gross { font-size: clamp(1.6rem, 4vw, 2.5rem); }

.knopf {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--blau);
	color: #FFFFFF;
	text-decoration: none;
	font-family: var(--schild);
	font-size: 1.0625rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.85rem 1.5rem;
	border: 2px solid var(--blau);
	transition: background 0.15s ease, color 0.15s ease;
}

.knopf:hover,
.knopf--still:hover { background: var(--gold); border-color: var(--gold); color: var(--nacht); }

.knopf--still {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

/* Im Fliesstext gilt sonst die Farbe für Verweise und der Knopf wird unlesbar. */
.text a.knopf { color: #FFFFFF; }
.text a.knopf--still { color: var(--schwarz); }
.text a.knopf:hover { color: var(--nacht); }

/* --------------------------------------------------------------- Schilder */

.schilder {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	margin-top: 2.5rem;
}

/* Bleibt in der letzten Reihe nur eine Karte übrig, nimmt sie die ganze Breite. */
.schilder > :last-child:nth-child(3n + 1) { grid-column: 1 / -1; }

@media (max-width: 62rem) {
	.schilder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.schilder > :last-child:nth-child(3n + 1) { grid-column: auto; }
	.schilder > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 38rem) {
	.schilder > :last-child { grid-column: auto; }
}

@media (max-width: 38rem) {
	.schilder { grid-template-columns: 1fr; }
}

.schild-karte {
	background: var(--papier);
	border: 2px solid var(--schwarz);
	box-shadow: 5px 5px 0 var(--schwarz);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.schild-karte:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--blau); }

.schild-karte svg { width: 2.25rem; height: 2.25rem; color: var(--blau); }

.schild-karte h3 {
	font-size: 1.25rem;
	letter-spacing: 0.04em;
}

.schild-karte p { font-size: 0.9375rem; color: var(--grau); margin: 0; }

/* ------------------------------------------------------------- Die zwei Leute */

.leute {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
	margin: 2.25rem 0 0.5rem;
}

.leute figure { margin: 0; }

.leute img {
	width: 100%;
	height: clamp(13rem, 28vw, 20rem);
	object-fit: cover;
	border-bottom: 4px solid var(--gold);
}

.leute figcaption {
	font-size: 0.9375rem;
	color: #C3C9D4;
	padding-top: 0.6rem;
}

/* ----------------------------------------------------------------- Gründe */

.gruende {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: clamp(1.5rem, 4vw, 3rem);
	margin-top: 2.5rem;
}

.streifen--dunkel .grund__zahl { color: var(--gold); }

.grund__zahl {
	font-family: var(--schild);
	font-size: clamp(3rem, 7vw, 4.5rem);
	line-height: 1;
	color: var(--blau);
	margin: 0 0 0.4rem;
}

.grund h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.grund p { margin: 0; color: var(--grau); }
.streifen--dunkel .grund p { color: #C3C0B9; }

/* ----------------------------------------------------------------- Ablauf */

.ablauf {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
	counter-reset: schritt;
}

.ablauf > div {
	border-top: 3px solid var(--blau);
	padding-top: 0.9rem;
	counter-increment: schritt;
}

.ablauf h3::before {
	content: counter( schritt, decimal-leading-zero ) " ";
	color: var(--blau);
}

.ablauf h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.ablauf p { margin: 0; color: var(--grau); }

/* -------------------------------------------------------- Leistungsblöcke */

.leistungen {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
	gap: 0 clamp(1.5rem, 4vw, 3.5rem);
	margin-top: 1.5rem;
}

.leistung {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1rem 1.5rem;
	padding: 1.75rem 0;
	border-top: 1px solid var(--linie);
	align-items: start;
}

.leistungen .leistung:nth-last-child(-n+2) { border-bottom: 1px solid var(--linie); }
.leistung svg { width: 2.5rem; height: 2.5rem; color: var(--blau); }
.leistung h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); margin-bottom: 0.5rem; }
.leistung p { max-width: 58ch; }
.leistung p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Anfahrt */

.anfahrt {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
	margin-top: 2rem;
}

.karte {
	border: 2px solid var(--schwarz);
	background: #EDE9E1;
	position: relative;
}

.karte svg { width: 100%; height: auto; display: block; }

.karte__quelle {
	font-size: 0.6875rem;
	color: var(--grau);
	padding: 0.35rem 0.6rem;
	margin: 0;
	border-top: 1px solid var(--linie);
	background: var(--papier);
}

.wege { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.zeiten {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.zeiten th,
.zeiten td {
	text-align: left;
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--linie);
	font-weight: 400;
}

.zeiten td { text-align: right; }
.zeiten .ist-heute { font-weight: 700; color: var(--blau); }
.fuss .zeiten th, .fuss .zeiten td { border-color: rgba(243, 242, 238, 0.18); }
.fuss .zeiten .ist-heute { color: var(--gold); }

.kontaktdaten {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.kontaktdaten strong {
	display: block;
	font-family: var(--schild);
	font-size: 0.8125rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--grau);
	font-weight: 500;
}

/* -------------------------------------------------------------- Innenseiten */

.seitenkopf {
	max-width: var(--breit);
	margin-inline: auto;
	padding: clamp(2.5rem, 7vh, 4.5rem) var(--rand) 0;
}

.seitenkopf h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); }

.text {
	max-width: var(--breit);
	margin-inline: auto;
	padding: 1.5rem var(--rand) clamp(3rem, 8vh, 5rem);
}

.text > p,
.text > ul,
.text > ol,
.text > h2,
.text > h3 { max-width: 62ch; }

.text h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.5rem 0 0.75rem; }
.text h3 { font-size: 1.1875rem; margin: 1.75rem 0 0.5rem; }
.text a { color: var(--blau); }
.text li { margin-bottom: 0.35rem; }

/* -------------------------------------------------------------------- Fuss */

.fuss {
	background: var(--nacht);
	color: #D5DAE4;
	padding: clamp(2.5rem, 6vh, 4rem) var(--rand) 1.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	gap: 2rem clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

.fuss__marke svg { width: 13rem; height: auto; }
.fuss h2 {
	font-size: 0.8125rem;
	letter-spacing: 0.2em;
	color: var(--gold);
	margin-bottom: 0.75rem;
}

.fuss a { color: inherit; }
.fuss a:hover { color: #FFFFFF; }
.fuss nav ul { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.3rem; }
.fuss nav a { text-decoration: none; }
.fuss__seiten { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.fuss__seiten a { text-decoration: none; }
.fuss__zeile {
	grid-column: 1 / -1;
	border-top: 1px solid rgba(243, 242, 238, 0.18);
	padding-top: 1rem;
	margin: 0;
	font-size: 0.8125rem;
	color: #96938D;
}

/* ---------------------------------------------------------------- Bewegung */

@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.schild-karte,
		.grund,
		.ablauf > div,
		.leistung,
		.anfahrt > * {
			animation: auftritt linear both;
			animation-timeline: view();
			animation-range: entry 5% entry 45%;
		}
	}

	@keyframes auftritt {
		from { opacity: 0; transform: translateY(1.25rem); }
		to { opacity: 1; transform: none; }
	}

	.band__status.ist-offen .status__punkt { animation: puls 2.4s ease-in-out infinite; }

	@keyframes puls {
		0%, 100% { opacity: 1; }
		50% { opacity: 0.35; }
	}
}

/* ------------------------------------------------------------------- Handy */

@media (max-width: 52rem) {
	.kopf { flex-wrap: wrap; row-gap: 0.6rem; }
	.kopf__marke svg { width: 10.5rem; }

	.klapp-knopf { display: flex; order: 2; margin-left: auto; }

	.nav { order: 3; width: 100%; margin-left: 0; }
	.js .nav { display: none; }
	.js .nav.ist-offen { display: block; }

	.nav ul { flex-direction: column; gap: 0.2rem; padding-top: 0.5rem; }
	.nav a { display: block; padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }

	.leistung { grid-template-columns: 1fr; }
	.band { font-size: 0.75rem; }
}

/* ------------------------------------------------------------------- Druck */

@media print {
	.band, .kopf__tel, .klapp-knopf, .nav, .skip, .wege, .auto { display: none !important; }
	body { background: #FFFFFF; color: #000000; font-size: 11pt; }
	.held, .streifen--dunkel, .fuss {
		background: #FFFFFF !important;
		color: #000000 !important;
		background-image: none !important;
	}
	.held::after { display: none; }
	.held h1 { font-size: 20pt; }
	.knopf, .tel {
		background: none !important;
		color: #000000 !important;
		border: 0;
		padding: 0;
		text-decoration: underline;
	}
	.status { border-color: #000000; color: #000000 !important; }
	.karte { border-color: #000000; }
	.schilder { display: grid; grid-template-columns: repeat(2, 1fr); }
	.leute img { height: 6cm; border-bottom: 0; }
	.leute figcaption { color: #000000; }
	.schild-karte { box-shadow: none; break-inside: avoid; }
	.fuss__zeile, .fuss p, .held__satz { color: #000000 !important; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
