/* ==========================================================================
   Bauen und Leben GmbH – Stylesheet
   Schriften lokal eingebunden (keine Anfragen an Google o. ä.)
   ========================================================================== */

/* ---------- Schriften ---------- */
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fira-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/fira-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fira-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/bitter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bitter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/bitter-latin-wght-italic.woff2") format("woff2");
}

/* ---------- Farben & Masse ---------- */
:root {
  --gruen: #7ab41d;        /* Logo-Grün – nur für Akzente, nicht für Text */
  --gruen-link: #467311;   /* dunkleres Grün für Links (Kontrast 5.6:1) */
  --schwarz: #000;         /* Logo-Schwarz – Titel und Leitsätze */
  --text: #3a3a38;         /* Fliesstext */
  --text-leise: #5f5f5a;   /* Fusszeile, Nebeninformationen */
  --linie: #dcdfd5;
  --flaeche: #f3f6ee;      /* helle Fläche, aus dem Logo-Grün abgeleitet */
  --auswahl: #e5f1d3;

  --font-sans: "Fira Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Bitter", Georgia, "Times New Roman", serif;

  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --abstand-section: clamp(3rem, 7vw, 5.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }
}

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

p {
  margin: 0 0 1em;
  hyphens: auto;
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  color: var(--schwarz);
  text-wrap: balance;
}

strong {
  font-weight: 600;
  color: var(--schwarz);
}

a {
  color: var(--gruen-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--schwarz);
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--auswahl);
  color: var(--schwarz);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--schwarz);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Kopfzeile ---------- */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.site-logo {
  display: block;
}

.site-logo img {
  width: clamp(11.5rem, 20vw, 15.5rem);
}

.header-link {
  color: var(--schwarz);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid var(--gruen);
  padding-bottom: 0.15em;
}

.header-link:hover {
  border-bottom-color: var(--schwarz);
}

/* ---------- Stimmungsbild ---------- */
.hero {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--flaeche); /* sichtbar, solange kein Bild hinterlegt ist */
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 40rem) {
  .hero {
    aspect-ratio: 8 / 3;
  }
}

/* ---------- Leitsatz oben (h1) und Seitentitel ---------- */
.lead {
  max-width: 19em;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

@media (max-width: 39.99rem) {
  .lead {
    font-size: 1.875rem;
    text-wrap: pretty;
  }
}

/* ---------- Abschnitte: Titel links, Text rechts ---------- */
.section {
  display: grid;
  row-gap: 1rem;
  padding-top: var(--abstand-section);
}

.section > h2 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
}

.section__body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 62rem) {
  .section {
    grid-template-columns: 17rem minmax(0, 42rem);
    column-gap: clamp(3rem, 6vw, 5.5rem);
  }

  .section > h2 {
    position: sticky;
    top: 2rem;
    align-self: start;
    font-size: 1.5rem;
    /* optisch auf die erste Textzeile ausrichten */
    margin-top: -0.1em;
  }
}

/* ---------- Leitsätze im Text ---------- */
.leitsatz {
  position: relative;
  margin: 2.25rem 0;
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: var(--schwarz);
  hyphens: manual;
  text-wrap: pretty;
}

.leitsatz .gm {
  color: var(--gruen);
  font-weight: 600;
}

/* öffnendes Guillemet hängt in den Rand, damit der Text bündig bleibt */
.leitsatz .gm:first-child {
  position: absolute;
  right: 100%;
  margin-right: 0.08em;
}

.signatur {
  margin-top: 1.75rem;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.45;
  color: var(--schwarz);
}

/* ---------- Typische Situationen ---------- */
.situationen {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin: 0;
}

.situation {
  padding-top: 0.9rem;
  border-top: 1px solid var(--linie);
}

.situation dt {
  margin-bottom: 0.35rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--schwarz);
}

.situation dd {
  margin: 0;
  font-size: 1rem;
  hyphens: auto;
}

@media (min-width: 40rem) {
  .situationen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Kontakt ---------- */
.kontakt-karte {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--flaeche);
}

.kontakt-karte img {
  flex: none;
  width: 7.5rem;
}

.kontakt-karte address {
  flex: 1 1 14rem;
  font-style: normal;
  line-height: 1.65;
}

.kontakt-karte a {
  overflow-wrap: anywhere;
}

.mitgliedschaft {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--linie);
  font-size: 1rem;
}

.mitgliedschaft img {
  width: 12.5rem;
  margin-bottom: 1.25rem;
}

/* ---------- Impressum ---------- */
.seite {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.section--impressum {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.section--impressum > h2 {
  font-size: 1.125rem;
}

@media (min-width: 62rem) {
  .section--impressum > h2 {
    font-size: 1.125rem;
    margin-top: 0.15em;
  }
}

.section--impressum address {
  font-style: normal;
}

.copyright {
  margin-top: var(--abstand-section);
  font-size: 0.9375rem;
  color: var(--text-leise);
}

@media (min-width: 62rem) {
  .copyright {
    /* auf die Textspalte ausrichten */
    margin-left: calc(17rem + clamp(3rem, 6vw, 5.5rem));
  }
}

/* ---------- Fusszeile ---------- */
.site-footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--linie);
  font-size: 0.9375rem;
  color: var(--text-leise);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem 2.5rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--schwarz);
}

.adresse {
  display: flex;
  flex-direction: column;
  font-style: normal;
}

@media (min-width: 64rem) {
  .adresse {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .adresse > span + span::before {
    content: "|";
    content: "|" / "";
    margin-inline: 0.65em;
    color: #b9bdb1;
  }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
