:root {
  --yellow: #ffd60a;
  --yellow-soft: #fff3b0;
  --ink: #111111;
  --paper: #f6f3ec;
  --concrete: #e7e2d8;
  --muted: #5b574f;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Segoe UI Black", "Helvetica Neue", Impact, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.smiley { width: 40px; height: 40px; flex: none; }
.smiley.small { width: 22px; height: 22px; vertical-align: -5px; margin-right: .35em; }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  background: rgba(246, 243, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-size: 1.1rem; }
.brand em { font-style: normal; background: var(--yellow); padding: 0 .25em; }
.top nav { display: flex; gap: .3rem; }
.top nav a {
  text-decoration: none; font-weight: 700; padding: .4rem .8rem; border-radius: 999px;
}
.top nav a:hover, .top nav a:focus-visible { background: var(--yellow); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font: 700 1rem/1 var(--font);
  padding: .85rem 1.3rem; border-radius: 999px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--yellow); }
.btn-ink:hover { box-shadow: 3px 3px 0 var(--yellow), 3px 3px 0 1px var(--ink); }

/* Einstieg */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  max-width: 1320px; margin: 0 auto;
}
.kicker { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .8rem; margin: 0 0 1rem; color: var(--muted); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.hero h1::after {
  content: ""; display: block; width: 3.2em; height: .22em; margin-top: .25em;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px;
}
.lead { font-size: 1.2rem; max-width: 36em; }
.stats { display: flex; gap: clamp(1.2rem, 4vw, 3rem); margin: 2rem 0; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.stats dd { margin: 0; color: var(--muted); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-collage {
  position: relative; aspect-ratio: 1 / 1; max-width: 560px; justify-self: center; width: 100%;
}
.hero-collage img {
  position: absolute; width: 46%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 6px solid #fff; box-shadow: 0 12px 30px rgba(0,0,0,.18);
  border-radius: 4px; background: var(--concrete);
}
.hero-collage img:nth-child(1) { left: 2%;  top: 6%;  transform: rotate(-7deg); }
.hero-collage img:nth-child(2) { left: 50%; top: 0;   transform: rotate(5deg); }
.hero-collage img:nth-child(3) { left: 27%; top: 38%; transform: rotate(-2deg); z-index: 2; }
.hero-collage img:nth-child(4) { left: 58%; top: 50%; transform: rotate(8deg); width: 38%; }

/* Abschnitte */
.block { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem); max-width: 1320px; margin: 0 auto; }
.block-head { margin-bottom: 1.5rem; }
.block-head > p { max-width: 46em; color: var(--muted); margin: 0; }

/* Karte */
.map-wrap { position: relative; }
#map {
  height: min(72vh, 680px); min-height: 380px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--concrete);
}
.locate { position: absolute; z-index: 500; right: 14px; bottom: 26px; }

.pin { background: none; border: 0; }
.pin svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); transition: transform .15s; }
.pin:hover svg { transform: scale(1.25); }
.pin.active svg { transform: scale(1.5); }

.cluster {
  display: grid; place-items: center;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 50%;
  font: 800 14px/1 var(--font);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.leaflet-popup-content-wrapper { border-radius: 12px; border: 2px solid var(--ink); }
.leaflet-popup-content { margin: 10px; font: 15px/1.4 var(--font); }
.popup { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; width: 250px; }
.popup img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.popup strong { display: block; font-size: 1rem; }
.popup span { color: var(--muted); font-size: .85rem; }
.popup button {
  margin-top: 6px; padding: 5px 10px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--yellow); font: 700 .85rem var(--font); cursor: pointer;
}

/* Galerie */
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.search input {
  font: 1rem var(--font); padding: .75rem 1.1rem; width: min(320px, 80vw);
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
}
.search input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button {
  font: 700 .9rem var(--font); padding: .45rem .8rem; border-radius: 999px;
  border: 2px solid var(--ink); background: transparent; cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.chips button:hover:not([aria-pressed="true"]) { background: var(--yellow-soft); }
.result-count { margin: 1rem 0 0; color: var(--muted); font-weight: 600; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px;
}
.grid button {
  all: unset; display: block; width: 100%; cursor: pointer; position: relative;
  border-radius: 10px; overflow: hidden; background: var(--concrete);
  aspect-ratio: 3 / 4;
}
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.grid button:hover img, .grid button:focus-visible img { transform: scale(1.06); }
.grid button:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }
.grid .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem .7rem .6rem; color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.25;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.grid .cap small { display: block; font-weight: 500; opacity: .85; }
.grid .nomap::after {
  content: "ohne Ort"; position: absolute; top: 8px; left: 8px;
  font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(255,255,255,.9);
}
.empty { grid-column: 1 / -1; padding: 2rem; text-align: center; color: var(--muted); }

/* Über OZ */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.about-text p { font-size: 1.1rem; max-width: 38em; }
.rip { border-left: 6px solid var(--yellow); padding: .3rem 0 .3rem 1rem; font-weight: 600; }
.about-links {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 1.5rem; align-self: start; box-shadow: 6px 6px 0 var(--yellow);
}
.about-links h3 { font-size: 1.15rem; margin-top: .4rem; }
.about-links h3 + ul { margin-bottom: 1.4rem; }
.about-links ul { list-style: none; padding: 0; margin: 0; }
.about-links li { padding: .5rem 0; border-bottom: 1px solid var(--concrete); }
.about-links li:last-child { border: 0; }
.about-links span { display: block; color: var(--muted); font-size: .88rem; }

/* Fußzeile */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem); border-top: 2px solid var(--ink);
  background: var(--ink); color: #ddd; font-size: .95rem;
}
.foot p { margin: 0; }
.foot a { color: var(--yellow); }

/* Bildbetrachter */
dialog {
  padding: 0; border: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%;
  max-height: 94vh; overflow: visible;
}
dialog::backdrop { background: rgba(17,17,17,.82); backdrop-filter: blur(3px); }
.viewer-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  background: var(--paper); border-radius: var(--radius); overflow: hidden; max-height: 94vh;
}
.viewer-photo { margin: 0; background: #1b1b1b; display: grid; place-items: center; min-height: 300px; }
.viewer-photo img { max-height: 90vh; width: 100%; object-fit: contain; }
.viewer-info { padding: 2rem 4rem 1.4rem 1.6rem; display: flex; flex-direction: column; overflow-y: auto; }
.viewer-info h3 { font-size: 1.8rem; }
.viewer-meta { margin: 0 0 .6rem; color: var(--muted); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
#viewer-desc { margin: 0 0 1.2rem; }
#viewer-desc:empty { display: none; }
.viewer-actions { display: flex; flex-direction: column; gap: .6rem; }
.viewer-nav { margin: auto 0 0; padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 600; }
.viewer-nav button, .viewer-close {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink);
  background: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.viewer-nav button:hover { background: var(--yellow); }
.viewer-close { position: absolute; top: 12px; right: 12px; background: var(--yellow); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-collage { max-width: 420px; }
  .about { grid-template-columns: 1fr; }
  .viewer-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .viewer-photo img { max-height: 60vh; }
  .top nav a { padding: .4rem .55rem; font-size: .9rem; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats { gap: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
