/* manuelmittelpunkt.com – schlicht wie das Original */
/* Schrift: Avenir Next (auf Mac/iPhone vorinstalliert), optisch auf die Größe
   der alten Squarespace-Schrift Proxima Nova angepasst. Keine externen Server. */
@font-face { font-family: "MM Sans"; font-weight: 400; size-adjust: 94.2%; src: local("AvenirNext-Regular"), local("Avenir Next Regular"); }
@font-face { font-family: "MM Sans"; font-weight: 600; size-adjust: 94.2%; src: local("AvenirNext-DemiBold"), local("Avenir Next Demi Bold"); }
@font-face { font-family: "MM Sans"; font-weight: 700; size-adjust: 94.2%; src: local("AvenirNext-Bold"), local("Avenir Next Bold"); }
@font-face { font-family: "MM Sans"; font-weight: 800; size-adjust: 94.2%; src: local("AvenirNext-Heavy"), local("Avenir Next Heavy"); }

:root {
  --ink: #000;
  --muted: #ababab;
  --bg: #fff;
  --gap: 8px;
  --row: 430px;
  --side: 35px;
  --font: "MM Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --text: #777;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.6 var(--font);
  letter-spacing: .31px;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Kopf ---------- */
.site-header {
  padding: 35px var(--side) 0;
  text-align: center;
}
.logo { margin: 0; font-size: 18px; line-height: 1; }
.logo a { display: inline-block; }
.logo img { width: 111px; height: auto; margin: 0 auto; }
.logo-text { font-weight: 700; letter-spacing: .1em; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 4px 15px;
  margin-top: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .66px;
}
.main-nav li { position: relative; }
.main-nav > ul > li { padding-right: 3.2px; }
.main-nav a, .main-nav .sub-toggle { display: block; padding: 2px 0; }
.main-nav li.active > a,
.main-nav li.active > .sub-toggle,
.main-nav a:hover, .main-nav .sub-toggle:hover { color: var(--muted); opacity: 1; }
.main-nav .sub {
  position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  min-width: 130px;
  padding: 8px 14px 10px;
  background: var(--bg);
  text-align: center;
  z-index: 20;
  display: none;
}
.main-nav .sub li.active a { color: var(--muted); }
.main-nav .has-sub:hover .sub,
.main-nav .has-sub:focus-within .sub,
.main-nav .has-sub.open .sub { display: block; }

.menu-toggle { display: none; }

/* ---------- Inhalt ---------- */
.site-main { padding: 28px var(--side) 40px; min-height: 50vh; overflow-x: clip; }

/* Thumbnail-Wand: Reihen gleicher Höhe, Breite nach Seitenverhältnis */
.thumbs {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--gap);
}
.thumb {
  flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row));
  min-width: 0;
}
.thumb a { display: block; background: #f6f6f6; }
.thumb a:hover { opacity: .85; }
.thumb img {
  width: 100%; height: auto;
  aspect-ratio: var(--r);
  object-fit: cover;
}
.thumb-filler { flex: 1000000 1 0; height: 0; }
.thumbs.justified { display: block; position: relative; }
.thumbs.justified .thumb { position: absolute; left: 0; top: 0; }
.thumbs.justified .thumb a, .thumbs.justified .thumb picture { height: 100%; }
.thumbs.justified .thumb img { height: 100%; aspect-ratio: auto; }
.thumbs.animate .thumb { transition: transform .5s cubic-bezier(.2,.7,.2,1), width .5s cubic-bezier(.2,.7,.2,1), height .5s cubic-bezier(.2,.7,.2,1); }
.thumbs.animate { transition: height .5s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { .thumbs.animate .thumb, .thumbs.animate { transition: none; } }
.empty { text-align: center; color: var(--muted); }

/* Großansicht */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 20px var(--side) 0;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  flex: 1; margin: 0; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.lb-stage { position: relative; }
.lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  transition: opacity .2s ease;
}
.lb-stage img.out { opacity: 0; }
/* dezenter Ladepunkt, nur wenn ein Bild länger braucht */
.lb-stage.loading::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--muted);
  animation: lbpulse 1s ease-in-out .3s infinite both; opacity: 0;
}
@keyframes lbpulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.lb-controls {
  flex: none; height: 60px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  color: #555; font-size: 14px; font-weight: 600; letter-spacing: .5px;
}
.lb-controls button { padding: 8px 4px; color: var(--ink); }
.lb-controls button:hover { color: var(--muted); opacity: 1; }
.lb-sep { color: var(--muted); }
.lb-count { margin-left: 22px; color: var(--muted); font-weight: 400; }
/* kein blauer Rahmen bei Maus/Touch, nur bei Tastatur-Bedienung */
.lightbox:focus, .lightbox button:focus:not(:focus-visible) { outline: none; }
.lightbox button:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.lb-close {
  position: absolute; top: 10px; right: 20px;
  font-size: 30px; line-height: 1; color: var(--ink);
  width: 44px; height: 44px; z-index: 2;
}
body.lb-open { overflow: hidden; }

/* Textseiten */
.text-page {
  max-width: 860px; margin: 11px auto 0;
  text-align: center;
  font-size: 11px; line-height: 16px;
  color: var(--text);
}
.text-page p { margin: 0 0 14px; }
.text-page strong { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 19px; letter-spacing: .23px; }
.text-page a { color: var(--ink); }
.text-page a[href^="mailto"] { text-decoration: underline; text-underline-offset: 2px; }
.page-imprint .text-page, .page-privacy .text-page { text-align: left; max-width: 700px; font-size: 12px; line-height: 18px; }

/* Fuß */
.site-footer {
  padding: 20px var(--side) 30px;
  text-align: center;
  font-size: 11px; letter-spacing: .5px;
  color: var(--muted);
}
.site-footer span { margin: 0 6px; }
.site-footer a:hover { color: var(--ink); opacity: 1; }

/* ---------- Mobil ---------- */
@media (max-width: 1000px) {
  :root { --row: 300px; }
}
@media (max-width: 700px) {
  :root { --side: 16px; --row: 170px; --gap: 6px; }
  .site-header { padding-top: 20px; }
  .logo img { width: 80px; }
  .menu-toggle {
    display: block; margin: 7px auto 0;
    font-size: 13px; font-weight: 700; letter-spacing: .66px; text-transform: uppercase;
    padding: 8px 12px;
  }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; margin-top: 6px; }
  .main-nav a, .main-nav .sub-toggle { padding: 9px 0; width: 100%; }
    .main-nav .sub { position: static; transform: none; display: block; padding: 0 0 6px; font-weight: 400; }
  .main-nav .sub a { padding: 6px 0; }
  .lightbox { padding: 12px 0 0; }
  .lb-close { right: 6px; top: 4px; }
}

/* Statcounter: unsichtbar */
.statcounter, .statcounter img { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none; }
