/* =====================================================================
   EnBeF – Energieberatung GbR  ·  Design-System
   Farben, Typografie, Layout, Komponenten
   Hausschrift: Carlito (metrisch kompatibel zu Calibri), lokal.
   ===================================================================== */

/* ---------- Lokale Schrift: Carlito ---------- */
/* Die Schriftdateien liegen in /assets/fonts/ (siehe assets/fonts/README.txt).
   Fällt Carlito aus, greift die metrisch nahe System-Schrift.            */
@font-face {
  font-family: "Carlito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/carlito-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Carlito";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/carlito-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Carlito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/carlito-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Carlito";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/carlito-bolditalic.woff2") format("woff2");
}

/* ---------- Farb-Tokens ---------- */
:root {
  --green:        #4A8522; /* Marken-Grün: Akzente, Linien, Marker */
  --green-ink:    #3E7020; /* dunkleres Grün: Buttons/Links (AA, Weiß >= 4,5:1) */
  --green-deep:   #35621A; /* Hover */
  --ink:          #1E2A17; /* Text & Headlines (Dunkelgrün) */
  --off-white:    #F5F7F2; /* Hintergrund */
  --white:        #FFFFFF;
  --grey:         #5F5F5F; /* Meta-Text (dunkler als #747474 für AA) */
  --grey-line:    #E1E6DC; /* feine Linien */
  --green-tint:   #EBF2E3; /* zarter grüner Flächenton */

  --maxw: 1120px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30,42,23,.05), 0 8px 24px rgba(30,42,23,.06);
  --font: "Carlito", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem; /* ~17px */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-ink); text-underline-offset: 2px; }
a:hover { color: var(--green-deep); }

/* ---------- Sichtbarer Fokus (Barrierefreiheit) ---------- */
:focus-visible {
  outline: 3px solid var(--green-ink);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip-Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.05rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1rem; }
strong { font-weight: 700; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: .25rem 0; }
.lead { font-size: 1.2rem; color: #2b3a22; }
small, .meta { color: var(--grey); font-size: .9rem; }

/* grüner Akzentstrich unter Section-Überschriften */
.h-accent { position: relative; padding-bottom: .4rem; }
.h-accent::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 56px; height: 4px; border-radius: 2px;
  background: var(--green);
}
.centered .h-accent::after { left: 50%; transform: translateX(-50%); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, .4rem + 2vw, 2rem); }
.section { padding-block: clamp(2.75rem, 2rem + 3vw, 4.75rem); }
.section--tint { background: var(--off-white); }
.section--green-tint { background: var(--green-tint); }
.centered { text-align: center; }
.narrow { max-width: 760px; margin-inline: auto; }
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-ink);
  margin-bottom: .6rem;
}

/* Grids */
.grid { display: grid; gap: clamp(1.25rem, .8rem + 1.5vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 700;
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--green-ink); color: #fff; }
.btn--primary:hover { background: var(--green-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--green-ink); border-color: var(--green-ink); }
.btn--ghost:hover { background: var(--green-ink); color: #fff; }
.btn--light { background:#fff; color: var(--green-ink); }
.btn--light:hover { background: var(--off-white); color: var(--green-deep); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--grey-line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { height: 46px; width: auto; }
.brand b { font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.brand span { display:block; font-size: .72rem; color: var(--grey); font-weight: 400; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { display: block; }

.main-nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: inline-block; text-decoration: none; color: var(--ink);
  font-weight: 600; padding: .55rem .8rem; border-radius: 8px; font-size: .98rem;
}
.main-nav a:hover { background: var(--off-white); color: var(--green-deep); }
.main-nav a[aria-current="page"] { color: var(--green-ink); }
.main-nav a[aria-current="page"]::after {
  content:""; display:block; height:3px; border-radius:2px; background: var(--green);
  margin-top: 3px;
}
.nav-cta { margin-left: .4rem; }

/* Untermenü (Dropdown, z. B. Hilfsmittel) */
.main-nav .has-submenu { position: relative; }
.main-nav .submenu-toggle {
  font: inherit; font-size: .98rem; font-weight: 600; color: var(--ink);
  background: none; border: 0; cursor: pointer;
  padding: .55rem .8rem; border-radius: 8px; display: inline-flex; align-items: center; gap: .3rem;
}
.main-nav .submenu-toggle:hover { background: var(--off-white); color: var(--green-deep); }
.main-nav .submenu-toggle.active { color: var(--green-ink); }
.main-nav .submenu-toggle .caret { font-size: .7em; line-height: 1; }
.main-nav .submenu {
  list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; left: 0;
  min-width: 230px; background: #fff; border: 1px solid var(--grey-line);
  border-radius: 10px; box-shadow: var(--shadow); display: none; z-index: 120;
}
.main-nav .submenu li { margin: 0; }
.main-nav .submenu a { display: block; padding: .6rem .8rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; }
.main-nav .submenu a:hover { background: var(--off-white); color: var(--green-deep); }
.main-nav .submenu.open { display: block; }
@media (min-width: 901px) {
  .main-nav .has-submenu:hover .submenu, .main-nav .has-submenu:focus-within .submenu { display: block; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--grey-line);
    padding: .5rem 0 1rem;
    display: none;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .container-nav { padding-inline: clamp(1rem,.4rem + 2vw,2rem); }
  .main-nav a { display: block; padding: .8rem clamp(1rem,.4rem + 2vw,2rem); border-radius: 0; }
  .main-nav a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: .6rem clamp(1rem,.4rem + 2vw,2rem) 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .main-nav .submenu-toggle { display: flex; width: 100%; justify-content: space-between; padding: .8rem clamp(1rem,.4rem + 2vw,2rem); border-radius: 0; }
  .main-nav .submenu { position: static; box-shadow: none; border: 0; min-width: 0; padding: 0 0 .3rem; background: var(--off-white); }
  .main-nav .submenu a { padding: .7rem clamp(1.6rem,1rem + 2vw,2.6rem); }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--green-tint) 0%, var(--off-white) 100%); }
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center; padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.hero h1 { margin-bottom: .5rem; }
.hero p { font-size: 1.18rem; color: #2b3a22; max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-figure img { border-radius: var(--radius); }
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 360px; }
}

/* ---------- Willkommens-Foto-Band (über dem grünen Hero) ---------- */
.welcome-band { position: relative; height: clamp(130px, 14vw, 220px); overflow: hidden; background: var(--ink); }
.welcome-band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.welcome-band-overlay { position: absolute; inset: 0; display: flex; align-items: center; }
.welcome-band-overlay .container { width: 100%; }
.welcome-band-title { display: inline-block; margin: 0; background: rgba(30,42,23,.72); color: #fff; padding: .5rem 1.1rem; border-radius: 8px; font-weight: 700; font-size: clamp(1.05rem, .85rem + 1.2vw, 1.55rem); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--grey-line);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
}
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-icon {
  width: 44px; height: 44px; border-radius: 9px;
  background: var(--green-tint); color: var(--green-deep);
  display: grid; place-items: center; margin-bottom: .9rem;
}
.card--link { text-decoration: none; color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card--link:hover { transform: translateY(-3px); border-color: #cfe0c0; color: inherit; }

/* Leistungs-Detailblock (Text + Bild abwechselnd) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3rem); align-items: center; }
.feature + .feature { margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.feature img { border-radius: var(--radius); box-shadow: var(--shadow); }
.feature.reverse .feature-media { order: 2; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
}

/* Persondaten (Team) */
.person { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem,1.2rem + 3.5vw,3.5rem); align-items: start; }
.person img { border-radius: var(--radius); box-shadow: var(--shadow); width: 220px; height: auto; }
.person ul { list-style: none; padding: 0; }
.person li { padding-left: 1.4rem; position: relative; }
.person li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: #747474; }
@media (max-width: 620px) { .person { grid-template-columns: 1fr; } .person img { width: 180px; } }

/* Badge / Trust */
.trust { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.trust img { height: 60px; width: auto; }

/* Kontaktzeile / NAP */
.nap { display: grid; gap: .35rem; }
.nap a { font-weight: 600; }

/* Formular */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.form-field .req { color: var(--green-ink); }
.form-field input, .form-field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .85rem; border: 1px solid #c7cfbf; border-radius: 8px; background: #fff;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--green-ink); outline: 3px solid rgba(62,112,32,.25); outline-offset: 0; }
.form-check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.2rem; }
.form-check input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; }        /* Honeypot */
.form-note { font-size: .9rem; color: var(--grey); }

/* Alert / Hinweisbox */
.note {
  border-left: 4px solid var(--green); background: var(--green-tint);
  padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0;
}
.note strong { color: var(--green-deep); }

/* Aktuelles-Liste */
.post-list { display: grid; gap: 1.25rem; }
.post-item { border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 1.4rem 1.5rem; background:#fff; }
.post-item h3 { margin-bottom: .25rem; }
.post-item h3 a { text-decoration: none; color: var(--ink); }
.post-item h3 a:hover { color: var(--green-deep); }

/* Prose (Rechtstexte, Beiträge) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose a { word-break: break-word; }

/* Breadcrumb */
.crumb { font-size: .9rem; color: var(--grey); padding-top: 1.25rem; }
.crumb a { color: var(--grey); text-decoration: none; }
.crumb a:hover { color: var(--green-deep); text-decoration: underline; }
.crumb [aria-current] { color: var(--ink); }

/* CTA-Band */
.cta-band { background: var(--ink); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e7ece1; }
.cta-band .container { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
@media (max-width: 760px) { .cta-band .container { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd6c4; padding-top: clamp(3.25rem, 2.5rem + 2.5vw, 4.5rem); padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.site-footer a { color: #e7ece1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer .brand b { color: #fff; }
.site-footer .brand span { color: #aeb9a3; }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .4rem 0; }
.footer-logo { height: 52px; width: auto; margin-bottom: .8rem; filter: brightness(0) invert(1); opacity: .95; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: #aeb9a3; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.text-green { color: var(--green-ink); }
.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; }
