/* Reset */
*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--color-bg);
  color:var(--color-fg);
  font-family:var(--font-sans);
  font-weight: var(--font-weight-regular);
  font-size:var(--text-base);
  line-height:1.4;
  overflow: hidden; /* Wir scrollen im Sheet */
}

/* Splash unter allem */
.splash{
  position: fixed;
  inset: 0;
  background: #5a5a5a; /* Platzhalter */
  z-index: 0;
}

/* Menü (dock top/bottom) */
.menu{
  position:fixed;
  left:0; right:0; top:0;
  height:var(--menu-h);
  background:rgba(0,0,0,0.9);
  border-bottom:1px solid var(--color-border);
  z-index: 1000;
  transform:translateY(0);
  transition: transform 180ms ease-out;
}
.menu.dock-bottom{
  transform:translateY(calc(100vh - var(--menu-h)));
  border-bottom:none;
  border-top:1px solid var(--color-border);
}

/* Menüinhalt: 4 Spalten */
.menu__inner.nav{
  height:100%;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  align-items:center;
}

/* Nav-Links: Roboto Black, groß; bei Hover/Active Black Italic + unterstrichen */
.nav__link{
  display:block;
  text-align:center;
  text-decoration:none;
  color:var(--color-fg);
  padding:.35rem .75rem;
  border:none; /* keine weißen Umrandungen */
  font-size: var(--text-nav);
  font-weight: var(--font-weight-black);
  font-style: normal;
}
.nav__link:hover,
.nav__link[aria-current="page"],
.nav__link:focus-visible{
  text-decoration: underline;
  font-style: italic;
  font-weight: var(--font-weight-black);
}

/* SHEET – Content-Panel über dem Bild */
.sheet{
  position: fixed;
  left:0; right:0; bottom:0;
  top: calc(100vh - var(--menu-h)); /* wenn Menü unten */
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  z-index: 500;
  overflow: auto;
  overscroll-behavior: contain;
  transition: top 180ms ease-out;
}
body.dock-top .sheet{ top: var(--menu-h); }
body.dock-bottom .sheet{ top: calc(100vh - var(--menu-h)); }

/* Typo Defaults */
.section{ padding: var(--size-32) var(--size-16); border-bottom:1px solid var(--color-border); }
h1{ font-size: var(--text-2xl); margin:0 0 var(--size-16); font-weight: var(--font-weight-bold); overflow-wrap:anywhere; }
h2{ font-size: var(--text-xl);  margin:0 0 var(--size-12); font-weight: var(--font-weight-bold); }
p { font-size: var(--text-lg); margin:0; max-width: 70ch; }

/* Index-Haupttext: volle Breite, ~45px, Medium 500 */
.index-hero{
  font-size: var(--text-hero);
  font-weight: var(--font-weight-medium);
  max-width: none;
}

/* Demo-Füller (falls benötigt)
.filler{ height: 120vh; background: repeating-linear-gradient(180deg, #000 0px,#000 24px,#0a0a0a 24px,#0a0a0a 48px); }
*/

@media (max-width: 480px){
  :root{ --menu-h: 84px; } /* mobile: etwas kleiner, aber höher als vorher */
}

/* === SNOB Leaflet Popup (vereinheitlicht) === */
:root{
  /* Einheitliche Popup-Breite: min 280px, ideal 32vw, max 420px */
  --popup-w: clamp(220px, 22vw, 300px);
}

.leaflet-container a.leaflet-popup-close-button { display: none; }

.snob-popup.leaflet-popup { border-radius: 0; }

.snob-popup .leaflet-popup-content-wrapper{
  background: var(--color-bg, #000);
  color: var(--color-fg, #fff);
  border-radius: 0;
  padding: 0;
  border: 0px solid var(--color-fg, #fff);
  width: var(--popup-w);           /* << einheitliche Größe */
  max-width: none;                 /* Leaflet-Limit aufheben */
}

.snob-popup .leaflet-popup-content{
  margin: 0;
  width: var(--popup-w);           /* << sichert gleiche Innenbreite */
}

.snob-popup .leaflet-popup-tip{
  background: var(--color-bg, #000);
  box-shadow: none;
}

.snob-popup__link{
  display:block; text-decoration:none; color:inherit;
}

.snob-popup__img{
  display:block; width:100%; height:auto;
  aspect-ratio: 3 / 2;            /* konsistente Bildhöhe */
  object-fit: cover;
}

.snob-popup__body{
  padding: 10px 12px 12px 12px;
  background: var(--color-bg, #000); /* neu: Body sicher schwarz */
}

.snob-popup__title{
  margin:0 0 6px 0;
  font-family: var(--font-strong, "Roboto"), sans-serif;
  font-weight:900;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height:1.15;
  color: var(--color-fg, #fff);
}

.snob-popup__text{
  margin:0;
  font-family: var(--font, "Roboto"), sans-serif;
  font-weight:500;
  font-size: clamp(12px, 1.4vw, 14px);
  line-height:1.35;
  color: var(--color-fg, #fff);
  opacity:.9;
}

/* Pin-Verhalten */
.snob-pin{ cursor:pointer; }
.snob-popup__link:hover .snob-popup__title { text-decoration: underline; }

/* Aktiver Pin schwarz (ohne neues PNG) */
.leaflet-marker-icon.is-active{
  filter: invert(1) brightness(0.9);   /* weiß -> schwarz */
}
