/* MB Garten- und Landschaftsbau – Stylesheet
   Keine externen Schriften oder Dienste (DSGVO-freundlich). */

@font-face {
  font-family: "Lora";
  src: url("fonts/lora-600.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben aus Logo und Flyer */
  /* Farben passend zum Startbereich (Salbeigrün) */
  --wald: #2C4537;      /* dunkles Salbeigrün: Überschriften, Footer, Symbole */
  --blatt: #236B3D;     /* Knopf-Grün aus dem Startbereich */
  --trieb: #C8E0C8;     /* helles Salbeigrün: Fokus-Rahmen auf dunklem Grund */
  --flyer: #E5EDE7;     /* sehr helles Salbeigrün: Kontaktbereich */
  --kalk: #F3F6F3;      /* heller Hintergrund */
  --basalt: #25302A;    /* Fließtext */
  --grau: #4F5D55;      /* Nebentext */
  --stein: #D6E0D8;     /* Linien, Flächen */
  --weiss: #FFFFFF;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1160px;
  --pad: clamp(20px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.6;
  color: var(--basalt);
  background: var(--kalk);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blatt); text-underline-offset: 3px; }
a:hover { color: var(--wald); }

:focus-visible { outline: 3px solid var(--wald); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .site-footer :focus-visible { outline-color: var(--trieb); }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--wald); color: var(--weiss); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Typografie ---------- */
h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--wald);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.0625rem; line-height: 1.35; margin: 0; color: var(--wald); }
p { margin: 0; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--grau); max-width: 36em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  font: 600 1.0625rem/1 var(--sans);
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blatt); color: var(--weiss); }
.btn-primary:hover { background: var(--wald); color: var(--weiss); }
.btn-ghost { border-color: var(--wald); color: var(--wald); background: transparent; }
.btn-ghost:hover { background: var(--wald); color: var(--weiss); }
.btn-light { background: var(--weiss); color: var(--wald); }
.btn-light:hover { background: var(--flyer); color: var(--wald); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 246, 243, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid rgba(44, 69, 55, .10);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wald); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font: 700 1rem/1.15 var(--sans); }
.brand-name span { display: block; }
.main-nav { margin-left: auto; display: flex; gap: 28px; }
.main-nav a { color: var(--basalt); text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: var(--blatt); text-decoration: underline; }
.header-call { min-height: 44px; padding: 0 18px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  --uebergang: clamp(56px, 8vw, 130px);
  position: relative;
  background: linear-gradient(135deg, #394F43 0%, #4A6456 45%, #688475 100%);
  color: var(--weiss);
  padding: clamp(72px, 11vw, 140px) 0 calc(clamp(64px, 9vw, 120px) + var(--uebergang));
}
.hero-uebergang {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: var(--uebergang);
  pointer-events: none;
}
.hero-uebergang .huegel-hinten { fill: rgba(255, 255, 255, .16); }
.hero-uebergang .huegel-vorne { fill: var(--weiss); }
#leistungen { padding-top: clamp(40px, 6vw, 80px); }
.hero-kicker {
  font: 700 .95rem/1.3 var(--sans);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--trieb);
  margin-bottom: 22px;
}
.hero h1 {
  color: var(--weiss);
  font-weight: 600;
  font-size: clamp(2.9rem, 7vw, 5.2rem);
  line-height: 1.04;
  max-width: 11em;
}
.hero .lead {
  margin-top: 28px;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.6;
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-actions .btn { min-height: 60px; padding: 0 36px; font-size: 1.1rem; }
.btn-hero { background: var(--blatt); color: var(--weiss); }
.btn-hero:hover { background: var(--wald); color: var(--weiss); }
.btn-hero-light { background: var(--weiss); color: var(--blatt); }
.btn-hero-light:hover { background: var(--flyer); color: var(--wald); }
.hero :focus-visible { outline-color: var(--trieb); }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-white { background: var(--weiss); }

/* Leistungen */
.services { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); }
.services-intro { align-self: start; position: sticky; top: 112px; }
.services-intro .lead { margin-top: 18px; }
.services-intro .btn { margin-top: 28px; }

.service-group + .service-group { margin-top: 48px; }
.group-title {
  display: flex; align-items: center; gap: 12px;
  font: 600 1.375rem/1.2 var(--serif); color: var(--wald);
  padding-bottom: 14px; border-bottom: 2px solid var(--wald);
  margin: 0;
}
.group-title svg { width: 26px; height: 26px; flex: none; }
.service-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
}
.service-list li { padding: 18px 0 20px; border-bottom: 1px solid var(--stein); }
.service-list p { margin-top: 6px; color: var(--grau); font-size: 1rem; line-height: 1.55; }
.service-list.single { grid-template-columns: 1fr; }

/* Ablauf */
.steps-head { max-width: 40em; }
.steps-head .lead { margin-top: 16px; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: schritt; }
.steps li { counter-increment: schritt; position: relative; }
.steps li::before {
  content: counter(schritt);
  display: grid; place-items: center;
  width: 68px; height: 56px; margin-bottom: 20px;
  font: 600 1.75rem/1 var(--serif); color: var(--wald);
  background: var(--stein);
  /* Trittstein-Form */
  border-radius: 52% 48% 44% 56% / 58% 46% 54% 42%;
}
.steps li:nth-child(2)::before { border-radius: 46% 54% 58% 42% / 44% 58% 42% 56%; }
.steps li:nth-child(3)::before { border-radius: 56% 44% 50% 50% / 50% 56% 44% 50%; }
.steps p { margin-top: 8px; color: var(--grau); }

/* Projekte */
.projects-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.projects-head .lead { max-width: 30em; }

/* Kontakt */
.contact { background: var(--flyer); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact .lead { color: var(--basalt); margin-top: 18px; }

.direct { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.direct a {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 14px;
  background: var(--weiss);
  color: var(--basalt); text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s, border-color .15s;
}
.direct a:hover { border-color: var(--blatt); }
.direct .ico {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--blatt); color: var(--weiss);
}
.direct .ico svg { width: 22px; height: 22px; }
.direct strong { display: block; color: var(--wald); font-size: 1.0625rem; }
.direct span.val { display: block; font-size: 1rem; word-break: break-word; }

.form-card {
  background: var(--weiss); border-radius: 18px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 1px 0 rgba(44, 69, 55, .08), 0 18px 40px -24px rgba(44, 69, 55, .45);
}
.form-card h3 { font: 600 1.5rem/1.2 var(--serif); }
.form-card > p { margin-top: 6px; color: var(--grau); font-size: 1rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; color: var(--wald); }
.field .opt { font-weight: 400; color: var(--grau); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--basalt);
  padding: 12px 14px; min-height: 48px;
  border: 1.5px solid #BCC8BF; border-radius: 10px; background: var(--weiss);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid #B8D3BF; outline-offset: 0; border-color: var(--blatt); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.form-error { color: #B3261E; font-size: .95rem; font-weight: 600; margin-top: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.form-actions .btn { flex: 1 1 auto; white-space: nowrap; padding: 0 20px; }
.form-note { margin-top: 14px; font-size: .9rem; color: var(--grau); }
.form-status {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px;
  background: var(--flyer); color: var(--wald); font-weight: 600; font-size: .95rem;
}

/* Footer */
.site-footer { background: var(--wald); color: #C9D8CD; padding: 56px 0 40px; font-size: .97rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.site-footer .brand { color: var(--weiss); }
.site-footer a { color: var(--weiss); }
.site-footer address { font-style: normal; line-height: 1.8; }
.footer-links { display: flex; gap: 24px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .9rem; }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */
.legal { padding: clamp(48px, 7vw, 88px) 0; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.45rem; margin-top: 40px; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 1.2em; }
.legal .back { display: inline-block; margin-bottom: 24px; }
.todo { background: #FFF1B8; color: #5C4A00; padding: 0 4px; border-radius: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .header-call { margin-left: auto; }
  .services, .contact-grid { grid-template-columns: 1fr; }
  .services-intro { position: static; }
}

@media (max-width: 680px) {
  .brand-name { font-size: .9rem; }
  .brand svg { width: 34px; height: 34px; }
  .header-call .num { display: none; }
  .header-call { padding: 0 16px; }
  .hero-kicker { font-size: .78rem; letter-spacing: .16em; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { padding: 0 32px; }


  .service-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .fields { grid-template-columns: 1fr; }

}

h4 { font-size: 1.0625rem; line-height: 1.35; margin: 0; color: var(--wald); }

/* ---------- Fotos & Großansicht ---------- */

.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: transparent; color: var(--weiss);
}
.lightbox::backdrop { background: rgba(30, 44, 36, .95); }
.lightbox[open] { display: grid; place-items: center; }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 64px 80px 32px; }
.lb-figure img {
  max-width: min(1200px, 100%); max-height: calc(100vh - 150px);
  width: auto; height: auto; border-radius: 8px;
}
.lb-figure figcaption { font-size: 1rem; color: var(--trieb); text-align: center; }
.lb-btn {
  position: fixed; z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: var(--weiss);
}
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-btn svg { width: 26px; height: 26px; }
.lb-btn:focus-visible { outline: 3px solid var(--trieb); outline-offset: 2px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: calc(50% - 26px); }
.lb-next { right: 16px; top: calc(50% - 26px); }

@media (max-width: 680px) {
  .lb-figure { padding: 64px 12px 96px; }
  .lb-figure img { max-height: calc(100vh - 200px); }
  .lb-prev, .lb-next { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

/* ---------- Unsere Arbeiten: Fotowand mit Filtern ---------- */
.works { background: var(--weiss); }

.filter { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: 600 .95rem/1 var(--sans); color: var(--wald);
  background: transparent; border: 1.5px solid rgba(44, 69, 55, .25);
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.chip .anzahl { font-weight: 500; opacity: .65; }
.chip:hover { border-color: var(--blatt); }
.chip[aria-pressed="true"] { background: var(--blatt); border-color: var(--blatt); color: var(--weiss); }
.chip[aria-pressed="true"] .anzahl { opacity: .8; }

.gallery {
  display: grid; gap: 12px; margin-top: 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
}
.tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--stein); }
.tile.gross { grid-column: span 2; grid-row: span 2; }
.tile.hoch { grid-row: span 2; }
.tile.breit { grid-column: span 2; }
.tile[hidden] { display: none; }
.gallery.is-filtered { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 250px; }
.gallery.is-filtered .tile { grid-column: auto; grid-row: auto; }

.tile a.photo { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) {
  .tile a.photo:hover img { transform: scale(1.05); }
}
.tile a.photo:focus-visible { outline: 3px solid var(--wald); outline-offset: -3px; border-radius: 14px; }
.tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 48px 16px 14px;
  font-weight: 600; font-size: .98rem; line-height: 1.3; color: var(--weiss);
  background: linear-gradient(to top, rgba(22, 34, 27, .82), rgba(22, 34, 27, 0));
  pointer-events: none;
}
.tile.gross figcaption { font: 600 1.4rem/1.2 var(--serif); padding: 80px 24px 22px; }

@media (prefers-reduced-motion: no-preference) {
  .gallery.animiert .tile:not([hidden]) { animation: kachel .35s ease both; }
}
@keyframes kachel { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
  .gallery.is-filtered { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}
@media (max-width: 680px) {
  .gallery { gap: 8px; grid-auto-rows: 150px; }
  .gallery.is-filtered { grid-auto-rows: 150px; }
  .tile { border-radius: 10px; }
  .tile figcaption { font-size: .85rem; padding: 36px 10px 10px; }
  .tile.gross figcaption { font-size: 1.15rem; padding: 56px 14px 14px; }
  .filter { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 0 var(--pad) 4px; scrollbar-width: none; }
  .filter::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ---------- E-Mail-Auswahl nach dem Absenden ---------- */
.mini-btn.ok { background: var(--wald); color: var(--weiss); border-color: var(--wald); }

.form-status p + p, .form-status .mail-wahl + p { margin-top: 8px; }
.form-status-sub { font-weight: 400; color: var(--basalt); }
.mail-wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mini-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--wald);
  font: 600 .9rem/1 var(--sans); color: var(--wald); background: var(--weiss);
  text-decoration: none; cursor: pointer;
}
.mini-btn:hover { background: var(--wald); color: var(--weiss); }

@media (max-width: 680px) {
  .direct li > a { padding: 14px; gap: 12px; }
  .direct .ico { width: 44px; height: 44px; }
  .direct span.val { font-size: .95rem; word-break: normal; overflow-wrap: anywhere; }
}

/* Pflichtfelder */
.pflicht { color: #B3261E; font-weight: 700; }

/* ---------- Feinschliff für alle Bildschirmgrößen ---------- */
/* Spalten dürfen nie breiter als der Bildschirm werden */
@media (max-width: 960px) {
  .services, .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Sehr kleine Handys (z. B. iPhone SE, 320 px) */
@media (max-width: 380px) {
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand svg { width: 30px; height: 30px; }
  .brand-name { font-size: .8rem; }
  .header-call { min-height: 40px; padding: 0 12px; gap: 6px; font-size: .9rem; }
  .header-call svg { width: 18px; height: 18px; }
  .hero h1 { font-size: 2.5rem; }
  .hero-kicker { font-size: .7rem; letter-spacing: .12em; }
  .hero-actions .btn { padding: 0 24px; font-size: 1rem; }
}
/* Große Bildschirme (Full HD und größer): Inhalt etwas breiter */
@media (min-width: 1700px) {
  :root { --wrap: 1300px; }
  .gallery { grid-auto-rows: 250px; }
  .gallery.is-filtered { grid-auto-rows: 290px; }
}
/* Sehr große Bildschirme (2K/4K): alles etwas größer */
@media (min-width: 2200px) {
  html { font-size: 20px; }
  :root { --wrap: 1560px; }
  .header-inner { min-height: 84px; }
  .brand svg { width: 46px; height: 46px; }
  .gallery { grid-auto-rows: 310px; gap: 16px; }
  .gallery.is-filtered { grid-auto-rows: 360px; }
}
