/* Hofprojekt Anderten – eigenständiges Stylesheet (keine externen Ressourcen) */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-display: swap; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-display: swap; src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"); }

/* Farben: ruhiger Grundton (Papierweiß, Blaugrau), ein gedeckter Ziegelton als einziger Akzent,
   Schieferblau nur in der Fußzeile. Das Hoffoto im Kopf trägt die Farbe. */
:root {
  --bg: #faf8f4;
  --bg-flaeche: #f2efe9;
  --karte: #fffdf9;
  --ink: #2a2e36;
  --ink-leise: #646872;
  --ueberschrift: #262b36;
  --akzent: #9a5b47;
  --akzent-hell: #f4e8e2;
  --rot-ueberschrift: #8e4c3b;
  --link: #8b4f3c;
  --linie: #e3ded5;
  --fuss-bg: #333a48;
  --fuss-ink: #ebe8e2;
  /* Schrift auf dem Foto: in beiden Modi gleich */
  --hero-ink: #f7f3ec;
  --hero-akzent: #f2b25c;
  --lightbox-bg: rgba(14, 16, 22, .92);
  --lightbox-ink: #f7f3ec;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.65 "Newsreader", Georgia, serif;
}

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

a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 2px; }

.kicker, .fuss {
  font-family: "Instrument Sans", system-ui, sans-serif;
}

h2 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--rot-ueberschrift);
  margin: 0 0 1.25rem;
}
h3 { font-size: 1.35rem; font-weight: 500; line-height: 1.2; margin: 0 0 .5rem; color: var(--ueberschrift); }
h3 a { color: inherit; text-decoration-color: var(--akzent); }
h3 a:hover { color: var(--link); }
p { margin: 0 0 1rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }

section { padding: 4rem 0; }
.flaeche { background: var(--bg-flaeche); }

.lead { font-size: 1.3rem; line-height: 1.5; }

/* Kopf */
/* Bild so breit wie die Textspalte, Titel unten auf dem Bild */
.hero { padding-top: clamp(1rem, 4vw, 2.5rem); color: var(--hero-ink); }
.hero-rahmen {
  position: relative;
  border-radius: .75rem;
  overflow: hidden;
}
.hero-bild {
  width: 100%;
  /* Ganzes 4:3-Bild, auf großen Bildschirmen höchstens 80 % der Fensterhöhe */
  aspect-ratio: 4 / 3;
  max-height: 80vh;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 6rem clamp(1.25rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(to top, rgba(18, 21, 30, .7), rgba(18, 21, 30, 0));
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 5.5rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--hero-ink);
}
.hero h1 span { color: var(--hero-akzent); }
.slogan {
  margin: .9rem auto 0;
  max-width: 64rem;
  font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  font-weight: 400;
  color: var(--hero-ink);
}

/* Aktuelles */
.aktuelles { padding-bottom: 0; }
.aktuell-karte {
  background: var(--akzent-hell);
  border-left: 3px solid var(--akzent);
  border-radius: .75rem;
  padding: 1.75rem 1.5rem;
}
@media (min-width: 640px) { .aktuell-karte { padding: 2.25rem 2.5rem; } }
.aktuell-karte h2 { margin-bottom: .75rem; }
.aktuell-karte p:last-child { margin-bottom: 0; }
.kicker {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 0 0 .5rem;
}
.kicker-zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1rem;
}
.kicker-zeile .stand { color: var(--ink-leise); font-weight: 500; }

/* Spalten */
.spalten { display: grid; gap: 2rem; }
@media (min-width: 820px) {
  .spalten { grid-template-columns: 3fr 2fr; gap: 3rem; align-items: start; }
}

.projekt-bild img { border-radius: .75rem; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.hinweis-box, .beratung {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: .75rem;
  padding: 1.4rem 1.5rem;
}
.hinweis-box, .flaeche .beratung { background: var(--akzent-hell); border-color: transparent; }
.hinweis-box p:last-child, .beratung p:last-child { margin-bottom: 0; }

/* Kacheln */
.kacheln {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 560px) { .kacheln { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .kacheln { grid-template-columns: repeat(3, 1fr); } .kacheln-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .kacheln-4 { grid-template-columns: repeat(4, 1fr); } }
.kachel {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-top: 2px solid var(--akzent);
  border-radius: .75rem;
  padding: 1.4rem 1.5rem;
}
.kachel p:last-child { margin-bottom: 0; }
.kachel-bild img {
  border-radius: .4rem;
  margin-top: 1rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  width: 100%;
}

/* Auf dem Hof: Überschrift, Text, Link und Bild jeder Kachel in gemeinsamen Zeilen, damit die Bilder auf einer Höhe beginnen */
@media (min-width: 560px) {
  .kacheln-3 > .kachel {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  .kacheln-3 > .kachel > :last-child { grid-row: 4; }
}

.kachel-logo { display: block; margin-top: 1rem; }
.kachel-logo img { width: 100%; border-radius: .4rem; }
.kachel-logo-eckig img { border-radius: 0; }

.kooperation {
  margin-top: 2.5rem;
  max-width: 44rem;
}

/* Bildleiste */
.bilder { padding: 4rem 0 0; }
.bildleiste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .bildleiste { grid-template-columns: repeat(2, 1fr); } }
.bildleiste figure { margin: 0; }
.bildleiste img { border-radius: .5rem; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
figcaption {
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: .88rem;
  color: var(--ink-leise);
  margin-top: .6rem;
}
a.zoom { display: block; cursor: zoom-in; }

/* Kontakt */
.mail-gross { font-size: 1.35rem; }
address { font-style: normal; line-height: 1.6; }

/* Fußzeile */
.fuss {
  background: var(--fuss-bg);
  color: var(--fuss-ink);
  font-size: .9rem;
  padding: 2rem 0;
}
.fuss p { margin: 0 0 .4rem; }
.fuss a { color: var(--fuss-ink); }

/* Lightbox (Overlay-Farben bewusst für beide Modi gleich) */
dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1600px);
  max-height: 96vh;
  overflow: visible;
}
dialog.lightbox::backdrop { background: var(--lightbox-bg); }
dialog.lightbox img { max-width: 100%; max-height: 86vh; width: auto; margin: 0 auto; border-radius: .5rem; }
.lightbox-caption { color: var(--lightbox-ink); text-align: center; margin: .75rem 0 0; font-family: "Instrument Sans", system-ui, sans-serif; }
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 2.25rem;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--lightbox-ink);
  cursor: pointer;
}

/* Rechtliches */
.legal-head { background: var(--bg-flaeche); color: var(--ink); border-bottom: 1px solid var(--linie); padding: 1.5rem 0; font-family: "Instrument Sans", system-ui, sans-serif; }
.legal-head .name { font-family: "Newsreader", Georgia, serif; font-weight: 400; font-size: 1.6rem; margin: 0 0 .3rem; color: var(--ueberschrift); }
.legal { max-width: 46rem; }
.legal h3 { margin-top: 2rem; }
