/* Noack Baugesellschaft mbH – gemeinsames Stylesheet aller Seiten.
   Farben wie die bisherige Seite (Entscheidung Oliver 25.10.2026). */

@font-face {
  font-family: "Rubik";
  src: url("/schriften/rubik-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/schriften/open-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --blau: #0075be;
  --blau-2: #0c71c3;
  --blau-tief: #005a93;
  --gruen: #7cda24;
  --gruen-tief: #6bc21c;
  --text: #666;
  --dunkel: #333;
  --schwarz: #222;
  --hell: #f3f6f9;
  --linie: #d4dae3;
  --weiss: #fff;
  --breite: 1180px;
  --rand: clamp(16px, 4vw, 32px);
  --radius: 4px;
  --schatten: 0 6px 24px rgba(0, 0, 0, .08);
  --kopf: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.7 "Open Sans", Arial, sans-serif;
  color: var(--text);
  background: var(--weiss);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-underline-offset: .15em; }
a:hover { color: var(--blau-tief); }
:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: "Rubik", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blau);
  margin: 0 0 .6em;
  text-wrap: balance;
  /* lange deutsche Wörter in Versalien sprengen sonst die Handybreite */
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.6rem); text-transform: uppercase; letter-spacing: .01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); color: var(--schwarz); }
h4 { font-size: 1.05rem; color: var(--schwarz); }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
strong { color: var(--dunkel); font-weight: 600; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--blau); color: var(--weiss); padding: 10px 16px; border-radius: var(--radius);
}
.sprung:focus { top: 8px; }

.innen { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }
.abschnitt { padding: clamp(56px, 8vw, 96px) 0; }
.abschnitt--hell { background: var(--hell); }
.abschnitt--blau { background: var(--blau-2); color: var(--weiss); }
.abschnitt--blau h2, .abschnitt--blau h3, .abschnitt--blau h4, .abschnitt--blau strong { color: var(--weiss); }
.abschnitt--blau a:not(.knopf) { color: var(--weiss); }
.abschnitt--dunkel { background: var(--dunkel); color: #ddd; }
.abschnitt--dunkel h2, .abschnitt--dunkel h3 { color: var(--weiss); }
.einleitung { max-width: 760px; font-size: 1.125rem; }
.zentriert { text-align: center; }
.zentriert .einleitung { margin-left: auto; margin-right: auto; }

/* Knöpfe */
.knopf {
  display: inline-block; padding: .8em 1.5em; border-radius: var(--radius);
  background: var(--blau); color: var(--weiss); border: 2px solid var(--blau);
  font: 600 1rem/1.2 "Open Sans", Arial, sans-serif; text-decoration: none; letter-spacing: .02em;
  transition: background .15s, border-color .15s, color .15s; cursor: pointer;
}
.knopf:hover { background: var(--blau-tief); border-color: var(--blau-tief); color: var(--weiss); }
/* Grün nur mit dunkler Schrift – weiß auf Grün ist zu kontrastarm */
.knopf--gruen { background: var(--gruen); border-color: var(--gruen); color: var(--schwarz); }
.knopf--gruen:hover { background: var(--gruen-tief); border-color: var(--gruen-tief); color: var(--schwarz); }
.knopf--rahmen { background: transparent; border-color: currentColor; color: var(--weiss); }
.knopf--rahmen:hover { background: var(--weiss); border-color: var(--weiss); color: var(--blau); }
.knopf--hell { background: transparent; border-color: var(--blau); color: var(--blau); }
.knopf--hell:hover { background: var(--blau); color: var(--weiss); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

/* Kopf */
.leiste { background: var(--blau); color: var(--weiss); font-size: .875rem; }
.leiste .innen { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: flex-end; padding-top: 6px; padding-bottom: 6px; }
.leiste a { color: var(--weiss); text-decoration: none; }
.leiste a:hover { text-decoration: underline; color: var(--weiss); }
.kopf {
  position: sticky; top: 0; z-index: 50; background: var(--weiss);
  box-shadow: 0 1px 0 var(--linie);
}
.kopf .innen { display: flex; align-items: center; justify-content: space-between; min-height: var(--kopf); gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blau); }
.logo img { width: 40px; height: 56px; }
.logo span { font: 700 1.05rem/1.15 "Rubik", Arial, sans-serif; }
.logo small { display: block; font: 400 .8rem/1.3 "Open Sans", Arial, sans-serif; color: var(--text); }

.menue ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.menue a {
  display: block; padding: 10px 12px; text-decoration: none; color: var(--dunkel);
  font: 500 .95rem/1.2 "Rubik", Arial, sans-serif; text-transform: uppercase; letter-spacing: .02em; border-radius: var(--radius);
}
.menue a:hover { color: var(--blau); background: var(--hell); }
.menue a[aria-current="page"] { color: var(--blau); box-shadow: inset 0 -3px 0 var(--blau); border-radius: 0; }
.menue-knopf { display: none; }

@media (max-width: 1099px) {
  .js .menue-knopf {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--blau);
    background: var(--weiss); color: var(--blau); border-radius: var(--radius);
    font: 600 .95rem "Rubik", Arial, sans-serif; cursor: pointer;
  }
  .menue-knopf svg { width: 20px; height: 20px; }
  .kopf .innen { flex-wrap: wrap; }
  .menue { flex-basis: 100%; }
  .menue ul { flex-direction: column; padding-bottom: 12px; }
  .menue a { padding: 12px 8px; border-bottom: 1px solid var(--hell); }
  .menue a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blau); padding-left: 14px; }
  .js .menue { display: none; }
  .js .menue.offen { display: block; }
}
@media (max-width: 560px) {
  .logo small { display: none; }
  .leiste .innen { justify-content: center; }
  .leiste .zeiten { display: none; }
}

/* Titelbereich Startseite */
.titel { position: relative; min-height: min(78vh, 720px); display: grid; align-items: end; color: var(--weiss); background: var(--dunkel); overflow: hidden; }
.titel-bilder, .titel-bilder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.titel-bilder img { opacity: 0; transition: opacity 1.2s ease; }
.titel-bilder img.aktiv { opacity: 1; }
.titel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .7) 100%); }
.titel .innen { position: relative; z-index: 1; width: 100%; padding-top: 80px; padding-bottom: clamp(40px, 7vw, 80px); }
.titel h1 { color: var(--weiss); max-width: 14em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.titel p { max-width: 38em; font-size: clamp(1.05rem, 1.6vw, 1.25rem); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.titel-bildtext { position: absolute; right: var(--rand); bottom: 12px; z-index: 1; font-size: .8rem; opacity: .85; }

/* Seitenkopf Unterseiten */
.seitenkopf { position: relative; color: var(--weiss); background: var(--blau-2); overflow: hidden; }
.seitenkopf > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seitenkopf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .25)); }
.seitenkopf .innen { position: relative; z-index: 1; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(40px, 6vw, 72px); }
.seitenkopf h1 { color: var(--weiss); margin: 0; }
.seitenkopf p { margin: .4em 0 0; font-size: 1.15rem; }

/* Bänder */
.band { background: var(--blau); color: var(--weiss); }
.band .innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.band h2 { color: var(--weiss); font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin: 0 0 .2em; }
.band p { margin: 0; }
.band--gruen { background: var(--gruen); color: var(--schwarz); }
.band--gruen h2 { color: var(--schwarz); }

/* Raster und Karten */
.raster { display: grid; gap: clamp(20px, 3vw, 32px); }
.raster--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.raster--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.raster--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.mittig { align-items: center; }
/* Rasterspalten dürfen schmaler werden als ihr längstes Wort – sonst wächst die Seite auf dem Handy in die Breite */
.raster > *, .block > * { min-width: 0; }
.karte { background: var(--weiss); padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); box-shadow: var(--schatten); border-top: 4px solid var(--blau); }
.karte h3 { margin-bottom: .4em; }
.karte p:last-child, .karte ul:last-child { margin-bottom: 0; }
.abschnitt--blau .karte { color: var(--text); }
.abschnitt--blau .karte h3 { color: var(--schwarz); }
.bild-rund { border-radius: var(--radius); box-shadow: var(--schatten); }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; text-align: center; }
.zahl strong { display: block; font: 700 clamp(2.2rem, 4.5vw, 3rem)/1.1 "Rubik", Arial, sans-serif; color: var(--weiss); }
.zahl span { font-size: .95rem; }

.haken { list-style: none; padding: 0; }
.haken li { position: relative; padding-left: 1.8em; margin-bottom: .45em; }
.haken li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1.05em; height: 1.05em; border-radius: 50%;
  background: var(--gruen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23222' stroke-width='2'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.haken ul { list-style: disc; padding-left: 1.3em; margin: .35em 0 .2em; }
.haken ul li { padding-left: 0; margin-bottom: .2em; }
.haken ul li::before { display: none; }
.phase { counter-increment: phase; }
.phasen { counter-reset: phase; }
.phase h3::before {
  content: counter(phase); display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; margin-right: .5em;
  border-radius: 50%; background: var(--blau); color: var(--weiss); font-size: .85em;
}
.spalten-liste { columns: 2 260px; column-gap: 32px; }
.spalten-liste li { break-inside: avoid; }
.orte { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.orte li { background: var(--weiss); border: 1px solid var(--linie); border-radius: 999px; padding: 6px 16px; color: var(--dunkel); }

/* Unterseiten: Inhaltsnavigation, Leistungsblöcke, Objekte */
.sprungmarken { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sprungmarken a {
  display: block; padding: 8px 16px; border: 2px solid var(--blau); border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.sprungmarken a:hover, .sprungmarken a[aria-current="page"] { background: var(--blau); color: var(--weiss); }
.block { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 880px) {
  .block { grid-template-columns: 5fr 4fr; }
  .block--rechts > :first-child { order: 2; }
}
.block + .block { margin-top: clamp(56px, 8vw, 96px); }
.block figure { margin: 0; display: grid; gap: 16px; }
.block figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--schatten); }
.hinweis { border-left: 4px solid var(--gruen); background: var(--hell); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.abschnitt--hell .hinweis { background: var(--weiss); }
.ansprechpartner { background: var(--blau-2); color: var(--weiss); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.ansprechpartner h3, .ansprechpartner strong { color: var(--weiss); }
.ansprechpartner a { color: var(--weiss); }
.ansprechpartner p:last-child { margin-bottom: 0; }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 0 0 1.5em; }
.fakten div { background: var(--hell); border-radius: var(--radius); padding: 12px 16px; }
.abschnitt--hell .fakten div { background: var(--weiss); }
.fakten dt { font-size: .85rem; }
.fakten dd { margin: 0; font: 700 1.2rem/1.3 "Rubik", Arial, sans-serif; color: var(--blau); }

/* Bildergalerie mit Großansicht (seite.js) */
.galerie { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.galerie a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--hell); }
.galerie img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .3s; }
.galerie a:hover img { transform: scale(1.04); }
.galerie figcaption { font-size: .85rem; padding: 4px 2px 0; }
/* lange Galerien: erst 8 Fotos, Rest per Knopf (seite.js); ohne JS alles sichtbar */
.js .galerie--kurz > li:nth-child(n+9) { display: none; }
.mehr-knopf { margin-top: 16px; }
.referenz + .referenz { margin-top: clamp(48px, 7vw, 80px); }
.referenz h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.referenz h2 small { font: 400 1rem/1.4 "Open Sans", Arial, sans-serif; color: var(--text); text-transform: none; letter-spacing: 0; }
.grossansicht { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(10, 14, 20, .94); color: var(--weiss); }
.grossansicht::backdrop { background: rgba(0, 0, 0, .6); }
.grossansicht figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 56px 56px 16px; }
.grossansicht img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.grossansicht figcaption { padding: 10px; text-align: center; font-size: .95rem; min-height: 2.5em; }
.grossansicht button {
  position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: var(--weiss); cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.grossansicht button:hover { background: var(--blau); }
.grossansicht .schliessen { top: 12px; right: 12px; }
.grossansicht .zurueck { left: 8px; top: 50%; transform: translateY(-50%); }
.grossansicht .weiter { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .grossansicht figure { padding: 64px 8px 16px; } .grossansicht .zurueck, .grossansicht .weiter { top: auto; bottom: 12px; transform: none; } }

/* Bautagebuch */
.tagebuch { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--blau); }
.tagebuch > li { position: relative; padding: 0 0 clamp(40px, 6vw, 64px) clamp(20px, 4vw, 40px); }
.tagebuch > li:last-child { padding-bottom: 0; }
.tagebuch > li::before { content: ""; position: absolute; left: -11px; top: 4px; width: 19px; height: 19px; border-radius: 50%; background: var(--weiss); border: 4px solid var(--gruen); }
.tagebuch time { display: inline-block; font: 600 .9rem/1 "Rubik", Arial, sans-serif; color: var(--weiss); background: var(--blau); padding: 6px 10px; border-radius: var(--radius); margin-bottom: 10px; }
.tagebuch h3 { margin-bottom: .5em; }

/* Rechtstexte */
.rechtstext { max-width: 820px; }
.rechtstext h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-top: 2em; }
.rechtstext h3 { font-size: 1.15rem; margin-top: 1.6em; }
.rechtstext h4 { margin-top: 1.2em; }
.rechtstext > :first-child { margin-top: 0; }
.rechtstext address { font-style: normal; margin: 0 0 1em; }
.rechtstext .versal { font-size: .95rem; }

/* Kontaktformular */
.formular { display: grid; gap: 18px; background: var(--weiss); padding: clamp(22px, 4vw, 40px); border-radius: var(--radius); box-shadow: var(--schatten); border-top: 4px solid var(--blau); }
.formular .zweispaltig { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.feld { display: grid; gap: 6px; }
.feld label { font-weight: 600; color: var(--dunkel); }
.feld input, .feld textarea {
  width: 100%; font: inherit; color: var(--schwarz); background: var(--weiss);
  border: 2px solid var(--linie); border-radius: var(--radius); padding: 10px 12px;
}
.feld textarea { min-height: 160px; resize: vertical; }
.feld input:focus, .feld textarea:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(0, 117, 190, .2); }
.feld [aria-invalid="true"] { border-color: #c62828; }
.feld-fehler { color: #c62828; font-size: .9rem; margin: 0; }
.feld-fehler:empty { display: none; }
.pflicht { color: #c62828; }
.zustimmung { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.zustimmung input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--blau); }
.honigtopf { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formular-meldung { margin: 0; padding: 14px 16px; border-radius: var(--radius); font-weight: 600; }
.formular-meldung:empty { display: none; }
.formular-meldung.ok { background: #e8f7d8; color: #2f5a0b; border-left: 4px solid var(--gruen); }
.formular-meldung.fehler { background: #fdecea; color: #8e1c1c; border-left: 4px solid #c62828; }
.formular button[disabled] { opacity: .6; cursor: wait; }

/* Kontakt-Kacheln */
.kontakt-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.kontakt-kacheln h3 { color: var(--blau); font-size: 1.1rem; margin-bottom: .3em; }
.kontakt-kacheln p { margin: 0; }

/* Fuß */
.fuss { background: var(--dunkel); color: #ccc; font-size: .95rem; }
.fuss .innen { padding-top: 56px; padding-bottom: 24px; }
.fuss h2 { color: var(--weiss); font-size: 1.1rem; text-transform: none; letter-spacing: 0; margin-bottom: .8em; }
.fuss a { color: var(--weiss); }
.fuss ul { list-style: none; padding: 0; }
.fuss li { margin-bottom: .35em; }
.foerderung { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; border-top: 1px solid #555; margin-top: 32px; padding-top: 24px; }
.foerderung img { width: 220px; height: auto; }
.foerderung p { margin: 0; max-width: 60em; font-size: .9rem; }
.fuss-unten { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid #555; margin-top: 24px; padding-top: 20px; font-size: .875rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .leiste, .menue, .menue-knopf, .titel-bilder, .fuss .foerderung { display: none !important; }
  .kopf { position: static; box-shadow: none; }
  .titel, .seitenkopf { color: #000; background: none; min-height: 0; }
  .titel h1, .seitenkopf h1 { color: #000; text-shadow: none; }
}
