/* =========================================================
   Bezirksschornsteinfeger — Musterbezirk
   Designsystem: Soft UI Evolution · Schwarz + Messing
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Farben */
  --bg:           #0E0E10;
  --bg-2:         #141417;
  --surface:      #1A1A1D;
  --surface-2:    #202024;
  --border:       #2A2A2F;
  --border-soft:  #1F1F23;

  --text:         #F5F1E8;
  --text-muted:   #9A9A9A;
  --text-faint:   #6A6A6A;

  --accent:       #C8893A;   /* warmes Messing / Kupfer */
  --accent-hi:    #E5A852;   /* Hover */
  --accent-soft:  #3A2A1A;   /* getönter Hintergrund für Accent-Pillen */

  /* Typo */
  --font-display: "Fraunces", "Iowan Old Style", "Charter", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing scale (rem) */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.5rem;
  --s-6:  2rem;
  --s-7:  3rem;
  --s-8:  4rem;
  --s-9:  6rem;
  --s-10: 8rem;

  /* Layout */
  --container: 1180px;
  --radius:    6px;
  --radius-lg: 12px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t-med:  250ms;
  --t-slow: 400ms;
}

/* ---------- Reset (klein) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover { color: var(--accent-hi); }

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #000;
  padding: var(--s-3) var(--s-4);
  z-index: 1000;
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.brand-sub { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.02em; }

.site-nav {
  display: flex;
  gap: var(--s-6);
  margin-left: var(--s-5);
}
.site-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: var(--s-2) 0;
}
.site-nav a:hover { color: var(--text); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right var(--t-med) var(--ease);
}
.site-nav a:hover::after { right: 0; }

.phone-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  transition: all var(--t-fast) var(--ease);
}
.phone-cta:hover {
  border-color: var(--accent);
  color: var(--accent-hi);
  background: rgba(200, 137, 58, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--s-10) 0 var(--s-9);
  /* Hintergrund bleibt dunkel + minimaler subtiler Glow oben rechts.
     Der warme Verlauf kommt komplett aus dem Canvas (weicher, fließend). */
  background:
    radial-gradient(ellipse at top right, rgba(200, 137, 58, 0.08), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--border-soft);
}

.hero-smoke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  /* Kein mix-blend-mode mehr — der breite Glow-Verlauf braucht normales
     Blending, sonst werden Übergänge zu Kanten. */
  mix-blend-mode: normal;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-5);
  padding: var(--s-1) var(--s-3);
  border: 1px solid rgba(200, 137, 58, 0.3);
  border-radius: 999px;
  background: var(--accent-soft);
}

.eyebrow-mark {
  border-radius: 50%;
  background: #fff;
  padding: 1px;
  width: 20px;
  height: 20px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Eyebrow-Variante: dezent, ohne Pill-Rahmen, in Section-Headers */
.eyebrow-plain {
  display: inline-block;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  margin-bottom: var(--s-4);
  font-size: 0.75rem;
  color: var(--accent);
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-top: var(--s-4);
}

.display {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: var(--s-5);
}

.display-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--s-7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-9);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-6);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-med) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #1A1206;
}
.btn-primary:hover {
  background: var(--accent-hi);
  color: #1A1206;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-hi);
}
.btn-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.btn-ghost:hover .btn-num { color: var(--accent-hi); }

/* Hero-Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border-soft);
  max-width: 620px;
  margin: 0;
}
.hero-stats > div { display: flex; flex-direction: column; gap: var(--s-1); }
.hero-stats dt {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
}
.hero-stats .unit {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.15em;
}

/* Mittleres Stat-Item: Qualifikation ist ein längerer Text, nicht eine Zahl.
   Deshalb kleinere Schrift, Body-Font, damit es nicht aus dem Grid springt. */
.hero-stats .stat-qual dd {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

/* ---------- Section Base ---------- */
.section {
  padding: var(--s-9) 0;
}
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  margin-bottom: var(--s-7);
  max-width: 700px;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}

/* ---------- Leistungen ---------- */
.leistungen {
  display: grid;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.leistung {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-5);
  padding: var(--s-6) var(--s-6);
  background: var(--surface);
  align-items: start;
  transition: background var(--t-med) var(--ease);
}
.leistung:hover { background: var(--surface-2); }
.leistung-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 0.3em;
}
.leistung-body h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s-2);
  font-weight: 500;
}
.leistung-body p {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 65ch;
}

/* ---------- Energie-Cards ---------- */
.energie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.energie-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-5);
  transition: all var(--t-med) var(--ease);
}
.energie-card:hover {
  border-color: rgba(200, 137, 58, 0.4);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.energie-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: var(--s-2);
  color: var(--text);
}
.energie-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- Bezirk ---------- */
.bezirk-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--s-7);
  align-items: start;
}
.bezirk-grid h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--s-5);
  line-height: 1.15;
}
.bezirk-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 50ch;
  margin-bottom: var(--s-5);
}
.orte {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.orte li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bezirk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.bezirk-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-soft);
}
.bezirk-card-row:last-child { border-bottom: 0; padding-bottom: 0; }
.bezirk-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.bezirk-card-val {
  font-size: 0.95rem;
  color: var(--text);
  /* Rechtsbündig, auch bei umgebrochenen Werten (Mobile). */
  text-align: right;
  flex: 1;
  min-width: 0;
  /* Worttrennung an der mittleren-Punkt-Grenze (Schulstr. 3 · 24867
     Dannewerk) erlaubt sauberen Umbruch ohne Layout-Bruch. */
  overflow-wrap: anywhere;
}
.mono { font-family: var(--font-mono); }

/* ---------- Über uns ---------- */
.ueber { max-width: 960px; }
.ueber-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: var(--s-5);
}
.ueber-text-wrap { min-width: 0; }   /* verhindert Grid-Overflow bei langem Wort */
.ueber h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--s-5);
  line-height: 1.15;
}
.ueber-text {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: var(--s-4);
}
.ueber-text.muted {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  line-height: 1.65;
}

/* ---------- Porträt ---------- */
.portrait {
  margin: 0;
  flex-shrink: 0;
}
.portrait img {
  display: block;
  width: clamp(180px, 22vw, 280px);
  height: clamp(180px, 22vw, 280px);
  object-fit: cover;
  border-radius: 50%;
  /* Subtiler Schatten + dünner warmer Randring gegen den dunklen BG.
     Mehrlagig: 2 Drop-Shadows für Tiefe + 2px/4px Bernstein-Ring. */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(200, 137, 58, 0.35),
    0 0 0 4px rgba(200, 137, 58, 0.12);
  background: var(--bg-2);
}

/* Auf Mobile einspaltig: Porträt zentriert über dem Text */
@media (max-width: 640px) {
  .ueber-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .ueber-grid .portrait { justify-self: center; }
  .portrait img {
    width: 200px;
    /* aspect-ratio erzwingt quadratische Form, auch wenn der Browser
       versucht, die Höhe automatisch zu setzen. Sonst wird border-radius
       50% zu einem Oval statt einem Kreis. */
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

/* ---------- Kontakt ---------- */
.section-contact {
  background: var(--bg-2);
  border-top: 1px solid var(--border-soft);
}

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: start;
}
.kontakt-grid h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--s-4);
  line-height: 1.15;
}
.kontakt-lede {
  color: var(--text-muted);
  margin-bottom: var(--s-6);
  max-width: 50ch;
}
.kontakt-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.kontakt-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--s-4);
  align-items: baseline;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-soft);
}
.kontakt-list li:last-child { border-bottom: 0; }
.kontakt-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kontakt-val {
  font-size: 1rem;
  color: var(--text);
}
a.kontakt-val:hover { color: var(--accent-hi); }

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.form label {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.form label span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form input,
.form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-body);
  transition: border-color var(--t-fast) var(--ease);
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form textarea { resize: vertical; min-height: 100px; }

.form-ok {
  margin-top: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border: 1px solid rgba(200, 137, 58, 0.4);
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-hi);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-meta { font-family: var(--font-mono); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .bezirk-grid { grid-template-columns: 1fr; }
  .kontakt-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .energie-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 var(--s-4); }
  .header-inner { height: 64px; gap: var(--s-3); }
  .brand-sub { display: none; }
  .phone-cta .phone-number { display: none; }
  .phone-cta { padding: var(--s-2) var(--s-3); }

  .hero { padding: var(--s-8) 0 var(--s-7); }
  .lede { font-size: 1.05rem; }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .hero-stats > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
  .hero-stats dd { font-size: 1.5rem; }
  .hero-stats .stat-qual dd { font-size: 1rem; }

  .section { padding: var(--s-7) 0; }
  .leistung { grid-template-columns: 50px 1fr; padding: var(--s-5) var(--s-4); }
  .energie-grid { grid-template-columns: 1fr; }
  .kontakt-list li { grid-template-columns: 1fr; gap: var(--s-1); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-smoke { display: none; }
}
