/* header.css – unverändert aus der ursprünglichen style.css übernommen */

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--color-heading);
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    font-family: var(--font-body);
    color: var(--color-text);
    text-decoration: none;
    transition: 0.3s;
}

nav a:hover {
    color: var(--color-accent);
}


.legal-header {
    text-align: center;
    padding-top: 25px;
    padding-bottom: 20px;
}

.legal-logo a {
    font-family: var(--font-heading);
    display: inline-block;
    font-size: 4rem;
    color: black;
    text-align: center;
    position: relative;
    letter-spacing: 2px;
    padding-bottom: 15px; /* neu */
    margin-bottom: 10px;  /* neu */
    margin-top: 0px;
}

.legal-logo a::after {
    content: "";
    display: block;
    width: 620px;
    height: 1px;
    background: var(--color-heading);
    margin: 10px auto 0;
}

.legal-nav ul {
    display: flex;
    justify-content: center;

    gap: 40px;

    list-style: none;

    margin-top: 15px;
    padding: 0;
}

.legal-nav a {
    font-size: 16px;
    font-weight: 300;
    color: #6d7076;
}


.hero-nav a.active,
.legal-nav a.active {
    position: relative;
}

.hero-nav a.active::after,
.legal-nav a.active::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -6px;

    width: 100%;
    height: 1px;

    background: currentColor;
}



/* Mobile Navigation – Startseite und Unterseiten */
.mobile-menu-toggle,
.mobile-navigation { display: none; }

@media (max-width: 1024px),
       (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
    .hero-nav, .legal-nav { display: none !important; }

    .mobile-menu-toggle {
        position: absolute;
        right: clamp(18px, 4vw, 36px);
        top: 27px;
        z-index: 32;
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 0;
        padding: 8px;
        background: transparent;
        cursor: pointer;
        color: #fff;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 1.5px;
        background: currentColor;
        transition: transform .25s ease, opacity .25s ease;
    }
    .mobile-navigation {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 30;
        align-items: center;
        justify-content: center;
        background: #fff;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .3s ease, visibility .3s ease;
    }
    .mobile-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(22px, 4vh, 40px);
        padding: 90px 20px 40px;
        margin: 0;
        list-style: none;
    }
    .mobile-navigation a {
        color: var(--color-heading);
        font-family: var(--font-body);
        font-size: clamp(19px, 3vw, 25px);
        font-weight: 300;
        letter-spacing: .04em;
    }
    .mobile-navigation a[aria-current="page"] {
        border-bottom: 1px solid currentColor;
        padding-bottom: 5px;
    }
    .mobile-navigation a:focus-visible,
    .mobile-menu-toggle:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 5px;
    }
    body.mobile-menu-open { overflow: hidden; }
    body.mobile-menu-open .mobile-navigation {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    body.mobile-menu-open .mobile-menu-toggle {
        color: var(--color-heading);
        position: fixed;
    }
    body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
    body.mobile-menu-open .hero-overlay { z-index: 40; }

    /* Nur Unterseiten: Logo und Menü auf einer Zeile */
    .legal-header {
        box-sizing: border-box;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 84px;
        padding: 16px 20px;
        text-align: left;
        border-bottom: 1px solid var(--color-heading, #151616);
    }
    .legal-header .legal-logo { min-width: 0; }
    .legal-header .legal-logo a {
        display: block;
        max-width: none;
        margin: 0;
        padding: 0;
        font-size: clamp(26px, 4.4vw, 42px);
        line-height: 1.05;
        letter-spacing: 1px;
        white-space: nowrap;
    }
    .legal-header .legal-logo a::after { display: none; }
    .legal-header .mobile-menu-toggle {
        position: relative;
        top: auto;
        right: auto;
        flex: 0 0 44px;
        margin-left: 12px;
        color: #151616;
    }
    .legal-header .mobile-menu-toggle span { background: currentColor; }
    body.mobile-menu-open .legal-header { z-index: 40; }
    body.mobile-menu-open .legal-header .mobile-menu-toggle {
        position: fixed;
        top: 27px;
        right: clamp(18px, 4vw, 36px);
        color: #151616;
    }
    /* Startseiten-Hamburger bleibt weiß, bis das Menü geöffnet ist. */
    body:not(.mobile-menu-open) .hero-overlay .mobile-menu-toggle,
    body:not(.mobile-menu-open) .hero-header .mobile-menu-toggle {
        color: #fff;
    }
}

@media (max-width: 380px) {
    .legal-header { padding-left: 16px; padding-right: 16px; }
    .legal-header .legal-logo a { font-size: 25px; }
}

/* Visual Moments wird bereits als HTML-Element ausgegeben. */
.legal-logo::after { content: none; }
.legal-brand-subtitle {
    display: block;
    font-family: "Allura", cursive;
    font-size: 2.15rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #393c40;
    text-align: center;
    margin: -2px auto 0;
}
@media (max-width: 1024px),
       (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
    .legal-brand-subtitle {
        font-size: clamp(1.25rem, 3.2vw, 1.75rem);
        text-align: left;
        margin: 3px 0 0;
    }
}

/* Mobile/Tablet: Marke exakt zur Viewportmitte ausrichten. */
@media (max-width: 1024px),
       (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
    .legal-header { justify-content: center; text-align: center; padding-top: 16px; padding-bottom: 16px; }
    .legal-header .legal-logo { width: max-content; max-width: calc(100% - 112px); margin: 0 auto; text-align: center; }
    .legal-header .legal-logo a { text-align: center; }
    .legal-header .legal-brand-subtitle { text-align: center; margin: 3px auto 0; }
    .legal-header .mobile-menu-toggle { position: absolute; right: 20px; top: 16px; margin: 0; }
}
@media (max-width: 380px) {
    .legal-header .legal-logo a { font-size: clamp(19px, 6.2vw, 25px); }
}


/* Kompakter Header ausschließlich auf Unterseiten.
   Die Startseite (.hero-overlay/.hero-header) bleibt unverändert. */
@media (min-width: 1025px) {
    .legal-header { padding-top: 15px; padding-bottom: 14px; }
    .legal-logo a {
        font-size: 3rem;
        padding-bottom: 0;
        margin-bottom: 0;
        line-height: 1.08;
    }
    .legal-logo a::after { display: none; }
    .legal-brand-subtitle {
        font-size: 1.65rem;
        margin: 0 auto;
        line-height: 1;
    }
    .legal-nav ul { margin-top: 8px; }
}
/* Auch bei Touch-Geräten im Querformat gelten die kompakten Mobilregeln. */
@media (max-width: 1024px),
       (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
    .legal-header { min-height: 74px; padding-top: 10px; padding-bottom: 10px; }
    .legal-header .legal-logo a { line-height: 1.05; }
    .legal-header .legal-brand-subtitle {
        font-size: clamp(1.1rem, 3vw, 1.55rem);
        margin-top: 1px;
    }
    .legal-header .mobile-menu-toggle { top: 50%; transform: translateY(-50%); }
    body.mobile-menu-open .legal-header .mobile-menu-toggle { top: 27px; transform: none; }
}

/* Unterseiten: Aktiven Menüpunkt dezent kennzeichnen.
   Der bisherige Abstand von 40px bleibt unverändert. */
.legal-nav a[aria-current="page"] { position: relative; }
.legal-nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
    height: 1px; background: currentColor;
}

/* Phase 6: Wortmarke auf allen Unterseiten mittig */
.legal-header .legal-logo{display:flex;flex-direction:column;align-items:center;text-align:center;margin-inline:auto}
.legal-header .legal-logo a,.legal-header .legal-brand-subtitle{text-align:center}

/* Phase 7: Burger-Icon auf Smartphone und Tablet im Visual-Moments-Braun.
   Auch das Schliessen-X bleibt auf dem hellen Menue gut sichtbar. */
@media (max-width: 1024px),
       (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
    .mobile-menu-toggle,
    .legal-header .mobile-menu-toggle,
    .hero .mobile-menu-toggle,
    body:not(.mobile-menu-open) .hero-overlay .mobile-menu-toggle,
    body:not(.mobile-menu-open) .hero-header .mobile-menu-toggle,
    body.mobile-menu-open .mobile-menu-toggle,
    body.mobile-menu-open .hero .mobile-menu-toggle {
        color: #8e7965 !important;
    }
    .mobile-menu-toggle span,
    .legal-header .mobile-menu-toggle span,
    .hero .mobile-menu-toggle span {
        background-color: currentColor !important;
    }
}

/* Phase 8: auf Desktop Navigation wieder unter der zentrierten Wortmarke */
@media (min-width:1025px) and (pointer:fine), (min-width:1367px) {
  .legal-header {display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
  .legal-header .legal-logo {margin-inline:auto;}
  .legal-header .legal-nav {width:100%;}
  .legal-header .legal-nav ul {justify-content:center;}
}

/* Einheitliche Headerfarben und korrektes Schliessen-X im mobilen Overlay */
.legal-logo a,.legal-nav a,.hero-nav a{color:var(--vm-ink)}
.legal-brand-subtitle{color:var(--vm-brown)}
.legal-nav a:hover,.hero-nav a:hover{color:var(--vm-brown)}
@media (max-width:1024px), (max-width:1366px) and (orientation:landscape) and (pointer:coarse){
 .mobile-navigation{background:var(--vm-paper);z-index:2000}
 .mobile-navigation a{color:var(--vm-ink)}
 body.mobile-menu-open .mobile-menu-toggle,
 body.mobile-menu-open .legal-header .mobile-menu-toggle{
  position:fixed !important;top:max(18px,env(safe-area-inset-top)) !important;
  right:max(18px,env(safe-area-inset-right)) !important;left:auto !important;
  margin:0 !important;transform:none !important;z-index:2002 !important;
  color:var(--vm-brown) !important;
 }
 body.mobile-menu-open .mobile-menu-toggle span{background-color:currentColor !important}
 body.mobile-menu-open .legal-header{z-index:2001}
}


/* Phase 13 – einheitliche Wortmarke und Navigation auf allen Unterseiten */
.legal-header {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 23px 24px 14px;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.legal-header .legal-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  margin: 0 auto;
}
.legal-header .legal-logo a {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(25px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: .07em;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  color: #292824;
}
.legal-header .legal-logo a::after { display: none; }
.legal-header .legal-brand-subtitle {
  font-family: "Allura", cursive;
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1;
  margin: 3px 0 0;
  color: #8e7965;
}
.legal-header .legal-nav { width: 100%; }
.legal-header .legal-nav ul {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 0;
  padding: 0;
}
.legal-header .legal-nav a {
  font-family: "Lato", sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #514b45;
}
@media (max-width: 1024px), (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
  .legal-header {
    min-height: 0;
    padding: 18px 16px;
    border: 0;
    gap: 0;
  }
  .legal-header .legal-nav { display: none !important; }
  .legal-header .legal-logo a { font-size: clamp(22px, 5vw, 34px); }
  .legal-header .legal-brand-subtitle { font-size: clamp(22px, 4vw, 30px); }
  .legal-header .mobile-menu-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    left: auto;
    margin: 0;
    transform: translateY(-50%);
  }
}
@media (max-width: 420px) {
  .legal-header .legal-logo a { font-size: clamp(19px, 5.5vw, 24px); }
}


/* Einheitliche Wortmarke/Trennlinie – zentral für alle Seiten */
.vm-shared-header .legal-logo::after {
  content: "";
  display: block;
  width: min(380px, 75vw);
  height: 1px;
  margin: 10px auto 0;
  background: rgba(142,121,101,.55);
}
.vm-shared-header .legal-logo { gap: 0; }
.vm-shared-header .legal-nav a[aria-current="page"] { text-decoration: none; }
@media (max-width: 650px) {
  .vm-shared-header .legal-logo::after { width: min(260px,70vw); margin-top: 8px; }
}


/* Mobile Navigation: blickdichte, viewportfüllende Fläche oberhalb der Seite.
   Explizite Farbe statt nicht überall definierter --vm-paper Variable. */
@media (max-width: 1024px), (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
  body.mobile-menu-open .vm-shared-header { z-index: 9998 !important; }
  .vm-shared-header .mobile-navigation {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    background: #faf7f1 !important;
    background-image: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999 !important;
  }
  body.mobile-menu-open .vm-shared-header .mobile-navigation {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  body.mobile-menu-open .vm-shared-header .mobile-menu-toggle {
    z-index: 10000 !important;
  }
}

/* Safari: Overlay auch bei dynamischen Browserleisten vollflächig halten. */
@media (max-width: 1024px), (max-width: 1366px) and (orientation: landscape) and (pointer: coarse) {
  .vm-shared-header .mobile-navigation {
    box-sizing: border-box !important;
    max-height: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.mobile-menu-open { overflow: hidden; }
}
