/*
 * Spatenladen – Design angelehnt an mtm-spindler-gmbh.de (Farben, Schrift Barlow, Karten, Tabellen).
 * Farben/Schriften nur über die Variablen in :root ändern.
 * Mobil zuerst: Grundregeln gelten für kleine Bildschirme, @media-Blöcke erweitern für größere.
 */

/* ---------- Schriften (lokal, SIL Open Font License) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }

/* ---------- Farben und Maße (wie mtm-spindler-gmbh.de) ---------- */
:root {
	--rot: #e10600;
	--rot-dunkel: #b00500;
	--tinte: #2b2d2f;
	--grau-text: #5d6064;
	--grau: #f1f1f0;
	--grau-2: #e4e4e2;
	--weiss: #ffffff;
	--display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
	--text: "Barlow", "Segoe UI", Arial, sans-serif;
	--breite: 1140px;
	--radius: 6px;
	color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Kopf und Fuß kommen von der Firmenseite (assets/mtm/style.css).
   Die folgenden Grundregeln gelten deshalb nur im Inhaltsbereich (.inhalt). */
.inhalt img { max-width: 100%; height: auto; display: block; }
.inhalt a { color: var(--rot); }
.inhalt a:hover { color: var(--rot-dunkel); }
.inhalt a:focus-visible, .inhalt button:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; }
.inhalt h1, .inhalt h2, .inhalt h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
.inhalt h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 6vw, 2.6rem); margin: .25rem 0 1rem; }
.inhalt h2 { font-weight: 600; font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.inhalt p { margin: 0 0 1rem; }

.wrap { max-width: var(--breite); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: absolute; left: 1rem; top: 1rem; z-index: 100; background: var(--weiss); padding: .5rem 1rem; }

.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grau-text); margin: 0; }

/* Knopf wie auf der Firmenseite */
.knopf { display: inline-block; background: var(--rot); color: var(--weiss); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 11px 24px; border-radius: 3px; box-shadow: 0 2px 6px rgba(200, 10, 0, .25); border: 0; cursor: pointer; font-family: var(--text); }
.knopf:hover { background: var(--rot-dunkel); color: var(--weiss); }
.inhalt .knopf, .inhalt .knopf:hover { color: var(--weiss); } /* gegen die rote Linkfarbe im Inhalt */

/* ---------- Inhalt ---------- */
.inhalt { padding-top: 1.75rem; padding-bottom: 4rem; }
.inhalt:focus { outline: none; }
.text > :first-child { margin-top: 0; }
.text h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }

.brotkrumen ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .85rem; color: var(--grau-text); }
.brotkrumen a { color: var(--grau-text); }
.brotkrumen a:hover { color: var(--rot); }
.brotkrumen li + li::before { content: "›"; padding: 0 .5rem; }

/* Startseite */
.einleitung { text-align: center; max-width: 46rem; margin: 0 auto; padding: 1rem 0 .5rem; }
.einleitung h1 { font-family: var(--text); font-weight: 500; color: var(--rot); font-size: clamp(1.6rem, 4.2vw, 2.35rem); margin: .75rem 0 1rem; }
.lead { font-size: 1.1rem; color: var(--grau-text); }

.hinweise { display: grid; gap: 12px; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.hinweis { background: var(--grau); border-left: 4px solid var(--rot); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; }
.hinweis strong { display: block; font-weight: 600; }
.hinweis span { color: var(--grau-text); font-size: .95rem; }

h2.abschnitt { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.3rem); text-align: center; margin-top: 3rem; }

/* Kachelraster (Karten wie auf der Firmenseite) */
.raster { display: grid; gap: 18px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.kachel a { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 10px; padding: 24px 22px 22px; background: var(--grau); border-radius: var(--radius); text-align: center; text-decoration: none; color: var(--tinte); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.kachel a:hover { border-color: var(--grau-2); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); color: var(--tinte); }
.kachel-bild { display: flex; align-items: center; justify-content: center; width: 100%; height: 210px; }
.kachel-bild img { max-height: 210px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); }
.kachel-bild.leer img { max-height: 60px; opacity: .25; filter: grayscale(1); }
.kachel-titel { font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.1; }
.kachel a:hover .kachel-titel { color: var(--rot); }
.kachel-text { font-size: .9rem; color: var(--grau-text); max-width: 34ch; }
.kachel-fuss { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.kachel-preis { font-size: .85rem; color: var(--grau-text); }
/* Auf grauem Grund das dunklere Rot (Kontrast ≥ 4,5:1, barrierearm) */
.kachel-mehr { font-weight: 600; font-size: .9rem; color: var(--rot-dunkel); }
.anfrage a, .hinweis a { color: var(--rot-dunkel); }

/* Kategorieseite */
.tax-maschinen_kategorie .inhalt > .text { max-width: 46rem; color: var(--grau-text); margin-bottom: 1.5rem; }

/* Maschinenseite */
.maschine-kopf { display: grid; gap: 24px; margin-top: .5rem; }
.hauptbild { display: flex; align-items: center; justify-content: center; background: var(--grau); border-radius: var(--radius); padding: 24px; min-height: 260px; }
.hauptbild img { max-height: 480px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); }
.vorschaubilder { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.vorschaubilder a { display: block; background: var(--grau); border-radius: 4px; border: 1px solid var(--grau-2); }
.vorschaubilder a:hover { border-color: var(--rot); }
.vorschaubilder img { width: 76px; height: 76px; object-fit: contain; padding: 4px; }
.maschine-info h1 { margin-top: 0; }
.kurz { font-size: 1.1rem; color: var(--grau-text); }
.preis { font-family: var(--display); font-size: 1.6rem; font-weight: 600; margin: 1.25rem 0 .25rem; }
.hinweis-klein { font-size: .9rem; color: var(--grau-text); margin-bottom: 1.25rem; }
.pdf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 1rem; }
.pdf::before { content: "PDF"; font-size: .68rem; font-weight: 700; color: var(--weiss); background: var(--rot); border-radius: 2px; padding: 1px 4px; }
.maschine .text { max-width: 46rem; }
.maschine > section { margin-top: 2.75rem; }
.maschine > section > h2 { font-family: var(--display); font-size: 1.9rem; margin: 0 0 .75rem; }

/* Technische Daten (wie Vergleichstabellen der Firmenseite) */
.tabelle-rahmen { overflow-x: auto; border: 1px solid var(--grau-2); border-radius: var(--radius); max-width: 46rem; }
.technik { width: 100%; border-collapse: collapse; font-size: .95rem; }
.technik th, .technik td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--grau-2); vertical-align: top; }
.technik tr:last-child th, .technik tr:last-child td { border-bottom: 0; }
.technik th { font-weight: 600; width: 45%; background: var(--grau); }

/* Anfrage */
.anfrage { margin-top: 3rem; padding: 24px; background: var(--grau); border-radius: var(--radius); border-top: 4px solid var(--rot); scroll-margin-top: 140px; }
.anfrage:focus { outline: none; }
.anfrage h2 { font-family: var(--display); font-size: 1.9rem; margin-top: 0; }

/* ---------- Anfrageformular ---------- */
.sl-formular { max-width: 46rem; }
.sl-formular fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
.sl-formular legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin-bottom: .5rem; }
.sl-formular .sl-radios legend { font-weight: 600; font-size: .95rem; }
.sl-feld { margin-bottom: 1rem; }
.sl-feld > label, .sl-radios legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .25rem; }
.sl-formular input[type="text"], .sl-formular input[type="email"], .sl-formular input[type="tel"],
.sl-formular input[type="number"], .sl-formular select, .sl-formular textarea {
	width: 100%; font: inherit; color: var(--tinte); background: var(--weiss);
	border: 1px solid #8d9094; border-radius: 3px; padding: 10px 12px; min-height: 44px;
}
.sl-formular textarea { resize: vertical; }
.sl-formular input:focus, .sl-formular select:focus, .sl-formular textarea:focus { outline: 3px solid var(--tinte); outline-offset: 1px; border-color: var(--tinte); }
.sl-formular [aria-invalid="true"] { border-color: var(--rot-dunkel); border-width: 2px; }
.sl-feld-klein input { max-width: 8rem; }
.sl-radio { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; cursor: pointer; }
.sl-radio input, .sl-checkbox input { width: 1.25rem; height: 1.25rem; accent-color: var(--rot); flex-shrink: 0; margin: 0; }
.sl-checkbox label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; cursor: pointer; }
.sl-checkbox input { margin-top: .2rem; }
.sl-stern { color: var(--rot-dunkel); }
.sl-hilfe { font-size: .85rem; color: var(--grau-text); margin: .25rem 0 0; }
.sl-pflichthinweis, .sl-datenschutz { font-size: .88rem; color: var(--grau-text); }
.sl-feldfehler { color: var(--rot-dunkel); font-weight: 600; font-size: .9rem; margin: .3rem 0 0; }
.sl-fehlerbox { background: var(--weiss); border: 2px solid var(--rot-dunkel); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 1.25rem; }
.sl-fehlerbox:focus { outline: 3px solid var(--tinte); }
.sl-fehlerbox p { margin: 0 0 .25rem; color: var(--rot-dunkel); }
.sl-fehlerbox ul { margin: 0; padding-left: 1.2rem; }
.sl-erfolg { background: var(--weiss); border-left: 4px solid #1a7f37; padding: 14px 18px; font-weight: 600; }
.sl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sl-raster { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) {
	.sl-raster { grid-template-columns: 1fr 1fr; }
	.sl-breit { grid-column: 1 / -1; }
}

/* Normale Seiten (Impressum usw.) */
.seite { max-width: 46rem; }

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 600px) {
	.raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hinweise { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
	.raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.maschine-kopf { grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; }
	.anfrage { padding: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
