/* Nav — final lock layer (load last on every page) */

:root {
  --nav-padding-top: 44px;
  /* ~5 cm Abstand links/rechts */
  --nav-edge-x: 5cm;
}

html {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

body {
  overflow-x: clip;
}

/* Nav scrollt mit — kein fixed, kein Gradient */
html body header.nav {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  inset: 0 0 auto 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  z-index: 10000 !important;
  transform: none !important;
  zoom: 1;
  font-size: var(--nav-link-size) !important;
  isolation: isolate;
  padding: var(--nav-padding-top) var(--nav-edge-x) 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

html body header.nav::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

html body header.nav .nav-inner,
html body header.nav .nav-logo,
html body header.nav .nav-toggle {
  position: relative !important;
  z-index: 2 !important;
}

html body header.nav .nav-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 2.5rem !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  min-height: var(--nav-logo-height) !important;
  box-sizing: border-box !important;
}

html body header.nav .nav-logo {
  flex: 0 0 auto !important;
  display: block !important;
  line-height: 0 !important;
  width: auto !important;
  min-width: 0 !important;
}

html body header.nav .nav-logo img {
  display: block !important;
  height: var(--nav-logo-height) !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  object-fit: contain !important;
}

html body header.nav .nav-drawer {
  position: relative !important;
  z-index: 1 !important;
  flex: 0 1 auto !important;
}

html body header.nav .menu {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: var(--nav-menu-gap) !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

html body header.nav .menu li {
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
}

html body header.nav .menu a,
html body header.nav .menu a:focus {
  display: block !important;
  font-family: Roboto, Arial, sans-serif !important;
  font-size: var(--nav-link-size) !important;
  font-weight: 400 !important;
  font-synthesis: none !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  transform: none !important;
  zoom: 1;
  color: #d8dce2 !important;
  padding: 0.2rem 0 !important;
  border-bottom: 2px solid transparent !important;
  white-space: nowrap !important;
}

html body header.nav .menu a:hover,
html body header.nav .menu a:focus-visible {
  color: #fff !important;
  border-bottom-color: var(--y) !important;
}

html body header.nav .menu a.on {
  color: #fff !important;
  font-weight: 600 !important;
  border-bottom-color: var(--y) !important;
}

@media (max-width: 1129px) {
  :root {
    --nav-edge-x: clamp(16px, 4vw, 28px);
    --nav-logo-height: 38px;
  }

  html body header.nav .nav-inner {
    gap: 1rem !important;
  }

  html body header.nav .nav-logo img {
    height: var(--nav-logo-height) !important;
    max-width: min(46vw, 168px) !important;
    width: auto !important;
  }

  html body header.nav .nav-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10002 !important;
    border: 1px solid rgba(255, 226, 0, 0.55) !important;
    background: rgba(6, 8, 12, 0.82) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }

  html body header.nav .nav-toggle span {
    background: #fff !important;
  }

  html body header.nav .nav-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    z-index: 10001 !important;
    width: min(340px, calc(100vw - 1.5rem)) !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(5.5rem + 1cm) 1.75rem 2rem !important;
    flex: none !important;
    background:
      linear-gradient(180deg, rgba(255, 226, 0, 0.06) 0%, transparent 18%),
      rgba(6, 8, 12, 0.97) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45) !important;
    transform: translateX(105%) !important;
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html body.nav-open header.nav .nav-drawer {
    transform: translateX(0) !important;
  }

  html body header.nav .menu {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
  }

  html body header.nav .menu li {
    width: 100% !important;
  }

  html body header.nav .menu a,
  html body header.nav .menu a.on,
  html body header.nav .menu a:focus {
    width: 100% !important;
    padding: 0.95rem 0 !important;
    white-space: normal !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  html body header.nav .menu a.on {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 3px 0 0 var(--y);
    padding-left: 0.75rem !important;
  }

  html body header.nav .menu li:last-child a {
    border-bottom: none !important;
  }

  html body .nav-backdrop {
    z-index: 9998 !important;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-logo-height: 34px;
  }

  html body header.nav .nav-logo img {
    max-width: min(42vw, 150px) !important;
  }
}

@media (min-width: 1130px) {
  html body header.nav .nav-toggle {
    display: none !important;
  }
}
