:root {
  --navy-950: #03101d;
  --navy-900: #061426;
  --navy-850: #0a1c31;
  --navy-800: #0d2743;
  --navy-700: #173b61;
  --gold-500: #ddb04f;
  --gold-400: #f2cb72;
  --gold-200: #f8e5b0;
  --ink: #0a1b2e;
  --ink-soft: #40566d;
  --surface: #ffffff;
  --surface-soft: #f2f6fa;
  --surface-blue: #eaf1f8;
  --line: #d9e3ed;
  --line-dark: rgba(255,255,255,.14);
  --text: #f7fbff;
  --muted: #b8c7d7;
  --success: #1f7a4f;
  --danger: #9f2f2f;
  --shadow-sm: 0 10px 28px rgba(3, 16, 29, .10);
  --shadow-md: 0 22px 55px rgba(3, 16, 29, .16);
  --shadow-lg: 0 34px 90px rgba(3, 16, 29, .30);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --container: 1280px;
  --header-height: 88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.picture { display: block; width: 100%; min-width: 0; }

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 999;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--gold-400);
  color: var(--navy-950);
  font-weight: 800;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(3, 16, 29, .96);
  border-bottom: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  width: min(1520px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(245px, 280px) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 235px;
  max-width: 280px;
  color: #fff;
}
.brand img {
  width: 56px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand span { display: grid; line-height: 1.04; min-width: 0; }
.brand b { font-size: 17px; letter-spacing: 0; white-space: nowrap; }
.brand small { margin-top: 3px; color: var(--gold-400); font-size: 12px; font-weight: 850; letter-spacing: .035em; }
.nav-panel {
  min-width: 0;
  display: contents;
}
.main-nav, .portal-nav { display: flex; align-items: center; gap: 3px; }
.main-nav { grid-column: 2; justify-content: center; min-width: 0; }
.main-nav a, .portal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 8px;
  border-radius: 10px;
  color: #dbe6f1;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.main-nav a:hover, .main-nav a.active,
.portal-nav a:hover, .portal-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.portal-nav {
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.12);
}
.portal-nav a { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding-inline: 12px; font-size: 12.5px; }
.header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
.top-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  font-weight: 900;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: 0 9px 24px rgba(221,176,79,.18);
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 4px;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* General layout */
main { min-height: 60vh; }
.section, .page-hero, .hero, .enterprise-proof { position: relative; }
.section { padding: 92px max(28px, calc((100vw - var(--container)) / 2)); }
.section > * { position: relative; z-index: 1; }
.section.soft { background: var(--surface-soft); color: var(--ink); }
.section.dark2 { background: var(--navy-900); color: #fff; }
.section.dark2 p { color: #c7d4e1; }
.section-shell { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.section-head { max-width: 880px; margin: 0 auto 42px; text-align: center; }
.section-head p { max-width: 760px; margin-inline: auto; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #b9821d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.dark2 .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .enterprise-proof .eyebrow { color: var(--gold-400); }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin-top: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(44px, 5.2vw, 78px); line-height: 1.01; }
h2 { font-size: clamp(34px, 4vw, 56px); line-height: 1.06; }
h3 { font-size: clamp(21px, 2vw, 28px); line-height: 1.15; }
p { margin: 0 0 1.05em; color: var(--ink-soft); }
.dark2 p, .hero p, .page-hero p, .enterprise-proof p { color: #c6d3df; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(221,176,79,.48);
  outline-offset: 3px;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-400)); color: var(--navy-950); box-shadow: 0 10px 26px rgba(221,176,79,.20); }
.btn-dark { background: var(--navy-900); color: #fff; box-shadow: 0 10px 24px rgba(3,16,29,.14); }
.btn-outline, .btn-ghost { color: #fff; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.06); }
.soft .btn-ghost, .soft .btn-outline { color: var(--navy-900); border-color: #bdcad7; background: transparent; }
.button-row, .hero-actions, .action-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center-row { justify-content: center; }

/* Homepage hero */
.hero {
  min-height: 720px;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .72fr);
  align-items: center;
  gap: 58px;
  padding: 74px max(28px, calc((100vw - var(--container)) / 2));
  color: #fff;
  background: var(--navy-950);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(3,16,29,.98) 0%, rgba(3,16,29,.92) 42%, rgba(3,16,29,.42) 72%, rgba(3,16,29,.58) 100%), var(--hero-image, url('../img/live-hero-haus-pv.png'));
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3,16,29,.02) 55%, rgba(3,16,29,.72));
}
.hero-copy { max-width: 730px; }
.hero h1 { max-width: 780px; margin: 0 0 22px; color: #fff; font-size: clamp(50px, 5.4vw, 78px); line-height: .98; }
.hero p { max-width: 710px; font-size: clamp(17px, 1.35vw, 20px); }
.hero-actions { margin-top: 28px; }
.trustbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 34px;
}
.trustbar > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 17px;
  background: rgba(7,25,43,.62);
  backdrop-filter: blur(12px);
}
.trustbar b { display: block; margin-bottom: 5px; color: var(--gold-400); font-size: 21px; }
.trustbar small { display: block; color: #d7e2ec; font-size: 12px; line-height: 1.4; }
.dash-shell { width: 100%; max-width: 500px; justify-self: end; }
.dashboard-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dash-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.dash-head b { font-size: 18px; }
.badge { display: inline-flex; align-items: center; min-height: 31px; padding: 6px 11px; border-radius: 999px; background: #fff5da; color: #8d5c08; border: 1px solid #efd389; font-size: 11px; font-weight: 900; white-space: nowrap; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-metric { padding: 16px; border-radius: 18px; background: #f2f6fa; }
.dash-metric b { display: block; margin-bottom: 4px; color: var(--navy-800); font-size: 25px; }
.dash-metric small { color: #52667a; font-size: 12px; }
.chart { position: relative; height: 120px; margin-top: 14px; overflow: hidden; border-radius: 18px; background: linear-gradient(180deg,#f2f7fb,#e8f0f7); }
.chart::before {
  content: "";
  position: absolute;
  inset: 18px;
  background:
    linear-gradient(135deg, transparent 0 9%, var(--gold-500) 9% 12%, transparent 12% 25%, #123d68 25% 28%, transparent 28% 42%, var(--gold-500) 42% 45%, transparent 45% 60%, #123d68 60% 63%, transparent 63% 78%, var(--gold-500) 78% 81%, transparent 81%);
}

/* Page hero */
.page-hero {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 74px max(28px, calc((100vw - var(--container)) / 2)) 64px;
  overflow: hidden;
  color: #fff;
  background: var(--navy-900);
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(3,16,29,.97) 0%, rgba(3,16,29,.84) 50%, rgba(3,16,29,.48) 100%), var(--page-hero-image, linear-gradient(135deg,#061426,#173b61));
  background-size: cover;
  background-position: var(--page-hero-position, center);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3,16,29,.05), rgba(3,16,29,.38));
}
.page-hero h1 { max-width: 1040px; margin: 0 0 18px; color: #fff; font-size: clamp(42px, 5vw, 70px); }
.page-hero p { max-width: 850px; margin: 0; font-size: clamp(17px, 1.6vw, 21px); }
.contact-line { margin-top: 16px !important; color: #fff !important; font-size: 20px !important; }
.contact-line a { color: var(--gold-400); font-weight: 900; }

/* Cards and grids */
.cards, .shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
}
.card, .panel, .login-preview {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.dark2 .card, .dark2 .panel { border-color: var(--line-dark); background: rgba(255,255,255,.06); color: #fff; }
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); border-color: #c8a14d; box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 16px; }
.card[href]::after { content: "Mehr erfahren →"; display: inline-block; margin-top: 4px; color: #8b5b08; font-weight: 900; }
.dark2 .card[href]::after { color: var(--gold-400); }
.service-matrix { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.service-matrix a {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transition: background .2s ease, transform .2s ease;
}
.service-matrix a:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); }
.soft .service-matrix a { color: var(--ink); background: #fff; border-color: var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.tabs span { padding: 9px 13px; border-radius: 999px; border: 1px solid #efd389; background: #fff6de; color: #775008; font-weight: 800; font-size: 14px; }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; counter-reset: item; }
.timeline > div, .timeline > article { counter-increment: item; padding: 24px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 800; }
.timeline > div::before, .timeline > article::before { content: counter(item); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: var(--gold-500); color: var(--navy-950); font-weight: 900; }
.timeline > article { min-height: 238px; display: flex; flex-direction: column; }
.timeline > article h3 { margin: 0 0 10px; color: var(--navy-950); font-size: 20px; line-height: 1.2; }
.timeline > article p { margin: 0; color: #4b5c70; font-weight: 600; line-height: 1.55; }
.dark2 .timeline > article h3 { color: var(--navy-950); }
.dark2 .timeline > article p { color: #52677d; }
.metric-grid, .mini-map { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.mini-map { grid-template-columns: repeat(5, minmax(0,1fr)); }
.mini-map a { display: grid; place-items: center; min-height: 76px; padding: 14px; border: 1px solid var(--line-dark); border-radius: 16px; background: rgba(255,255,255,.06); text-align: center; font-weight: 800; }

/* Images */
.photo-split, .mega-grid, .split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.photo-split > .picture, .photo-split > img,
.mega-grid > .picture, .mega-grid > img,
.split > .picture, .split > img { min-width: 0; }
.photo-split img, .rounded-photo, .page-photo, .page-visual-band img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.page-photo { max-height: 480px; }
.image-strip, .real-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.image-strip img, .real-strip img { width: 100%; height: 250px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-sm); }
.reference-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.image-card { position: relative; min-height: 330px; overflow: hidden; border-radius: 22px; background: var(--navy-900); box-shadow: var(--shadow-md); }
.image-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.page-referenzen .reference-cards .image-card:first-child img { object-position: 82% center; }
.image-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,16,29,.02) 35%, rgba(3,16,29,.92)); }
.image-card > div { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2; color: #fff; }
.image-card span { color: var(--gold-400); font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.image-card h3 { margin: 7px 0 0; font-size: 22px; }
.image-card:hover img { transform: scale(1.035); }
.page-visual-band { padding: 28px max(28px, calc((100vw - var(--container)) / 2)); background: var(--navy-900); }

/* EMS custom visual */
.ems-showcase {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 22px;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(145deg, #061426, #0f2d4d);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.ems-photo { position: relative; min-height: 500px; overflow: hidden; border-radius: 24px; }
.ems-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ems-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,16,29,.02), rgba(3,16,29,.66)); }
.ems-photo-copy { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 22px; }
.ems-photo-copy h3 { margin-bottom: 8px; }
.ems-photo-copy p { color: #d6e1eb; margin: 0; }
.ems-ui { display: grid; gap: 14px; align-content: center; padding: 14px; }
.ems-ui-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ems-ui-head strong { font-size: 20px; }
.ems-ui-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ems-ui-card { padding: 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.075); }
.ems-ui-card span { display: block; margin-bottom: 7px; color: #a9bdd0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ems-ui-card b { font-size: 21px; color: #fff; }
.energy-flow { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; align-items: center; }
.energy-flow div { position: relative; padding: 13px 8px; border-radius: 13px; background: rgba(255,255,255,.08); text-align: center; font-size: 12px; font-weight: 800; }
.energy-flow div:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--gold-400); z-index: 2; }
.energy-status { display: flex; align-items: center; gap: 8px; color: #c6d5e3; font-size: 13px; }
.energy-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #54d392; box-shadow: 0 0 0 6px rgba(84,211,146,.12); }

/* Flow and calculators */
.ems-flow { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; max-width: 1120px; margin: 0 auto; }
.ems-flow > div { position: relative; padding: 16px 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: center; font-weight: 850; }
.ems-flow > div:not(:last-child)::after { content: "→"; position: absolute; right: -10px; color: var(--gold-500); }
.dark2 .ems-flow > div { color: #fff; background: rgba(255,255,255,.07); border-color: var(--line-dark); }
.flow { display: grid; gap: 10px; }
.flow > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line-dark); border-radius: 14px; background: rgba(255,255,255,.06); }
.flow b { color: var(--gold-400); }
.energy-map { position: relative; min-height: 430px; overflow: hidden; border-radius: 30px; background: radial-gradient(circle at 20% 15%,rgba(221,176,79,.28),transparent 24%), linear-gradient(145deg,#07192b,#0f3153); box-shadow: var(--shadow-md); }
.node { position: absolute; padding: 12px 14px; border: 1px solid rgba(242,203,114,.48); border-radius: 15px; background: rgba(255,255,255,.08); color: #fff; font-weight: 800; }
.n1 { left: 8%; top: 17%; }.n2 { right: 9%; top: 18%; }.n3 { left: 39%; top: 45%; }.n4 { left: 9%; bottom: 17%; }.n5 { right: 9%; bottom: 17%; }
.pulse-line { position: absolute; height: 3px; background: linear-gradient(90deg,transparent,var(--gold-400),transparent); }
.pl1 { left: 21%; top: 36%; width: 30%; transform: rotate(14deg); }.pl2 { left: 45%; top: 36%; width: 27%; transform: rotate(-16deg); }.pl3 { left: 25%; top: 65%; width: 46%; transform: rotate(-7deg); }
.rechner-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.calc label, .form label { display: block; margin: 13px 0 6px; color: var(--ink); font-weight: 800; }
.form input, .form select, .form textarea, .calc input, .calc select {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid #cbd7e2;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
}
.form textarea { min-height: 150px; resize: vertical; }
.result { min-height: 28px; color: #6f4a08; font-weight: 900; }
.price { margin: 14px 0; color: #83570a; font-size: 30px; font-weight: 900; }

/* Forms */
.form { max-width: 760px; }
.form .checkline { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; color: var(--ink); font-weight: 650; }
.form .checkline input { width: auto; min-height: 0; margin-top: 5px; }
.form .checkline a { text-decoration: underline; }
.form-errors, .form-success { margin: 16px 0; padding: 16px 18px; border-radius: 14px; }
.form-errors { border: 1px solid #e4aaa7; background: #fff2f1; color: #6a1e1a; }
.form-success { border: 1px solid #a7d6b8; background: #f1fff5; color: #154d33; }
.form-errors ul { margin: 8px 0 0; padding-left: 20px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice, .enterprise-note { padding: 17px 18px; border: 1px solid #efd389; border-radius: 15px; background: #fff6df !important; color: #61420a !important; }
.module-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.module-table th, .module-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; }
.module-table th { background: var(--navy-800); color: #fff; }

/* Login previews */
.login-preview { max-width: 800px; margin-inline: auto; }

/* CTA and footer */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 42px; }
.cta-band > div { max-width: 820px; }
.enterprise-proof { padding: 66px 0; background: linear-gradient(135deg,#081a2e,#0e2b49); color: #fff; }
.proof-shell { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.proof-shell > div:first-child { max-width: 820px; }
.proof-shell h2 { margin-bottom: 12px; font-size: clamp(32px,3.6vw,50px); }
.footer { padding: 70px 0 30px; background: var(--navy-950); color: #fff; }
.footer-inner { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.45fr repeat(3, .8fr); gap: 44px; }
.footer-grid > div > b { display: block; margin-bottom: 15px; color: #fff; font-size: 15px; }
.footer-grid a { display: block; margin: 8px 0; color: #b9c8d7; font-size: 14px; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-brand p { max-width: 500px; color: #b9c8d7; }
.footer-brand-lockup { margin-bottom: 20px; }
.footer-contact { color: #fff !important; font-weight: 800; }
.legal { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.11); color: #8195aa; font-size: 12px; }
.micro { font-size: 13px; }

/* Floating tools */
.floating-tools { position: fixed; right: 18px; bottom: 20px; z-index: 80; display: grid; gap: 7px; }
.floating-tools a { min-width: 136px; padding: 9px 13px; border: 1px solid rgba(3,16,29,.08); border-radius: 999px; background: #fff; color: var(--navy-900); box-shadow: 0 10px 25px rgba(3,16,29,.18); font-size: 12px; font-weight: 900; text-align: center; }
.floating-tools .floating-primary { background: linear-gradient(135deg,var(--gold-500),var(--gold-400)); color: var(--navy-950); }

/* Cookie */
.cookie-banner { position: fixed; left: 18px; bottom: 18px; z-index: 90; display: none; align-items: center; gap: 18px; width: min(590px,calc(100vw - 36px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: var(--shadow-md); }
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 13px; line-height: 1.45; }
.cookie-banner a { text-decoration: underline; font-weight: 750; }
.cookie-banner .btn { flex: 0 0 auto; min-height: 40px; padding: 9px 16px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 22px; background: rgba(3,16,29,.68); }
.modal.is-open { display: grid; }
.modal-box { position: relative; width: min(520px,100%); padding: 30px; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: transparent; color: var(--ink); font-size: 31px; cursor: pointer; }

/* Utility */
.quote { color: var(--gold-400); font-size: 27px; font-weight: 900; line-height: 1.25; }
.news-list { display: grid; gap: 12px; }
.news-list a { display: flex; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.subnav-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.subnav-grid a { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; font-weight: 850; box-shadow: var(--shadow-sm); }

/* Responsive */
@media (max-width: 1220px) {
  :root { --header-height: 76px; }
  .topbar-inner { width: min(100% - 28px, 1360px); grid-template-columns: minmax(220px, 245px) minmax(0, 1fr) auto; column-gap: 14px; }
  .brand { min-width: 220px; max-width: 245px; }
  .brand b { font-size: 15px; }
  .brand img { width: 50px; height: auto; max-height: 40px; }
  .main-nav a { padding-inline: 7px; font-size: 12.5px; }
  .portal-nav { display: none; }
  .hero { grid-template-columns: minmax(0,1fr) 400px; gap: 36px; }
  .service-matrix { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .reference-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .topbar-inner { display: flex; }
  .brand { min-width: 0; max-width: none; }
  .nav-panel {
    position: fixed;
    left: 100%;
    right: auto;
    top: var(--header-height);
    bottom: 0;
    width: 100%;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 24px 22px 40px;
    overflow-y: auto;
    background: rgba(3,16,29,.995);
    transform: translateX(0);
    transition: transform .24s ease;
  }
  .nav-open .nav-panel { transform: translateX(-100%); }
  .main-nav, .portal-nav { display: grid; gap: 4px; align-items: stretch; }
  .main-nav a, .portal-nav a { min-height: 48px; padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .portal-nav { padding: 15px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .portal-nav a { border-radius: 12px; }
  .header-actions { display: grid; gap: 12px; white-space: normal; }
  .top-cta { width: 100%; min-height: 50px; font-size: 15px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; padding-bottom: 62px; }
  .hero-copy { max-width: 760px; }
  .dash-shell { max-width: 620px; justify-self: start; }
  .photo-split, .mega-grid, .split, .ems-showcase { grid-template-columns: 1fr; }
  .photo-split > .picture, .photo-split > img { order: 0; }
  .cards, .shop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .timeline, .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reference-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1.25fr repeat(2,1fr); }
  .footer-grid > div:last-child { grid-column: 2 / 4; }
  .proof-shell, .cta-band { align-items: flex-start; flex-direction: column; }
  .ems-photo { min-height: 420px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; padding-bottom: 96px; }
  .topbar-inner { width: calc(100% - 24px); }
  .brand img { width: 44px; height: 37px; }
  .brand b { font-size: 15px; }
  .brand small { font-size: 11px; }
  .section { padding: 68px 20px; }
  .page-hero { min-height: 410px; padding: 58px 20px 48px; }
  .page-hero h1 { font-size: clamp(36px, 11vw, 48px); line-height: 1.04; }
  .page-hero p { font-size: 17px; }
  .hero { padding: 56px 20px 48px; background-position: 62% center; }
  .hero::before { background-image: linear-gradient(90deg,rgba(3,16,29,.98) 0%,rgba(3,16,29,.91) 72%,rgba(3,16,29,.72) 100%), var(--hero-image,url('../img/live-hero-haus-pv.png')); background-position: 62% center; }
  .hero h1 { font-size: clamp(40px, 12vw, 56px); line-height: 1.01; }
  .hero p { font-size: 16px; }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  .trustbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dash-shell { display: none; }
  .cards, .shop-grid, .reference-cards, .service-matrix, .subnav-grid, .rechner-grid, .image-strip, .real-strip, .footer-grid, .timeline, .metric-grid, .mini-map { grid-template-columns: 1fr; }
  .footer-grid > div:last-child { grid-column: auto; }
  .card, .panel, .login-preview { padding: 23px; }
  .photo-split img, .rounded-photo, .page-photo, .page-visual-band img { aspect-ratio: 4 / 3; border-radius: 22px; }
  .image-card { min-height: 290px; }
  .ems-photo { min-height: 340px; }
  .ems-ui { padding: 2px; }
  .ems-ui-grid { grid-template-columns: 1fr; }
  .energy-flow { grid-template-columns: 1fr; }
  .energy-flow div:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); }
  .ems-flow { grid-template-columns: 1fr 1fr; }
  .ems-flow > div:not(:last-child)::after { display: none; }
  .proof-shell { width: calc(100% - 40px); }
  .enterprise-proof { padding: 54px 0; }
  .footer { padding-top: 56px; }
  .legal { display: grid; }
  .floating-tools {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 0;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: rgba(3,16,29,.97);
    border-top: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(14px);
  }
  .floating-tools a { min-width: 0; padding: 10px 4px; border: 0; border-radius: 10px; background: transparent; color: #fff; box-shadow: none; font-size: 10.5px; }
  .floating-tools .floating-primary { background: var(--gold-500); color: var(--navy-950); }
  .cookie-banner { left: 12px; bottom: 76px; width: calc(100vw - 24px); flex-direction: column; align-items: stretch; gap: 10px; }
  .cookie-banner .btn { width: 100%; }
}

@media (max-width: 430px) {
  .brand span { max-width: 130px; }
  .hero h1 { font-size: 39px; }
  .page-hero h1 { font-size: 36px; }
  .trustbar { grid-template-columns: 1fr; }
  .section-head { text-align: left; }
  .button-row { display: grid; }
  .button-row .btn { width: 100%; }
  .reference-cards { gap: 14px; }
  .image-card { min-height: 260px; }
  .ems-flow { grid-template-columns: 1fr; }
}

@media print {
  .topbar, .floating-tools, .cookie-banner, .enterprise-proof, .footer, .btn { display: none !important; }
  .page-hero, .section { padding: 24px; background: #fff !important; color: #000 !important; }
  .page-hero::before, .page-hero::after { display: none; }
}

/* Final proportion and navigation refinements */
.brand { min-width: 235px; max-width: 280px; }
.hero { min-height: 660px; }
.hero h1 { font-size: clamp(46px, 4.45vw, 68px); line-height: 1.01; max-width: 720px; }
.page-hero { min-height: 390px; }
.page-hero h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.04; max-width: 980px; }
.hero::before {
  background-image: linear-gradient(90deg, rgba(3,16,29,.96) 0%, rgba(3,16,29,.88) 41%, rgba(3,16,29,.25) 70%, rgba(3,16,29,.42) 100%), var(--hero-image, url('../img/responsive/live-hero-haus-pv-1920.webp'));
}
.page-hero::before {
  background-image: linear-gradient(90deg, rgba(3,16,29,.95) 0%, rgba(3,16,29,.82) 50%, rgba(3,16,29,.34) 100%), var(--page-hero-image, linear-gradient(135deg,#061426,#173b61));
}
.photo-split > .picture,
.photo-split > img,
.rounded-photo-picture { min-width: 0; }
.rounded-photo { width: 100%; object-fit: cover; object-position: center; }
.page-geschaeftskunden .rounded-photo { object-position: center 58%; }
.page-elektro-bau .photo-split:nth-of-type(1) .rounded-photo { object-position: center; }

@media (max-width: 1480px) {
  .topbar-inner { width: calc(100% - 32px); grid-template-columns: minmax(220px, 245px) minmax(0, 1fr); column-gap: 18px; }
  .portal-nav { display: none; }
  .main-nav a { padding-inline: 8px; font-size: 12.5px; }
  .nav-panel { display: contents; }
  .brand { min-width: 220px; max-width: 245px; }
}

@media (max-width: 1180px) {
  :root { --header-height: 76px; }
  .nav-toggle { display: block; }
  .nav-panel {
    position: fixed;
    left: 100%;
    right: auto;
    top: var(--header-height);
    bottom: 0;
    width: 100%;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    padding: 24px 22px 40px;
    overflow-y: auto;
    background: rgba(3,16,29,.995);
    transform: translateX(0);
    transition: transform .24s ease;
  }
  .nav-open .nav-panel { transform: translateX(-100%); }
  .main-nav, .portal-nav { display: grid; gap: 4px; align-items: stretch; }
  .main-nav a, .portal-nav a { min-height: 48px; padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .portal-nav { padding: 15px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .portal-nav a { border-radius: 12px; }
  .top-cta { width: 100%; min-height: 50px; font-size: 15px; }
}

@media (max-width: 980px) {
  .hero { min-height: auto; }
  .hero h1 { font-size: clamp(44px, 7vw, 62px); }
  .page-hero h1 { font-size: clamp(40px, 6.5vw, 56px); }
}

@media (max-width: 720px) {
  .brand { min-width: 0; max-width: none; }
  .hero { padding-top: 58px; }
  .hero::before {
    background-image: linear-gradient(90deg, rgba(3,16,29,.97) 0%, rgba(3,16,29,.90) 58%, rgba(3,16,29,.68) 100%), var(--hero-image, url('../img/responsive/live-hero-haus-pv-960.webp'));
    background-position: 68% center;
  }
  .hero h1 { font-size: clamp(38px, 11.2vw, 50px); line-height: 1.02; }
  .page-hero { min-height: 370px; }
  .page-hero h1 { font-size: clamp(34px, 9.6vw, 44px); }
}

/* Final scale pass: strong, but not visually zoomed */
h1 { font-size: clamp(40px, 4.7vw, 68px); }
h2 { font-size: clamp(32px, 3.5vw, 50px); }
.hero h1 { font-size: clamp(44px, 4.05vw, 62px); max-width: 700px; }
.page-hero h1 { font-size: clamp(38px, 3.7vw, 54px); max-width: 920px; }
.page-hero p { font-size: clamp(17px, 1.35vw, 20px); }

@media (max-width: 720px) {
  .hero h1 { font-size: clamp(37px, 10.6vw, 46px); }
  .page-hero h1 { font-size: clamp(33px, 9.2vw, 42px); }
  h2 { font-size: clamp(30px, 9vw, 40px); }
}

@media (max-width: 1180px) {
  body:not(.nav-open) .nav-panel { display: none; }
  body.nav-open .nav-panel {
    display: flex;
    left: 0;
    right: 0;
    width: auto;
    transform: none;
  }
}
.legal-copy { max-width: 980px; margin: 0 auto; }
.legal-copy h2 { margin-top: 42px; font-size: clamp(26px, 2.4vw, 36px); }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { max-width: 88ch; }

/* Mobile navigation viewport fix */
@media (max-width: 1180px) {
  .topbar {
    isolation: isolate;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: rgba(3, 16, 29, .96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  body.nav-open .nav-panel {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    height: calc(100dvh - var(--header-height));
    min-height: 0;
    max-height: calc(100dvh - var(--header-height));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
