/* Holzbau Witt – Stylesheet
   Schrift: Jost (SIL Open Font License), lokal eingebunden – keine Verbindung zu Google. */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/jost-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f6f7f3;      /* Kalkweiß */
  --moss: #e8ede3;       /* helles Moos für ruhige Flächen */
  --green: #1f5a2d;      /* Tannengrün aus dem Logo */
  --forest: #123a1c;     /* Dunkelgrün */
  --forest-deep: #0c2913;
  --ink: #181818;        /* Logo-Schwarz */
  --ink-soft: #4a4d48;
  --timber: #cdb48c;     /* Holzton, nur als Linie */
  --line: #d6ddd2;
  --on-dark: #eef2ea;
  --on-dark-soft: #b9c7b6;

  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 18ch; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: 0; }
p { margin: 0 0 1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .8rem 1.5rem;
  font: 500 1.0625rem/1.2 var(--font); letter-spacing: .01em;
  text-decoration: none; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--forest); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--forest); }
.btn-light:hover { background: #fff; }
.btn-ghost-dark { border-color: var(--forest); color: var(--forest); background: var(--paper); }

/* ---------- Logo */
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: .2rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 6.25rem; height: auto; }
.logo-roof { fill: var(--green); }
.logo-type { stroke: var(--ink); }
.logo-sub { font-size: .6rem; font-weight: 500; letter-spacing: .34em; margin-right: -.34em; color: var(--green); line-height: 1; text-transform: uppercase; }
.logo-invert .logo-roof { fill: var(--on-dark-soft); }
.logo-invert .logo-type { stroke: var(--on-dark); }
.logo-invert .logo-sub { color: var(--on-dark-soft); }

/* ---------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 243, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(246, 247, 243, .85); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 4.75rem; }
.nav-desktop { margin-left: auto; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: 1.75rem; }
.nav-desktop a, .nav-mobile a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-desktop a:hover { color: var(--green); text-decoration: underline; }
.header-call {
  font-weight: 500; text-decoration: none; color: var(--paper); background: var(--green);
  padding: .55rem 1rem; border-radius: var(--radius); white-space: nowrap;
}
.header-call:hover { background: var(--forest); }

.nav-mobile { display: none; margin-left: auto; position: relative; }
.nav-mobile summary {
  list-style: none; cursor: pointer; font-weight: 500;
  padding: .55rem 1rem; border: 2px solid var(--ink); border-radius: var(--radius);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { background: var(--ink); color: var(--paper); }
.nav-mobile nav {
  position: absolute; right: 0; top: calc(100% + .5rem); width: min(18rem, 80vw);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(18, 58, 28, .14); padding: .5rem;
}
.nav-mobile a { display: block; padding: .8rem .9rem; border-radius: var(--radius); }
.nav-mobile a:hover { background: var(--moss); }

/* ---------- Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem); border-bottom: 1px solid var(--line); }
.hero-grain {
  position: absolute; inset: 0 0 0 auto; width: min(46%, 38rem);
  color: var(--green); opacity: .22; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
  mask-image: linear-gradient(to right, transparent, #000 35%);
}
.hero-grain .grain { width: 100%; height: 100%; stroke: currentColor; }
.hero-inner { position: relative; }
.hero-roof { width: min(100%, 34rem); height: clamp(4rem, 11vw, 7.5rem); margin-bottom: clamp(.75rem, 2vw, 1.25rem); overflow: visible; }
.hero-roof polyline {
  fill: none; stroke: var(--green); stroke-width: 14; stroke-linejoin: miter; stroke-linecap: butt;
}
.hero h1 {
  font-size: clamp(3rem, 10.5vw, 7.25rem); font-weight: 500; letter-spacing: -0.035em; line-height: .95;
  max-width: 11ch; margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.hero-lead { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.45; max-width: 34ch; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-note { margin-top: 1.5rem; color: var(--ink-soft); font-size: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-roof polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-roof 1.4s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
  @keyframes draw-roof { to { stroke-dashoffset: 0; } }
}

/* ---------- Sections */
.section { padding-block: var(--space); }
.section > .wrap > h2 { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-moss { background: var(--moss); }
.section-line { border-top: 1px solid var(--line); }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 5vw, 5rem); }
.service { border-top: 3px solid var(--ink); padding-top: 1.75rem; }
.service p { max-width: 42ch; color: var(--ink-soft); }
.service h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-top: 1.5rem; }
.service .service-tag { color: var(--green); font-weight: 500; margin: .35rem 0 .9rem; }
.ill { width: 100%; max-width: 15rem; height: auto; overflow: visible; }
.ill .ln, .ill .lk { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ill .ln { stroke: var(--green); }
.ill .lk { stroke: var(--ink); stroke-width: 2.25; }
.ill .dash { stroke-dasharray: 5 6; stroke: var(--ink-soft); }

/* Vorteile */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }
.benefit { position: relative; padding-top: 2.75rem; }
.benefit::before {
  content: ""; position: absolute; left: 0; top: 0; width: 3.25rem; height: 1.6rem;
  background: var(--green);
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 86% 100%, 50% 26%, 14% 100%);
}
.benefit h3 { margin-bottom: .75rem; }
.benefit p { color: var(--ink-soft); max-width: 34ch; }

/* Über mich */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.rings { width: 100%; max-width: 26rem; height: auto; stroke: var(--green); }
.rings .bark { fill: var(--green); stroke: none; }
.about-text h2 { margin-bottom: 1.5rem; }
.about-lead { font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.45; max-width: 36ch; }
.about-text p { max-width: 52ch; }
.signature { margin-top: 2rem; font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.signature span { display: block; font-size: 1rem; font-weight: 400; color: var(--green); margin-top: .25rem; }

/* Ablauf – echte Reihenfolge, daher nummeriert */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 1.4rem; height: 4px; background: var(--timber); }
.step { position: relative; counter-increment: step; padding-top: 4.25rem; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 3px solid var(--green); color: var(--green);
  font-weight: 600; font-size: 1.125rem;
}
.step h3 { margin-bottom: .6rem; }
.step p { color: var(--ink-soft); font-size: 1.0625rem; }

/* ---------- Kontakt mit Giebel */
.contact {
  position: relative; background: var(--forest); color: var(--on-dark);
  padding-block: calc(var(--space) + clamp(3rem, 8vw, 6rem)) var(--space);
  clip-path: polygon(0 clamp(3rem, 8vw, 6rem), 50% 0, 100% clamp(3rem, 8vw, 6rem), 100% 100%, 0 100%);
  margin-top: clamp(-3rem, -4vw, -1rem);
}
.contact :focus-visible { outline-color: var(--timber); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); }
.contact h2 { color: #fff; margin-bottom: 1.25rem; }
.contact-direct p { color: var(--on-dark-soft); }
.contact-direct a { color: #fff; text-decoration: none; display: block; width: fit-content; }
.contact-direct a:hover { text-decoration: underline; }
.contact-phone { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 500; letter-spacing: -.01em; margin-top: 1.75rem; }
.contact-mail { font-size: 1.25rem; margin: .5rem 0 1.75rem; }
.contact-direct address { color: var(--on-dark-soft); }

.contact-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.contact-form label { font-weight: 500; color: #fff; }
.opt { font-weight: 400; color: var(--on-dark-soft); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: 400 1.0625rem/1.4 var(--font); color: var(--ink);
  background: var(--paper); border: 2px solid transparent; border-radius: var(--radius);
  padding: .8rem .9rem; min-height: 3.25rem;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid var(--timber); outline-offset: 1px; }
.contact-form [aria-invalid="true"] { border-color: #f0b4a8; }
.contact-form .btn { justify-self: start; }
.form-privacy { font-size: .95rem; color: var(--on-dark-soft); margin: 0; }
.form-privacy a { color: #fff; }
.form-status { background: #fbe9e5; color: #6b1d0f; border-radius: var(--radius); padding: .9rem 1rem; font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer */
.site-footer { background: var(--forest-deep); color: var(--on-dark-soft); padding-block: 3.5rem; font-size: 1rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 2.5rem; align-items: start; }
.footer-brand .logo { align-items: center; }
.footer-slogan { margin-top: 1rem; color: var(--on-dark); }
.site-footer a { color: var(--on-dark); }
.footer-address strong { color: var(--on-dark); font-weight: 500; }
.footer-legal ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }

/* ---------- Unterseiten (Impressum, Datenschutz, …) */
.legal { padding-block: clamp(3rem, 7vw, 5.5rem) var(--space); }
.legal-inner { max-width: 48rem; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); letter-spacing: -.03em; margin-bottom: 2.5rem; padding-top: 1.5rem; border-top: 3px solid var(--ink); }
.legal h2 { font-size: 1.375rem; max-width: none; margin: 2.5rem 0 .75rem; letter-spacing: 0; }
.legal ul { padding-left: 1.25rem; margin: 0 0 1em; }
.legal li { margin-bottom: .25rem; }
.legal-intro { font-size: 1.25rem; line-height: 1.5; }
.legal-strong { background: var(--moss); padding: 1rem 1.25rem; border-left: 4px solid var(--green); }
.legal-date { margin-top: 3rem; color: var(--ink-soft); }
.legal .btn { margin-top: 1rem; }

/* Platzhalter: vor dem Livegang ausfüllen */
mark.todo { background: #ffe58a; color: #3b2f00; padding: 0 .25em; border-radius: 2px; }
.hint-todo { font-size: .95rem; color: #6b5600; background: #fff6d1; padding: .6rem .9rem; border-radius: var(--radius); }

/* ---------- Mobile Schnellkontakt */
.mobile-bar { display: none; }

/* ---------- Responsive */
@media (max-width: 62rem) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
  .header-call { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .steps::before { display: none; }
  .benefits { grid-template-columns: 1fr; max-width: 40rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 48rem) {
  body { font-size: 1.0625rem; }
  .logo-mark { width: 4.75rem; }
  .header-inner { min-height: 4.25rem; }
  .services, .about, .contact-inner, .field-row { grid-template-columns: 1fr; }
  .about-art { max-width: 15rem; }
  .hero-grain { width: 70%; opacity: .12; }
  .hero-actions .btn { flex: 1 1 100%; }
  .steps { grid-template-columns: 1fr; }
  .step { padding-top: 0; padding-left: 4rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .contact-form .btn { justify-self: stretch; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(18, 58, 28, .08);
  }
  .mobile-bar .btn { min-height: 3rem; padding: .6rem 1rem; }
  body { padding-bottom: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .mobile-bar, .hero-grain, .contact-form { display: none; }
  .contact { clip-path: none; background: none; color: #000; }
}

/* ================================================================
   Version 2: Fotos und Ansprechpartner
   ================================================================ */

/* Hero mit Porträt im Giebelrahmen */
.hero-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.hero-text h1 { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.hero-person { margin: 0; justify-self: end; width: 100%; max-width: 26rem; }
.gable { position: relative; padding-top: 7%; }
.gable-photo {
  clip-path: polygon(0 18%, 50% 0, 100% 18%, 100% 100%, 0 100%);
  aspect-ratio: 3 / 4; background: var(--moss);
}
.gable-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.gable-roof { position: absolute; left: -7%; top: 0; width: 114%; height: auto; aspect-ratio: 1120 / 284; overflow: visible; }
.gable-roof polyline { fill: none; stroke: var(--green); stroke-width: 26; stroke-linejoin: miter; stroke-linecap: butt; }
@media (prefers-reduced-motion: no-preference) {
  .gable-roof polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-roof 1.4s cubic-bezier(.6, 0, .2, 1) .15s forwards; }
}
.hero-person figcaption { margin-top: 1rem; font-size: 1rem; color: var(--ink-soft); line-height: 1.4; }
.hero-person figcaption strong { display: block; color: var(--ink); font-size: 1.25rem; font-weight: 500; }

/* Leistungen mit Foto */
.service-photo { display: block; margin-top: .25rem; }
.service-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--moss); }

/* Über mich mit Foto */
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--moss); }

/* Ansprechpartner im Kontakt */
.contact-person { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.25rem; }
.contact-person img { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; border: 3px solid var(--on-dark-soft); }
.contact-person p { margin: 0; color: #fff; line-height: 1.3; }
.contact-person strong { display: block; font-weight: 500; font-size: 1.2rem; }
.contact-person span { color: var(--on-dark-soft); font-size: 1rem; }

@media (max-width: 62rem) {
  .hero-split { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 2.5rem; }
}
@media (max-width: 48rem) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-person { justify-self: center; max-width: 18rem; margin-top: 0; }
  .hero { padding-bottom: 3rem; }
  .about-art { max-width: none; }
  .about-photo img { aspect-ratio: 4 / 3; }
}

/* ================================================================
   Version 3: eigener Abschnitt für David, Menü und Verknüpfungen
   ================================================================ */

/* Menü: aktiver Abschnitt */
.nav-desktop ul { gap: 1.5rem; }
.nav-desktop a[aria-current="true"] { color: var(--green); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.nav-mobile a[aria-current="true"] { background: var(--moss); color: var(--green); }

/* Startbereich */
.hero-note a { color: var(--green); font-weight: 500; }

/* Leistungen: Anfrage-Link */
.service-link {
  display: inline-block; margin-top: .25rem; padding: .35rem 0;
  font-weight: 500; color: var(--green);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em;
}
.service-link:hover { color: var(--forest); text-decoration-color: var(--timber); }

/* Abschnitt David */
.david-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.david-photo { position: relative; margin: 0; max-width: 28rem; }
.david-rings { position: absolute; left: -22%; bottom: -12%; width: 72%; z-index: 0; opacity: .9; pointer-events: none; }
.david-rings .rings { max-width: none; }
.david-photo picture { position: relative; z-index: 1; display: block; }
.david-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(18, 58, 28, .18); }
.david-photo figcaption { position: relative; z-index: 1; margin-top: .9rem; font-size: .95rem; color: var(--ink-soft); }
.david-text h2 { margin-bottom: 1.5rem; }
.david-text p { max-width: 52ch; }
.david-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.david .signature { margin-top: 1.75rem; }
.david { overflow: hidden; }

/* Ablauf: Abschluss */
.steps-cta { margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; }

/* Footer: Seitennavigation */
.footer-inner { grid-template-columns: 1.3fr 1fr .8fr auto; }
.footer-nav ul, .footer-legal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }

@media (max-width: 62rem) {
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 48rem) {
  .david-inner { grid-template-columns: 1fr; }
  .david-photo { max-width: 22rem; margin-inline: auto; }
  .david-rings { left: -14%; bottom: -8%; width: 60%; }
  .david-actions .btn { flex: 1 1 100%; }
  .steps-cta .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-address { grid-column: 1 / -1; }
}
