/* =========================================================
   Heiko Zogbaum – Wärmepumpen & Smart Home
   Dark-Theme, modern-technisch. Farben zentral via CSS-Variablen.
   ========================================================= */

/* ---------- Schriftart "Inter" lokal eingebunden (DSGVO-konform) ----------
   Schriftdateien liegen in assets/fonts/ – kein externer Aufruf an Google. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-800.woff2') format('woff2');
}

:root {
  /* Basis-Farben */
  --bg:           #0d1117;
  --bg-alt:       #121a24;
  --surface:      #16202c;
  --surface-2:    #1c2836;
  --border:       #243244;

  /* Akzent (Energie-Türkis/Grün) */
  --accent:       #2dd4bf;
  --accent-2:     #1bd1a5;
  --accent-soft:  rgba(45, 212, 191, 0.12);

  /* Text */
  --text:         #e8edf2;
  --text-muted:   #9fb0c0;
  --text-dim:     #6b7d8f;

  /* Maße */
  --maxw:         1140px;
  --radius:       16px;
  --radius-sm:    10px;
  --gap:          clamp(1.25rem, 3vw, 2.5rem);
  --shadow:       0 18px 40px rgba(0, 0, 0, 0.35);

  --font:         'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--text-muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.accent { color: var(--accent); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04231d;
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.25);
}
.btn-primary:hover { color: #04231d; box-shadow: 0 14px 30px rgba(45, 212, 191, 0.38); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

.btn-block { width: 100%; }

/* Großer, auffälliger Conversion-Button */
.btn-lg {
  padding: 1.05rem 2.1rem;
  font-size: 1.1rem;
  border-radius: 999px;
}
@media (max-width: 520px) {
  .btn-lg { width: 100%; }
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(13, 17, 23, 0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04231d;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -0.03em;
}
.brand-text { font-size: 1.05rem; letter-spacing: -0.01em; }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--text); }
.main-nav .nav-cta {
  color: #04231d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: .55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}
.main-nav .nav-cta:hover { color: #04231d; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(27, 209, 165, 0.10), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero-inner { max-width: 820px; }
.hero-lead { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 2rem; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: .6rem;
  list-style: none; padding: 0; margin: 0;
}
.hero-badges li {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: .4rem .9rem;
  border-radius: 999px;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.section-sub { font-size: 1.05rem; }

/* Hervorgehobene CTA-Sektion (Förder- & Heizungs-Check) */
.section-cta {
  background:
    radial-gradient(700px 380px at 50% -10%, rgba(45, 212, 191, 0.14), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-cta .section-head { max-width: 760px; margin-inline: auto; text-align: center; }

/* Schmaler, zentrierter Inhaltsblock */
.narrow { max-width: 760px; margin-inline: auto; }
.contact-slim { text-align: center; }
.contact-list-center { justify-items: center; }
.contact-list-center li { justify-content: center; }
.hero-actions.center { justify-content: center; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.two-col.reverse .media-placeholder { order: 2; }

/* ---------- Media-Platzhalter ---------- */
.media-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background:
    linear-gradient(135deg, var(--surface), var(--surface-2));
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: .95rem;
  font-weight: 500;
}

/* Echtes Foto (ersetzt .media-placeholder beim Bild-Austausch) */
.media-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
}
/* Hochformat-Porträt: Höhe begrenzen, mittig im Raster */
.media-img.portrait {
  max-height: 560px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
}

/* ---------- Karten-Grid (Leistungen) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { margin: 0; font-size: .96rem; }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}

/* ---------- Marken / Partner ---------- */
.brand-row, .partner-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.brand-chip, .partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
}
.brand-chip h3, .partner-card h3 { margin: 1rem 0 .4rem; }
.brand-chip p, .partner-card p { margin: 0; font-size: .92rem; }

/* Verlinkte Marken-Kacheln (klickbar zu den Herstellerseiten) */
a.brand-chip {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.brand-chip:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.brand-link {
  display: inline-block;
  margin-top: .9rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .88rem;
}
a.brand-chip:hover .brand-link { color: var(--accent-2); }
.brand-logo-placeholder {
  height: 64px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- Smart-Home Tech-Liste ---------- */
.tech-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.tech-list li {
  position: relative;
  padding: .65rem 0 .65rem 1.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.tech-list li:last-child { border-bottom: 0; }
.tech-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tech-list strong { color: var(--text); }

/* ---------- Tools ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  position: relative;
}
.tool-card h3 { margin-bottom: .5rem; }
.tool-card p { font-size: .95rem; }
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: .25rem .7rem;
  border-radius: 999px;
}

/* ---------- Kontakt ---------- */
.contact-grid { align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; }
.contact-list li {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem 0;
  color: var(--text-muted);
}
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .4rem;
  color: var(--text);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
  padding: .75rem .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-hint { font-size: .8rem; color: var(--text-dim); margin: 0 0 1rem; }
.form-status { margin: 1rem 0 0; font-size: .92rem; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff8088; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--gap);
}
.footer-col h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  margin-bottom: 1rem;
}
.footer-col p { font-size: .9rem; color: var(--text-muted); }
.footer-brand { font-weight: 700; color: var(--text); font-size: 1.1rem; margin: .8rem 0 .3rem; }
.footer-col .brand-mark { margin-bottom: .4rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; font-size: .85rem; color: var(--text-dim); }
.to-top { font-size: .85rem; color: var(--text-muted); }
.to-top:hover { color: var(--accent); }

/* ---------- Ablauf-Schritte (nummerierte Karten) ---------- */
.card-step {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04231d;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}

/* ---------- Förder- & Heizungs-Check (eingebetteter autarc-Konfigurator) ---------- */
.check-embed {
  max-width: 900px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;            /* verhindert eine zweite, äußere Scrollleiste */
  box-shadow: var(--shadow);
}
.check-embed iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
}
.check-fallback {
  text-align: center;
  font-size: .9rem;
  color: var(--text-dim);
  margin-top: 1rem;
}
.check-fallback a { color: var(--accent); }
/* Auf kleinen Screens mehr Höhe, damit das mehrstufige Formular möglichst
   ohne internes Scrollen passt – vermeidet doppelte Scrollbalken am Handy. */
@media (max-width: 600px) {
  .check-embed { border-radius: var(--radius-sm); }
  .check-embed iframe { height: 1040px; }
}

/* ---------- Galerie / Infomaterial ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.gallery-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  font: inherit;
  text-align: left;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.gallery-cap {
  padding: .9rem 1.1rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
/* Verlinkte Flyer (Klick führt zum Förder-Check) */
a.gallery-item { color: inherit; text-decoration: none; cursor: pointer; }
.gallery-cta {
  display: block;
  margin-top: .5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: .85rem;
}
a.gallery-item:hover .gallery-cta { color: var(--accent-2); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(5, 8, 12, 0.9);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
  animation: lb-fade .2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Rechtsseiten (Datenschutz) ---------- */
.legal-inner { max-width: 760px; }
.legal h1 { margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .6rem; }
.legal p { color: var(--text-muted); }
.legal em { color: var(--text-dim); }
.legal-note {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: .92rem;
}
.legal-list { color: var(--text-muted); padding-left: 1.2rem; }
.legal-list li { margin: .35rem 0; }
.legal-back { margin-top: 2.5rem; }

/* ---------- Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.5rem 1.5rem;
    transform: translateY(-130%);
    transition: transform .3s ease;
    box-shadow: var(--shadow);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .main-nav .nav-cta { text-align: center; margin-top: .8rem; padding: .8rem; }
  .nav-toggle { display: flex; }

  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse .media-placeholder { order: 0; }

  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Callout-Box (Förder-Hinweis auf Regionsseiten) ---------- */
.callout {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
}
.callout h3 { margin-bottom: .4em; color: var(--accent); }
.callout p { margin: 0; color: var(--text); }
