/* MB green energy – Modern Buildings
   Statische Seite, keine externen Quellen (Schriften liegen auf dem eigenen Server). */

@font-face {
  font-family: "Fjalla One";
  src: url("../fonts/fjalla-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #262b27;
  --ink-soft: #4d5650;
  --muted: #69726b;
  --green: #237a2b;          /* Text & Knöpfe – Kontrast 5,4:1 auf Weiß */
  --green-strong: #1a5c21;
  --green-bright: #3a9b36;
  --green-light: #6cc04a;
  --forest: #13241a;
  --forest-2: #1b3424;
  --bg: #ffffff;
  --bg-soft: #f2f6f0;
  --line: #dfe7dc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(19, 36, 26, .05), 0 10px 30px rgba(19, 36, 26, .07);
  --head: "Fjalla One", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

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

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

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-strong); }

:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--forest);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Knöpfe (immer mit Rahmen) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .8em 1.35em;
  border: 2px solid var(--green);
  border-radius: 999px;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-strong); border-color: var(--green-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--forest); }
.btn-light:hover { background: transparent; color: #fff; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 78px;
}
.brand { flex: none; }
.brand img { width: 150px; }
.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.main-nav a:hover { color: var(--green); background: var(--bg-soft); }
.header-cta { padding: .6em 1.1em; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 0;
  background:
    radial-gradient(1200px 520px at 85% 20%, rgba(108, 192, 74, .14), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--green);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 { margin-bottom: .35em; }
.hl { color: var(--green); }
.lead {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2rem 0 2.2rem;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
}
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { width: 18px; height: 18px; color: var(--green-bright); flex: none; }

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 520px);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 192, 74, .30), rgba(108, 192, 74, 0) 70%);
  filter: blur(30px);
  z-index: -1;
}
.hero-visual img {
  width: 100%;
  filter: drop-shadow(0 18px 40px rgba(19, 36, 26, .16));
}
@keyframes einblenden {
  from { opacity: 0; transform: scale(.94) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

/* Wellen in eigener Zeile unter dem Text – feste Höhe, gleich dicke Striche, überdecken nie Inhalt */
.waves {
  display: block;
  width: 100%;
  height: clamp(56px, 8vw, 120px);
  margin-top: clamp(28px, 5vw, 56px);
  pointer-events: none;
}
.waves path { fill: none; stroke-width: 8; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* Rad zum Anklicken: runde Felder über den acht Bereichen und der Mitte „smart“ */
.rad { position: relative; animation: einblenden .9s ease-out both; }
.feld {
  position: absolute;
  width: 21%;
  height: 21%;
  padding: 0;
  border: 2px solid rgba(35, 122, 43, .28);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.feld:hover, .feld:focus-visible {
  border-color: var(--green);
  background: rgba(108, 192, 74, .14);
  transform: scale(1.05);
}
.feld-home { left: 39.5%; top: 7.5%; }
.feld-energy { left: 62.1%; top: 16.9%; }
.feld-money { left: 71.5%; top: 39.5%; }
.feld-time { left: 62.1%; top: 62.1%; }
.feld-network { left: 39.5%; top: 71.5%; }
.feld-protection { left: 16.9%; top: 62.1%; }
.feld-ventilation { left: 7.5%; top: 39.5%; }
.feld-climate { left: 16.9%; top: 16.9%; }
.feld-smart {
  left: 31%;
  top: 31%;
  width: 38%;
  height: 38%;
  border-color: rgba(255, 255, 255, .55);
  animation: puls 2.6s ease-out 1.2s 3;
}
@keyframes puls {
  0% { box-shadow: 0 0 0 0 rgba(108, 192, 74, .55); }
  100% { box-shadow: 0 0 0 18px rgba(108, 192, 74, 0); }
}
.rad-hinweis {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.rad-hinweis svg { width: 18px; height: 18px; color: var(--green-bright); }

/* Infofenster (HTML-Popover, ohne Skript) */
.info-pop {
  width: min(92vw, 440px);
  max-height: 86vh;
  margin: auto;
  padding: 26px 24px 22px;
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(19, 36, 26, .30);
  font-size: 1rem;
  line-height: 1.6;
}
.info-pop::backdrop { background: rgba(19, 36, 26, .40); }
.info-pop:popover-open { animation: aufklappen .22s ease-out; }
@keyframes aufklappen {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.info-pop .area-icon { margin-bottom: 14px; }
.info-pop h3 { font-size: 1.6rem; margin-bottom: .4em; }
.info-pop p { color: var(--ink-soft); margin-bottom: .8em; }
.info-pop ul { margin: 0 0 1em; padding-left: 1.15em; color: var(--ink-soft); }
.info-pop li { margin-bottom: .45em; }
.info-pop li strong { color: var(--ink); font-weight: 600; }
.info-pop .btn { margin-top: 6px; padding: .55em 1.1em; font-size: .95rem; }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 0; }

/* Leistungen */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  transition: transform .25s, box-shadow .25s, background-color .25s;
}
.service:hover { transform: translateY(-3px); background: #fff; box-shadow: var(--shadow); }
.service-no {
  display: block;
  margin-bottom: 18px;
  color: var(--green-bright);
  font-family: var(--head);
  font-size: 1.5rem;
  line-height: 1;
}
.service h3 { font-size: 1.35rem; margin-bottom: .45em; }
.service p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.service-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(150deg, var(--green) 0%, var(--green-strong) 100%);
  color: #fff;
}
.service-cta:hover { background: linear-gradient(150deg, var(--green) 0%, var(--green-strong) 100%); }
.service-cta h3 { color: #fff; }
.service-cta p { color: rgba(255, 255, 255, .88); }
.service-cta .btn { align-self: flex-start; }

/* Smart Home – acht Bereiche */
.areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.area {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.area-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(108, 192, 74, .18), rgba(35, 122, 43, .10));
  color: var(--green);
}
.area-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.area h3 { font-size: 1.35rem; margin-bottom: .35em; }
.area-en {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.area p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.claim {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 820px;
  text-align: center;
  font-family: var(--head);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  color: var(--ink);
}
.claim span { color: var(--green); }

/* Partner */
.partners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.partner {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 26px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.partner-logo {
  display: grid;
  place-items: center;
  height: 132px;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: #fff;
}
.partner-logo img { max-height: 96px; width: auto; }
.partner-logo-dark { background: #231f20; }
.partner-logo-brand { background: linear-gradient(150deg, var(--green) 0%, var(--green-strong) 100%); color: #fff; }
.partner-logo-brand svg {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.partner h3 { margin-bottom: .35em; }
.partner p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* Kontakt */
.contact {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.contact-card {
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  font-style: normal;
}
.contact-card .contact-name {
  margin-bottom: .2em;
  color: var(--ink);
  font-family: var(--head);
  font-size: 1.7rem;
  line-height: 1.2;
}
.contact-card > p { color: var(--ink-soft); }
.contact-list { margin: 1.4rem 0 0; padding: 0; }
.contact-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.contact-list dt { color: var(--muted); font-size: .9rem; font-weight: 600; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Fußzeile ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: 56px 0 32px;
  background: var(--forest);
  color: rgba(255, 255, 255, .72);
  font-size: .93rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.footer-brand {
  margin: 0;
  color: #fff;
  font-family: var(--head);
  font-size: 1.9rem;
  line-height: 1.1;
}
.footer-brand small {
  display: block;
  margin-top: 4px;
  color: var(--green-light);
  font-size: 1.05rem;
  letter-spacing: .04em;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: #fff; text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: var(--green-light); text-decoration: underline; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-meta p { margin: 0; }
.footer-meta svg { display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; color: var(--green-light); }

/* ---------- Rechtstexte ---------- */
.page-head {
  padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 40px);
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0; }
.legal { padding: clamp(36px, 5vw, 56px) 0 clamp(64px, 8vw, 96px); }
.legal .wrap > * { max-width: 760px; }
.legal h2 { font-size: 1.7rem; margin-top: 2.2em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.25rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .35em; }
.legal .stand { color: var(--muted); font-size: .92rem; margin-top: 3em; }

.error-page { padding: clamp(80px, 12vw, 140px) 0; text-align: center; }
.error-page .btn { margin-top: 1rem; }

/* ---------- Anpassung an Bildschirmbreite ---------- */
@media (max-width: 1080px) {
  .services, .areas { grid-template-columns: repeat(2, 1fr); }
  .main-nav a { padding: 8px 9px; }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0 16px;
    min-height: 0;
    padding-top: 10px;
  }
  .brand img { width: 124px; }
  .header-cta { margin-left: auto; }
  .main-nav {
    order: 3;
    width: calc(100% + 2 * var(--gutter));
    margin: 8px calc(-1 * var(--gutter)) 0;
    padding: 0 56px 8px var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex: none; padding: 6px 10px; font-size: .92rem; }
  html { scroll-padding-top: 120px; }

  .hero-grid, .contact { grid-template-columns: 1fr; }
  .hero-visual { width: min(80%, 420px); order: -1; }
  .partners { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .services, .areas { grid-template-columns: 1fr; }
  .header-cta .cta-text { display: none; }
  .header-cta { padding: .6em; }
  .hero-actions .btn, .contact-actions .btn { flex: 1 1 auto; justify-content: center; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
  .footer-brand { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-header, .waves, .hero-actions, .contact-actions { display: none; }
  .site-footer { background: #fff; color: #000; }
  .footer-brand, .footer-nav a { color: #000; }
}
