/* Damjan Heizung und Sanitärtechnik – Stil
   Idee: Die Seite ist wie ein Leitungssystem aufgebaut. Abschnitte hängen an einer durchgehenden
   „Leitung“, Nummern sitzen in „Muffen“. Farben: Firmen-Lila und Gelb wie Logo und Firmenwagen. */

:root {
  --lila: #653264;
  --lila-tief: #3e1d3d;
  --lila-hell: #efe7ee;
  --gelb: #facf01;
  --gelb-tief: #e2b900;
  --tinte: #1f1720;
  --grau: #5d5560;
  --papier: #faf8f5;
  --weiss: #fff;
  --rand: #e4dde3;
  --rohr: 6px;
  --r: 14px;
  --max: 1160px;
  --schrift: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--schrift); font-size: 17px; line-height: 1.6; color: var(--tinte); background: var(--papier); padding-bottom: 64px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lila); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 800; }
p { margin: 0 0 1em; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }
.ic.gross { width: 40px; height: 40px; stroke-width: 1.6; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--gelb); padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 3px; }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.3em; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s; cursor: pointer; font: inherit; font-weight: 700; }
.knopf:hover { transform: translateY(-2px); }
.knopf-gelb { background: var(--gelb); color: var(--tinte); }
.knopf-gelb:hover { background: var(--gelb-tief); }
.knopf-rand { border-color: var(--lila); color: var(--lila); background: transparent; }
.knopf-rand:hover { background: var(--lila); color: #fff; }
.knopf-rand-hell { border-color: rgba(255,255,255,.7); color: #fff; }
.knopf-rand-hell:hover { background: #fff; color: var(--lila); }

/* ---------- Kopf ---------- */
.kopf { position: sticky; top: 0; z-index: 50; background: var(--lila); border-bottom: 5px solid var(--gelb); }
.kopf-in { max-width: var(--max); margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { width: 140px; height: auto; }
.burger { display: grid; gap: 5px; width: 48px; height: 48px; place-content: center; background: none; border: 0; cursor: pointer; }
.burger span { width: 26px; height: 3px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded=true] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded=true] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.menue { position: fixed; inset: 69px 0 auto 0; background: var(--lila-tief); display: none; flex-direction: column; padding: 8px 16px 24px; max-height: calc(100vh - 69px); overflow: auto; }
.menue.offen { display: flex; }
.menue a { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
.menue a[aria-current=page] { color: var(--gelb); }
.menue .knopf { margin-top: 16px; border-bottom: 0; color: var(--tinte); }

/* ---------- Held (Startseite) ---------- */
.held { position: relative; overflow: hidden; background: var(--lila); color: #fff; }
.held-in { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 48px 16px 56px; }
.stempel { display: inline-flex; align-items: center; gap: .5em; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gelb); border: 2px solid currentColor; padding: .3em .8em; border-radius: 6px; margin-bottom: 1.4em; }
.held h1 { font-size: clamp(2.6rem, 11vw, 6rem); max-width: 11em; font-weight: 900; letter-spacing: -.035em; line-height: .95; margin-bottom: .35em; }
.held .hl { color: var(--gelb); }
.held-text { max-width: 34em; font-size: 1.1rem; color: #f1e9f0; }
.held-k { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
/* drei Rohre, die rechts herunterlaufen und abknicken */
.held-rohr { position: absolute; right: -40px; top: -20px; width: 46%; height: 115%; pointer-events: none; }
.held-rohr span { position: absolute; right: 0; top: 0; border: var(--rohr) solid; border-left: 0; border-top: 0; border-radius: 0 0 120px 0; }
.held-rohr span:nth-child(1) { width: 70%; height: 60%; border-color: var(--gelb); right: 70px; }
.held-rohr span:nth-child(2) { width: 82%; height: 74%; border-color: rgba(255,255,255,.55); right: 46px; }
.held-rohr span:nth-child(3) { width: 94%; height: 88%; border-color: rgba(255,255,255,.18); right: 22px; }
@media (max-width: 639px) {
  /* auf dem Handy: Rohre nur oben rechts neben der großen Überschrift, nicht durch den Text */
  .held-rohr { width: 34%; height: 300px; top: -40px; right: -30px; }
  .held-rohr span { border-radius: 0 0 70px 0; }
  .held-rohr span:nth-child(1) { right: 44px; }
  .held-rohr span:nth-child(2) { right: 28px; }
  .held-rohr span:nth-child(3) { right: 12px; }
}

/* ---------- Unterseiten-Kopf ---------- */
.unterheld { position: relative; background: linear-gradient(180deg, rgba(31,23,32,0) 35%, rgba(31,23,32,.72) 100%), var(--bild) var(--pos, center)/cover; color: #fff; }
.unterheld h1 { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.unterheld-in { max-width: var(--max); margin: 0 auto; padding: 120px 16px 40px; }
.unterheld h1 { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 900; max-width: 16em; }

/* ---------- Abschnitte an der „Leitung“ ---------- */
.sektion { max-width: var(--max); margin: 0 auto; padding: 56px 16px 8px; }
.sektion.oben { padding-top: 40px; }
.abschnitt-kopf { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 28px; }
.abschnitt-kopf h2 { margin-bottom: .15em; }
.unter { color: var(--grau); margin: 0; }
.muffe { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--lila); color: var(--gelb); font-weight: 900; font-size: 1.1rem; box-shadow: 0 0 0 5px var(--lila-hell); position: relative; }
.muffe::after { content: ""; position: absolute; left: 50%; top: 100%; width: var(--rohr); height: 22px; margin-left: calc(var(--rohr) / -2); background: var(--lila-hell); }
.muffe .ic { width: 26px; height: 26px; }

/* ---------- Karten ---------- */
.karten { display: grid; gap: 16px; }
.karte { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--r); padding: 24px 22px 20px; text-decoration: none; color: var(--tinte); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.karte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--rohr); background: var(--gelb); }
.karte:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(62,29,61,.5); }
.karte .ic.gross { color: var(--lila); }
.karte h3 { margin: 4px 0 0; }
.karte p { color: var(--grau); margin: 0 0 8px; }
.karte-nr { position: absolute; right: 16px; top: 8px; font-size: 3.2rem; font-weight: 900; color: var(--lila-hell); line-height: 1; }
.mehr { margin-top: auto; font-weight: 800; color: var(--lila); display: inline-flex; gap: .4em; align-items: center; }

/* ---------- Team ---------- */
.team-bild { margin: 0 0 24px; border-radius: var(--r); overflow: hidden; border-bottom: var(--rohr) solid var(--gelb); }
.team-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; }
.haken { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.haken li { display: flex; gap: 10px; align-items: flex-start; }
.haken .ic { color: var(--lila); background: var(--gelb); border-radius: 50%; padding: 3px; width: 1.4em; height: 1.4em; margin-top: .1em; }

/* ---------- Ablauf ---------- */
.schritte { list-style: none; counter-reset: s; padding: 0 0 0 4px; margin: 0; position: relative; }
.schritte::before { content: ""; position: absolute; left: 25px; top: 20px; bottom: 30px; width: var(--rohr); background: var(--lila-hell); border-radius: 3px; }
.schritte li { counter-increment: s; position: relative; padding: 0 0 26px 70px; }
.schritte li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--gelb); color: var(--tinte); font-weight: 900; display: grid; place-items: center; border: 5px solid var(--papier); }
.schritte b { display: block; font-size: 1.15rem; }
.schritte span { color: var(--grau); }

/* ---------- Referenzen ---------- */
.refs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ref { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 1; display: block; }
.ref img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ref:hover img { transform: scale(1.05); }
.ref span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; color: #fff; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; background: linear-gradient(transparent, rgba(31,23,32,.85)); }
.galerie { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-bild { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.g-bild img { width: 100%; height: 100%; object-fit: cover; }
.leuchte { position: fixed; inset: 0; z-index: 100; background: rgba(20,12,20,.94); display: grid; place-items: center; padding: 16px; }
.leuchte img { max-height: 88vh; border-radius: 8px; }
.leuchte button { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gelb); font-size: 1.6rem; font-weight: 900; cursor: pointer; }

/* ---------- Leistungs-Blöcke ---------- */
.block { display: grid; gap: 18px; margin-bottom: 44px; }
.block img { border-radius: var(--r); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.block-t .abschnitt-kopf { margin-bottom: 14px; }
.block-t h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
.weiter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 40px; }

/* ---------- Band (Aufruf) ---------- */
.band { background: var(--lila-tief); color: #fff; margin-top: 48px; border-top: var(--rohr) solid var(--gelb); }
.band-in { max-width: var(--max); margin: 0 auto; padding: 40px 16px; }
.band-t { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 800; max-width: 26em; }
.band-k { display: flex; flex-wrap: wrap; gap: 12px; }
.band .knopf-rand { border-color: rgba(255,255,255,.7); color: #fff; }
.band .knopf-rand:hover { background: #fff; color: var(--lila); }

/* ---------- Kontakt ---------- */
.kontakt-raster { display: grid; gap: 24px; }
.kontakt-wege { display: grid; gap: 12px; }
.weg { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; background: var(--weiss); border: 1px solid var(--rand); border-left: var(--rohr) solid var(--gelb); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--tinte); }
.weg .ic { grid-row: span 2; color: var(--lila); }
.weg span { color: var(--grau); }
.formular { background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--r); padding: 22px 18px; display: grid; gap: 14px; }
.formular h2 { font-size: 1.4rem; }
.formular label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
.formular small { font-weight: 400; color: var(--grau); }
.formular input, .formular select, .formular textarea { font: inherit; font-weight: 400; padding: 12px 14px; border: 2px solid var(--rand); border-radius: 10px; background: var(--papier); width: 100%; }
.formular input:focus, .formular select:focus, .formular textarea:focus { border-color: var(--lila); outline: none; background: #fff; }
.zwei { display: grid; gap: 14px; }
.einw { display: flex !important; grid-template-columns: none; gap: 10px; font-weight: 400 !important; align-items: flex-start; }
.einw input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--lila); }
.hp { position: absolute; left: -9999px; }
#responseMessage { margin: 0; font-weight: 700; color: var(--lila); }

/* ---------- Text-Seiten (Impressum, Datenschutz) ---------- */
.text { max-width: 820px; overflow-wrap: anywhere; }
.text h1 { font-size: clamp(2rem, 7vw, 3rem); font-weight: 900; }
.text h2 { font-size: 1.5rem; margin-top: 1.4em; }
.text h3, .text h4 { font-size: 1.15rem; margin-top: 1.2em; }

/* ---------- Fuß ---------- */
.fuss { background: var(--lila); color: #f1e9f0; margin-top: 0; border-top: var(--rohr) solid var(--gelb); }
.band + .fuss, .band ~ .fuss { border-top: 0; }
.fuss-in { max-width: var(--max); margin: 0 auto; padding: 36px 16px 8px; display: grid; gap: 24px; }
.fuss a { color: #fff; text-decoration: none; }
.fuss a:hover { color: var(--gelb); }
.fuss-t { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gelb); margin-bottom: .6em; }
.fuss .ic { color: var(--gelb); }
.klein { font-size: .9rem; margin-top: 10px; }
.fuss-copy { max-width: var(--max); margin: 0 auto; padding: 14px 16px 18px; font-size: .85rem; opacity: .7; }

/* ---------- Schnellkontakt (nur Handy) ---------- */
.schnell { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 -6px 20px rgba(0,0,0,.18); }
.schnell a { display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 58px; font-weight: 800; text-decoration: none; background: var(--lila); color: #fff; }
.schnell a.gelb { background: var(--gelb); color: var(--tinte); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .karten { grid-template-columns: 1fr 1fr; }
  .refs { grid-template-columns: repeat(4, 1fr); }
  .galerie { grid-template-columns: repeat(3, 1fr); }
  .zwei { grid-template-columns: 1fr 1fr; }
  .fuss-in { grid-template-columns: 1fr 1fr; }
}

/* ---------- PC ---------- */
@media (min-width: 980px) {
  body { padding-bottom: 0; font-size: 18px; }
  .schnell { display: none; }
  .burger { display: none; }
  .logo img { width: 165px; }
  .menue { position: static; display: flex; flex-direction: row; align-items: center; gap: 4px; background: none; padding: 0; max-height: none; overflow: visible; }
  .menue a { font-size: .95rem; padding: 10px 12px; border: 0; position: relative; }
  .menue a:not(.knopf)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; background: var(--gelb); transform: scaleX(0); transition: transform .2s; }
  .menue a:not(.knopf):hover::after, .menue a[aria-current=page]::after { transform: scaleX(1); }
  .menue .knopf { margin: 0 0 0 10px; }
  .held-in { padding: 96px 16px 110px; }
  .held-rohr { width: 40%; }
  .sektion { padding-top: 88px; }
  .karten { grid-template-columns: repeat(4, 1fr); }
  .team { display: grid; grid-template-columns: 1.3fr 1fr; column-gap: 40px; align-items: center; }
  .team .abschnitt-kopf { grid-column: 1 / -1; }
  .team-bild { margin: 0; }
  .ablauf .schritte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; }
  .ablauf .schritte::before { left: 24px; right: 24px; top: 21px; bottom: auto; width: auto; height: var(--rohr); }
  .ablauf .schritte li { padding: 66px 0 0; }
  .block { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px; }
  .block-r img { order: 2; }
  .kontakt-raster { grid-template-columns: 1fr 1.6fr; align-items: start; }
  .formular { padding: 32px; }
  .fuss-in { grid-template-columns: 1.3fr 1.3fr 1fr 1fr; }
  .unterheld-in { padding: 180px 16px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .kopf, .schnell, .band, .held-rohr { display: none !important; }
}
