
:root {
  --bg: #080e2a;
  --bg2: #0e1740;
  --ink: #eef0fb;
  --mut: #b4bbdc;
  --tl: #9aa6ff;
  --br: #3543a8;
  --tk: #272b87;
  --am: #ff9f43;
  --light: #f3f4fb;
  --dark: #0b1030;
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--am);
  outline-offset: 3px;
}

.w {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

section {
  width: 100%;
  min-width: 0;
}

/* 3D CANVAS */

#gl {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#tag {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translate(-200px, -200px);
  transition: opacity 0.25s;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--am);
  color: #241400;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#tag.on {
  opacity: 1;
}

/* HEADER */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 0 rgba(8,14,42,0.13);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  text-decoration: none;
}

.logo img {
  width: min(340px, 35vw);
  height: auto;
  max-height: 55px;
  object-fit: contain;
  object-position: left center;
}

.menu {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu a {
  color: #1b2150;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.menu a:hover {
  color: var(--br);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.3;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn.p,
.menu a.btn.p {
  background: var(--br);
  color: #fff;
}

.btn.p:hover,
.menu a.btn.p:hover {
  background: #4858c5;
  color: #fff;
}

.btn.g {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  background: rgba(8,14,42,0.2);
}

.btn.g:hover {
  background: rgba(255,255,255,0.12);
}

.btn.sm {
  min-height: 42px;
  padding: 10px 20px;
}

.burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.burger i {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: #1b2150;
  transition: transform 0.2s, top 0.2s;
}

.burger i:first-child {
  top: 17px;
}

.burger i:last-child {
  top: 25px;
}

.nav.open .burger i:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.nav.open .burger i:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

/* ALLGEMEIN */

.kick {
  margin-bottom: 10px;
  color: var(--tl);
  font-size: 14px;
  font-weight: 700;
}

.t {
  margin-bottom: 22px;
  font-size: clamp(34px, 4.7vw, 58px);
}

.intro {
  max-width: 60ch;
  color: var(--mut);
}

.sec {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: clamp(76px, 9vw, 120px) 0;
}

.lt {
  background: var(--light);
  color: var(--dark);
}

.lt .kick {
  color: var(--br);
}

.lt p:not(.kick) {
  color: #4e5981;
}

.dk {
  background: var(--bg2);
  color: #fff;
}

/* HERO */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 70px;
  background: transparent;
}

.hero-content {
  width: min(610px, 100%);
  text-shadow: 0 2px 20px rgba(8,14,42,0.5);
}

.hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(50px, 7.5vw, 100px);
}

.sub {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 2.5vw, 29px);
  line-height: 1.35;
}

.lead {
  max-width: 48ch;
  margin-bottom: 30px;
  color: var(--mut);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 35px 0 0;
  list-style: none;
}

.chips li {
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(8,14,42,0.55);
  color: var(--mut);
  font-size: 13px;
}

/* SCHADSTOFFE / 3D */

.scan {
  position: relative;
  height: 420svh;
  background: transparent;
}

.pin {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100svh;
  width: 100%;
}

.scan-layout {
  display: flex;
  align-items: center;
}

.panel {
  position: relative;
  width: min(470px, 100%);
  min-height: 365px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  background: rgba(14,23,64,0.91);
  box-shadow: 0 16px 50px rgba(0,0,0,0.12);
  backdrop-filter: blur(14px);
}

.step {
  position: absolute;
  inset: 32px 32px 58px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}

.step.on {
  opacity: 1;
  transform: none;
}

.step h2 {
  margin: 8px 0 15px;
  font-size: clamp(35px, 4vw, 49px);
}

.step p:not(.kick) {
  margin-bottom: 0;
  color: var(--mut);
}

.step small {
  display: block;
  margin-top: 15px;
  color: var(--am);
  font-size: 13px;
  font-weight: 700;
}

.bar {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 24px;
  height: 3px;
  background: rgba(255,255,255,0.16);
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--tl);
}

/* LEISTUNGEN */

.hd {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 35px;
  align-items: end;
}

.hd > * {
  min-width: 0;
}

.hd .t {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.card {
  min-width: 0;
  padding: 30px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--dark);
}

.lc {
  display: flex;
  flex-direction: column;
}

.lc .kick {
  margin-bottom: 20px;
  font-size: 13px;
}

.svc-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 16px;
  background: #e7eaf8;
}

.svc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  margin-bottom: 15px;
  font-size: clamp(23px, 2.1vw, 28px);
  overflow-wrap: anywhere;
}

.card p:not(.kick) {
  color: #4e5981;
  font-size: 15px;
}

.lc a {
  margin-top: auto;
  padding-top: 20px;
  color: var(--br);
  font-weight: 700;
  text-decoration: none;
}

.lc a:hover {
  text-decoration: underline;
}

/* ABLAUF */

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 45px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.flow li {
  min-width: 0;
  padding-top: 18px;
  border-top: 2px solid var(--tl);
  counter-increment: schritt;
}

.flow li::before {
  content: counter(schritt, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: var(--tl);
  font-family: Georgia, serif;
  font-size: 38px;
}

.flow b {
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
}

.flow span {
  display: block;
  color: var(--mut);
  font-size: 15px;
}

/* ÜBER UNS */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 55px;
}

.about > * {
  min-width: 0;
}

.big {
  color: #4e5981;
  font-family: Georgia, serif;
  font-size: 20px;
}

.big span {
  display: block;
  color: var(--tk);
  font-size: clamp(85px, 13vw, 160px);
  line-height: 1;
}

.about p + p {
  margin-top: 16px;
}

/* KONTAKT */

.ct {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 55px;
  align-items: start;
}

.ct > * {
  min-width: 0;
}

.ci {
  display: grid;
  gap: 22px;
  margin: 35px 0 0;
  padding: 0;
  list-style: none;
}

.ci li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ci i {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(154,166,255,0.14);
  color: var(--tl);
  font-size: 23px;
  font-style: normal;
}

.ci li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ci small {
  display: block;
  color: var(--tl);
  font-size: 13px;
  font-weight: 700;
}

.ci a {
  text-decoration: none;
}

.ci a:hover {
  color: var(--tl);
}

form {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 35px;
  border-radius: 20px;
  background: #fff;
  color: var(--dark);
}

form h3 {
  margin-bottom: 0;
  font-size: 29px;
}

.fn {
  margin-bottom: 0;
  color: #5a6392;
  font-size: 13px;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d3d7ee;
  border-radius: 11px;
  background: #fff;
  color: var(--dark);
  font-size: 16px;
  font-weight: 400;
}

textarea {
  min-height: 145px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--br);
  outline-offset: 1px;
}

form .btn {
  width: 100%;
  cursor: pointer;
}

/* FOOTER */

.site-footer {
  background: #071125;
  color: #9aadd5;
  padding: 55px 0 0;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr;
  gap: 50px;
  padding-bottom: 65px;
}

.footer-columns > * {
  min-width: 0;
}

.footer-logo {
  margin-bottom: 18px;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
}

.footer-logo span {
  color: #8995ff;
}

.footer-brand p {
  color: #9aadd5;
}

.site-footer h2 {
  margin-bottom: 18px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.footer-navigation,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-navigation h2,
.footer-contact h2 {
  margin-bottom: 8px;
}

.site-footer a {
  color: #9aadd5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer a:hover {
  color: #fff;
}

.footer-contact p {
  margin: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid rgba(154,173,213,0.17);
  color: #8297c0;
  font-size: 13px;
}

/* FALLBACK OHNE WEBGL */

.no3d #gl,
.no3d #tag {
  display: none;
}

.no3d .hero {
  background: var(--bg);
}

.no3d .scan {
  height: auto;
  padding: 85px 0;
  background: var(--bg);
}

.no3d .pin {
  position: static;
  height: auto;
}

.no3d .panel {
  min-height: auto;
}

.no3d .step {
  position: static;
  opacity: 1;
  transform: none;
  margin-bottom: 28px;
}

.no3d .bar {
  display: none;
}

/* TABLETS */

@media (max-width: 1024px) {
  .logo img {
    width: min(290px, 32vw);
  }

  .menu {
    gap: 16px;
  }

  .menu a {
    font-size: 14px;
  }

  .grid {
    gap: 16px;
  }

  .card {
    padding: 23px;
  }

  .ct {
    gap: 30px;
  }
}

/* HANDY UND KLEINE TABLETS */

@media (max-width: 820px) {
  html {
    scroll-padding-top: 70px;
  }

  .w {
    width: calc(100% - 36px);
    max-width: 100%;
  }

  .nav-inner {
    min-height: 70px;
  }

  .logo img {
    width: min(270px, 64vw);
    max-height: 46px;
  }

  .burger {
    display: block;
  }

  .menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100svh - 70px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 22px;
    background: #fff;
    box-shadow: 0 16px 28px rgba(8,14,42,0.14);
  }

  .nav.open .menu {
    display: flex;
  }

  .menu a {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
  }

  .menu a.btn {
    margin-top: 10px;
    text-align: center;
  }

  .hero {
    min-height: 100svh;
    padding: 120px 0 65px;
    align-items: flex-start;
  }

  .hero-content {
    width: 100%;
    max-width: 550px;
  }

  .hero h1 {
    font-size: clamp(45px, 10vw, 70px);
  }

  .lead {
    max-width: 42ch;
  }

  .scan {
    height: 400svh;
  }

  .pin {
    align-items: flex-end;
    padding: 0 0 20px;
  }

  .scan-layout {
    width: calc(100% - 36px);
    align-items: flex-end;
  }

  .panel {
    width: 100%;
    min-height: 290px;
    padding: 22px;
    background: rgba(14,23,64,0.95);
  }

  .step {
    inset: 22px 22px 44px;
  }

  .step h2 {
    margin: 5px 0 10px;
    font-size: 33px;
  }

  .step p:not(.kick) {
    font-size: 14px;
    line-height: 1.55;
  }

  .step small {
    margin-top: 9px;
    font-size: 12px;
  }

  .bar {
    left: 22px;
    right: 22px;
    bottom: 17px;
  }

  #tag {
    display: none;
  }

  .sec {
    width: 100%;
    padding: 75px 0;
  }

  .hd,
  .about,
  .ct {
    grid-template-columns: minmax(0, 1fr);
  }

  .hd {
    gap: 16px;
  }

  .hd .t {
    max-width: 680px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
  }

  .card {
    padding: 24px;
  }

  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about {
    gap: 30px;
  }

  .ct {
    gap: 35px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* HANDYS */

@media (max-width: 600px) {
  .w {
    width: calc(100% - 36px);
  }

  .hero {
    padding-top: 110px;
  }

  .hero h1 {
    font-size: clamp(44px, 12vw, 60px);
  }

  .sub {
    font-size: 22px;
  }

  .lead {
    font-size: 15px;
  }

  .cta {
    gap: 10px;
  }

  .cta .btn {
    width: 100%;
  }

  .chips {
    display: none;
  }

  .scan {
    height: 400svh;
  }

  .panel {
    min-height: 305px;
  }

  .sec {
    padding: 65px 0;
  }

  .t {
    font-size: clamp(32px, 8vw, 43px);
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 30px;
  }

  .card {
    width: 100%;
    padding: 26px;
  }

  .card h3 {
    font-size: 25px;
  }

  .svc-media {
    aspect-ratio: 16 / 10;
  }

  .flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .big span {
    font-size: 100px;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
  }

  form {
    padding: 24px;
  }

  .footer-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* SEHR KLEINE HANDYS */

@media (max-width: 380px) {
  .w {
    width: calc(100% - 28px);
  }

  .logo img {
    width: min(235px, 65vw);
  }

  .hero h1 {
    font-size: 43px;
  }

  .panel {
    min-height: 345px;
    padding: 18px;
  }

  .step {
    inset: 18px 18px 42px;
  }

  .step h2 {
    font-size: 30px;
  }

  .step p:not(.kick) {
    font-size: 13px;
  }

  .bar {
    left: 18px;
    right: 18px;
  }

  .card {
    padding: 22px;
  }

  form {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================
   MOBILE: HERO UND 3D-HAUS SAUBER TRENNEN
   Desktop bleibt unverändert
   ============================================ */

@media (max-width: 820px) {

  /* Der obere Startbereich erhält einen
     vollständig deckenden dunkelblauen Hintergrund. */
  .hero {
    position: relative;
    z-index: 2;
    min-height: 100svh;
    background: #080e2a;
    display: flex;
    align-items: flex-start;
    padding-top: 125px;
    padding-bottom: 70px;
  }

  /* Der gesamte Text steht über dem Hintergrund. */
  .hero .w {
    position: relative;
    z-index: 2;
  }

  .hero-content {
    width: 100%;
    max-width: 550px;
    text-shadow: none;
  }

  .hero h1 {
    font-size: clamp(45px, 10vw, 66px);
    line-height: 1.08;
    margin-bottom: 24px;
  }

  .hero .sub {
    color: #ffffff;
    font-size: clamp(21px, 5.5vw, 27px);
    line-height: 1.35;
  }

  .hero .lead {
    color: #b4bbdc;
    font-size: 16px;
    line-height: 1.7;
  }

  /* Die Buttons bleiben gut bedienbar. */
  .hero .cta {
    position: relative;
    z-index: 2;
    margin-top: 28px;
  }

  /* Die Schadstoffsektion folgt danach.
     Hier ist das 3D-Haus sichtbar. */
  .scan {
    position: relative;
    z-index: 1;
    background: transparent;
    height: 400svh;
  }

  .scan .pin {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
  }

  /* Infokarte unten, Haus darüber sichtbar. */
  .scan .panel {
    width: 100%;
    background: rgba(14, 23, 64, 0.96);
    backdrop-filter: blur(14px);
  }

  /* Leistungen und weitere Sektionen
     decken die 3D-Szene vollständig ab. */
  .sec.lt {
    position: relative;
    z-index: 3;
    background: #f3f4fb;
  }

  .sec.dk {
    position: relative;
    z-index: 3;
    background: #0e1740;
  }

  .site-footer {
    position: relative;
    z-index: 3;
  }
}

/* Besonders kleine Smartphones */
@media (max-width: 380px) {
  .hero {
    padding-top: 110px;
    padding-bottom: 55px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero .sub {
    font-size: 21px;
  }

  .hero .lead {
    font-size: 15px;
  }
}
