/* Dachdeckermeisterbetrieb Ortwin Scherff — Stylesheet
   Farben aus dem Logo abgeleitet (Ziegelrot, Anthrazit), siehe 03_Design/Mockup-Stand.md */

:root {
  --red:      #C0392E;
  --red-deep: #8F251C;
  --red-tint: #F7E7E4;
  --char:     #2E3134;

  --ground:   #F6F5F3;
  --surface:  #FFFFFF;
  --ink:      #23262A;
  --ink-muted:#5A5F65;
  --ink-faint:#8B8F94;
  --line:     #E3DFDA;
  --line-2:   #CDC7C0;

  --wa:       #128C7E;
  --ok:       #2F6B4F;
  --bad:      #A8342A;

  --font-ui: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-spec: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r-sm: 3px; --r-md: 6px; --r-lg: 10px;
  --w: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #16171A; --surface:  #1E2023; --ink:      #E9E6E2;
    --ink-muted:#ADA8A2; --ink-faint:#7C7873; --line:     #2E3134; --line-2:   #40444A;
    --red:      #DC5A4C; --red-deep: #B23A2D; --red-tint: #2C1D1A;
  }
}
:root[data-theme="dark"] {
  --ground:   #16171A; --surface:  #1E2023; --ink:      #E9E6E2;
  --ink-muted:#ADA8A2; --ink-faint:#7C7873; --line:     #2E3134; --line-2:   #40444A;
  --red:      #DC5A4C; --red-deep: #B23A2D; --red-tint: #2C1D1A;
}
:root[data-theme="light"] {
  --ground:   #F6F5F3; --surface:  #FFFFFF; --ink:      #23262A;
  --ink-muted:#5A5F65; --ink-faint:#8B8F94; --line:     #E3DFDA; --line-2:   #CDC7C0;
  --red:      #C0392E; --red-deep: #8F251C; --red-tint: #F7E7E4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; color: var(--ink-muted); max-width: 65ch; }
p:last-child { margin-bottom: 0; }

.kicker {
  font-family: var(--font-spec); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red); margin: 0 0 8px; display: block;
}

/* ---------- Kopf & Navigation ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; flex-wrap: wrap; }
.brand img { width: 148px; height: auto; }
.brand-group { display: flex; align-items: center; gap: 14px; }
/* Das VELUX-Siegel bleibt auf allen Größen sichtbar — die Marke kennt jeder und schafft
   sofort Vertrauen. Auf schmalen Displays wird es nur kleiner, nicht ausgeblendet. */
.siegel-header { height: 42px; width: auto; flex: none; }

/* Telefonknopf in der Kopfzeile: auf dem Desktop die Nummer zum Ablesen (dort kann man sie
   nicht antippen), auf dem Handy nur "Anrufen" - kurz, weil die Leiste eng ist, und der
   Fingertipp startet den Anruf ohnehin direkt.
   Diese Grundregel muss VOR den Media-Queries stehen: bei gleicher Spezifitaet gewinnt sonst
   die spaetere Regel und beide Beschriftungen waeren unsichtbar. */
.tel-kurz { display: none; }

/* Kopfzeile auf dem Handy: Logo und Siegel links, Anrufen rechts, Navigation darunter.
   Vorher stapelten sich drei Zeilen (194 px) — bei einer klebenden Kopfzeile ein Viertel
   des Bildschirms. */
@media (max-width: 700px) {
  .nav { padding: 8px 20px; gap: 8px; }
  .brand-group { order: 1; gap: 9px; }
  .site-header .btn { order: 2; margin-left: auto; }
  .nav-links {
    order: 3; flex-basis: 100%; justify-content: space-between;
    gap: 8px; font-size: 13px; padding-top: 2px;
  }
  .brand img { width: 118px; }
  .siegel-header { height: 46px; }
  .tel-lang { display: none; }
  .tel-kurz { display: inline; }
}
@media (max-width: 560px) {
  .site-header .btn { font-size: 13px; padding: 9px 12px; }
  .nav-links { font-size: 12.5px; }
  .brand img { width: 108px; }
  .siegel-header { height: 42px; }
}
/* Erst bei sehr schmalen Geräten (iPhone SE und älter) wird es wirklich eng. */
@media (max-width: 340px) {
  .brand img { width: 94px; }
  .siegel-header { height: 36px; }
  .site-header .btn { font-size: 12.5px; padding: 8px 10px; }
}
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; }
/* Kein Umbruch innerhalb eines Menüpunkts — lieber bricht die Leiste in zwei Zeilen um,
   als dass "Über mich" mittendrin zerfällt. */
.nav-links a { white-space: nowrap; }
.nav-links a { text-decoration: none; color: var(--ink-muted); }
.nav-links a:hover { color: var(--red); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: var(--r-sm); white-space: nowrap;
  text-decoration: none; border: none; cursor: pointer; font-family: var(--font-ui);
}
.btn:hover { background: var(--red-deep); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn.wa { background: var(--wa); }
.btn.wa:hover { background: #0e6f63; }
.btn.lg { font-size: 15px; padding: 13px 22px; }
.btn.block { width: 100%; }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: clamp(300px, 44vh, 470px);
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24,20,19,0.15) 0%, rgba(24,20,19,0.5) 45%, rgba(24,20,19,0.9) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 44px 20px 34px; display: flex; flex-direction: column; gap: 16px; width: 100%; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero .sub { color: #E2DEDA; font-size: clamp(0.9375rem, 1.6vw, 1.0625rem); max-width: 50ch; }
.hero .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,0.5); }

.page-hero { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .kicker { margin-bottom: 10px; }

/* ---------- Vertrauensleiste ---------- */

.trustbar { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--ground); }
.trustbar div { flex: 1 1 150px; padding: 14px 18px; border-right: 1px solid var(--line); font-size: 13px; line-height: 1.4; }
.trustbar div:last-child { border-right: 0; }
.trustbar b { display: block; font-family: var(--font-spec); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--red); }
.trustbar span { color: var(--ink-muted); }

/* ---------- Abschnitte ---------- */

section.block { padding: 84px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.block-head { max-width: 60ch; margin-bottom: 40px; }
.block-head p { margin-top: 12px; font-size: 1.0625rem; }

/* Der Über-mich-Abschnitt ist der Kern der Seite — er bekommt eine eigene,
   ruhigere Fläche, damit er sich vom Rest abhebt. */
.persoenlich { background: var(--surface); }

@media (max-width: 700px) {
  section.block { padding: 56px 0; }
}

/* ---------- Leistungskarten ---------- */

/* Feste Spaltenzahl statt auto-fit: bei sechs Karten ergibt das in jeder Stufe eine
   symmetrische Aufteilung (3+3 / 2+2+2 / einspaltig) statt 4+2. */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column; color: inherit;
}
.card .thumb { height: 160px; background-size: cover; background-position: center; }
/* Solange assets/img/energetische-sanierung.jpg fehlt, bleibt hier eine ruhige Fläche. */
.card .thumb-energie { background-color: var(--line); }
.card .c-txt { padding: 16px 18px 18px; display: grid; gap: 4px; }
.card h3 { letter-spacing: -0.015em; }
.card p { font-size: 14px; margin: 0; }
.card .go { font-family: var(--font-spec); font-size: 11px; color: var(--red); letter-spacing: 0.04em; margin-top: 4px; }

/* ---------- Weitere Leistungen ---------- */

.weitere { margin-top: 34px; }
.weitere h3 { font-size: 1rem; margin-bottom: 12px; }
/* Drei Spalten wie das Kartenraster darüber — sechs Einträge ergeben wieder 3+3. */
.leistungsliste {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px;
}
.leistungsliste li {
  position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-muted);
}
.leistungsliste li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
@media (max-width: 860px) { .leistungsliste { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .leistungsliste { grid-template-columns: 1fr; } }

/* ---------- VELUX-Partnerschaft ---------- */

.velux-block {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center;
  margin-top: 40px; padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.velux-urkunde img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.velux-urkunde:hover img { border-color: var(--red); }
.velux-txt .kicker { margin-bottom: 6px; }
.velux-txt h3 { margin-bottom: 10px; }
.btn.konfigurator { margin-top: 6px; }

/* ---------- Konfigurator-Seite ---------- */

.konf-huelle {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  overflow: hidden; min-height: 420px; display: flex;
}
.konf-platzhalter {
  margin: auto; max-width: 46ch; padding: 48px 24px; text-align: center;
  display: grid; gap: 14px; justify-items: center;
}
.konf-platzhalter h2 { font-size: 1.375rem; }
.konf-platzhalter p { font-size: 14px; margin: 0; }
/* 2400 px war die Höhe, mit der der Konfigurator auf der Vorgängerseite lief. Lieber etwas
   Luft unten als ein abgeschnittener letzter Schritt — der Rahmen kann nicht mitwachsen,
   weil der Inhalt von einer fremden Domain kommt. */
.konf-rahmen { width: 100%; height: 2400px; border: 0; display: block; }
@media (max-width: 700px) { .konf-rahmen { height: 2600px; } }
.konf-fallback {
  margin-top: 28px; padding: 22px 24px; background: var(--ground);
  border: 1px solid var(--line); border-radius: var(--r-md);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.konf-fallback p { flex: 1 1 300px; margin: 0; font-size: 14px; }
.konfigurator-hinweis {
  display: block; margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); max-width: 46ch;
}
@media (max-width: 700px) {
  .velux-block { grid-template-columns: 1fr; }
  .velux-urkunde { max-width: 240px; }
}

/* ---------- Über mich / Porträt ---------- */

.portrait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.portrait-grid img { border-radius: var(--r-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 760px) { .portrait-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Kernsatz hervorheben — trägt die persönliche Aussage der Seite */
.pull {
  font-size: 1.1875rem; line-height: 1.5; color: var(--ink);
  border-left: 3px solid var(--red); padding-left: 18px; margin: 22px 0 0;
}
.signatur {
  margin-top: 16px; font-family: var(--font-spec); font-size: 11.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}

.badge-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.badge {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 14px; background: var(--surface); font-size: 13px;
}
.badge b { display: block; font-size: 13px; }
.badge span { color: var(--ink-faint); font-size: 12px; }

/* ---------- Referenzen ---------- */

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--line); }
.ba > div { position: relative; height: 220px; background-size: cover; background-position: center; }
.ba .lbl {
  position: absolute; top: 10px; left: 10px; font-family: var(--font-spec); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; background: rgba(255,255,255,0.94); color: #23262A;
  padding: 3px 8px; border-radius: var(--r-sm); font-weight: 700;
}
.platzhalter-hinweis {
  border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 18px 20px;
  background: var(--red-tint); color: var(--red-deep); font-size: 14px; margin-bottom: 26px;
}
.platzhalter-hinweis strong { display: block; margin-bottom: 4px; }

/* ---------- Formular ---------- */

.form-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 34px; align-items: start; }
@media (max-width: 780px) { .form-layout { grid-template-columns: 1fr; } }

/* Kontaktbereich ohne Formular. Die Formular-Styles weiter unten bleiben absichtlich
   stehen — das Formular soll spaeter nachgeruestet werden. */
.kontakt-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 780px) { .kontakt-layout { grid-template-columns: 1fr; } }
.kontakt-karte { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.karte-lead { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* Die Klasse sitzt am Mobil-Button: der Abstand gehört vor den "oder"-Trenner,
   nicht zwischen die beiden Telefonnummern. */
.btn.anruf { margin-bottom: 24px; }
.contact-lines { display: grid; gap: 10px; font-size: 14px; }
.contact-lines div { display: flex; gap: 10px; align-items: baseline; }
.contact-lines .k { font-family: var(--font-spec); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); width: 84px; flex: none; }
.contact-lines a, .contact-lines strong { color: var(--ink); font-weight: 700; text-decoration: none; }
.contact-lines a:hover { color: var(--red); }
/* Auf dem Handy sind das die wichtigsten Ziele überhaupt — sie brauchen eine
   Trefferfläche, die man mit dem Daumen sicher erwischt. */
@media (max-width: 700px) {
  .contact-lines { gap: 4px; }
  .contact-lines div { padding: 6px 0; align-items: center; }
  .contact-lines a { display: inline-block; padding: 5px 0; }
}

form.kontakt-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field .optional { color: var(--ink-faint); font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field textarea, .field input[type="file"] {
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--ground);
  padding: 10px 12px; font-size: 14px; font-family: var(--font-ui); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-color: var(--red); outline: none; }
.consent { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-muted); }
.consent input { margin-top: 3px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-hint { font-family: var(--font-spec); font-size: 11px; color: var(--ink-faint); line-height: 1.5; }
.oder {
  display: flex; align-items: center; gap: 12px; margin: 4px 0;
  font-family: var(--font-spec); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
}
.oder::before, .oder::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.banner { border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 22px; font-size: 14px; }
.banner.ok { background: #E9F3ED; border: 1px solid var(--ok); color: var(--ok); }
.banner.error { background: var(--red-tint); border: 1px solid var(--bad); color: var(--bad); }

/* ---------- Fuß ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 30px; padding: 40px 20px 26px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid img { width: 130px; margin-bottom: 10px; }
.footer-grid p { font-size: 13.5px; margin: 0; }
.foot-kicker { font-family: var(--font-spec); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
.foot-legal {
  border-top: 1px solid var(--line); padding: 14px 20px; font-size: 12px; color: var(--ink-faint);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { color: var(--red); }

/* ---------- Sonstiges ---------- */

.legal p, .legal li { font-size: 14.5px; }
.legal h2 { margin-top: 34px; margin-bottom: 10px; font-size: 1.25rem; }
.legal h2:first-child { margin-top: 0; }
