/* ==========================================================================
   Weidekiez – eigene Styles (ergänzend zu Tailwind CDN)
   ========================================================================== */

:root {
  --weide-500: #38a169;
  --weide-600: #2f855a;
  --kiez-700:  #234e52;
  --nebel:     #f7fafc;
}

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

  /* Platz für die Scrollleiste dauerhaft reservieren. Sonst wird die Seite
     11 px breiter, sobald das mobile Menü den Seitenscroll sperrt – Texte und
     Bilder würden dabei sichtbar verspringen. */
  scrollbar-gutter: stable;

  /* Markenfarbene Scrollleiste bewusst über die Standard-Eigenschaften.
     ::-webkit-scrollbar schaltet Chrome auf Legacy-Scrollleisten um und setzt
     scrollbar-gutter damit außer Kraft. */
  scrollbar-width: thin;
  scrollbar-color: #b6cfcb #edf2f7;
}

/* Tailwind-Preflight setzt svg{display:block} und hebelt damit das
   hidden-Attribut aus – hier wieder geradegerückt. */
[hidden] { display: none !important; }
body { overflow-x: hidden; }

/* Smooth Scrolling deaktivieren, wenn der Nutzer reduzierte Bewegung wünscht */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Auswahlfarbe */
::selection { background: var(--weide-500); color: #fff; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
#site-header {
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  /* Nur die Flächen animieren – nicht "all", sonst würde ein Ausgleich der
     Scrollleistenbreite als sichtbares Rucken mitlaufen. */
  transition-property: background-color, box-shadow, backdrop-filter;
}
#site-header.is-scrolled {
  background: rgba(247, 250, 252, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(35, 78, 82, .08), 0 8px 30px -18px rgba(35, 78, 82, .45);
}

/* Offenes Menü: keine Transparenz, sonst schlägt der dunkle Hero durch und
   der Balken wirkt dunkler als das Panel darunter. */
#site-header.is-menu-open,
#site-header.is-menu-open.is-scrolled {
  background: var(--nebel);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
/* Auf dem Hero (transparenter Header) stehen die Links auf dunklem Grund */
/* Schriftzug: dunkel auf hellem Header, hell über dem Hero-Foto */
.wordmark-a   { color: var(--weide-500); transition: color .3s; }
.wordmark-b   { color: var(--kiez-700);  transition: color .3s; }
.wordmark-sub { color: rgba(40, 94, 97, .55); transition: color .3s; }

#site-header:not(.is-scrolled) .wordmark-a   { color: #a8e6bd; }
#site-header:not(.is-scrolled) .wordmark-b   { color: #ffffff; }
#site-header:not(.is-scrolled) .wordmark-sub { color: rgba(255, 255, 255, .65); }

/* Einfarbige Bildmarke – nimmt die Farbe des Umfelds an */
.logo-mark        { color: var(--weide-500); transition: color .3s; }
.logo-mark--light { color: #fff; }
#site-header:not(.is-scrolled) .logo-mark {
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
}

/* Hero: kräftiges Marken-Overlay, damit die Typografie sicher lesbar bleibt */
.hero-overlay {
  background:
    linear-gradient(to bottom, rgba(23, 58, 62, .45) 0%, rgba(23, 58, 62, .05) 50%, rgba(23, 58, 62, .35) 100%),
    linear-gradient(115deg, rgba(23, 58, 62, .92) 0%, rgba(35, 78, 82, .72) 45%, rgba(47, 133, 90, .42) 100%);
}

#site-header:not(.is-scrolled) .nav-link { color: rgba(255, 255, 255, .85); }
#site-header:not(.is-scrolled) .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }
#site-header:not(.is-scrolled) .nav-link.is-active { color: #fff; }
#site-header:not(.is-scrolled) .nav-link.is-active::after { background: #fff; }

.nav-link {
  position: relative;
  padding: .6rem .95rem;
  border-radius: 9999px;
  font-size: .925rem;
  font-weight: 500;
  color: #2c5f63;
  transition: color .2s, background-color .2s;
}
.nav-link:hover { color: var(--weide-600); background: rgba(56, 161, 105, .08); }
.nav-link.is-active { color: var(--weide-600); font-weight: 600; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: .15rem;
  width: 18px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--weide-500);
}

/* Mobiles Menü */
.mobile-menu {
  overflow: hidden;
  background: var(--nebel);
  border-top: 1px solid rgba(35, 78, 82, .08);
  box-shadow: 0 20px 40px -24px rgba(35, 78, 82, .5);
  animation: menu-in .28s ease both;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-link {
  display: block;
  padding: .95rem 1rem;
  border-radius: .85rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #2c5f63;
  transition: background-color .2s, color .2s;
}
.mobile-link:hover, .mobile-link:focus-visible {
  background: rgba(56, 161, 105, .1);
  color: var(--weide-600);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1rem 1.9rem;
  border-radius: 9999px;
  background: var(--weide-600);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(47, 133, 90, .8);
  transition: transform .2s, background-color .2s, box-shadow .2s;
}
.btn-primary:hover { background: #276749; transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(47, 133, 90, .9); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1rem 1.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: background-color .2s, border-color .2s, transform .2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .6); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Sektions-Typografie
   -------------------------------------------------------------------------- */
.section-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--weide-600);
}
/* Nachhaltigkeits-Abschnitt: dunkler Grund, deshalb heller Grünton. Zudem block
   statt inline-block – dort folgt auf den Eyebrow ein Badge, kein <h2>, und beide
   Inline-Elemente würden sonst in derselben Zeile landen. */
.section-eyebrow--light { display: block; color: #9ae6b4; }

.section-title {
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--kiez-700);
}

/* --------------------------------------------------------------------------
   Werte-Karten (Über uns)
   -------------------------------------------------------------------------- */
.value-card {
  padding: 1.4rem;
  border-radius: 1.1rem;
  background: #fff;
  border: 1px solid rgba(35, 78, 82, .08);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 161, 105, .3);
  box-shadow: 0 18px 36px -22px rgba(35, 78, 82, .55);
}
.value-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: .8rem;
  background: #dcf3e3;
  color: var(--weide-600);
}
.value-title { margin-top: .9rem; font-family: Outfit, sans-serif; font-weight: 700; color: var(--kiez-700); }
.value-text  { margin-top: .35rem; font-size: .92rem; line-height: 1.6; color: rgba(40, 94, 97, .8); }

/* --------------------------------------------------------------------------
   Immobilien-Karten
   -------------------------------------------------------------------------- */
.property-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 1.4rem;
  background: #fff;
  border: 1px solid rgba(35, 78, 82, .07);
  box-shadow: 0 4px 24px -18px rgba(35, 78, 82, .5);
  transition: transform .3s, box-shadow .3s;
}
.property-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -28px rgba(35, 78, 82, .6); }

.property-media { position: relative; overflow: hidden; }
.property-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.property-card:hover .property-img { transform: scale(1.07); }

.property-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.property-meta {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(47, 133, 90, .9);
}
.property-title {
  margin-top: .45rem;
  font-family: Outfit, sans-serif; font-size: 1.3rem; font-weight: 700;
  color: var(--kiez-700);
}
.property-text {
  flex: 1;
  margin-top: .6rem;
  font-size: .93rem; line-height: 1.65;
  color: rgba(40, 94, 97, .78);
}

/* Eckdaten als ruhige Merkmalsliste: Bezeichnung links, Wert rechts.
   Die frühere Variante mit fettem Wert über Kleinschrift wirkte wie drei
   konkurrierende Überschriften. */
.property-specs {
  margin: 1.3rem 0 0;
  border-top: 1px solid rgba(35, 78, 82, .1);
  font-size: .875rem;
}
.property-specs > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(35, 78, 82, .07);
}
.property-specs dt { color: rgba(40, 94, 97, .6); }
.property-specs dd { margin: 0; font-weight: 600; color: var(--kiez-700); text-align: right; }

.property-badges { display: flex; flex-wrap: wrap; gap: .45rem; padding-top: 1.1rem; }
.badge {
  padding: .3rem .7rem;
  border-radius: 9999px;
  font-size: .74rem; font-weight: 600;
  background: #eef4f3;
  color: #2c5f63;
  border: 1px solid rgba(35, 78, 82, .1);
}
/* Einziger Farbakzent: das Energiemerkmal, das die Marke ausmacht */
.badge-green { background: #dcf3e3; color: #276749; border-color: #bbe6c9; }

/* --------------------------------------------------------------------------
   Nachhaltigkeit / Weidewatt
   -------------------------------------------------------------------------- */
/* Energie-Sektion: Foto bleibt sichtbar, Text bleibt kontrastreich */
.eco-overlay {
  background:
    radial-gradient(120% 80% at 15% 20%, rgba(23, 58, 62, .92) 0%, rgba(23, 58, 62, .74) 45%, rgba(23, 58, 62, .58) 100%),
    linear-gradient(115deg, rgba(23, 58, 62, .9) 0%, rgba(35, 78, 82, .8) 50%, rgba(34, 84, 61, .72) 100%);
}

.benefit { display: flex; gap: 1rem; }
.benefit-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  border-radius: .85rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #8dd3a5;
}
.benefit-title { font-family: Outfit, sans-serif; font-weight: 700; color: #fff; }
.benefit-text  { margin-top: .25rem; font-size: .93rem; line-height: 1.65; color: rgba(255, 255, 255, .68); }

.progress-bar { transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */
.contact-card {
  display: flex; gap: 1.1rem;
  padding: 1.5rem;
  border-radius: 1.1rem;
  background: #fff;
  border: 1px solid rgba(35, 78, 82, .08);
  transition: border-color .25s, box-shadow .25s;
}
.contact-card:hover { border-color: rgba(56, 161, 105, .32); box-shadow: 0 16px 34px -24px rgba(35, 78, 82, .5); }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  border-radius: .85rem;
  background: #dcf3e3;
  color: var(--weide-600);
}
.contact-label {
  font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(40, 94, 97, .55);
}
.contact-value { display: block; margin-top: .3rem; font-weight: 600; color: var(--kiez-700); transition: color .2s; }

/* Formularfelder */
.field-label {
  display: block; margin-bottom: .45rem;
  font-size: .85rem; font-weight: 600; color: var(--kiez-700);
}
.field {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: .8rem;
  border: 1px solid rgba(35, 78, 82, .16);
  background: #fdfdfd;
  color: var(--kiez-700);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field::placeholder { color: rgba(40, 94, 97, .38); }
.field:focus {
  outline: none;
  background: #fff;
  border-color: var(--weide-500);
  box-shadow: 0 0 0 4px rgba(56, 161, 105, .14);
}
.field.is-invalid { border-color: #c53030; background: #fff5f5; }
.field.is-invalid:focus { box-shadow: 0 0 0 4px rgba(197, 48, 48, .13); }
.field-error { margin-top: .4rem; font-size: .82rem; font-weight: 500; color: #c53030; }

select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23234e52' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 1.1rem;
  padding-right: 2.6rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer-head {
  font-family: Outfit, sans-serif;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.footer-link { color: rgba(255, 255, 255, .72); transition: color .2s; }
.footer-link:hover { color: #8dd3a5; }

/* --------------------------------------------------------------------------
   Scroll-Animationen
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Fallback, falls JS deaktiviert ist */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Zurück-nach-oben-Button */
#to-top.is-visible { opacity: 1; transform: translateY(0); }

/* Bild-Fallback, wenn Unsplash nicht erreichbar ist */
.img-fallback {
  background: linear-gradient(135deg, #7cc95c 0%, #38a169 45%, #234e52 100%);
  position: relative;
}
.img-fallback::after {
  content: attr(data-fallback-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  text-align: center;
  font-family: Outfit, sans-serif; font-weight: 600; font-size: .9rem;
  color: rgba(255, 255, 255, .9);
}

/* --------------------------------------------------------------------------
   Rechtsseiten (Impressum, Datenschutz, AGB)
   -------------------------------------------------------------------------- */
.legal-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 250, 252, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(35, 78, 82, .08);
  padding-top: env(safe-area-inset-top, 0px);
}

.legal-hero { background: linear-gradient(135deg, #234e52 0%, #2c7a7b 55%, #2f855a 100%); }

.legal-prose { color: rgba(40, 94, 97, .88); line-height: 1.75; }
.legal-prose h2 {
  margin-top: 2.75rem; margin-bottom: .85rem;
  font-family: Outfit, sans-serif; font-size: 1.45rem; font-weight: 700;
  color: var(--kiez-700); scroll-margin-top: 6rem;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose h3 {
  margin-top: 1.75rem; margin-bottom: .5rem;
  font-family: Outfit, sans-serif; font-size: 1.08rem; font-weight: 700;
  color: var(--kiez-700);
}
.legal-prose p { margin-bottom: 1rem; }
.legal-prose ul { margin: 0 0 1.15rem 0; padding: 0; list-style: none; }
.legal-prose ul li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; }
.legal-prose ul li::before {
  content: ""; position: absolute; left: 0; top: .62rem;
  width: .45rem; height: .45rem; border-radius: 9999px; background: var(--weide-500);
}
.legal-prose ol { margin: 0 0 1.15rem 1.3rem; padding: 0; }
.legal-prose ol li { margin-bottom: .5rem; padding-left: .3rem; }
.legal-prose a { color: var(--weide-600); text-decoration: underline; text-underline-offset: 2px; }
.legal-prose a:hover { color: #276749; }
.legal-prose strong { color: var(--kiez-700); font-weight: 600; }
.legal-prose address { font-style: normal; margin-bottom: 1rem; }

/* Hinweiskasten für offene Angaben */
.legal-note {
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: .9rem;
  border: 1px solid #e6dcc9;
  background: #f9f5ec;
  font-size: .92rem;
  color: #7a6544;
}
.legal-note strong { color: #6b5636; }

/* Inhaltsverzeichnis */
.legal-toc a {
  display: block; padding: .4rem 0;
  font-size: .92rem; color: rgba(40, 94, 97, .75);
  text-decoration: none; transition: color .2s;
}
.legal-toc a:hover { color: var(--weide-600); }

/* ---------------------------------------------------------------------------
   Fehlerseite 404
   --------------------------------------------------------------------------- */
.error-link {
  display: block;
  height: 100%;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(35, 78, 82, .12);
  border-radius: 1rem;
  background: #fff;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.error-link:hover {
  border-color: rgba(56, 161, 105, .45);
  box-shadow: 0 10px 30px -18px rgba(35, 78, 82, .5);
  transform: translateY(-2px);
}
.error-link:focus-visible {
  outline: 2px solid var(--weide-500);
  outline-offset: 2px;
}
.error-link-title {
  display: block;
  font-weight: 600;
  color: var(--kiez-700);
}
.error-link-text {
  display: block;
  margin-top: .2rem;
  font-size: .875rem;
  color: rgba(40, 94, 97, .7);
}
