/* ==========================================================================
   Baumschule Glißmann – Komponenten
   Ergänzt Tailwind um wiederkehrende Muster laut DESIGNSYSTEM-GLISMANN.md.
   Reines CSS ohne @apply, damit die Datei build-unabhängig funktioniert.
   ========================================================================== */

:root {
  --wald: #21822E;
  --wald-tief: #21822E;
  --laub: #B8CDA8;
  --laub-hell: #E4ECDD;
  --papier: #F5F5F5;
  --tinte: #1A1A1A;
  --tinte-matt: #4A4F48;
  --linie: #D3D8CC;
  --fehler: #7A2E22;
  --ruhig: cubic-bezier(0.2, 0, 0, 1);
}

/* --- Grundlage ---------------------------------------------------------- */

html { scroll-behavior: smooth; }

/* Der randbündige Bildausbruch rechnet mit 100vw. Bei sichtbarer Scrollleiste
   ist 100vw breiter als der Layoutbereich, dadurch entstand ein waagerechter
   Überlauf und der Kopfbereich wirkte rechts abgeschnitten.
   overflow-x: clip beschneidet, ohne einen Scrollcontainer zu erzeugen,
   position: sticky im Kopfbereich bleibt damit funktionsfähig. */
html, body { overflow-x: clip; }

body {
  font-family: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  color: var(--tinte);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .schrift-display {
  font-family: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  font-weight: 600;
}

/* Tabellenziffern für alle Datenzusammenhänge */
.zahlen, table, time, .oeffnungszeiten, .kontaktdaten {
  font-variant-numeric: tabular-nums;
}

/* Fokus global sichtbar */
:focus-visible {
  outline: 2px solid var(--wald);
  outline-offset: 2px;
}
.auf-gruen :focus-visible { outline-color: #fff; }

/* Sprungmarke */
.sprungmarke {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--wald);
  color: #fff;
  padding: 12px 20px;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}
.sprungmarke:focus { left: 0; }

/* --- Fließtext ---------------------------------------------------------- */

.fliesstext { max-width: 68ch; }
/* Ausnahme fuer den breiten Textabschnitt: Dort soll der Text die Spalte
   fuellen, sonst steht nur die Ueberschrift breit. Zwei Klassen, damit die
   Regel unabhaengig von der Ladereihenfolge der Stylesheets gewinnt, und erst
   ab 1024px: Darunter stapeln Text und Bild, und die Lesebreite ist dann ein
   Gewinn statt einer Einschraenkung. */
@media (min-width: 1024px) {
  .fliesstext.fliesstext-voll { max-width: none; }
}
.fliesstext p + p { margin-top: 1rem; }
.fliesstext p { font-size: 1.0625rem; line-height: 1.7; }
.fliesstext strong { font-weight: 600; }

/* --- Hero ----------------------------------------------------------------
   Vollflächiges Bild, die Textfläche liegt als deckende Farbfläche darin.
   Kein Verlauf, keine Transparenz: Der Text steht auf Waldgrün, nicht auf
   dem Foto. Unter 1024px stapeln Bild und Fläche mit leichter Überlappung. */

.hero { position: relative; }

.hero-bild {
  display: block;
  width: 100%;
  height: clamp(14rem, 52vw, 20rem);
  object-fit: cover;
  object-position: center 58%;
  background: var(--laub-hell);
}

.hero-inhalt { position: relative; }

.hero-box {
  background: var(--wald);
  margin-top: -3rem;
  padding: 2rem 1.5rem;
}

@media (min-width: 720px) {
  .hero-bild { height: clamp(20rem, 46vw, 26rem); }
  .hero-box { padding: 2.5rem; }
}

@media (min-width: 1024px) {
  .hero-bild { height: clamp(34rem, 46vw, 42rem); }
  .hero-inhalt {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    pointer-events: none;
  }
  /* Die Box sitzt buendig an der linken Fensterkante und traegt die volle
     Hoehe der Titelflaeche. Dafuer wird der zentrierte Container an dieser
     einen Stelle aufgehoben; sein linkes Polster wuerde die Box sonst
     einruecken. */
  .hero-inhalt > div {
    max-width: none;
    margin-left: 0;
    padding-left: 0;
    display: flex;
  }
  .hero-box {
    margin-top: 0;
    padding: 3rem;
    width: 54%;
    max-width: 40rem;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* Nur unmittelbar unter der Titelflaeche beginnt der B2B-Hinweis auf
     derselben Textkante wie die Box darueber. Auf Unterseiten folgt er einem
     Seitenkopf; dort bleibt er im Container und damit buendig zu den
     Ueberschriften. */
  .hero + .hinweis-leiste > div {
    max-width: none;
    margin-left: 0;
    padding-left: 3rem;
  }
}

@media (min-width: 1280px) {
  .hero-box { padding: 3.5rem; }
  .hero + .hinweis-leiste > div { padding-left: 3.5rem; }
}

/* --- Links -------------------------------------------------------------- */

.link {
  color: var(--wald);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 120ms ease-out, text-decoration-thickness 120ms ease-out;
}
.link:hover { color: var(--wald-tief); text-decoration-thickness: 2px; }

.fliesstext a:not(.btn) {
  color: var(--wald);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* Auf grünem Grund darf kein Waldgrün stehen. Betrifft Telefon- und
   E-Mail-Links im Fußbereich und in der Kontaktleiste. */
.auf-gruen .link,
.auf-gruen .fliesstext a:not(.btn) {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.65);
}
.auf-gruen .link:hover { color: #fff; text-decoration-color: #fff; }

.link-hell {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.link-hell:hover { text-decoration-color: #fff; text-decoration-thickness: 1.5px; }
.link-hell:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Navigation */
.nav-link {
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  color: var(--tinte);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 120ms ease-out, color 120ms ease-out;
}
.nav-link:hover { border-bottom-color: var(--linie); }
.nav-link[aria-current="page"] { border-bottom-color: var(--wald); color: var(--wald); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1;
  height: 52px;
  padding: 0 32px;
  border-radius: 2px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
.btn-m { height: 44px; padding: 0 24px; font-size: 1rem; }
.btn-s { height: 36px; padding: 0 16px; font-size: 0.9375rem; }

.btn-primaer { background: var(--wald); color: #fff; }
.btn-primaer:hover { background: var(--wald-tief); }

.btn-sekundaer { background: transparent; color: var(--wald); border-color: var(--wald); }
.btn-sekundaer:hover { background: var(--laub-hell); }

.btn-hell { background: #fff; color: var(--wald); }
.btn-hell:hover { background: var(--laub-hell); }

.btn-download { background: transparent; color: var(--tinte); border-color: var(--linie); }
.btn-download:hover { border-color: var(--wald); }
.btn-download svg { color: var(--wald); flex: none; }

@media (max-width: 719px) {
  .btn-block-mobil { width: 100%; }
}

/* --- Formulare ---------------------------------------------------------- */

.feldgruppe { display: flex; flex-direction: column; gap: 6px; }

.label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--tinte);
}
.label .pflicht { color: var(--tinte-matt); font-weight: 400; }

.feld {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--tinte);
  background: #fff;
  border: 1.5px solid var(--linie);
  border-radius: 2px;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out;
}
.feld::placeholder { color: var(--tinte-matt); opacity: 0.7; }
.feld:focus {
  outline: none;
  border-color: var(--wald);
  box-shadow: 0 0 0 3px var(--laub);
}
textarea.feld { min-height: 140px; resize: vertical; }
select.feld { appearance: none; background-image: none; padding-right: 40px; }

.feld[aria-invalid="true"] { border-color: var(--fehler); }
.feldfehler { font-size: 0.875rem; color: var(--fehler); }

.feld-hinweis { font-size: 0.875rem; color: var(--tinte-matt); }

.checkbox-zeile { display: flex; align-items: flex-start; gap: 12px; }
.checkbox-zeile input[type="checkbox"] {
  width: 22px; height: 22px; flex: none; margin-top: 2px;
  accent-color: var(--wald);
}

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formularmeldung {
  border-left: 3px solid var(--wald);
  background: var(--laub-hell);
  padding: 20px 24px;
}
.formularmeldung-fehler { border-left-color: var(--fehler); background: #F7EFED; }

/* Datei-Upload */
.upload-liste { display: flex; flex-direction: column; gap: 8px; }
.upload-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--linie); padding: 10px 14px; background: #fff;
}

/* --- Platzhalter -------------------------------------------------------- */

/* Für harte Daten, die noch nicht vorliegen. Bewusst sichtbar markiert. */
.platzhalter {
  color: var(--tinte-matt);
  border-bottom: 1px dashed var(--linie);
  font-style: italic;
}

/* Bildplatzhalter mit Motivangabe */
.bildplatzhalter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: var(--laub-hell);
  border: 1px solid var(--linie);
  color: var(--tinte-matt);
}
.bildplatzhalter::before {
  content: "Bildplatzhalter";
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wald);
  background: #fff;
  border: 1px solid var(--linie);
  padding: 3px 8px;
}
.bildplatzhalter .motiv {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  max-width: 34ch;
}
.bildplatzhalter svg { color: var(--wald); opacity: 0.5; }

/* Rahmen für echte Fotos. Der Grüngrau-Hintergrund bleibt sichtbar,
   solange das Bild lädt oder falls es nicht erreichbar ist. */
.bildrahmen {
  position: relative;
  overflow: hidden;
  background: var(--laub-hell);
  border: 1px solid var(--linie);
}
.bildrahmen .bild {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bildunterschrift {
  font-size: 0.875rem;
  color: var(--tinte-matt);
  margin-top: 10px;
  max-width: 60ch;
}

/* --- Sortimentsliste (Signaturelement) ---------------------------------- */

.sortiment { border-top: 1px solid var(--linie); }
.sortiment-gruppe { border-bottom: 1px solid var(--linie); }
.sortiment-kopf {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.sortiment-kopf:hover .sortiment-titel { color: var(--wald); }
.sortiment-titel {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  transition: color 120ms ease-out;
}
.sortiment-zeichen {
  flex: none;
  width: 28px; height: 28px;
  border: 1.5px solid var(--linie);
  display: grid; place-items: center;
  color: var(--wald);
  transition: border-color 120ms ease-out;
}
.sortiment-kopf:hover .sortiment-zeichen { border-color: var(--wald); }
.sortiment-inhalt { padding-bottom: 24px; }

.ausfuehrung {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 0.9375rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--linie);
  padding-top: 14px;
  margin-top: 18px;
}
.ausfuehrung dt { color: var(--tinte-matt); min-width: 130px; }
.ausfuehrung dd { font-weight: 500; }
.ausfuehrung dd + dd::before { content: "·"; color: var(--linie); margin: 0 8px 0 2px; }

/* --- Eckdaten einer Stelle ---------------------------------------------- */

/* Untereinander statt nebeneinander: Beschriftung und Wert stehen dicht
   beieinander, das Symbol nimmt den Sinn vorweg. Fuer das Sortiment bleibt
   .ausfuehrung unveraendert. */
.eckdaten {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  line-height: 1.45;
  border-top: 1px solid var(--linie);
  padding-top: 14px;
  margin-top: 18px;
}
.eckdaten > div { display: flex; align-items: baseline; gap: 10px; }
.eckdaten svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--wald);
  align-self: flex-start;
  translate: 0 2px;
}
.eckdaten dt { color: var(--tinte-matt); }
.eckdaten dt::after { content: ":"; }
.eckdaten dd { font-weight: 500; font-variant-numeric: tabular-nums; }

/* --- Merkmalliste (ersetzt Kachelraster) -------------------------------- */

.merkmale { border-top: 1px solid var(--linie); }
.merkmale li { border-bottom: 1px solid var(--linie); padding: 22px 0; }

/* --- Öffnungszeiten ----------------------------------------------------- */

.oeffnungszeiten { width: 100%; border-collapse: collapse; }
.oeffnungszeiten th,
.oeffnungszeiten td { padding: 8px 0; text-align: left; font-weight: 400; font-size: 0.9375rem; }
.oeffnungszeiten td { text-align: right; font-weight: 500; white-space: nowrap; }
.oeffnungszeiten tr + tr th,
.oeffnungszeiten tr + tr td { border-top: 1px solid var(--linie); }
.auf-gruen .oeffnungszeiten tr + tr th,
.auf-gruen .oeffnungszeiten tr + tr td { border-top-color: rgba(255,255,255,0.25); }

/* --- Kontaktleiste ------------------------------------------------------ */

.kontaktleiste-desktop {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
}
@media (min-width: 1024px) { .kontaktleiste-desktop { display: block; } }

.kontaktleiste-reiter {
  display: flex;
  flex-direction: column;
  align-self: center;
  flex: none;
  height: fit-content;
  background: var(--wald);
  box-shadow: 0 1px 12px rgba(26,26,26,0.10);
}
.kontaktleiste-reiter a,
.kontaktleiste-reiter button {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  color: #fff;
  border: 0;
  background: none;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}
.kontaktleiste-reiter a + a,
.kontaktleiste-reiter a + button,
.kontaktleiste-reiter button + a { border-top: 1px solid rgba(255,255,255,0.2); }
.kontaktleiste-reiter a:hover,
.kontaktleiste-reiter button:hover { background: var(--wald-tief); }

.kontaktleiste-mobil {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--wald);
  box-shadow: 0 -1px 12px rgba(26,26,26,0.10);
}
@media (min-width: 1024px) { .kontaktleiste-mobil { display: none; } }
.kontaktleiste-mobil a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.kontaktleiste-mobil a + a { border-left: 1px solid rgba(255,255,255,0.2); }

body { padding-bottom: 56px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* Ab 1024px liegt die Kontaktleiste an der rechten Kante. Die Inhaltscontainer
   bekommen dort zusätzliche rechte Polsterung, damit die Leiste nie über Text
   liegt. Vollflächige Hintergründe sitzen auf der Section und bleiben randbündig. */
@media (min-width: 1024px) {
  .max-w-weit { padding-right: 104px; }
}

/* --- Kopfbereich -------------------------------------------------------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  transition: box-shadow 200ms var(--ruhig), border-color 200ms var(--ruhig);
  border-bottom: 1px solid transparent;
}
.kopf[data-verdichtet="true"] { border-bottom-color: var(--linie); }
.kopf-innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  height: 80px;
  transition: height 200ms var(--ruhig);
}
@media (min-width: 1024px) { .kopf-innen { height: 96px; } }
.kopf[data-verdichtet="true"] .kopf-innen { height: 64px; }

.logo-link { display: inline-flex; align-items: center; color: var(--wald); }
/* Logo rund ein Fuenftel groesser als zuvor (44/52/38). Der Kopfbereich ist
   80, 96 und verdichtet 64 Pixel hoch, die Hoehen passen also weiterhin
   hinein. */
.logo-link img, .logo-link svg { height: 53px; width: auto; transition: height 200ms var(--ruhig); }
@media (min-width: 1024px) { .logo-link img, .logo-link svg { height: 62px; } }
.kopf[data-verdichtet="true"] .logo-link img,
.kopf[data-verdichtet="true"] .logo-link svg { height: 46px; }

/* --- Bildausbruch (Signatur) -------------------------------------------- */

/* Der Ausbruch endet an der Kante der Kontaktleiste, nicht am Viewportrand.
   Damit stößt das Bild sichtbar an die Leiste, statt darunter zu verschwinden. */
@media (min-width: 1024px) {
  .bild-ausbruch-rechts {
    margin-right: calc(-1 * ((100vw - min(1360px, 100vw)) / 2 + 52px));
  }
  .bild-ausbruch-links {
    margin-left: calc(-1 * ((100vw - min(1360px, 100vw)) / 2 + 40px));
  }
}

/* --- Reduzierte Bewegung ------------------------------------------------ */

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

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

@media print {
  .kopf, .kontaktleiste-desktop, .kontaktleiste-mobil, .consent { display: none !important; }
  body { padding-bottom: 0; }
}
