/* Vereinigte Zünfte zur Gerwe und zur Schuhmachern – Stylesheet
   Farben aus dem Zunftwappen: Löwenrot, Stiefelschwarz, Sporngold, dazu Leder und Pergament. */

:root {
  --parchment: #f7f2ec;
  --paper: #fffdfa;
  --ink: #2a2320;
  --text: #3b322d;
  --muted: #6e6058;
  --leather: #8c6a52;
  --leather-light: #e9dfd4;
  --line: #e2d7cb;
  --red: #b3262a;
  --red-dark: #8e1d21;
  --gold: #d9a82e;
  --slate: #7f95ab;

  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", "P052", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wide: 1120px;
  --prose: 720px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  margin: 2em 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p, ul, ol, dl, figure { margin: 0 0 1.1em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--prose); }

/* ---------------------------------------------------------------- Kopf */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 250, 0.96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: auto; }
.brand__text { font-family: var(--serif); line-height: 1.15; }
.brand__small, .brand__name { display: block; font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--leather); }

.nav-toggle {
  display: none;
  align-items: center; gap: 8px;
  font: 600 0.95rem var(--sans);
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; color: var(--ink); cursor: pointer;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle__icon::before { position: absolute; top: -6px; }
.nav-toggle__icon::after { position: absolute; top: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 0.92rem var(--sans); text-decoration: none;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--leather); color: var(--leather); background: transparent;
  white-space: nowrap;
}
.btn:hover { background: var(--leather); color: #fff; text-decoration: none; }
.btn--solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn--solid:hover { background: var(--red-dark); border-color: var(--red-dark); }

.main-nav { border-top: 1px solid var(--line); }
.main-nav ul {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter);
  max-width: var(--wide);
  display: flex; flex-wrap: wrap; gap: 0 4px;
}
.main-nav a {
  display: block; padding: 12px 12px 10px;
  font-size: 0.95rem; font-weight: 600; color: var(--muted); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
.main-nav a[aria-current="page"], .main-nav a.is-section { color: var(--ink); border-bottom-color: var(--red); }
.main-nav__interna { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-header__bar .btn { display: none; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding-bottom: 12px; }
  .main-nav a { border-bottom: 0; border-left: 3px solid transparent; padding: 10px 12px; }
  .main-nav a[aria-current="page"], .main-nav a.is-section { border-left-color: var(--red); background: var(--parchment); }
  .main-nav__interna { display: block; }
}

@media (max-width: 520px) {
  .brand { gap: 10px; }
  .brand img { width: 36px; }
  .brand__small, .brand__name { font-size: 0.72rem; letter-spacing: 0.06em; }
  .nav-toggle { padding: 8px 10px; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------------------------------------------------------------- Titelbild */

/* Das Titelbild ist nie breiter als der Inhaltsbereich (Containerbreite ohne Seitenränder). */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--wide) - 2 * var(--gutter));
  margin: var(--gutter) auto 0;
  border-radius: var(--radius);
  min-height: clamp(220px, 30vw, 340px);
  display: flex; align-items: flex-end;
  color: #fff; background: var(--ink);
}
.hero--home { min-height: clamp(340px, 55vh, 540px); }
.hero--home .hero__img { object-position: 50% 65%; }
.hero__content.container { padding-left: clamp(20px, 4vw, 40px); padding-right: clamp(20px, 4vw, 40px); }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20, 14, 10, 0.05) 0%, rgba(20, 14, 10, 0.25) 45%, rgba(20, 14, 10, 0.8) 100%);
}
.hero__content { padding-top: 48px; padding-bottom: clamp(24px, 4vw, 44px); }
.hero h1 { color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35); max-width: 820px; }
.hero__lead { font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 0.6em 0 0; max-width: 640px; opacity: 0.95; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  color: var(--slate); margin-bottom: 10px;
}
.kicker::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.6; max-width: 240px; }
.hero .kicker { color: #f3d27a; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }

.page-title { padding: clamp(36px, 6vw, 64px) 0 8px; }

/* ---------------------------------------------------------------- Inhalt */

main { display: block; }
.section { padding: clamp(32px, 5vw, 56px) 0; }
.section + .section { padding-top: 0; }
.section > .container > :first-child { margin-top: 0; }

.lead { font-family: var(--serif); font-size: 1.25rem; line-height: 1.55; color: var(--ink); }
.quote {
  font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink);
  border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin: 0 0 1.4em;
}
.source { font-size: 0.92rem; color: var(--muted); }
.signature { font-style: italic; color: var(--muted); }

.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.subnav a {
  display: block; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  font-size: 0.92rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--paper);
}
.subnav a:hover { border-color: var(--leather); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0 0 1.6em; padding: 0; list-style: none; }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-family: var(--serif); font-size: 2rem; color: var(--red); line-height: 1.1; }
.facts span { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.card h2, .card h3 { margin-top: 0; }
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color 0.15s, transform 0.15s; }
.card--link:hover { border-color: var(--leather); transform: translateY(-2px); color: inherit; text-decoration: none; }
.card--link h3 { color: var(--ink); }
.card__more { font-weight: 600; color: var(--red); font-size: 0.95rem; }

.split { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

figure img { border-radius: var(--radius); }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

.note { background: var(--leather-light); border-radius: var(--radius); padding: 14px 18px; font-size: 0.95rem; }

/* ---------------------------------------------------------------- Termine */

.events { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid; grid-template-columns: 72px 1fr; gap: 0 14px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.event:last-child { border-bottom: 0; }
.event__date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.92rem; line-height: 1.3; }
.event__date b { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.event__title { font-weight: 500; color: var(--ink); }
.event--major .event__title { font-weight: 700; }
.event--major .event__date b { color: var(--red); }
.event__extra { display: block; font-size: 0.9rem; color: var(--muted); }
.event.is-past { opacity: 0.45; }

.months { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.month h2, .month h3 { font-size: 1.25rem; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--red); }
.year + .year { margin-top: 40px; }
.year__title { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 16px; color: var(--red); }
.footnotes { list-style: none; padding: 0; margin: 28px 0 0; font-size: 0.93rem; color: var(--muted); }
.footnotes li { display: grid; grid-template-columns: 28px 1fr; }

.next-events .event__date b { font-size: 1.2rem; }

.dates { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dates li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 0.95rem; }

/* ---------------------------------------------------------------- Vorsteherschaft */

.board { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin: 0 0 1.5em; padding: 0; list-style: none; }
.board li { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--leather); border-radius: var(--radius); padding: 16px 18px; }
.board .role { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.board .name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); display: block; }
.board .name + .role { margin-top: 10px; }
.board li.is-lead { border-top-color: var(--red); }
.board .portrait { display: block; width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 3 / 4; object-fit: cover; margin: -16px -18px 14px; background: var(--line); }

/* ---------------------------------------------------------------- Galerie */

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin: 0; padding: 0; list-style: none; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery a:hover img { transform: scale(1.04); }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; margin: 0;
}
.lightbox::backdrop { background: rgba(15, 10, 8, 0.92); }
.lightbox__inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
@media (max-width: 600px) { .lightbox__inner { padding: 56px 8px; } .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; } }

/* ---------------------------------------------------------------- Fuss */

.site-footer { background: var(--ink); color: #d8cec6; margin-top: clamp(40px, 6vw, 72px); font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; padding-top: 44px; padding-bottom: 32px; }
.site-footer h2 { font-size: 0.8rem; font-family: var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.site-footer__brand img { width: 48px; }
.site-footer__brand strong { font-family: var(--serif); font-size: 1.1rem; color: #fff; display: block; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 16px; padding-bottom: 24px; font-size: 0.85rem; color: #a99d94; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Druck */

@media print {
  .site-header, .site-footer, .hero__img, .nav-toggle, .subnav, .skip-link { display: none !important; }
  .hero { min-height: 0; color: var(--ink); background: none; }
  .hero::after { display: none; }
  .hero h1 { color: var(--ink); text-shadow: none; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------------------------------------------------------------- Vorschau-Hinweis (nur build.py --vorschau) */

.preview-banner {
  background: var(--gold); color: var(--ink); text-align: center;
  font-size: 0.9rem; padding: 8px var(--gutter);
}
.preview-banner a { color: var(--ink); font-weight: 600; }
