/* Malerfachbetrieb René Wieruch
   Werte aus Figma: Grund #272525, Akzent #ffbe00, Inhalt 1400 px bei 1900 px Rahmen,
   Inter. Umbrüche: 1100 px (Menü), 900 px (Spalten), 560 px (Handy). */

:root {
  --grund: #272525;
  --grund-hell: #312e2e;
  --akzent: #ffbe00;
  --akzent-dunkel: #e0a700;
  --text: #fff;
  --text-leise: rgba(255, 255, 255, 0.78);
  --rand: 24px;
  --breite: 1400px;
  --aussen: max(var(--rand), calc((100% - var(--breite)) / 2));
  --abstand: clamp(64px, 8vw, 128px);
  --balken: 12px;
  --spalt: clamp(32px, 5vw, 96px); /* Spaltenabstand im Seitenkopf */
}

@media (min-width: 560px) { :root { --rand: 32px; } }
@media (min-width: 1100px) { :root { --rand: 48px; } }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.menue-offen, body.lupe-offen { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }

h1 { font-size: clamp(34px, 4.2vw, 48px); line-height: 1.17; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.2vw, 35px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
.h2--gross { font-size: clamp(32px, 4vw, 48px); line-height: 1.17; }
.gross, .seitenkopf__unter { font-size: clamp(17px, 1.4vw, 18px); line-height: 1.56; }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
.karte:focus-visible, .knopf:focus-visible { outline-color: #fff; }

.nur-fuer-screenreader {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprungmarke {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--akzent); color: var(--grund); padding: 10px 16px; font-weight: 600;
}
.sprungmarke:focus { top: 12px; }

.bereich { width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }
.bereich--schmal { max-width: 820px; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 24px;
  background: var(--akzent); color: var(--grund);
  border: 1.5px solid var(--akzent);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.knopf:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.knopf--rand { background: transparent; color: var(--akzent); }
.knopf--rand:hover { background: var(--akzent); color: var(--grund); border-color: var(--akzent); }
.knopf--gross { font-size: 16px; padding: 14px 28px; }
.knopf--voll { width: 100%; font-size: 18px; font-weight: 700; padding-block: 16px; cursor: pointer; font-family: inherit; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }

.textlink { color: var(--akzent); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.textlink:hover { text-decoration: underline; text-underline-offset: 4px; }
.oberzeile { color: var(--akzent); font-size: 14px; line-height: 20px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 50;
  background: var(--grund);
  transition: box-shadow .2s;
}
.kopf--gescrollt { box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.kopf__innen { display: flex; align-items: center; gap: 24px; min-height: 84px; padding-block: 10px; }
.kopf__logo { flex: none; margin-right: auto; }
.kopf__logo img { width: 220px; }
.kopf__nav { display: flex; align-items: center; }
.kopf__nav > a, .kopf__leistungen {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  color: #fff; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.kopf__nav > a:hover, .kopf__leistungen:hover, .kopf__nav > a[aria-current="page"], .kopf__leistungen--aktiv { color: var(--akzent); }
.kopf__leistungen svg { transition: transform .2s; }
.kopf__gruppe { position: relative; }
.kopf__unter {
  display: none; position: absolute; left: 0; top: 100%;
  min-width: 260px; padding: 8px 0;
  background: var(--grund-hell); border-top: 3px solid var(--akzent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}
.kopf__unter a { display: block; padding: 10px 20px; font-size: 14px; text-decoration: none; }
.kopf__unter a:hover, .kopf__unter a[aria-current="page"] { color: var(--akzent); background: rgba(255, 255, 255, .04); }
.kopf__gruppe--offen .kopf__unter { display: block; }
.kopf__gruppe--offen .kopf__leistungen svg { transform: rotate(180deg); }
.kopf__aktion { display: flex; align-items: center; gap: 24px; }
.kopf__whatsapp { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; justify-content: center; text-decoration: none; }
.kopf__whatsapp img { width: 32px; height: 32px; }
.kopf__whatsapp-text { display: none; }
.kopf__cta { padding: 12px 20px; min-height: 44px; }
.kopf__schalter { display: none; }

@media (min-width: 1100px) {
  .kopf__innen { min-height: 120px; }
  .kopf__logo img { width: 330px; }
  .kopf__whatsapp--leiste { display: none; }
  .kopf__menue { display: flex; align-items: center; gap: 40px; }
  .kopf__gruppe:hover .kopf__unter { display: block; }
}
@media (min-width: 1100px) and (max-width: 1299px) {
  .kopf__logo img { width: 260px; }
  .kopf__menue { gap: 20px; }
  .kopf__nav > a, .kopf__leistungen { padding: 0 9px; }
}

@media (max-width: 1099px) {
  .kopf__innen { gap: 8px; }
  .kopf__schalter {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-right: -10px;
    background: none; border: 0; color: #fff; cursor: pointer;
  }
  .kopf__schalter-zu, .kopf--offen .kopf__schalter-auf { display: none; }
  .kopf--offen .kopf__schalter-zu { display: block; }
  .kopf__menue {
    display: none;
    position: fixed; inset: var(--kopf-hoehe, 84px) 0 0 0;
    padding: 16px var(--rand) 40px;
    background: var(--grund); overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  .kopf--offen .kopf__menue { display: flex; flex-direction: column; gap: 32px; }
  .kopf__nav { flex-direction: column; align-items: stretch; }
  .kopf__nav > a, .kopf__leistungen {
    justify-content: space-between; width: 100%;
    min-height: 56px; padding: 0; font-size: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .kopf__unter { position: static; box-shadow: none; border: 0; background: none; padding: 4px 0 12px 16px; min-width: 0; }
  .kopf__unter a { font-size: 17px; padding: 11px 0; }
  .kopf__aktion { flex-direction: column; align-items: stretch; gap: 12px; }
  .kopf__aktion .kopf__whatsapp {
    justify-content: center; min-height: 52px;
    border: 1.5px solid var(--akzent); color: var(--akzent); font-weight: 500;
  }
  .kopf__whatsapp-text { display: inline; }
  .kopf__aktion .kopf__whatsapp img { width: 24px; height: 24px; }
  .kopf__cta { min-height: 52px; font-size: 16px; }
}

/* Seitenkopf: Text links im Raster, Foto rechts bis zum Rand, gelber Balken darunter */
.seitenkopf, .start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--spalt);
  padding-left: var(--aussen);
  padding-top: clamp(24px, 4vw, 56px);
}
.seitenkopf__text, .start-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 600px; padding-block: 32px; }
.seitenkopf__ober a { color: var(--akzent); font-size: 14px; font-weight: 500; text-decoration: none; }
.seitenkopf__ober a:hover { text-decoration: underline; }
.seitenkopf__unter a { color: var(--akzent); }
.seitenkopf__bild { position: relative; margin-left: 25px; padding-bottom: var(--balken); }
.seitenkopf__bild img { width: 100%; height: clamp(280px, 24vw, 460px); object-fit: cover; }
.seitenkopf__bild::after, .start-hero__bild::after {
  content: ""; position: absolute; left: -25px; right: 0; bottom: 0; height: var(--balken); background: var(--akzent);
}
/* Die Collage ist unten auf das Motiv beschnitten (bilder/figma/hero-collage-v2.png),
   der Balken schließt deshalb ohne Spalt an. */
.seitenkopf--schlicht { grid-template-columns: minmax(0, 1fr); padding-block: clamp(48px, 8vw, 120px); }

.start-hero { padding-top: 0; }
.start-hero__text { max-width: 690px; }
.start-hero__bild { position: relative; align-self: end; margin-top: -24px; }
.start-hero__bild img { width: 100%; max-width: 915px; margin-left: auto; }

@media (max-width: 899px) {
  .seitenkopf, .start-hero { grid-template-columns: minmax(0, 1fr); padding-right: var(--rand); padding-top: 8px; }
  .seitenkopf__text, .start-hero__text { padding-block: 16px 40px; gap: 18px; }
  .seitenkopf__bild { margin-left: 0; margin-right: calc(-1 * var(--rand)); }
  .seitenkopf__bild img { height: auto; aspect-ratio: 16 / 10; }
  .seitenkopf__bild::after { left: 0; }
  .start-hero__bild { margin: 0 calc(-1 * var(--rand)) 0 0; }
  .start-hero__bild::after { left: 0; }
  .start-hero__bild img { max-width: none; }
}
@media (max-width: 559px) {
  .knopfreihe { width: 100%; gap: 12px; }
  .knopfreihe .knopf { flex: 1 1 auto; }
}

/* Abschnitte */
.abschnitt { padding-block: var(--abstand); }
.abschnitt--eng { padding-block: clamp(40px, 5vw, 64px) 0; }
/* Intro der Leistungsseiten: im Entwurf 48 px unter dem gelben Balken, 720 px breit,
   rechts am Raster ausgerichtet (gemessen an Figma 508:169). */
.abschnitt--intro { padding-block: clamp(32px, 3.4vw, 48px) 0; }
/* Der Intro-Absatz steht im selben Raster wie der Seitenkopf, also bündig mit dem
   linken Ende des gelben Balkens (Spalte 2 des Kopfrasters). */
.abschnitt--intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--spalt);
  padding-left: var(--aussen);
}
.intro-rechts { grid-column: 2; max-width: calc(720px + var(--rand)); padding-right: var(--rand); }
@media (max-width: 899px) {
  .abschnitt--intro { grid-template-columns: minmax(0, 1fr); padding-inline: var(--rand); }
  .intro-rechts { grid-column: 1; max-width: none; }
}
.abschnitt--oben-eng { padding-top: 0; }

.kopfzeile { display: grid; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 720px; }
.kopfzeile p { font-size: 18px; line-height: 1.56; color: var(--text-leise); }
.kopfzeile--mitte { text-align: center; margin-inline: auto; }
.kopfzeile--mit-link { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; max-width: none; flex-wrap: wrap; }
.kopfzeile--mit-link > div { display: grid; gap: 16px; max-width: 920px; }

.zweispalter { display: grid; gap: 24px 64px; align-items: center; }
@media (min-width: 900px) {
  .zweispalter { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .zweispalter--rechts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .zweispalter--rechts > * { grid-column: 2; margin-left: 25px; }
}
.fliesstext { display: grid; gap: 16px; font-size: 16px; line-height: 1.65; color: var(--text-leise); }

/* Karten */
.karten { display: grid; gap: 25px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 900px) {
  .karten--vier, .karten--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .karten--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .karten--vier, .karten--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.karten--mitte.karten--3 { max-width: 1060px; margin-inline: auto; }
.karte {
  display: flex; flex-direction: column; gap: 12px;
  height: 100%;
  padding: clamp(28px, 3vw, 54px) clamp(24px, 2.6vw, 47px);
  background: var(--akzent); color: var(--grund);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  text-decoration: none;
}
.karte p { font-size: 16px; line-height: 24px; }
.karte__titel { font-size: clamp(22px, 1.6vw, 28px); line-height: 1.15; font-weight: 600; hyphens: auto; -webkit-hyphens: auto; }
.karte__mehr { margin-top: auto; padding-top: 4px; font-size: 14px; line-height: 20px; font-weight: 600; }
.karte--link { transition: transform .2s, background-color .2s; }
.karte--link:hover { background: #ffc726; transform: translateY(-3px); }
.karte--link:hover .karte__mehr { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .karte--link, .karte--link:hover { transition: none; transform: none; } }

/* Referenzen auf der Startseite */
.bento { display: grid; gap: 24px; grid-template-columns: 26fr 24fr 24fr 24fr; grid-template-rows: 238px 238px; }
.bento > div { overflow: hidden; background: var(--grund-hell); }
.bento img { width: 100%; height: 100%; object-fit: cover; }
.bento__gross { grid-row: span 2; }
@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: clamp(140px, 36vw, 260px); gap: 12px; }
  .bento__gross { grid-column: span 2; grid-row: span 2; }
  .bento > div:last-child { display: none; }
}

/* Banner: Foto links bis zum Rand, Text rechts */
.banner {
  display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); align-items: center;
  column-gap: clamp(32px, 4vw, 72px);
  padding-right: var(--aussen);
  margin-bottom: clamp(24px, 4vw, 72px);
}
.banner__bild { position: relative; padding-bottom: var(--balken); }
.banner__bild img { width: 100%; height: clamp(300px, 22vw, 440px); object-fit: cover; object-position: 50% 40%; }
.banner__bild::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--balken); background: var(--akzent); }
.banner__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 590px; }
.banner__text h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; }
.banner__text p { font-size: 18px; line-height: 1.56; color: rgba(255, 255, 255, .85); }
@media (max-width: 899px) {
  .banner { grid-template-columns: minmax(0, 1fr); padding-inline: 0; row-gap: 40px; margin-top: var(--abstand); }
  .banner__bild img { height: auto; aspect-ratio: 16 / 9; }
  .banner__text { padding-inline: var(--rand); }
}
main > .abschnitt:last-child { padding-bottom: var(--abstand); }
main > .banner:first-child { margin-top: 0; }

/* Referenzgalerie */
.galerie { display: grid; gap: 32px 25px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.galerie__knopf { display: block; width: 100%; padding: 0; border: 0; background: var(--grund-hell); cursor: zoom-in; overflow: hidden; aspect-ratio: 450 / 353; }
.galerie__knopf img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.galerie__knopf:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .galerie__knopf img { transition: none; } .galerie__knopf:hover img { transform: none; } }
@media (max-width: 899px) { .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.lupe {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 64px 16px;
  background: rgba(20, 19, 19, .94);
}
.lupe[hidden] { display: none; }
.lupe__figur { margin: 0; display: grid; gap: 12px; justify-items: center; }
.lupe__bild { max-width: min(1600px, 100%); max-height: calc(100vh - 160px); width: auto; height: auto; }
.lupe__text { font-size: 14px; color: var(--text-leise); text-align: center; }
.lupe__knopf {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border: 0; cursor: pointer;
  background: var(--akzent); color: var(--grund);
}
.lupe__zu { top: 16px; right: 16px; }
.lupe__zurueck, .lupe__vor { top: 50%; transform: translateY(-50%); }
.lupe__zurueck { left: 16px; }
.lupe__vor { right: 16px; }
@media (max-width: 559px) { .lupe__zurueck, .lupe__vor { top: auto; bottom: 16px; transform: none; } }

/* Kontakt */
.kontakt { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .kontakt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 8vw, 170px); } }
.kontakt__formular { border: 1px solid var(--akzent); padding: clamp(24px, 3vw, 40px); }
.formular { display: grid; gap: 24px; }
.formular__reihe { display: grid; gap: 24px; }
@media (min-width: 560px) { .formular__reihe { grid-template-columns: 1fr 1fr; } }
.formular__feld { display: grid; gap: 8px; }
.formular__feld label { color: var(--akzent); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.formular input, .formular textarea {
  width: 100%; min-height: 56px; padding: 14px 16px;
  background: transparent; color: #fff;
  border: 1px solid var(--akzent); border-radius: 0;
  font: inherit; font-size: 16px;
}
.formular textarea { resize: vertical; min-height: 150px; }
.formular ::placeholder { color: rgba(255, 255, 255, .45); }
.formular input:focus, .formular textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; background: rgba(255, 190, 0, .04); }
.formular__falle { position: absolute; left: -9999px; }
.formular__hinweis { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .65); }
.formular__hinweis a { color: var(--akzent); }
.kontakt__info { display: grid; gap: 36px; }
.kontaktbox { display: grid; gap: 14px; padding: clamp(28px, 3vw, 44px) clamp(24px, 4vw, 64px); border: 1px solid var(--akzent); box-shadow: 0 25px 15px rgba(0, 0, 0, .05); font-style: normal; }
.kontaktbox__zeile { display: grid; grid-template-columns: 22px 1fr; gap: 16px; align-items: start; line-height: 1.6; }
.kontaktbox__zeile img { width: 20px; height: 20px; object-fit: contain; margin-top: 3px; }
.kontaktbox a { text-decoration: none; }
.kontaktbox a:hover { color: var(--akzent); }

/* Rechtstexte */
.rechtstext { padding-block: clamp(40px, 6vw, 88px) var(--abstand); }
.rechtstext h1 { margin-bottom: 32px; }
.rechtstext h2 { font-size: 24px; margin: 40px 0 12px; }
.rechtstext h3, .rechtstext h4 { font-size: 18px; margin: 28px 0 8px; }
.rechtstext p, .rechtstext ul { margin-bottom: 12px; line-height: 1.7; color: rgba(255, 255, 255, .85); }
.rechtstext a { color: var(--akzent); word-break: break-word; }

/* Fuß */
.fuss { padding-block: clamp(56px, 7vw, 144px) 32px; border-top: 1px solid rgba(255, 255, 255, .06); }
.fuss__gitter { display: grid; gap: 40px 48px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fuss h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 16px; }
.fuss ul { display: grid; gap: 12px; }
.fuss a { text-decoration: none; }
.fuss a:hover { color: var(--akzent); }
.fuss__betrieb { display: grid; gap: 16px; align-content: start; line-height: 1.6; }
.fuss__betrieb p:last-child { color: rgba(255, 255, 255, .6); font-size: 14px; max-width: 280px; }
.fuss__name { font-weight: 600; }
.fuss__zeile {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(40px, 5vw, 72px); padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 14px; color: rgba(255, 255, 255, .6);
}
.fuss__contentura { display: inline-flex; min-height: 44px; align-items: center; }
.fuss__contentura img { width: 120px; height: auto; }
@media (max-width: 559px) {
  .fuss__gitter { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .fuss__betrieb { grid-column: span 2; }
}
