/* =================================================================
   Carsten Gerlach – Zimmerei & Dachdeckerei
   Aesthetik: Handwerk / industriell-warm, Timber + Anthrazit
   ----------------------------------------------------------------
   HAUSFARBE zentral ändern: --brand (+ --brand-strong) unten.
   ================================================================= */

:root {
  /* ---- HAUSFARBE Carsten Gerlach (Forstgrün) ---- */
  --brand:        #154D27;
  --brand-strong: #0e3a1d;
  --brand-soft:   #e2efe6;

  /* ---- Light (Default) ---- */
  --bg:        #f6f3ee;
  --surface:   #ffffff;
  --surface-2: #efe9e0;
  --ink:       #20262b;
  --muted:     #5d6469;
  --line:      #e3dccf;
  --brand-ink: #ffffff;
  --shadow:    0 18px 50px -22px rgba(32, 38, 43, .35);
  --shadow-sm: 0 6px 22px -14px rgba(32, 38, 43, .45);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;

  --header-h: 88px;
  --wrap: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
}

[data-theme="dark"] {
  --bg:        #16191c;
  --surface:   #1d2125;
  --surface-2: #23282d;
  --ink:       #eef0f1;
  --muted:     #a4adb3;
  --line:      #2d343a;
  --brand:        #4f9e6b;
  --brand-strong: #3f8657;
  --brand-soft:   #15241a;
  --brand-ink: #0f1612;
  --shadow:    0 22px 55px -24px rgba(0,0,0,.7);
  --shadow-sm: 0 6px 22px -14px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700; font-size: .8rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brand);
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--brand); display: inline-block; }

.section { padding: clamp(64px, 9vw, 124px) 0; }
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 18px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px; cursor: pointer; border: 2px solid transparent;
  transition: transform .18s ease, background .25s ease, box-shadow .25s ease, color .25s;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

/* =================================================================
   HEADER (fix)
   ================================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
  font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.brand img.logo { max-height: 64px; width: auto; }
.brand .logo-dark { display: none; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.brand img.custom-logo { max-height: 64px; width: auto; }
.brand .name { font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; line-height: 1; }
.brand .name span { display: block; font-family: var(--font-body); font-weight: 600; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: 9px 14px; border-radius: 999px; color: var(--ink); transition: color .2s, background .2s;
}
.nav a:hover, .nav a.active { color: var(--brand); }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; }
[data-theme="dark"] .nav a.btn-primary { background: var(--brand-strong); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: transform .2s, border-color .2s; flex: 0 0 auto;
}
.theme-toggle:hover { transform: rotate(-15deg); border-color: var(--brand); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: .25s;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; left: 0; }
.nav-toggle span::after  { content: ""; position: absolute; top: 6px; left: 0; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: rotate(45deg); top: 0; }
body.nav-open .nav-toggle span::after  { transform: rotate(-45deg); top: 0; }

/* =================================================================
   HERO
   ================================================================= */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(60px, 9vw, 120px)); padding-bottom: clamp(70px, 9vw, 130px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 88% -10%, var(--brand-soft), transparent 60%),
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--line) 50%, transparent) 22px 23px);
  opacity: .9;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.7rem); margin: 22px 0 20px; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--muted); max-width: 38ch; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 20px; font-weight: 600; color: var(--muted); font-size: .95rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-badges span::before { content: "✓"; color: var(--brand); font-weight: 800; }

.hero-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.hero-card .img {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)),
    var(--brand-strong);
  background-size: cover; background-position: center;
}
.hero-card .img.has-photo { background-image: var(--hero-photo, none), linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55)); background-blend-mode: normal; }
.hero-card .plate {
  position: absolute; left: 22px; right: 22px; bottom: 22px; color: #fff;
}
.hero-card .plate .k { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.hero-card .plate .v { font-weight: 600; opacity: .9; }
.hero-card .tag {
  position: absolute; top: 18px; left: 18px; background: var(--brand); color: var(--brand-ink);
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 999px;
}

/* =================================================================
   LEISTUNGEN
   ================================================================= */
.leistungen { background: var(--surface); border-block: 1px solid var(--line); }
.trade-block { margin-top: 14px; }
.trade-block + .trade-block { margin-top: 64px; }
.trade-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.trade-title h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.trade-title .num { font-family: var(--font-display); font-weight: 800; color: var(--brand); font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative; overflow: hidden;
}
.card::after { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 0; background: var(--brand); transition: height .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { height: 100%; }
.card .ico { width: 50px; height: 50px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.card .ico svg { width: 26px; height: 26px; }
.card h4 { font-size: 1.18rem; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: .98rem; }

/* =================================================================
   ÜBER MICH
   ================================================================= */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.about-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 380px;
  background: linear-gradient(150deg, var(--brand-strong), var(--brand)); box-shadow: var(--shadow);
  display: grid; place-items: center; color: #fff;
}
.about-visual .seal {
  width: 180px; height: 180px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.5);
  display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-weight: 800;
}
.about-visual .seal b { font-size: 2.6rem; display: block; line-height: 1; }
.about-text h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 16px 0 18px; }
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; }
.about-points { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.about-points li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.about-points li svg { width: 22px; height: 22px; color: var(--brand); flex: 0 0 auto; margin-top: 3px; }

/* =================================================================
   KONTAKT
   ================================================================= */
.kontakt { background: var(--surface); border-top: 1px solid var(--line); }
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.contact-info { display: grid; gap: 16px; }
.contact-row { display: flex; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color .2s, transform .2s; }
.contact-row:hover { border-color: var(--brand); transform: translateX(4px); }
.contact-row .ico { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.contact-row .ico svg { width: 22px; height: 22px; }
.contact-row .lbl { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-row .val { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }

.map { margin-top: 8px; height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map .leaflet-container { height: 100%; width: 100%; font-family: var(--font-body); }

.contact-form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 38px); }
.contact-form h3 { font-size: 1.4rem; margin-bottom: 18px; }
.cgz-fallback label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.cgz-fallback .field { margin-bottom: 16px; }
.cgz-fallback input, .cgz-fallback textarea,
.wpcf7 input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.wpcf7 textarea, .wpcf7 select {
  width: 100%; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.cgz-fallback input:focus, .cgz-fallback textarea:focus,
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.cgz-fallback textarea { min-height: 130px; resize: vertical; }
.wpcf7 input[type=submit], .cgz-fallback button {
  background: var(--brand); color: var(--brand-ink); border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; padding: 14px 30px; border-radius: 999px;
  font-size: 1rem; transition: background .2s, transform .2s;
}
.wpcf7 input[type=submit]:hover, .cgz-fallback button:hover { background: var(--brand-strong); transform: translateY(-2px); }
.cgz-note { font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer { background: var(--ink); color: #d7dbde; padding: 60px 0 26px; }
[data-theme="dark"] .site-footer { background: #0f1214; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h5 { font-family: var(--font-display); color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer a { color: #b9bfc4; transition: color .2s; }
.site-footer a:hover { color: var(--brand); }
.footer-brand .mark { width: 46px; height: 46px; margin-bottom: 14px; }
.footer-brand p { color: #9aa1a6; max-width: 36ch; font-size: .96rem; }
.footer-list { list-style: none; display: grid; gap: 9px; font-size: .96rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; color: #8b9296; }
.footer-bottom a { color: #b9bfc4; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 50px; height: 50px;
  border-radius: 14px; border: none; cursor: pointer; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transform: translateY(14px) scale(.9); transition: opacity .3s, transform .3s, background .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.to-top:hover { background: var(--brand-strong); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 940px) {
  .hero-grid, .about-grid, .kontakt-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; aspect-ratio: 16/12; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about-visual { min-height: 280px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px;
    transform: translateY(-130%); transition: transform .35s ease; box-shadow: var(--shadow);
  }
  body.nav-open .nav { transform: translateY(0); }
  .nav a { padding: 13px 16px; border-radius: 11px; }
  .nav a:hover, .nav a.active { background: var(--brand-soft); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .brand .name span { display: none; }
  .brand img.logo, .brand img.custom-logo { max-height: 52px; }
}
