/* WIST-IT — dauerhaft weißer Header, Hero mit getrenntem Slider-Footer.
   Bitte nach assets/style.css einbinden. Stand: 19.10.2026. */

:root {
  --wist-header-height: 78px;
  --wist-slider-footer-height: 79px;
}

/* Header — deckender Hintergrund in JEDEM Zustand, auch beim Scrollen. */
html body > .site-header,
html body > .site-header.is-scrolled,
html body > .site-header.detail-header,
html body > .site-header.detail-header.is-scrolled {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  box-sizing: border-box !important;
  height: var(--wist-header-height) !important;
  min-height: var(--wist-header-height) !important;
  z-index: 5000 !important;
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  opacity: 1 !important;
  color: #111815 !important;
  mix-blend-mode: normal !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate !important;
  border-bottom: 1px solid rgba(13, 20, 17, .12) !important;
  box-shadow: 0 2px 10px rgba(13, 20, 17, .055) !important;
}

/* Der Zusatzlayer verhindert, dass andere Hover-/Scroll-Regeln durchscheinen. */
html body > .site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff !important;
  pointer-events: none;
}

html body > .site-header .desktop-nav,
html body > .site-header .desktop-nav a,
html body > .site-header .header-contact,
html body > .site-header .menu-toggle,
html body > .site-header .detail-back {
  color: #111815 !important;
}
html body > .site-header .brand img {
  filter: none !important;
  opacity: 1 !important;
}

/* Wichtig: eigener Stack; der Header soll auch über dem Slider liegen. */
html body > #mobile-menu {
  z-index: 4999 !important;
}
html body > .skip-link {
  z-index: 5001 !important;
}

/* Der Hero wird in zwei Layout-Zeilen getrennt: Inhalt + Navigation.
   Dadurch kann die Beschreibung niemals hinter den Tabs liegen. */
html body .hero {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-content: stretch !important;
  padding-top: var(--wist-header-height) !important;
  min-height: 100vh !important;
  min-height: 100svh !important;
  height: auto !important;
}
html body .hero-stage {
  grid-row: 1 !important;
  position: relative !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: max(400px, calc(100svh - var(--wist-header-height) - var(--wist-slider-footer-height))) !important;
  max-height: none !important;
}
html body .hero .slide {
  box-sizing: border-box !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr) !important;
  gap: clamp(24px, 4vw, 85px) !important;
  align-items: center !important;
  padding: 45px var(--pad, 4vw) 24px !important;
}
html body .hero .slide-copy {
  box-sizing: border-box !important;
  position: relative !important;
  min-width: 0 !important;
  max-width: 100% !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
html body .hero .slide .eyebrow {
  margin: 0 0 clamp(10px, 1.6svh, 20px) !important;
  font-size: 11px;
}
html body .hero .slide h1,
html body .hero .slide h2 {
  /* Viewport-Höhe begrenzt die Schrift — entscheidend bei 1875 × 638. */
  font-size: clamp(38px, min(6.1vw, 9.1svh), 110px) !important;
  line-height: .93 !important;
  margin: 0 !important;
  letter-spacing: -.055em;
  text-wrap: pretty;
}
html body .hero .slide .lead {
  max-width: 620px !important;
  margin: clamp(11px, 2svh, 26px) 0 clamp(10px, 1.8svh, 24px) !important;
  font-size: clamp(14px, min(1.15vw, 2.55svh), 20px) !important;
  line-height: 1.43 !important;
}
html body .hero .slide .text-link {
  font-size: 11px !important;
  padding-bottom: 6px;
}
html body .hero .slide-media {
  box-sizing: border-box !important;
  min-height: 280px !important;
  height: min(61svh, 690px) !important;
  max-height: calc(100% - 20px) !important;
}
html body .hero-kicker {
  top: calc(var(--wist-header-height) + 16px) !important;
  z-index: 11 !important;
}

/* Tatsächlich unter dem Slide-Inhalt – keine position:absolute-Überlagerung. */
html body .hero .slider-nav {
  box-sizing: border-box !important;
  grid-row: 2 !important;
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: var(--wist-slider-footer-height) !important;
  margin: 0 var(--pad, 4vw) !important;
  padding: 9px 0 15px !important;
  z-index: 13 !important;
  align-self: end !important;
  background: #0e1412 !important;
}
html body .hero .slider-tabs button {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Kurze Desktopfenster benötigen kompaktere Abstände, keine Überlagerungen. */
@media (min-width: 761px) and (max-height: 740px) {
  html body .hero-stage {
    min-height: max(440px, calc(100svh - var(--wist-header-height) - var(--wist-slider-footer-height))) !important;
  }
  html body .hero .slide {
    padding-top: 28px !important;
    padding-bottom: 16px !important;
  }
  html body .hero .slide h1,
  html body .hero .slide h2 {
    font-size: clamp(37px, min(5.7vw, 8.6svh), 73px) !important;
  }
  html body .hero .slide .lead {
    font-size: clamp(13px, 2.45svh, 17px) !important;
    margin: 10px 0 11px !important;
  }
  html body .hero .slide-media {
    height: min(60svh, 420px) !important;
    min-height: 300px !important;
  }
}

/* Mobile: Bild zuerst, Text danach, Navigation als eigener Block darunter. */
@media (max-width: 760px) {
  :root {
    --wist-header-height: 70px;
    --wist-slider-footer-height: 83px;
  }
  html body .hero-stage {
    min-height: max(690px, calc(100svh - var(--wist-header-height) - var(--wist-slider-footer-height))) !important;
  }
  html body .hero .slide {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: clamp(16px, 3svh, 28px) !important;
    padding: 52px var(--pad, 20px) 25px !important;
  }
  html body .hero .slide-media {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    height: clamp(185px, 27svh, 270px) !important;
  }
  html body .hero .slide-copy {
    order: 2 !important;
    align-self: stretch !important;
  }
  html body .hero .slide h1,
  html body .hero .slide h2 {
    font-size: clamp(35px, 9.2vw, 66px) !important;
  }
  html body .hero .slide .eyebrow {
    margin-bottom: 11px !important;
  }
  html body .hero .slide .lead {
    font-size: 14px !important;
    line-height: 1.44 !important;
    margin: 12px 0 14px !important;
  }
  html body .hero .slider-nav {
    margin: 0 var(--pad, 20px) !important;
    min-height: 74px !important;
    padding-bottom: 14px !important;
  }
  html body .hero-kicker {
    top: calc(var(--wist-header-height) + 12px) !important;
  }
}
@media (max-width: 380px) {
  html body .hero-stage { min-height: 770px !important; }
  html body .hero .slide h1,
  html body .hero .slide h2 {font-size: clamp(31px, 9vw, 42px) !important;}
}
