/* ==========================================================================
   Mietservice Philipp GbR – Stylesheet
   Alle Schriften lokal gehostet (/assets/fonts), keine externen Requests.
   ========================================================================== */

/* ---------- Schriften (Barlow, SIL OFL 1.1, selbst gehostet) ---------- */
@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: 600;
  font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --grau: #727271;          /* Markenfarbe aus dem Logo */
  --gruen: #b3cc1d;         /* Akzentfarbe aus dem Logo */
  --gruen-dunkel: #8fa416;  /* Hover/Fokus auf Grün */
  --text: #3f3f3e;          /* Fließtext – dunkler als Markengrau für Lesbarkeit */
  --weiss: #ffffff;
  --flaeche: #f2f2ef;       /* ruhige Hintergrundfläche für Abschnitte */
  --linie: #deded9;

  --font-text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", system-ui, "Segoe UI", Arial, sans-serif;

  --max: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--weiss);
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  color: var(--grau);
  margin: 0 0 0.75rem;
}
h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.375rem; font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: inherit; }
a:hover { color: var(--gruen-dunkel); }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--gruen);
  color: #232322;
  padding: 0.5rem 1rem;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

.btn--primaer {
  background: var(--gruen);
  color: #232322;
}
.btn--primaer:hover { background: var(--gruen-dunkel); color: #fff; }

.btn--sekundaer {
  background: transparent;
  color: #fff;
  border-color: var(--gruen);
}
.btn--sekundaer:hover { background: var(--gruen); color: #232322; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--weiss);
  border-bottom: 1px solid var(--linie);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.logo { flex: none; }
.logo img { width: 10.5rem; }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--grau);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--grau); border-bottom-color: var(--gruen); }

.header-tel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--grau);
  text-decoration: none;
  white-space: nowrap;
}
.header-tel svg { width: 1.25rem; height: 1.25rem; color: var(--gruen); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0.5rem;
  color: var(--grau);
  cursor: pointer;
}
.nav-toggle svg { width: 1.75rem; height: 1.75rem; display: block; }

@media (max-width: 52rem) {
  .logo img { width: 9rem; }
  .nav-toggle { display: block; }
  .header-tel { order: 2; font-size: 1.05rem; }
  .header-tel span { display: none; }  /* nur Icon auf kleinen Displays */
  .nav-toggle { order: 3; margin-left: 0; }
  .header-tel { margin-left: auto; padding: 0.5rem; }
  .nav {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--weiss);
    border-bottom: 1px solid var(--linie);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--pad) 1rem;
  }
  .nav a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--linie); }
  .nav li:last-child a { border-bottom: 0; }
}
/* Ohne JavaScript bleibt die Navigation auf Mobilgeräten sichtbar */
.no-js .nav-toggle { display: none; }
@media (max-width: 52rem) {
  .no-js .nav { display: block; position: static; }
  .no-js .site-header .wrap { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: #3a352c;
  isolation: isolate;
}
.hero picture,
.hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(34,34,33,0.88) 0%, rgba(34,34,33,0.72) 45%, rgba(34,34,33,0.25) 100%);
}
.hero .wrap {
  padding-block: clamp(4rem, 12vw, 8.5rem);
}
.hero-inhalt { max-width: 38rem; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero .subline {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  font-weight: 600;
  color: var(--gruen);
  margin-bottom: 1.5rem;
}
.hero-text { font-size: 1.125rem; max-width: 34rem; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (max-width: 40rem) {
  .hero::before { background: rgba(34,34,33,0.8); }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 6rem); }
.section--flaeche { background: var(--flaeche); }
.section-intro { max-width: 40rem; margin-bottom: 2.5rem; }

/* ---------- Maschinenpark ---------- */
.maschinen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  border-top: 1px solid var(--linie);
}
.maschinen li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 0.5rem 1.1rem 0;
  border-bottom: 1px solid var(--linie);
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--grau);
}
.maschinen svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--gruen);
}
.hinweis {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--gruen);
  max-width: 40rem;
}
.hinweis a { font-weight: 600; }

/* ---------- Über uns ---------- */
.ueber {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 56rem) {
  .ueber { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
}
.leistungen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.leistungen li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1rem;
  align-items: start;
}
.leistungen .icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: var(--gruen);
  color: #232322;
}
.leistungen .icon svg { width: 1.5rem; height: 1.5rem; }
.leistungen h3 { margin-bottom: 0.25rem; }
.leistungen p { margin: 0; }

/* ---------- Kontakt ---------- */
.kontakt {
  display: grid;
  gap: 3rem;
}
@media (min-width: 56rem) {
  .kontakt { grid-template-columns: 1fr 1.1fr; gap: 4rem; }
}
.kontakt-tel {
  display: inline-block;
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--grau);
  text-decoration: none;
  border-bottom: 4px solid var(--gruen);
  margin-bottom: 1.75rem;
}
.kontakt-tel:hover { color: var(--gruen-dunkel); }

.kontakt-liste {
  margin: 0 0 1.75rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
}
.kontakt-liste dt { font-weight: 600; color: var(--grau); }
.kontakt-liste dd { margin: 0; }

address { font-style: normal; }

.route {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.route svg { width: 1.2rem; height: 1.2rem; color: var(--gruen-dunkel); }
.route-hinweis { font-size: 0.9rem; color: var(--grau); margin-top: 0.35rem; }

/* Formular */
.formular {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 5px solid var(--gruen);
  padding: clamp(1.25rem, 4vw, 2rem);
}
.feld { margin-bottom: 1.1rem; }
.feld label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--grau);
}
.feld input,
.feld textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  padding: 0.7rem 0.8rem;
  border: 1px solid #b9b9b4;
  border-radius: 0;
  background: #fff;
}
.feld textarea { min-height: 9rem; resize: vertical; }
.feld input:focus,
.feld textarea:focus {
  outline: 3px solid var(--gruen);
  outline-offset: 0;
  border-color: var(--gruen-dunkel);
}
.formular-hinweis { font-size: 0.9rem; color: var(--grau); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #3f3f3e;
  color: #e6e6e2;
  padding-block: 3rem 1.5rem;
  font-size: 0.975rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gruen); }
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: auto 1fr 1fr; gap: 3rem; align-items: start; }
}
.footer-logo {
  background: #fff;
  padding: 0.75rem;
  width: 8.5rem;
}
.footer-titel {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.4rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.35rem; }
.copyright {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.875rem;
  color: #bdbdb8;
}

/* ---------- Rechtstexte (Impressum / Datenschutz) ---------- */
.rechtstext {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.rechtstext h1 { font-size: clamp(2.25rem, 6vw, 3rem); margin-bottom: 2rem; }
.rechtstext h2 { font-size: 1.75rem; margin-top: 2.75rem; }
.rechtstext h3 { font-size: 1.25rem; margin-top: 1.75rem; }
.rechtstext ul { padding-left: 1.25rem; }
.rechtstext li { margin-bottom: 0.4rem; }
.rechtstext a { overflow-wrap: anywhere; }
.zurueck { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }

/* ---------- Formular: Spam-Schutz & Statusmeldung ---------- */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.formular { position: relative; }
.formular-status {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--gruen);
  background: #f5f8e4;
  color: #2f3a05;
  font-weight: 600;
}
.formular-status.is-fehler {
  border-left-color: #b3261e;
  background: #fbeceb;
  color: #7a1a14;
}
.btn[disabled] { opacity: 0.6; cursor: wait; }
