/* ==========================================================================
   softwerk – Theme-Styles
   Schriften: im Customizer wählbar (Allgemein › Schriften), alle lokal
   eingebunden – @font-face-Regeln erzeugt inc/fonts.php
   ========================================================================== */


:root {
	--sw-tinte: #17324d;      /* Werkstattblau – Text, Flächen */
	--sw-tinte-2: #224868;
	--sw-papier: #f2f4f6;     /* kühles Hellgrau */
	--sw-weiss: #ffffff;
	--sw-signal: #f0b400;     /* Zahnrad-Gelb – sparsam */
	--sw-petrol: #1f6f73;     /* Links */
	--sw-grau: #56687a;
	--sw-linie: #d5dce3;
	/* Abgeleitete Töne – werden aus den Customizer-Farben neu berechnet */
	--sw-on-tinte: #ffffff;
	--sw-signal-hover: #ffc61a;
	--sw-on-signal: #17324d;
	--sw-band-bg: #17324d;
	--sw-band-text: #ffffff;
	--sw-band-muted: #c9d6e2;
	--sw-band-btn: #f0b400;
	--sw-on-band-btn: #17324d;
	--sw-footer-bg: #10263b;
	--sw-footer-text: #b9c2ca;

	--sw-head: "Adventor", "Century Gothic", "Avenir Next", sans-serif;
	--sw-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--sw-step--1: 0.875rem;
	--sw-step-0: 1.0625rem;
	--sw-step-1: 1.3125rem;
	--sw-step-2: 1.75rem;
	--sw-step-3: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
	--sw-step-4: clamp(2.5rem, 1.5rem + 4.2vw, 4.5rem);

	--sw-wrap: 74rem;
	--sw-gutter: clamp(1.25rem, 4vw, 3rem);
	--sw-space: clamp(4rem, 8vw, 7.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: var(--sw-body);
	font-size: var(--sw-step-0);
	line-height: 1.6;
	color: var(--sw-tinte);
	background: var(--sw-weiss);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
	font-family: var(--sw-head);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0 0 0.6em;
	text-wrap: balance;
}
h1 { font-size: var(--sw-step-4); }
h2 { font-size: var(--sw-step-3); }
h3 { font-size: var(--sw-step-1); line-height: 1.25; }
p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--sw-petrol); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--sw-tinte); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--sw-tinte); outline-offset: 3px; border-radius: 2px; box-shadow: 0 0 0 6px var(--sw-signal); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	top: 1rem; left: 1rem; padding: 0.75rem 1rem;
	background: var(--sw-signal); color: var(--sw-tinte);
}

.sw-wrap { width: 100%; max-width: var(--sw-wrap); margin-inline: auto; padding-inline: var(--sw-gutter); }

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */
.sw-header { border-bottom: 1px solid var(--sw-linie); background: var(--sw-weiss); position: relative; z-index: 20; }
.sw-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 5rem; }

.sw-brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--sw-tinte); }
.sw-brand:hover { color: var(--sw-tinte); }
.sw-brand__gear { width: 2.25rem; height: 2.25rem; color: var(--sw-tinte); }
.sw-brand__gear .hub { fill: var(--sw-signal); }
.sw-brand__name { font-family: var(--sw-head); font-weight: 700; font-size: 1.375rem; line-height: 1; }
.sw-brand__sub { display: block; font-family: var(--sw-body); font-weight: 400; font-size: 0.8125rem; color: var(--sw-grau); margin-top: 0.25rem; }
.custom-logo { max-height: 3rem; width: auto; }

.sw-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; }
.sw-nav a { color: var(--sw-tinte); text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.sw-nav a:hover,
.sw-nav .current-menu-item > a,
.sw-nav .current_page_item > a { border-bottom-color: var(--sw-signal); }

.sw-nav-toggle {
	display: none; background: none; border: 1px solid var(--sw-linie); border-radius: 4px;
	padding: 0.5rem 0.75rem; font: inherit; font-weight: 600; color: var(--sw-tinte); cursor: pointer;
}

@media (max-width: 52rem) {
	.sw-nav-toggle { display: inline-block; }
	.sw-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sw-weiss); border-bottom: 1px solid var(--sw-linie); }
	.sw-nav.is-open { display: block; }
	.sw-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--sw-gutter) 1.25rem; }
	.sw-nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--sw-linie); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.sw-hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; position: relative; color: var(--sw-tinte); }
.sw-hero > .sw-wrap { position: relative; z-index: 1; }
/* Hintergrundbild mit Überlagerung (Bild und Werte kommen aus dem Customizer) */
.sw-hero--image { background-size: cover; background-repeat: no-repeat; padding-block: clamp(5rem, 12vw, 9rem); }
.sw-hero--image::before { content: ""; position: absolute; inset: 0; background: var(--sw-hero-overlay, #000); opacity: var(--sw-hero-overlay-o, .4); }
.sw-hero__grid--solo { grid-template-columns: minmax(0, 46rem); }
.sw-hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.sw-hero h1 { margin-bottom: 0.5em; }
.sw-hero__lead { font-size: var(--sw-step-1); line-height: 1.5; color: var(--sw-grau); max-width: 34ch; margin-bottom: 2rem; }

.sw-hero__gear { position: relative; aspect-ratio: 1; max-width: 26rem; justify-self: end; width: 100%; }
.sw-hero__gear img { width: 100%; height: 100%; object-fit: contain; animation: sw-turn 2.4s cubic-bezier(.2,.7,.2,1) both; transform-origin: 50% 50%; }
/* „30 Jahre“ als Aufkleber am Rand – die Mitte (CD) bleibt frei */
.sw-hero__badge {
	position: absolute; left: -4%; bottom: 2%; margin: 0;
	width: 36%; aspect-ratio: 1; border-radius: 50%;
	display: grid; place-content: center; text-align: center;
	background: var(--sw-signal); color: var(--sw-on-signal);
	font-family: var(--sw-head);
	box-shadow: 0 0 0 6px var(--sw-weiss);
}
.sw-hero__badge strong { display: block; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 0.9; }
.sw-hero__badge span { font-family: var(--sw-body); font-size: clamp(0.6875rem, 1vw, 0.8125rem); line-height: 1.25; margin-top: 0.25rem; padding-inline: 0.5rem; }

@keyframes sw-turn { from { transform: rotate(-90deg); } to { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .sw-hero__gear img { animation: none; } }

@media (max-width: 52rem) {
	.sw-hero__grid { grid-template-columns: 1fr; }
	.sw-hero__gear { max-width: 14rem; justify-self: start; order: -1; }
}

/* Buttons */
.sw-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.sw-button {
	display: inline-block; padding: 0.875rem 1.5rem; border-radius: 4px;
	background: var(--sw-tinte); color: var(--sw-on-tinte); text-decoration: none;
	font-weight: 600; font-size: 1rem; line-height: 1.2; border: 2px solid var(--sw-tinte);
}
.sw-button:hover { background: var(--sw-tinte-2); border-color: var(--sw-tinte-2); color: var(--sw-on-tinte); }
.sw-button--ghost { background: transparent; color: var(--sw-tinte); }
.sw-button--ghost:hover { background: var(--sw-papier); color: var(--sw-tinte); border-color: var(--sw-tinte); }
.sw-button--signal { background: var(--sw-signal); border-color: var(--sw-signal); color: var(--sw-on-signal); }
.sw-button--signal:hover { background: var(--sw-signal-hover); border-color: var(--sw-signal-hover); color: var(--sw-on-signal); }

/* --------------------------------------------------------------------------
   Zeitleiste (echte Abfolge → nummerierte Struktur gerechtfertigt)
   -------------------------------------------------------------------------- */
.sw-timeline { background: var(--sw-papier); border-block: 1px solid var(--sw-linie); }
.sw-timeline ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.sw-timeline li { padding: 1.75rem 1.5rem 1.75rem 0; position: relative; }
.sw-timeline li + li { padding-left: 1.5rem; border-left: 1px solid var(--sw-linie); }
.sw-timeline__year { font-family: var(--sw-head); font-weight: 700; font-size: var(--sw-step-2); line-height: 1; display: block; margin-bottom: 0.5rem; }
.sw-timeline li:last-child .sw-timeline__year { color: var(--sw-petrol); }
.sw-timeline p { margin: 0; color: var(--sw-grau); font-size: 0.9375rem; }

@media (max-width: 40rem) {
	.sw-timeline ol { grid-template-columns: 1fr; }
	.sw-timeline li, .sw-timeline li + li { padding: 1.25rem 0; border-left: 0; }
	.sw-timeline li + li { border-top: 1px solid var(--sw-linie); }
}

/* --------------------------------------------------------------------------
   Abschnitte
   -------------------------------------------------------------------------- */
.sw-section { padding-block: var(--sw-space); }
.sw-section--papier { background: var(--sw-papier); }
.sw-section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.sw-section__head h2 { margin: 0; }
.sw-section__head p { margin: 0; color: var(--sw-grau); }
@media (max-width: 52rem) { .sw-section__head { grid-template-columns: 1fr; gap: 1rem; } }

/* Leistungen – Zeilen statt Kartenraster */
.sw-services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--sw-tinte); }
.sw-service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; padding-block: 2rem; border-bottom: 1px solid var(--sw-linie); }
.sw-service h3 { margin: 0; font-size: var(--sw-step-2); }
.sw-service p { margin: 0; }
.sw-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-content: start; }
.sw-tags li { font-size: 0.8125rem; font-weight: 600; padding: 0.25rem 0.625rem; border: 1px solid var(--sw-linie); border-radius: 999px; color: var(--sw-grau); background: var(--sw-weiss); }
@media (max-width: 52rem) { .sw-service { grid-template-columns: 1fr; gap: 0.75rem; } }

/* Referenzen */
.sw-refs { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.25rem, 3vw, 2rem); }
.sw-ref { grid-column: span 4; display: flex; flex-direction: column; }
.sw-refs--featured .sw-ref:first-child { grid-column: span 8; grid-row: span 2; }
.sw-refs--featured .sw-ref:first-child .sw-ref__media { aspect-ratio: 16 / 11; }
.sw-refs--featured .sw-ref:first-child h3 { font-size: var(--sw-step-2); }
.sw-ref a { color: inherit; text-decoration: none; }
.sw-ref__media { aspect-ratio: 4 / 3; background: var(--sw-tinte); overflow: hidden; border-radius: 4px; margin-bottom: 1rem; position: relative; }
.sw-ref__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sw-ref a:hover .sw-ref__media img { transform: scale(1.03); }
.sw-ref__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.18); }
.sw-ref__placeholder svg { width: 40%; }
.sw-ref__placeholder .hub { fill: none; }
.sw-ref__cat { font-size: 0.8125rem; font-weight: 600; color: var(--sw-petrol); margin-bottom: 0.375rem; }
.sw-ref h3 { margin: 0 0 0.375rem; }
.sw-ref a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--sw-signal); text-underline-offset: 0.2em; }
.sw-ref p { margin: 0; color: var(--sw-grau); font-size: 0.9375rem; }
@media (max-width: 64rem) { .sw-ref { grid-column: span 6; } .sw-refs--featured .sw-ref:first-child { grid-column: span 12; grid-row: auto; } }
@media (max-width: 40rem) { .sw-ref { grid-column: span 12; } }

.sw-more { margin-top: 2.5rem; }

/* Werkstatt / Person */
.sw-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sw-about__quote { font-family: var(--sw-head); font-size: var(--sw-step-3); line-height: 1.2; margin: 0; }
.sw-about__person { display: flex; gap: 1rem; align-items: center; margin-top: 2rem; }
.sw-about__person img { width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; }
.sw-about__person strong { display: block; }
.sw-about__person span { color: var(--sw-grau); font-size: 0.9375rem; }
.sw-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; margin: 2rem 0 0; }
.sw-facts dt { font-weight: 600; }
.sw-facts dd { margin: 0.25rem 0 0; color: var(--sw-grau); font-size: 0.9375rem; }
@media (max-width: 52rem) { .sw-about { grid-template-columns: 1fr; } }
@media (max-width: 30rem) { .sw-facts { grid-template-columns: 1fr; } }

/* Kontakt */
.sw-contact { background: var(--sw-band-bg); color: var(--sw-band-text); padding-block: var(--sw-space); }
.sw-contact a { color: var(--sw-petrol); }
.sw-contact a:hover { color: var(--sw-petrol); text-decoration-thickness: 3px; }
.sw-contact :focus-visible { outline-color: var(--sw-tinte); }
.sw-contact .sw-button--signal { background: var(--sw-band-btn); border-color: var(--sw-band-btn); color: var(--sw-on-band-btn); }
.sw-contact .sw-button--signal:hover { filter: brightness(1.12); color: var(--sw-on-band-btn); text-decoration: none; }
.sw-contact__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.sw-contact h2 { font-size: var(--sw-step-4); margin-bottom: 0.4em; }
.sw-contact p { color: var(--sw-grau); }
.sw-contact address { font-style: normal; font-size: var(--sw-step-1); line-height: 1.6; }
.sw-contact address strong { font-family: var(--sw-head); }
.sw-contact .sw-phone { font-family: var(--sw-head); font-weight: 700; font-size: var(--sw-step-2); text-decoration: none; display: inline-block; margin-top: 1rem; }
@media (max-width: 52rem) { .sw-contact__grid { grid-template-columns: 1fr; } }

/* Fuß */
.sw-footer { background: var(--sw-footer-bg); color: var(--sw-footer-text); font-size: 0.875rem; padding-block: 1.75rem; }
.sw-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.sw-footer a { color: var(--sw-petrol); text-decoration: none; }
.sw-footer a:hover { color: var(--sw-petrol); text-decoration: underline; }
.sw-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; }

/* --------------------------------------------------------------------------
   Inhaltsseiten
   -------------------------------------------------------------------------- */
.sw-page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--sw-linie); }
.sw-page-head h1 { font-size: var(--sw-step-3); margin: 0; max-width: 24ch; }
.sw-page-head .sw-meta { color: var(--sw-grau); margin-top: 1rem; font-size: 0.9375rem; }
.sw-page-head .sw-meta a { color: var(--sw-petrol); }
.sw-archive-desc { color: var(--sw-grau); margin-top: 1rem; }

.sw-content { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--sw-space); }
.sw-content > .sw-wrap > * { max-width: 44rem; }
.entry-content > * { max-width: 44rem; }
.entry-content > .alignwide { max-width: 64rem; }
.entry-content > .alignfull { max-width: none; margin-inline: calc(var(--sw-gutter) * -1); }
.entry-content h2 { font-size: var(--sw-step-2); margin-top: 2em; }
.entry-content h3 { margin-top: 1.75em; }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content del, .entry-content s { color: var(--sw-grau); }
.entry-content img { border-radius: 4px; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption { font-size: 0.875rem; color: var(--sw-grau); margin-top: 0.5rem; }
.entry-content blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: 3px solid var(--sw-signal); font-family: var(--sw-head); font-size: var(--sw-step-1); }
.entry-content .wp-block-button__link { background: var(--sw-tinte); color: var(--sw-on-tinte); border-radius: 4px; padding: 0.875rem 1.5rem; font-weight: 600; }
.sw-featured { margin: 0 0 2.5rem; max-width: 64rem !important; }
.sw-featured img { border-radius: 4px; width: 100%; }

.sw-post-nav { display: flex; justify-content: space-between; gap: 2rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--sw-linie); max-width: 44rem; }
.sw-post-nav a { text-decoration: none; font-weight: 600; }
.sw-post-nav small { display: block; color: var(--sw-grau); font-weight: 400; }

.sw-filter { list-style: none; margin: 0 0 2.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sw-filter a { display: inline-block; padding: 0.375rem 0.875rem; border: 1px solid var(--sw-linie); border-radius: 999px; text-decoration: none; color: var(--sw-tinte); font-size: 0.875rem; font-weight: 600; }
.sw-filter a:hover, .sw-filter .is-active a { background: var(--sw-tinte); border-color: var(--sw-tinte); color: var(--sw-on-tinte); }

.pagination, .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 3rem; }
.page-numbers { display: inline-block; min-width: 2.5rem; padding: 0.5rem 0.75rem; text-align: center; border: 1px solid var(--sw-linie); border-radius: 4px; text-decoration: none; color: var(--sw-tinte); }
.page-numbers.current { background: var(--sw-tinte); color: var(--sw-on-tinte); border-color: var(--sw-tinte); }

.sw-search { display: flex; gap: 0.5rem; max-width: 30rem; }
.sw-search input[type="search"] { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--sw-linie); border-radius: 4px; font: inherit; color: var(--sw-tinte); }
.sw-search button { padding: 0.75rem 1.25rem; border: 0; border-radius: 4px; background: var(--sw-tinte); color: var(--sw-on-tinte); font: inherit; font-weight: 600; cursor: pointer; }

.sw-empty { padding: 2rem 0; }
