/* =========================================================================
   Der besondere Garten — style.css
   Farbschema A (SLB-Grün gedimmt) · siehe specs/design.md
   ========================================================================= */

:root {
  --bg:            #f4f8ed;
  --bg2:           #e8f3d6;
  --bg3:           #ddeec4;
  --primary:       #4a7a00;
  --primary-dark:  #2e5200;
  --primary-light: #6a9e20;
  --primary-pale:  #c8e6a0;
  --text:          #1a2a0a;
  --text-muted:    #4a5e38;
  --text-light:    #7a8f68;
  --border:        rgba(74,122,0,0.14);
  --border-med:    rgba(74,122,0,0.25);
  --white:         #ffffff;

  --font-display:  Georgia, 'Times New Roman', serif;
  --font-body:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --maxw:          1200px;
  --gutter:        24px;
  --radius:        4px;
  --shadow:        0 8px 30px rgba(46,82,0,0.10);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* <picture> nur als Hülle für WebP – Layout richtet sich nach dem img */
picture { display: contents; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--primary-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: 21px; color: var(--text); }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Layout-Helfer ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--bg2 { background: var(--bg2); }
.section--dark { background: var(--primary-dark); color: var(--bg2); }
.section--dark h2,
.section--dark h3 { color: var(--white); }

/* Parallax-Bahn: fixiertes Foto mit Dunkel-Overlay, heller Text.
   Overlay + Bild liegen als zwei Background-Layer übereinander. */
.section--parallax {
  background-color: var(--primary-dark);
  background-image:
    linear-gradient(rgba(26,42,10,0.74), rgba(26,42,10,0.74)),
    url('../images/parallax.jpg');
  background-image:
    linear-gradient(rgba(26,42,10,0.74), rgba(26,42,10,0.74)),
    image-set(url('../images/parallax.webp') type('image/webp'), url('../images/parallax.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.section--parallax .section-head h2 { color: var(--white); }
.section--parallax .section-head p  { color: var(--bg2); }
.section--parallax .eyebrow         { color: var(--primary-pale); }

.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); color: var(--white); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* =========================================================================
   Header (sticky)
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244,248,237,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--primary-dark);
  white-space: nowrap;
}
.brand span { color: var(--primary-light); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 15px;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.nav a:hover,
.nav a.active { color: var(--primary-dark); }
.nav a:hover::after,
.nav a.active::after { width: 100%; }

.burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--primary-dark);
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  min-height: clamp(560px, 82vh, 760px);
  display: flex;
  align-items: center;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  position: absolute;
  left: 0;
  top: -20%;               /* Reserve oben + unten, damit Parallax keine Lücke zeigt */
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
}
.hero__media::after {       /* Lesbarkeits-Overlay */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(26,42,10,0.62) 0%,
    rgba(26,42,10,0.34) 45%,
    rgba(26,42,10,0.05) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 620px; }
.hero__inner .eyebrow { color: var(--primary-pale); }
.hero h1 { color: var(--white); }
/* Ortszeile innerhalb der H1: Schrift und Abstand wie eine normale Eyebrow */
.hero-title .eyebrow {
  display: block;
  width: fit-content;
  font-family: var(--font-body);
  line-height: 1.65;
}
.hero-h1 { display: block; }
.hero-quote {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 24px);
  font-style: italic;
  color: var(--bg2);
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================================
   Über uns
   ========================================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about__text p:last-child { margin-bottom: 0; }
.quote-block {
  border-left: 3px solid var(--primary-light);
  background: var(--bg3);
  padding: 22px 26px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--primary-dark);
  margin: 8px 0 0;
}
.about__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* =========================================================================
   Offener Garten (dunkle Einladungs-Section, nutzt .about__grid)
   ========================================================================= */
.section--dark .eyebrow { color: var(--primary-pale); }


/* =========================================================================
   Leistungen — interaktive Hover-Animation
   3 Slots (Erneuerung / Pflege & Erhalt / Erweiterung). Der Zustand jedes Slots
   liegt allein im Attribut data-state="idle|big|small" auf .ls-slot; sämtliche
   visuellen Unterschiede entstehen rein über CSS-Selektoren darauf. Alle Karten
   bleiben dauerhaft im DOM und werden nur über opacity / max-height / flex /
   pointer-events gesteuert — niemals über display, damit die Transitions beim
   schnellen Slot-Wechsel sauber (ohne Flackern) durchlaufen. JS setzt lediglich
   das Attribut und das dynamische Bild (js/services.js).
   ========================================================================= */
.services__grid {
  display: flex;
  gap: 14px;
  align-items: stretch;
  /* Feste Reihenhöhe → alle Slots sind gleich hoch und schließen bündig ab.
     Die Karten füllen die Höhe per flex (das Bild wächst/schrumpft mit), sodass
     die Kacheln einheitlich groß wirken, egal welcher Slot gerade aktiv ist. */
  height: 440px;
}

.ls-slot {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  transition: flex 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Gehoverter Slot wird breiter; die übrigen bleiben normal breit (small). */
.ls-slot[data-state="big"] { flex: 1.8; }

/* Gemeinsame Karten-Optik */
.ls-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f4f7ee;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Eigene Karte füllt den Slot. Im small-Zustand teilt sie sich die Höhe mit der
   dynamischen Kachel; das Bild absorbiert die Höhenänderung, der Body bleibt
   kompakt, sodass alle Unterkanten bündig sitzen. */
.ls-card-main { flex: 1 1 auto; min-height: 0; }

.ls-card__img-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.ls-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ls-card__icon {
  position: absolute;
  top: 8px; right: 12px;
  color: #6aaa2a;
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.ls-card__icon svg { width: 40px; height: 40px; }
.ls-slot[data-state="big"] .ls-card-main .ls-card__icon { opacity: 0.4; }

.ls-card__body {
  flex: 0 0 auto;
  padding: 18px 24px 24px;
  transition: background-color 0.5s ease;
}
.ls-slot[data-state="big"] .ls-card-main .ls-card__body { background-color: #e8f3d6; }
.ls-card__body h3 { margin-bottom: 8px; }
.ls-card__body p  { font-size: 15.5px; color: var(--text-muted); margin: 0; }

/* Dynamische Bild-Kachel: nur im small-Zustand sichtbar; sie zeigt ein Bild zum
   Thema des GEHOVERTEN Slots (von js/services.js gesetzt), nicht zum eigenen.
   Kollabiert über flex-basis/margin/opacity statt display, damit animierbar. */
.ls-card-dynamic-img {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 0;
  margin-top: 0;
  opacity: 0;
  border-width: 0;
  pointer-events: none;
  transition: flex-basis 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              margin-top 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              border-width 0.7s ease,
              opacity 0.45s ease;
}
.ls-slot[data-state="small"] .ls-card-dynamic-img {
  flex-basis: 46%;
  margin-top: 14px;
  opacity: 1;
  border-width: 1px;
}
.ls-card__dyn {
  flex: 1 1 auto;
  min-height: 0;
  background-color: var(--bg3);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* =========================================================================
   Galerie
   ========================================================================= */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46,82,0,0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery__item:hover::after,
.gallery__item:focus-visible::after { opacity: 1; }
.gallery__item:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20,30,8,0.92);
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 0;
  color: var(--white);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,0.28); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px;  top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }

/* =========================================================================
   Kontakt
   ========================================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 72px);
  /* Hervorgehobene Karte mit 3D-Effekt + Garten-Hintergrundbild.
     Helles Overlay haelt Text und Formular gut lesbar. */
  background:
    linear-gradient(rgba(255,255,255,0.62), rgba(255,255,255,0.62)),
    url('../images/contact-bg.jpg');
  background-image:
    linear-gradient(rgba(255,255,255,0.62), rgba(255,255,255,0.62)),
    image-set(url('../images/contact-bg.webp') type('image/webp'), url('../images/contact-bg.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--primary-pale);
  border-radius: 16px;
  /* Karten-Padding ersetzt den Gutter – Breite anpassen, damit auf schmalen
     Screens der Außenabstand erhalten bleibt (Desktop bleibt bei max-width 1200) */
  width: calc(100% - 2 * var(--gutter));
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 10px 30px rgba(46,82,0,0.12), 0 2px 6px rgba(46,82,0,0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
/* Hover: Karte hebt sich an wie die Galerie-Items – reines Hervorheben, kein Link */
.contact__grid:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 22px 50px rgba(46,82,0,0.20), 0 8px 16px rgba(46,82,0,0.12);
  border-color: var(--primary-light);
}
.contact__info .eyebrow { color: var(--primary-light); }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; }
.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  color: var(--text-muted);
  font-size: 15.5px;
}
.contact-list svg { color: var(--primary); flex: none; margin-top: 2px; }
.contact-list a { color: var(--text-muted); }
.contact-list a:hover { color: var(--primary); }

/* Formular */
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,122,0,0.12);
}
.form-field textarea { resize: vertical; min-height: 130px; }

.form-status {
  margin: 4px 0 16px;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: none;
}
.form-status.show { display: block; }
.form-status.ok  { background: var(--bg3); color: var(--primary-dark); }
.form-status.err { background: #fbe6e1; color: #8a2b14; }

.form-honeypot { display: none; }

.form-note { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--primary-dark);
  color: var(--bg2);
  padding: 56px 0 28px;
  font-size: 14.5px;
}
.site-footer a { color: var(--primary-pale); }
.site-footer a:hover { color: var(--white); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer__grid h3 {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-pale);
  margin-bottom: 14px;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
  margin-bottom: 10px;
}
.footer__grid ul { list-style: none; padding: 0; margin: 0; }
.footer__grid li { padding: 4px 0; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.footer__legal a { color: var(--primary-pale); }
.footer__legal a:hover { color: var(--white); }

/* =========================================================================
   Rechtstexte (Impressum / Datenschutz) — eigene Seiten
   ========================================================================= */
.legal { max-width: 760px; }
.legal h1 { margin-bottom: 28px; }
.legal h2 { margin-top: 40px; font-size: 24px; }
.legal h3 { margin-top: 24px; }
.legal p,
.legal li { color: var(--text-muted); }
.legal address { font-style: normal; }

/* =========================================================================
   Scroll-Animationen — siehe specs/animations.md
   ========================================================================= */
/* 1 · Hero-Load (CSS keyframes) */
.hero-eyebrow { animation: heroIn 0.6s ease 0.10s both; }
.hero-h1      { animation: heroIn 0.7s ease 0.25s both; }
.hero-quote   { animation: heroIn 0.7s ease 0.45s both; }
.hero-cta     { animation: heroFade 0.6s ease 0.70s both; }

@keyframes heroIn   { from { opacity:0; transform:translateX(-24px); } to { opacity:1; transform:none; } }
@keyframes heroFade { from { opacity:0; } to { opacity:1; } }

/* Ausgangszustände nur mit .js (setzt anim.js) – ohne JavaScript bleibt alles sichtbar */
/* gemeinsamer Sichtbar-Zustand */
.js .rv-up    { opacity:0; transform:translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .rv-up.on { opacity:1; transform:none; }

/* 2 · Slide links / rechts */
.js .rv-left  { opacity:0; transform:translateX(-40px); transition: opacity 0.65s ease, transform 0.65s ease; }
.js .rv-right { opacity:0; transform:translateX( 40px); transition: opacity 0.65s ease, transform 0.65s ease; }
.js .rv-left.on, .js .rv-right.on { opacity:1; transform:none; }

/* Ueber-uns: Slide-Animation etwas langsamer als der globale Standard (0.65s) */
#ueber-uns .rv-left,
#ueber-uns .rv-right { transition: opacity 1.1s ease, transform 1.1s ease; }

/* Verzögerung für die Galerie-Reihen */
.d1 { transition-delay: 90ms; }
.d2 { transition-delay: 180ms; }
.d3 { transition-delay: 270ms; }
.d4 { transition-delay: 360ms; }

/* 5 · Clip-Path-Reveal (Galerie) — Bild wird von oben nach unten enthüllt.
   Demo: :hover · Echteinsatz: .on per IntersectionObserver */
.js .rv-clip {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .rv-clip.on,
.js .gallery__item.rv-clip:hover,
.js .gallery__item.rv-clip:focus-visible { clip-path: inset(0 0 0 0); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 960px) {
  /* Touch/schmale Viewports: kein Hover → statisches Karten-Raster.
     Die dynamische Bild-Kachel entfällt, jeder Slot zeigt nur seine Karte. */
  .services__grid { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; height: auto; }
  .ls-slot { display: block; flex: none; }
  .ls-card-main { display: block; }
  .ls-slot .ls-card-main .ls-card__img-wrap { height: 180px; }
  .ls-slot .ls-card-main .ls-card__img-wrap img { height: 100%; }
  .ls-card-dynamic-img { display: none; }
  .gallery__grid  { grid-template-columns: repeat(2, 1fr); }
  .footer__grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }

  /* Burger-Navigation */
  .burger { display: inline-flex; }
  .nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px var(--gutter); font-size: 16px; }
  .nav a::after { display: none; }

  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }
  .about__media { order: -1; }

  /* Mobil: kein seitliches Hereinschieben (animations.md §2) */
  .js .rv-left, .js .rv-right { transform: translateY(20px); }
  .js .rv-left.on, .js .rv-right.on { transform: none; }

  /* background-attachment: fixed ist auf Mobil unzuverlässig/ruckelig → scroll */
  .section--parallax { background-attachment: scroll; }
}

@media (max-width: 560px) {
  .services__grid { grid-template-columns: 1fr; }
  .footer__grid   { grid-template-columns: 1fr; }
  .hero-cta .btn  { flex: 1 1 100%; text-align: center; }
}

/* =========================================================================
   Reduced Motion — alle Animationen deaktivieren (animations.md)
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .js .rv-up, .js .rv-left, .js .rv-right { opacity: 1; transform: none; }
  .js .rv-clip { clip-path: none; }
}
