/* =========================================================
   Microsite Base — Energie Experte Berlin
   ========================================================= */

:root {
  --brand:        #83ce00;
  --brand-dark:   #6fb000;
  --ink:          #15212e;
  --ink-soft:     #4a5a6a;
  --line:         #e3e8ee;
  --bg:           #ffffff;
  --bg-alt:       #f6f8fa;
  --bg-dark:      #15212e;
  --max:          1160px;
  --gutter:       20px;
  --radius:       10px;
  --font-head: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; margin-bottom: .55em; }
h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .35em; letter-spacing: -.01em; }
p  { margin-bottom: 1rem; color: var(--ink-soft); }
a  { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--brand); }
.btn--ghost:hover { background: var(--brand); color: var(--ink); }
.btn--lg { padding: 18px 38px; font-size: 1.05rem; }
button.btn { font-family: var(--font-body); }
.btn-block { width: 100%; text-align: center; }

.muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
}
.nav__logo { color: var(--ink); }
.nav__logo:hover { text-decoration: none; color: var(--ink); }
.nav__logo img { max-height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav__links a { color: var(--ink); font-weight: 500; font-size: .97rem; }
.nav__links a:hover { color: var(--brand-dark); text-decoration: none; }

.has-dropdown { position: relative; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  min-width: 250px; padding: 8px 0; box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.has-dropdown::after {
  content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; display: none;
}
.has-dropdown:hover::after { display: block; }
.has-dropdown:hover .dropdown { display: block; }
.dropdown li { list-style: none; }
.dropdown a { display: block; padding: 9px 18px; font-size: .92rem; }
.dropdown a:hover { background: var(--bg-alt); }

.nav__cta {
  background: var(--brand); color: var(--ink) !important;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 700;
  border: 0; cursor: pointer; font-family: var(--font-body); font-size: .97rem;
}
.nav__cta:hover { background: var(--brand-dark); }

.nav__toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px var(--gutter);
  }
  .nav__links.open { display: flex; }
  .nav__links li { width: 100%; padding: 8px 0; }
  .dropdown { position: static; display: block; box-shadow: none; border: 0; padding: 4px 0 4px 14px; min-width: 0; }
  .nav__toggle { display: block; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,33,46,.48), rgba(21,33,46,.78));
  z-index: 1;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px var(--gutter);
}
.hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 700; color: var(--brand); }
.hero h1 { color: #fff; margin: 10px 0 16px; max-width: 18ch; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.15rem; max-width: 46ch; }
.hero__cta { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.img-band { padding: 18px 0; }
.img-band img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 460px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.82); }
.section__lead { max-width: none; width: 100%; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.section--alt .card { background: #fff; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card--featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.card__badge {
  display: inline-block;
  background: var(--brand);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.linklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; }
@media (max-width: 800px) { .linklist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .linklist { grid-template-columns: 1fr; } }
.linklist a {
  display: block; padding: 14px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 600;
}
.linklist a:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .96rem; }
th { background: var(--bg-alt); font-family: var(--font-body); font-weight: 700; color: var(--ink); }
tr:last-child td { border-bottom: 0; }

.faq { max-width: none; width: 100%; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); font-size: 1.1rem; padding: 16px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand-dark); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding-bottom: 16px; margin-bottom: 0; }

.cta-band { background: var(--brand); color: var(--ink); padding: 56px 0; }
.cta-band h2 { color: var(--ink); }
.cta-band p { color: rgba(21,33,46,.82); }
.cta-band .btn { background: var(--ink); color: #fff; }
.cta-band .btn:hover { background: #0d1620; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form-card--wide { max-width: 920px; margin: 0 auto; padding: 36px 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field--flush { margin-bottom: 0; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid #d7dee6; border-radius: 6px;
  font-family: var(--font-body); font-size: 1rem; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.field textarea { min-height: 110px; resize: vertical; }

.consent-form__title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: #5c6570;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.consent-form__intro { font-size: .95rem; color: var(--ink-soft); margin-bottom: 20px; }
.consent-form__link {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
  font: inherit;
}
.consent-form__link:hover { text-decoration: underline; }

.person-row {
  display: grid;
  grid-template-columns: .9fr 1.2fr 1.2fr .7fr;
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 800px) { .person-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .person-row { grid-template-columns: 1fr; } }

.contact-pref {
  background: #eef4f8;
  border-radius: 10px;
  padding: 22px 24px;
  margin: 12px 0 22px;
}
.contact-pref__row {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: center;
}
.contact-pref__heading { font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.contact-pref__copy { margin: 0; font-size: .92rem; }
.contact-pref__or {
  text-align: center;
  font-weight: 800;
  color: var(--ink);
  margin: 14px 0;
}
@media (max-width: 720px) {
  .contact-pref__row { grid-template-columns: 1fr; gap: 10px; }
}

.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.8); padding: 56px 0 28px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-family: var(--font-body); font-size: 1rem; letter-spacing: .02em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.8); font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: rgba(255,255,255,.55); }
.footer-disclaimer { font-size: .82rem; color: rgba(255,255,255,.55); margin-top: 10px; line-height: 1.5; }

.article { max-width: 65ch; }
.article h1 { margin-bottom: 14px; }
.article h2 { margin-top: 40px; }
.article h3 { margin-top: 26px; }
.article ul, .article ol { margin: 0 0 1rem 1.3em; color: var(--ink-soft); }
.article li { margin-bottom: .45rem; }
.faq-page h2 { font-size: 1.35rem; margin-top: 34px; }
.contact-list { list-style: none; margin: 22px 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }

.form-honey {
  position: absolute !important; left: -9999px !important;
  opacity: 0 !important; height: 0 !important; width: 0 !important;
  pointer-events: none;
}
.form-error { color: #b42318; font-size: .9rem; margin: 8px 0 0; }
.form-note { font-size: .82rem; color: var(--ink-soft); margin: 12px 0 0; }
.form-thanks { text-align: center; padding: 12px 0; }
.form-thanks-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
  background: #eaf7ee; color: #14804a; display: flex; align-items: center; justify-content: center;
}

.cta-popup {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(21,33,46,.62); padding: 16px;
}
.cta-popup.is-open { display: flex; }
.cta-popup-card {
  position: relative; width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.2); padding: 32px 28px 28px;
}
.cta-popup-card--wide { max-width: 920px; padding: 36px 32px 28px; }
.cta-popup-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border: 0; background: var(--bg-alt);
  border-radius: 8px; cursor: pointer; color: var(--ink-soft);
}

.mobile-sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--brand); color: var(--ink); padding: 14px 16px;
  font-weight: 700; font-size: .97rem; z-index: 60;
  border: 0; cursor: pointer; font-family: var(--font-body);
}
@media (max-width: 768px) {
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 58px; }
}
body.popup-open { overflow: hidden; }
