  :root {
    --bg: #f4f4f4;
    --paper: #ffffff;
    --ink: #31455E;
    --muted: #5b6776;
    --accent: #3f5978;
    --accent-dark: #3f5978;
    --accent-light: #f4f4f4;
    --line: #dde3ea;
    --nav-h: 150px;
    --btn-call-to-action-bg: #1B9A8B;
    --btn-call-to-action-bg-hover: #F9A03E;
    --flip-radius: 28px;   /* größer = runder, z. B. 20px / 28px / 36px */
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; }

  body {
    font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    padding-top: var(--nav-h);
  }
  body.modal-open { overflow: hidden; }

  h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

  section { scroll-margin-top: calc(var(--nav-h) + 20px); }

  .wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

  /* ---------- Hero ---------- */
  .hero {
    min-height: calc(100vh - var(--nav-h)); 
    min-height: calc(100svh - var(--nav-h));  /* für mobile Browser mit ein-/ausfahrender Adressleiste */
    display: flex;
    align-items: center;
    background:#3f5978;
    color: #f4f4f4;
    position: relative;
    overflow: hidden;
  }
  /* Logo als Hintergrund im Hero */
    .hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -10%;
    transform: translateY(-50%);
    width: 110vh;
    height:110vh;
    background: url("img/logo_light.svg") no-repeat left center / contain;
    opacity: .2;
    pointer-events: none;
    z-index: 1;
    }

    .hero .wrap {
    position: relative;
    width: 100%;
    z-index: 2;
    }  
    
    /* ---------- Hero: Referenz-Slideshow ---------- */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero.show-ref .hero-slides { opacity: 1; }

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }

/* Overlay für Lesbarkeit */
.hero-slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(63,89,120,.88) 0%, rgba(63,89,120,.6) 55%, rgba(63,89,120,.35) 100%);
}
.hero-stack { display: grid; }
.hero-content {
  grid-area: 1 / 1;
  transition: opacity .8s ease, visibility .8s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* verhindert, dass Kinder (Button) auf volle Breite gestreckt werden */
}

/* Umschalten zwischen Original-Hero und Referenz-Text */
.hero-main,
.hero-ref {
  transition: opacity .8s ease;
}
.hero-ref {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.hero.show-ref .hero-ref { opacity: 1; pointer-events: auto;  visibility: visible; }
.hero.show-ref .hero-main { opacity: 0; pointer-events: none; visibility: hidden; }

/* Referenz-Überschrift (h2) */
.hero-ref h2 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 20ch;
  margin-bottom: 22px;
}

/* Durchgestrichene Slogan-Wörter */
.hero-ref .slogan b { font-weight: inherit; }
.hero-ref .slogan .off {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: .35;
}
  .hero h1 span { color: #b8c9dc; }
  .slogan {
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .9rem;
    font-weight: 600;
    color: #b9cfe0;
    margin-bottom: 22px;
  }
  .slogan span { color: #fff; opacity: .5; margin: 0 .5em; }
  .hero h1 { font-size: clamp(3rem, 7.5vw, 5.1rem); max-width: 18ch; margin-bottom: 22px; }
  .hero p { max-width: 54ch; font-size: 1.1rem; color: #d7e3ec; margin-bottom: 32px; }
  .btn {
    display: inline-block;
    padding: 13px 28px;
    background: var(--btn-call-to-action-bg);
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    border-radius: 20px;
    transition: background .2s, color .2s;
  }
  .btn:hover { 
    background: var(--btn-call-to-action-bg-hover);
    color: var(--accent-dark);
  }

  /* ---------- Sektionen ---------- */
  .block { padding: 96px 0; }
  .block.alt { background: var(--paper); }
  .eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
  }
  .block h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 20px; }
  .lead { max-width: 62ch; color: var(--muted); font-size: 1.05rem; }

  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 28px;
    margin-top: 48px;
    counter-reset: flipnr;
  }
  .card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    padding: 30px 26px;
    border-radius: 3px;
  }
  .alt .card { background: var(--bg); }
  .card h3 { font-size: 1.15rem; margin-bottom: 10px; }
  .card p { color: var(--muted); font-size: .97rem; }

  .about {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 56px;
    align-items: start;
  }

  .about-fig { margin: 0; }

  .about-fig figcaption {
    margin-top: 5px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
  }

  .about-img {
  width: 100%;
  aspect-ratio: 3 / 4;      /* Hochformat */
  object-fit: cover;
  border-radius: 20px;
  display: block;
  }

  .facts { list-style: none; border-top: 1px solid var(--line); }

  .facts li {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
  }

  .facts span {
    display: block;
    color: var(--ink);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .facts p { margin: 0; }

  .facts strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin: 16px 0 4px;
  }

  .steps { counter-reset: s; margin-top: 48px; display: grid; gap: 0; }
  .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
  }
  .step::before {
    counter-increment: s;
    content: "0" counter(s);
    font-size: 1.4rem;
    color: var(--accent);
    font-weight: 600;
  }
  .step h3 { font-size: 1.1rem; margin-bottom: 4px; }
  .step p { color: var(--muted); }
  
	  /* ---------- Flip-Kacheln ---------- */
	.flip {
        perspective: 1000px;
        height: 200px;
        cursor: pointer;
        outline: none;
        counter-increment: flipnr;
        -webkit-tap-highlight-color: transparent;  /* NEU, optional: kein graues Antippen-Highlight auf iOS */
	}
	.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;   /* NEU */
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.4, .2, .2, 1);
    -webkit-transition: -webkit-transform .6s cubic-bezier(.4, .2, .2, 1); /* NEU */
	}

	.flip.flipped .flip-inner {
    -webkit-transform: rotateY(180deg);     /* NEU */
    transform: rotateY(180deg);
  }

  .flip-face::before {
    content: counter(flipnr, decimal-leading-zero);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 350px;
    line-height: 1;
    font-weight: 700;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .flip-front::before { color: rgba(63, 89, 120, 0.05); }
  .flip-back::before  { color: rgba(255, 255, 255, 0.05); }

  .flip-face > * { 
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
  }

	.flip-face {
	  position: absolute;
	  inset: 0;
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	  padding: 26px;
	  border: 1px solid var(--line);
	  border-radius: 20px;
    overflow: hidden;
	  -webkit-backface-visibility: hidden;
	  backface-visibility: hidden;
    -webkit-transform: rotateY(0deg);   /* NEU: erzwingt eigene 3D-Ebene in Safari */
    transform: rotateY(0deg);           /* NEU */
	}

  .flip-face::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent);
    pointer-events: none;
    z-index: 2;
  }

	.flip-front {
	  background: var(--paper);
	  align-items: center;
	  text-align: center;
	}
	.flip-front h3 { font-size: 1.25rem; }
	.flip-hint {
	  margin-top: 12px;
	  font-size: .75rem;
	  letter-spacing: .12em;
	  text-transform: uppercase;
	  color: var(--accent);
	  opacity: .8;
	}
	.flip-back {
	  background: var(--accent);
	  color: #fff;
	  transform: rotateY(180deg);
	  border-color: var(--accent);
    -webkit-transform: rotateY(180deg);  /* NEU */
	}
	.flip-back h3 { font-size: 1.05rem; margin-bottom: 10px; color: #fff; }
	.flip-back p { font-size: .97rem; color: #e3ecf3; }

	.flip:hover .flip-front { box-shadow: 0 6px 18px rgba(31, 42, 55, .12); }
	.flip:focus-visible .flip-face { outline: 2px solid var(--accent); outline-offset: 3px; }

	@media (prefers-reduced-motion: reduce) {
	  .flip-inner { transition: none; }
	}
  

  /* ---------- Footer ---------- */
  footer {
    background: var(--accent-dark);
    color: #dbe6ee;
    padding: 50px 0 30px;
    position: relative;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 56px;
  }
  footer h2 { color: #fff; font-size: 1.6rem; margin-bottom: 16px; }
  footer p { color: #b9cad7; margin-bottom: 10px; }
  footer p a { color: #fff; }
  .legal { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px 22px; }
  .legal a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.35);
    font-size: .92rem;
    cursor: pointer;
  }
  .legal a:hover { border-color: #fff; }

  form { display: grid; gap: 14px; }
  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  label { display: block; font-size: .8rem; margin-bottom: 4px; color: #b9cad7; }
  input, textarea {
    width: 100%;
    padding: 11px 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 3px;
    color: #fff;
    font: inherit;
  }
  input:focus, textarea:focus { outline: none; border-color: #fff; background: rgba(255,255,255,.13); }
  textarea { min-height: 120px; resize: vertical; }
  form button {
    justify-self: start;
    padding: 12px 28px;
    background: var(--btn-call-to-action-bg);
    color: var(--accent-light);
    border: 0;
    border-radius: 20px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  form button:hover { 
    background: var(--btn-call-to-action-bg-hover); 
    color: var(--accent-dark);
  }

  form button:disabled { opacity: .6; cursor: wait; }

  .privacy-note { font-size: .8rem; color: #9fb4c3; }
  .privacy-note a { color: #fff; cursor: pointer; }

  /* Honeypot-Feld (Spamschutz) – für Besucher unsichtbar */
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .form-status { min-height: 1.4em; font-size: .92rem; }
  .form-status.ok  { color: #9fe3b4; }
  .form-status.err { color: #ffb4b4; }

  /* ---------- Navigation (unten fixiert) ---------- */
  nav {
    position: fixed;
    left: 0; right: 0; top: 0;
    height: var(--nav-h);
    background: var(--accent-dark);
    border-bottom: 1px solid rgba(255,255,255,.12);
    z-index: 100;
    display: flex;
    align-items: center;
  }
  nav.at-end { border-bottom-color: transparent; }

  .nav-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .02em;
  }

  .logo img {
  display: block;
  height: 100px;      /* Höhe nach Bedarf anpassen, z. B. 30–44px */
  width: auto;       /* Breite ergibt sich aus dem Seitenverhältnis 87,7 : 29,8 */
  aspect-ratio: 89.1 / 28.3;
  }

  .logo small { display: block; font-weight: 400; font-size: .7rem; color: #a9bccb; letter-spacing: .12em; text-transform: uppercase; }
  nav ul { list-style: none; display: flex; gap: 30px; }
  nav ul a {
    color: #cfdce6;
    text-decoration: none;
    font-size: 1.25rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
  }
  nav ul a:hover { color: #fff; border-bottom-color: #fff; }

  /* Hamburger-Button (nur Mobil sichtbar) */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 310;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

/* Zustand "offen": Hamburger wird zum X */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

  /* ---------- Overlay-Fenster (Impressum / Disclaimer / Datenschutz) ---------- */
  .overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 24px) 24px 24px;
    background: rgba(12, 28, 40, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .overlay.open { opacity: 1; visibility: visible; }

  .modal {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 100%;
    overflow-y: auto;
    padding: 44px 44px 40px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .15);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
  }
  .overlay.open .modal { transform: none; opacity: 1; }

  .modal h2 { font-size: 1.8rem; margin-bottom: 22px; }
  .modal h3 { font-size: 1.05rem; margin: 22px 0 6px; }
  .modal p, .modal li { margin-bottom: 10px; color: rgba(255, 255, 255, .92); font-size: .97rem; }
  .modal ul { padding-left: 20px; margin-bottom: 10px; }
  .modal a { color: #fff; }

  .modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
  }
  .modal-close:hover { background: rgba(255, 255, 255, .28); }

  .modal::-webkit-scrollbar { width: 8px; }
  .modal::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 8px; }

  @media (max-width: 760px) {
    .hero-ref h2 { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-ref { padding-left: 28px; padding-right: 28px; } 
    :root { --nav-h: 100px; }
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: clamp(2.55rem, 6.375vw, 4.335em); }
    .about, .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .row { grid-template-columns: 1fr; }
    .logo small { display: none; }
    .block { padding: 64px 0; }
    .slogan { letter-spacing: .15em; font-size: .75rem; }
    .modal { padding: 36px 24px 28px; border-radius: 18px; }
    .logo img { height: 70px; }
      .nav-toggle { display: block; }

  /* Overlay mit den 4 Menüpunkten */
  nav ul {
    position: fixed;
    inset: 0;
    z-index: 300;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    background: rgba(63, 89, 120, .97);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  nav ul.open {
    opacity: 1;
    visibility: visible;
  }
  nav ul a {
    font-size: 1.5rem;
    color: #fff;
  }

  /* Logo bleibt über dem Overlay sichtbar */
  .logo { position: relative; z-index: 310; }

  body.menu-open { overflow: hidden; }
  }