/* =========================================================
   norman-eschenfelder.de – ein Stylesheet für alles
   Farben und Abstände oben in :root anpassen.
   ========================================================= */

/* --- Schrift lokal (Dateien in /fonts, z. B. über gwfh.mranftl.com) --- */
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 100; font-display: swap; src: url('../fonts/josefin-sans-v32-latin-100.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/josefin-sans-v32-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/josefin-sans-v32-latin-italic.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/josefin-sans-v32-latin-700.woff2') format('woff2'); }

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --text: #1d1b18;
  --muted: #6b665d;
  --line: #ddd6c8;
  --accent: #b4381f;          /* Links, aktive Filter */
  --accent-text: #ffffff;
  --live: #2f6b3a;            /* Etikett "laufend" */
  --media-bg: #16140f;        /* Hintergrund der Galerien */
  --radius: 6px;
  --gap: 1.5rem;
  --font: 'Josefin Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141310;
    --surface: #1e1c18;
    --text: #ece7dd;
    --muted: #a29b8e;
    --line: #34312a;
    --accent: #e8735a;
    --accent-text: #141310;
    --live: #7cc28a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }

/* --- Kopf / Profil --- */
.profile { padding: 2.5rem 1rem 1.5rem; }
.profile-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 2rem; align-items: center;
}
.profile h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: .01em; }
.tagline { font-size: 1.15rem; margin: .6rem 0; }
.profile .gallery { aspect-ratio: 1 / 1; }
.social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.social a { display: inline-flex; padding: 4px; border-radius: var(--radius); }
.social a:hover { background: var(--line); }
.social img { display: block; width: 30px; height: 30px; }
@media (max-width: 700px) {
  .profile-inner { grid-template-columns: 1fr; }
  .profile .gallery { max-width: 340px; }
}

/* --- Filterleiste --- */
.filters {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: .5rem;
  max-width: 1200px; margin: 0 auto; padding: .75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.filters button {
  font: inherit; font-size: .95rem;
  padding: .45rem .9rem .35rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  cursor: pointer;
}
.filters button:hover { border-color: var(--accent); }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.filters .count { opacity: .7; font-size: .85em; margin-left: .25em; }

/* --- Projektraster --- */
.grid {
  max-width: 1200px; margin: 0 auto; padding: var(--gap) 1rem 3rem;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 4.5rem;
}
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card h3 { font-size: 1.45rem; font-weight: 700; }
.sub { color: var(--muted); margin: .2rem 0 .8rem; }
.card p { margin: 0 0 .7rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; margin-bottom: .6rem !important; }
.tag {
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .75rem;
  padding: .2rem .5rem .1rem; border: 1px solid var(--line); border-radius: 3px;
}
.tag-live { color: var(--live); border-color: currentColor; }
.year { color: var(--muted); }
.facts { list-style: none; padding: .7rem 0 0; margin: .9rem 0 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.facts li { margin-bottom: .25rem; }
.warn { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem !important; }
.btn {
  display: inline-block; padding: .45rem .8rem .35rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; font-size: .9rem;
}
.btn:hover { background: var(--accent); color: var(--accent-text); }

/* --- Galerie --- */
.gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--media-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.card .gallery { border-radius: 0; }
.slides, .slides img { width: 100%; height: 100%; }
.slides img { display: block; object-fit: contain; cursor: zoom-in; }
.slides img + img { display: none; }               /* ohne JS: nur erstes Bild */
.slides.is-js img { display: none; }
.slides.is-js img.is-active { display: block; }

.g-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 1.2rem; line-height: 1;
  cursor: pointer; opacity: .8;
}
.g-btn:hover, .g-btn:focus-visible { opacity: 1; }
.g-prev { left: .5rem; }
.g-next { right: .5rem; }
.g-count {
  position: absolute; right: .5rem; bottom: .5rem;
  padding: .15rem .5rem .05rem; border-radius: 3px;
  background: rgba(0,0,0,.55); color: #fff; font-size: .8rem;
}

/* --- Lightbox --- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 3rem 4rem; border: 0;
  background: rgba(10,9,7,.94); color: #fff;
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
.lb-caption { margin: .75rem 0 0; font-size: .9rem; opacity: .8; text-align: center; }
.lightbox button {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 3.5rem .5rem; } .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; } }

/* --- Fuß --- */
.site-footer {
  max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem;
  font-size: .9rem; color: var(--muted);
}
.site-footer h2 { font-size: 1rem; margin-bottom: .4rem; color: var(--text); }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
