/* =====================================================================
   Navigation – "Produkt" menu, current section, smooth jumps, mobile menu
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* jump targets land right below the sticky header */
#ueberblick, #workspace, #funktionen, #warum, #early-access { scroll-margin-top: 80px; }
@media (max-width: 720px) { #ueberblick, #workspace, #funktionen, #warum, #early-access { scroll-margin-top: 68px; } }

/* the menu button looks like the other links */
button.nav__link { border: 0; background: none; font: inherit; cursor: pointer; }
.nav__link .chev { transition: transform 200ms var(--ease); }
.nav__link[aria-expanded="true"] { color: var(--text); }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav__link.is-current { color: var(--text); }
.nav__link.is-current::after { transform: scaleX(1); }
.nav__link[aria-disabled="true"] { cursor: default; }

/* ---------- "Produkt" panel ---------- */
.nav__item { position: relative; }
.pm {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 30;
  width: 200px; padding: 6px;
  border-radius: 14px; background: var(--bg);
  box-shadow: 0 0 0 1px var(--border), 0 16px 32px -18px rgba(28, 28, 26, 0.25);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px);
  transition: opacity 160ms var(--ease), transform 200ms cubic-bezier(0.2, 0, 0, 1), visibility 0s linear 200ms;
}
.pm::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }   /* hover bridge */
.pm.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.pm__group + .pm__group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.pm__item {
  display: flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 9px;
  font-size: 14.5px; color: var(--text-2);
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.pm__item:hover { background: rgba(28, 28, 26, 0.05); color: var(--text); }
.pm__item:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

/* dark header (over the dark area) */
.header.is-dark .nav__link.is-current, .header.is-dark .nav__link[aria-expanded="true"] { color: #fff; }
.header.is-dark .pm { background: #1a1a19; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 48px -24px rgba(0, 0, 0, 0.6); }
.header.is-dark .pm__group + .pm__group { border-color: rgba(255, 255, 255, 0.1); }
.header.is-dark .pm__item { color: #c9c6c0; }
.header.is-dark .pm__item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.header.is-dark .pm__item:focus-visible { outline-color: #fff; }

/* ---------- mobile menu ---------- */
@media (max-width: 1100px) {
  .mobile-nav:not([hidden]) { max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain; }
  .mobile-nav__label { margin: 8px 0 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
  .mobile-nav a.mobile-nav__sub { padding: 12px 0; font-size: 17px; }
  .mobile-nav a[aria-disabled="true"] { color: var(--muted); }
  .mobile-nav a.mobile-nav__cta {
    display: flex; align-items: center; justify-content: center; height: 52px; margin-top: 16px; padding: 0;
    border: 0; border-radius: 999px; background: var(--dark); color: #fff; font-size: 16px; font-weight: 500;
  }
  .mobile-nav.is-dark a.mobile-nav__cta { background: #f4f2ee; color: #121212; }
  .mobile-nav.is-dark .mobile-nav__label { color: #8f8d88; }
}
@media (max-width: 720px) { .mobile-nav:not([hidden]) { max-height: calc(100vh - 68px); } }
