/* ==========================================================================
   Designsystem MGH Wilhelmshöhe 2
   Palette abgeleitet aus dem Axo4-Rendering (hermannbau, 10.07.2026),
   Pixelwerte gesampelt, für AA-Kontraste abgedunkelt/aufgehellt –
   Herleitung: docs/projektdoku.md, Abschnitt "Design-Richtung".
   ========================================================================== */

/* ---- Fonts: self-hosted, latin-Subset (OFL, siehe assets/fonts/) ---- */
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/source-sans-3-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/source-sans-3-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/source-sans-3/source-sans-3-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4/source-serif-4-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design-Tokens ---- */
:root {
  /* gesampelt aus Axo4 */
  --holz: #8d7663;            /* Lärchenfassade */
  --anthrazit: #58565b;       /* Fensterrahmen/Geländer */
  --gruen-rasen: #659247;     /* Rasenfläche */
  --putz: #ddcec6;            /* Putzfassade, sonnig */
  --himmel: #748eab;          /* Himmel (nur dekorativ) */

  /* abgeleitet (AA-tauglich) */
  --holz-dunkel: #6d543a;     /* Links/Akzente auf Hell: Kontrast >= 6:1 */
  --text: #2e2c2a;            /* Fließtext, aus Anthrazit abgedunkelt */
  --text-leise: #5b5750;      /* Nebentext, >= 7:1 auf Weiß */
  --gruen: #47682f;           /* Badge/Akzent, weißer Text >= 5:1 */
  --papier: #ffffff;
  --papier-warm: #faf6f2;     /* aus Putzton aufgehellt */
  --linie: #e2d9d1;

  --platzhalter-bg: #ffe98f;
  --platzhalter-text: #4a3f00;

  --schrift: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --schrift-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --breite: 68rem;
  --radius: 0.5rem;
}

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

html {
  font-size: 112.5%; /* 18 px Grundschrift (Zielgruppe teils 60+) */
}

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--papier);
}

h1,
h2,
h3 {
  font-family: var(--schrift-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 2.2rem; margin: 0 0 0.5em; }
h2 { font-size: 1.6rem; margin: 2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }

p { margin: 0 0 1em; }

a {
  color: var(--holz-dunkel);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--text); }

:focus-visible {
  outline: 3px solid var(--holz-dunkel);
  outline-offset: 2px;
  border-radius: 2px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}
th,
td {
  text-align: left;
  padding: 0.45em 0.6em;
  border-bottom: 1px solid var(--linie);
}
th { font-weight: 600; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }

/* ---- Platzhalter-Konvention (AUFTRAG) ---- */
.platzhalter {
  background: var(--platzhalter-bg);
  color: var(--platzhalter-text);
  padding: 0.1em 0.35em;
  border-radius: 0.25em;
  font-style: italic;
}

/* ---- Layoutrahmen ---- */
.rahmen {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Kopf & Navigation */
.kopf {
  border-bottom: 1px solid var(--linie);
  background: var(--papier);
}
.kopf .rahmen {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.marke {
  font-family: var(--schrift-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.marke:hover { color: var(--holz-dunkel); }
.navi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin-left: auto;
}
.navi a {
  text-decoration: none;
  font-weight: 600;
  padding: 0.35em 0.2em; /* großzügige Klickfläche */
}
.navi a[aria-current="page"] {
  border-bottom: 3px solid var(--holz);
}

/* Fußzeile */
.fuss {
  margin-top: 4rem;
  border-top: 1px solid var(--linie);
  background: var(--papier-warm);
  color: var(--text-leise);
  font-size: 0.95rem;
}
.fuss .rahmen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.2rem;
  padding-bottom: 1.4rem;
}
.fuss nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.fuss .projekt { margin-left: auto; }

/* ---- Hero (Startseite) ----
   Hintergrund: gerastertes Axo4-Rendering (tools/render_assets.py);
   heller Verlauf von links hält den Text lesbar (Layout-Spez: Overlay). */
.hero {
  background-image:
    linear-gradient(100deg, rgba(250, 246, 242, 0.95) 0%,
      rgba(250, 246, 242, 0.88) 42%, rgba(250, 246, 242, 0.25) 100%),
    url("../assets/img/hero-axo4.jpg");
  background-size: cover;
  background-position: center right;
  border-bottom: 1px solid var(--linie);
}
.hero .rahmen {
  padding-top: 4rem;
  padding-bottom: 4rem;
  max-width: 46rem;
  margin: 0;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 0.4em;
}
.hero .fakten {
  font-size: 1.15rem;
  margin-bottom: 1.6em;
}

/* Buttons */
.knopf {
  display: inline-block;
  padding: 0.7em 1.5em;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--holz-dunkel);
}
.knopf-primaer {
  background: var(--holz-dunkel);
  color: #fff;
}
.knopf-primaer:hover {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.knopf-sekundaer {
  background: transparent;
  color: var(--holz-dunkel);
}
.knopf-sekundaer:hover { color: var(--text); border-color: var(--text); }
.knopf + .knopf { margin-left: 0.8rem; }

/* ---- Abschnitte Startseite ---- */
.abschnitt { padding: 1rem 0 0.5rem; }
.abschnitt-warm {
  background: var(--papier-warm);
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  padding: 1.5rem 0 2rem;
  margin-top: 2.5rem;
}
.erzaehlung { max-width: 42rem; }

/* Kacheln Gemeinschaftsflächen */
.kachelgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0;
  list-style: none;
}
.kachelgrid li {
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.kachelgrid .symbol {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.kachelgrid .begriff {
  display: block;
  font-weight: 700;
}
.kachelgrid .zusatz {
  color: var(--text-leise);
  font-size: 0.95rem;
}

/* Wer wir sind */
.werwirsind {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 2rem;
  align-items: start;
}
.werwirsind img {
  border-radius: var(--radius);
  border: 1px solid var(--linie);
}

/* ---- Wohnungs-Kacheln (Teaser + Übersicht) ---- */
.wohnungsgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.2rem;
  padding: 0;
  margin: 1.5rem 0 0.8rem;
  list-style: none;
}
.wohnungskachel {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: var(--papier);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.wohnungskachel h3 {
  margin: 0;
  font-size: 1.15rem;
}
.wohnungskachel h3 a {
  text-decoration: none;
  color: var(--text);
}
.wohnungskachel h3 a:hover { color: var(--holz-dunkel); }
.wohnungskachel h3 a::after {
  /* ganze Kachel klickbar */
  content: "";
  position: absolute;
  inset: 0;
}
.wohnungskachel { position: relative; }
.wohnungskachel .daten {
  color: var(--text-leise);
  font-size: 0.98rem;
}
.wohnungskachel .preis {
  margin-top: auto;
  font-weight: 700;
  font-size: 1.1rem;
}
.wohnungskachel.vergeben {
  background: var(--papier-warm);
  color: var(--text-leise);
}

.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15em 0.7em;
  border-radius: 1em;
  text-transform: uppercase;
}
.badge-verfuegbar { background: var(--gruen); color: #fff; }
.badge-vergeben { background: var(--anthrazit); color: #fff; }

.fussnote {
  color: var(--text-leise);
  font-size: 0.9rem;
}

/* ---- Wohnungsseite ---- */
.brotkrumen {
  font-size: 0.95rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-leise);
}
.wohnungskopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
}
.wohnungskopf h1 { margin: 0; }

.eckdaten {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.2rem;
  padding: 0.9rem 0;
  margin: 1rem 0 1.5rem;
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  list-style: none;
}
.eckdaten li strong { display: block; font-size: 1.15rem; }
.eckdaten li span { color: var(--text-leise); font-size: 0.9rem; }

.hauptbereich {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: start;
}
.grundriss button {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--papier);
  padding: 0.4rem;
  cursor: zoom-in;
  display: block;
  width: 100%;
}
.grundriss .bildhinweis {
  font-size: 0.9rem;
  color: var(--text-leise);
  margin-top: 0.3rem;
}

.preisblock {
  background: var(--papier-warm);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.preisblock .label {
  font-size: 0.95rem;
  color: var(--text-leise);
  margin: 0;
}
.preisblock .preis {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.1em 0;
  font-family: var(--schrift-serif);
}
.preisblock .ohne-tg { margin: 0 0 0.6em; }
.preisblock .knopf { display: block; text-align: center; margin: 1rem 0 0.6rem; }
.preisblock .vertrauen {
  font-size: 0.9rem;
  color: var(--text-leise);
  text-align: center;
  margin: 0;
}

.detailbereich {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.ausstattung ul {
  padding-left: 1.2em;
}
.ausstattung li { margin-bottom: 0.3em; }

.seitenfuss-we {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--linie);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: center;
}

/* ---- Lage-Seite ---- */
.lagebild {
  margin: 2rem 0;
}
.lagebild img {
  border-radius: var(--radius);
  border: 1px solid var(--linie);
}
.lagebild figcaption {
  font-size: 0.9rem;
  color: var(--text-leise);
  margin-top: 0.4rem;
}
.karte {
  background: var(--papier-warm);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  max-width: 34rem;
}
.karte p:last-child { margin-bottom: 0; }

/* ---- Haus & Technik ---- */
.plangrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 1.5rem 0;
  list-style: none;
}
.plangrid button {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--papier);
  padding: 0.4rem;
  cursor: zoom-in;
  display: block;
  width: 100%;
}
.plangrid li > p {
  margin: 0.4rem 0 0;
  font-weight: 600;
}

/* ---- Lightbox ---- */
.lightbox {
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem;
  max-width: min(96vw, 70rem);
}
.lightbox::backdrop { background: rgba(46, 44, 42, 0.75); }
.lightbox img {
  display: block;
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
.lightbox .schliessen {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5em 0.7em;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--papier);
  cursor: pointer;
}

/* ---- Responsiv (bis 360 px) ---- */
@media (max-width: 50rem) {
  .hauptbereich,
  .detailbereich,
  .werwirsind {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero .rahmen {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .knopf {
    display: block;
    text-align: center;
  }
  .knopf + .knopf {
    margin-left: 0;
    margin-top: 0.7rem;
  }
}
