/* ==========================================================================
   Rademacher Baumaschinenservice
   Gestaltungskonzept "Bodenprofil": Abschnitte sind Schichten, Uebergaenge
   zeigen die Schnittkante einer Baugrubenwand. Harte Kanten, keine Radien.
   ========================================================================== */

/* --- Schriften (lokal, keine externen Anfragen) --------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Farben aus den Baustellenfotos und den Maschinen abgeleitet */
  --beton: #e8eae6;
  --beton-hell: #f3f4f1;
  --schiefer: #20262e;
  --schiefer-hell: #4e5869;
  --lehm: #7a4e24;
  --sand: #d8c293;
  --sand-blass: #ece2cd;
  --maschine: #efa400;
  --text: #20262e;
  --text-leise: #58616d;
  --text-leise-dunkel: #a3abb5; /* gedaempfter Text auf Schiefer, Kontrast 6.6:1 */
  --linie: #c8ccc5;

  /* Typografie */
  --schrift-titel: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --schrift-text: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Modulare Skala, Faktor 1.25, fluid zwischen 400px und 1200px */
  --t-xs: 0.8rem;
  --t-s: 0.9375rem;
  --t-m: 1.0625rem;
  --t-l: clamp(1.2rem, 0.9rem + 0.9vw, 1.5rem);
  --t-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  --t-2xl: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  --t-3xl: clamp(2.1rem, 1.1rem + 4.6vw, 4.6rem);

  /* Abstandsskala, Vielfache von 4px */
  --r-1: 0.25rem;
  --r-2: 0.5rem;
  --r-3: 0.75rem;
  --r-4: 1rem;
  --r-6: 1.5rem;
  --r-8: 2rem;
  --r-12: 3rem;
  --r-16: 4rem;
  --r-24: 6rem;

  /* Raster */
  --bahn: 72rem;
  --bahn-schmal: 38rem;
  --rand: clamp(1.25rem, 5vw, 4rem);
}

/* --- Grundlagen ----------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--beton);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: var(--t-m);
  line-height: 1.65;
  font-variant-numeric: oldstyle-nums;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  background: var(--sand-blass);
}

h1,
h2,
h3,
h4 {
  font-family: var(--schrift-titel);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--r-4);
  text-wrap: balance;
  /* lange Komposita wie "Datenschutzerklärung" auf schmalen Schirmen trennen */
  hyphens: auto;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--t-3xl);
}
h2 {
  font-size: var(--t-2xl);
}
h3 {
  font-size: var(--t-xl);
}
h4 {
  font-size: var(--t-l);
}

p,
ul,
ol,
dl {
  margin: 0 0 var(--r-4);
}

/* Lesbares Textmass */
.fliess > p,
.fliess > ul,
.fliess > ol,
.fliess > h2,
.fliess > h3,
.fliess > h4 {
  max-width: 62ch;
}

a {
  color: var(--lehm);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

a:hover {
  color: var(--schiefer);
}

address {
  font-style: normal;
}

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

/* --- Layoutbausteine ------------------------------------------------------ */

.bahn {
  width: 100%;
  max-width: var(--bahn);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.schnitt {
  padding-block: var(--r-16);
}

.schnitt--eng {
  padding-block: var(--r-12);
}

/* Die Schnittkante: gestapelte Bodenhorizonte als Abschnittstrenner. */
.kante {
  height: 0.75rem;
  border: 0;
  margin: 0;
  background-image: linear-gradient(
    to bottom,
    var(--sand) 0 25%,
    var(--sand-blass) 25% 45%,
    var(--lehm) 45% 70%,
    var(--schiefer-hell) 70% 100%
  );
}

.springlink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--maschine);
  color: var(--schiefer);
  font-family: var(--schrift-titel);
  font-weight: 800;
  padding: var(--r-3) var(--r-4);
  z-index: 100;
}

.springlink:focus {
  left: 0;
}

/* --- Kopfbereich und Navigation ------------------------------------------- */

.kopf {
  background: var(--schiefer);
  color: var(--beton);
}

.kopf__bahn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--r-4);
  padding-block: var(--r-4);
}

.marke {
  font-family: var(--schrift-titel);
  color: var(--beton);
  text-decoration: none;
  display: block;
  line-height: 1.15;
}

.marke__name {
  display: block;
  font-weight: 800;
  font-size: var(--t-l);
  letter-spacing: -0.02em;
}

.marke__zusatz {
  display: block;
  font-weight: 500;
  font-size: var(--t-xs);
  color: var(--sand);
  letter-spacing: 0.04em;
}

.marke:hover .marke__name {
  color: var(--maschine);
}

/* Navigation: vier kurze Punkte, immer sichtbar – kein Menü-Schalter noetig */
.nav__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-1) clamp(1rem, 4vw, 1.5rem);
}

.nav__liste a {
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: var(--t-s);
  color: var(--beton);
  text-decoration: none;
  display: block;
  padding: var(--r-2) 0;
  border-bottom: 3px solid transparent;
}

.nav__liste a:hover {
  color: var(--maschine);
}

.nav__liste a[aria-current="page"] {
  color: var(--maschine);
  font-weight: 800;
  border-bottom-color: var(--maschine);
}

/* --- Titelbild ------------------------------------------------------------ */

.titelbild {
  position: relative;
  background: var(--schiefer);
  min-height: min(78vh, 34rem);
  display: grid;
  align-items: end;
}

.titelbild__bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.titelbild__text {
  position: relative;
  padding-block: var(--r-16) var(--r-12);
  color: var(--beton-hell);
  text-shadow: 0 1px 14px rgb(15 18 22 / 0.7);
}

.titelbild__text h1 {
  margin-bottom: var(--r-4);
  max-width: 16ch;
}

.titelbild__unterzeile {
  font-size: var(--t-l);
  max-width: 34ch;
  margin-bottom: var(--r-8);
}

/* --- Seitenkopf der Unterseiten ------------------------------------------- */

.seitenkopf {
  background: var(--schiefer);
  color: var(--beton-hell);
  padding-block: var(--r-12);
}

.seitenkopf h1 {
  max-width: 18ch;
  margin-bottom: var(--r-3);
}

.seitenkopf p {
  max-width: 52ch;
  font-size: var(--t-l);
  color: var(--sand);
  margin: 0;
}

/* Brotkrumen */
.pfad {
  font-family: var(--schrift-titel);
  font-size: var(--t-xs);
  font-weight: 500;
  margin-bottom: var(--r-4);
}

.pfad ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-2);
  margin: 0;
  padding: 0;
}

.pfad li + li::before {
  content: "/";
  color: var(--schiefer-hell);
  margin-right: var(--r-2);
}

.pfad a {
  color: var(--sand);
}

.pfad a:hover {
  color: var(--maschine);
}

/* --- Schaltflaechen ------------------------------------------------------- */

.knopf {
  display: inline-block;
  text-shadow: none;
  font-family: var(--schrift-titel);
  font-weight: 800;
  font-size: var(--t-s);
  text-decoration: none;
  padding: var(--r-3) var(--r-6);
  border: 2px solid transparent;
}

.knopf.knopf--voll {
  background: var(--maschine);
  color: var(--schiefer);
}

.knopf.knopf--voll:hover {
  background: var(--beton-hell);
  color: var(--schiefer);
}

.knopf.knopf--linie {
  border-color: currentColor;
  color: var(--beton-hell);
  background: transparent;
}

.knopf.knopf--linie:hover {
  background: var(--beton-hell);
  color: var(--schiefer);
  border-color: var(--beton-hell);
}

.knopf.knopf--dunkel {
  background: var(--schiefer);
  color: var(--beton-hell);
}

.knopf.knopf--dunkel:hover {
  background: var(--lehm);
  color: var(--beton-hell);
}

/* Einzelner Knopf zwischen Absaetzen bekommt Luft nach unten */
.knopf + p {
  margin-top: var(--r-4);
}

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-3);
}

/* --- Leistungsuebersicht --------------------------------------------------- */

.leistungen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--r-8);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.leistung {
  display: flex;
  flex-direction: column;
  background: var(--beton-hell);
  border-top: 4px solid var(--lehm);
}

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

.leistung__text {
  padding: var(--r-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.leistung__text h3 {
  margin-bottom: var(--r-2);
}

.leistung__text p {
  color: var(--text-leise);
  font-size: var(--t-s);
  flex: 1;
}

.leistung__text a {
  font-family: var(--schrift-titel);
  font-weight: 800;
  font-size: var(--t-s);
  align-self: start;
}

/* --- Zweispaltige Textabschnitte ------------------------------------------- */

.paar {
  display: grid;
  /* minmax(0, …) verhindert, dass breite Inhalte die Spalte aufsprengen */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--r-8);
  align-items: start;
}

@media (min-width: 52em) {
  .paar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--r-12);
  }
  .paar--textbreit {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.paar figure {
  margin: 0;
}

.paar figcaption,
.bildfeld figcaption {
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: var(--t-xs);
  color: var(--text-leise);
  padding-top: var(--r-2);
  border-top: 1px solid var(--linie);
  margin-top: var(--r-2);
}

/* --- Bildstrecken ---------------------------------------------------------- */

.bildfeld {
  display: grid;
  gap: var(--r-6);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.bildfeld figure {
  margin: 0;
}

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

/* Galerie */
.galerie {
  display: grid;
  gap: var(--r-3);
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.galerie a {
  display: block;
}

.galerie img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.galerie a:hover img {
  outline: 4px solid var(--maschine);
  outline-offset: -4px;
}

/* --- Kennzahlen / Maschinenliste ------------------------------------------- */

.merkmale {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--r-4);
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.merkmale li {
  border-top: 3px solid var(--sand);
  padding-top: var(--r-3);
}

.merkmale strong {
  font-family: var(--schrift-titel);
  font-weight: 800;
  display: block;
  font-size: var(--t-l);
  line-height: 1.2;
  margin-bottom: var(--r-1);
}

.merkmale span {
  font-size: var(--t-s);
  color: var(--text-leise);
}

/* --- Aufzaehlungen ---------------------------------------------------------- */

.liste {
  list-style: none;
  padding: 0;
  max-width: 62ch;
}

.liste li {
  padding-left: var(--r-6);
  position: relative;
  margin-bottom: var(--r-3);
}

.liste li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.85rem;
  height: 0.2rem;
  background: var(--lehm);
}

/* --- Abschnitt mit dunklem Grund -------------------------------------------- */

.band {
  background: var(--schiefer);
  color: var(--beton-hell);
}

.band h2 {
  color: var(--beton-hell);
}

.band p {
  color: var(--sand);
}

.band a {
  color: var(--maschine);
}

.band--sand {
  background: var(--sand-blass);
  color: var(--text);
}

.band--sand h2,
.band--sand h3 {
  color: var(--text);
}

.band--sand p {
  color: var(--text-leise);
}

.band--sand a {
  color: var(--lehm);
}

/* --- Kontaktdaten ----------------------------------------------------------- */

.kontaktdaten {
  margin: 0;
  display: grid;
  gap: var(--r-6);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.kontaktdaten dt {
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: var(--t-xs);
  color: var(--text-leise);
  border-top: 3px solid var(--maschine);
  padding-top: var(--r-2);
  margin-bottom: var(--r-1);
}

.kontaktdaten dd {
  margin: 0;
  font-size: var(--t-l);
  font-weight: 600;
  line-height: 1.35;
}

.kontaktdaten dd a {
  text-decoration: none;
}

.kontaktdaten dd a:hover {
  text-decoration: underline;
}

/* --- Formular ---------------------------------------------------------------- */

.formular {
  max-width: 34rem;
}

.feld {
  margin-bottom: var(--r-4);
}

.feld label {
  display: block;
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: var(--t-s);
  margin-bottom: var(--r-1);
}

.feld input,
.feld textarea {
  width: 100%;
  font-family: var(--schrift-text);
  font-size: var(--t-m);
  padding: var(--r-3);
  border: 2px solid var(--linie);
  background: var(--beton-hell);
  color: var(--text);
}

.feld input:focus,
.feld textarea:focus {
  border-color: var(--schiefer);
}

.feld textarea {
  min-height: 9rem;
  resize: vertical;
}

.pflicht {
  color: var(--lehm);
}

.hinweis {
  font-size: var(--t-s);
  color: var(--text-leise);
  max-width: 52ch;
}

/* --- Rechtstexte -------------------------------------------------------------- */

.rechtstext {
  max-width: var(--bahn-schmal);
}

.rechtstext h2 {
  font-size: var(--t-l);
  margin-top: var(--r-8);
}

.rechtstext h2:first-of-type {
  margin-top: 0;
}

.rechtstext p,
.rechtstext li {
  font-size: var(--t-s);
}

/* --- Fussbereich --------------------------------------------------------------- */

.fuss {
  background: var(--schiefer);
  color: var(--beton);
  padding-block: var(--r-12) var(--r-8);
}

.fuss__gitter {
  display: grid;
  gap: var(--r-8);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-bottom: var(--r-8);
}

.fuss h2 {
  font-size: var(--t-s);
  font-weight: 500;
  color: var(--sand);
  letter-spacing: 0.04em;
  margin-bottom: var(--r-3);
}

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

.fuss li {
  margin-bottom: var(--r-2);
}

.fuss a {
  color: var(--beton);
  text-decoration: none;
  font-size: var(--t-s);
}

.fuss a:hover {
  color: var(--maschine);
  text-decoration: underline;
}

.fuss address {
  font-style: normal;
  font-size: var(--t-s);
  line-height: 1.8;
}

.fuss__schluss {
  border-top: 1px solid var(--schiefer-hell);
  padding-top: var(--r-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-4) var(--r-6);
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--t-xs);
  color: var(--text-leise-dunkel);
}

.fuss__schluss p {
  margin: 0;
}

/* --- Hilfsklassen ---------------------------------------------------------------- */

.nur-vorleser {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vorspann {
  font-size: var(--t-l);
  max-width: 54ch;
  line-height: 1.5;
}

.eng {
  max-width: var(--bahn-schmal);
}

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

@media print {
  .kopf,
  .fuss,
  .titelbild__bild,
  .springlink {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
