/* ==========================================================================
   franz-wegener.de — Stylesheet
   Schrift: Spectral (Auszeichnung) + IBM Plex Sans (Lesetext)
   ========================================================================== */

:root {
  --paper:        #edeff1;
  --surface:      #f8f9fa;
  --surface-2:    #e4e7ea;
  --ink:          #16191a;
  --ink-2:        #414a4d;
  --ink-3:        #6d767a;
  --rule:         #dcdfe2;
  --rule-strong:  #c3c8cc;
  --accent:       #2c4a3b;
  --accent-hover: #1c3227;
  --accent-tint:  #e6ece7;
  --focus:        #8a6a1f;

  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --nav-w: 19rem;
  --measure: 42rem;
  --pad: clamp(1.15rem, 4vw, 3rem);
}

/* --------------------------------------------------------- Reset / Basis */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.68;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: .5rem; top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 3px;
  font-size: .9rem;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: .5rem; color: #fff; }

/* --------------------------------------------------------- Grundgerüst */

.layout {
  display: block;
  min-height: 100vh;
}

/* ------------------------------------------------------- Mobile Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem var(--pad);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.topbar__title {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: .005em;
  margin: 0;
  line-height: 1.2;
}
.topbar__title a { color: var(--ink); text-decoration: none; }

.navtoggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  font: inherit;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: .45rem .7rem;
  cursor: pointer;
}
.navtoggle:hover { color: var(--accent); border-color: var(--accent); }

.navtoggle__bars {
  position: relative;
  width: 15px; height: 9px;
  flex: none;
}
.navtoggle__bars::before,
.navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s ease;
}
.navtoggle__bars::before { top: 0; }
.navtoggle__bars::after  { bottom: 0; }
.navtoggle[aria-expanded="true"] .navtoggle__bars::before { transform: translateY(3.75px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars::after  { transform: translateY(-3.75px) rotate(-45deg); }

/* ------------------------------------------------------------- Sidebar */

.sidenav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: .5rem var(--pad) 2rem;
}
.sidenav.is-open { display: block; }

.sidenav__brand { display: none; }

.sidenav__group + .sidenav__group { margin-top: 1.6rem; }

.sidenav__grouptitle {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--rule);
}

.sidenav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidenav li { margin: 0; }

.sidenav a,
.sidenav .is-current {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  padding: .42rem 0;
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sidenav a:hover { color: var(--accent); }

.sidenav .is-current {
  color: var(--ink);
  font-weight: 600;
}
.sidenav .is-current .band { color: var(--accent); }

.band {
  flex: none;
  min-width: 1.85em;
  font-family: var(--serif);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--ink-3);
}

.sidenav__footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.sidenav__footer p { margin: 0 0 .4rem; }

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

.main {
  padding: 0 var(--pad) 4rem;
}

.page-header {
  padding: 2.25rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}

.eyebrow {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .7rem;
}

.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 5.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.content { max-width: var(--measure); }

/* Fließtext */

.content p { margin: 0 0 1.15em; }

.content h2, .content h3, .content h4, .content h5, .content h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.4rem 0 .8rem;
  letter-spacing: -.005em;
  text-wrap: balance;
}
.content h2 { font-size: 1.5rem; }
.content h3 { font-size: 1.3rem; }
.content h4 { font-size: 1.125rem; }
.content h5, .content h6 { font-size: 1rem; }

.content h2 strong, .content h3 strong,
.content h4 strong, .content h5 strong,
.content h6 strong { font-weight: 600; }

.content > :first-child { margin-top: 0; }

.content ul, .content ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.content li { margin-bottom: .35em; }

.content blockquote {
  margin: 1.6rem 0;
  padding: .2rem 0 .2rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.0625rem;
}
.content blockquote p:last-child { margin-bottom: 0; }

.content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* Vorspann: fett gesetzter Absatz am Textanfang */
.content p.lead {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1.4em;
}
.content p.lead strong { font-weight: 600; }

/* Literaturverzeichnisse und Register: kleiner, enger, klar abgesetzt */
.apparatus {
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.apparatus p { margin-bottom: .55em; }

/* --------------------------------------------------------------- Bilder */

figure {
  margin: 1.8rem 0;
}
figure img { border-radius: 2px; }
figure figcaption,
.content .caption {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: .55rem;
}

figure.align-left, figure.align-right { max-width: min(46%, 17rem); }

@media (min-width: 40rem) {
  figure.align-left  { float: left;  margin: .35rem 1.75rem 1.25rem 0; }
  figure.align-right { float: right; margin: .35rem 0 1.25rem 1.75rem; }
}

@media (max-width: 39.99rem) {
  figure.align-left, figure.align-right { max-width: 100%; float: none; margin: 1.5rem 0; }
}

.content::after { content: ""; display: block; clear: both; }

/* --------------------------------------------------------------- Tabellen */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6rem 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
}
.content table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
  min-width: 22rem;
}
.content th, .content td {
  text-align: left;
  vertical-align: top;
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--rule);
}
.content tr:last-child td { border-bottom: 0; }
.content th { font-weight: 600; color: var(--ink); }
.content td:first-child {
  width: 4.5rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --------------------------------------------------------- Fotogalerie */

.photogrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.5rem 1.1rem;
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
}

.photogrid .gridItem { margin: 0; }

.photogrid .gridItem .imageLink {
  display: block;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.photogrid .gridItem .imageLink img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .2s ease;
}
.photogrid .gridItem .imageLink:hover img { transform: scale(1.04); }

.photogrid .gridItem h3 {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.35;
  margin: .55rem 0 0;
  letter-spacing: 0;
}
.photogrid .gridItem h3 a { color: var(--ink-2); text-decoration: none; }
.photogrid .gridItem h3 a:hover { color: var(--accent); text-decoration: underline; }

/* Blätter-Navigation der Fotoseiten */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.75rem;
  padding: .6rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: .875rem;
}
.pager a {
  text-decoration: none;
  color: var(--ink-2);
  padding: .25rem .1rem;
}
.pager a:hover { color: var(--accent); text-decoration: underline; }
.pager .pager__next { margin-left: auto; }
.pager .pager__index { color: var(--ink-3); }
.pager__sep { color: var(--rule-strong); }

/* ----------------------------------------------------------- Beiwerk */

.aside {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.aside__block + .aside__block { margin-top: 1.75rem; }

.aside__title {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .75rem;
}

.aside figure { margin: 0 0 1rem; max-width: 15rem; }

.booklist { list-style: none; margin: 0; padding: 0; font-size: .875rem; line-height: 1.45; }
.booklist li { padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.booklist li:last-child { border-bottom: 0; }
.booklist a { text-decoration: none; }
.booklist a:hover { text-decoration: underline; }
.booklist .booklist__author { display: block; color: var(--ink-3); font-size: .8125rem; margin-top: .1rem; }

/* Portrait / Kontakt auf der Startseite */

.intro-figure { margin: 0 0 1.75rem; }
.intro-figure img { border-radius: 3px; }

/* ------------------------------------------------------------- Fußzeile */

.site-footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-3); }
.site-footer a:hover { color: var(--accent); }

/* ================================================== Desktop ab 62rem === */

@media (min-width: 62rem) {

  .topbar { display: none; }

  .layout {
    display: grid;
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
    align-items: start;
  }

  .sidenav {
    display: block;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2.5rem 1.75rem 2.5rem clamp(1.5rem, 3vw, 2.75rem);
    background: var(--paper);   /* Navigationsspalte minimal abgesetzt */
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .sidenav__brand {
    display: block;
    margin-bottom: 2.25rem;
  }
  .sidenav__brand a { text-decoration: none; color: var(--ink); }
  .sidenav__brand .name {
    display: block;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.015em;
  }
  .sidenav__brand .role {
    display: block;
    margin-top: .4rem;
    font-size: .8125rem;
    line-height: 1.45;
    color: var(--ink-3);
  }

  .main {
    padding: 0 clamp(2rem, 5vw, 5rem) 5rem;
    background: var(--surface);
    min-height: 100vh;
    border-left: 0;
  }

  .page-header { padding-top: 4rem; }

  .content, .page-header, .site-footer, .aside { max-width: var(--measure); }
  .page-header, .site-footer, .aside { max-width: none; }
  .page-header > *, .site-footer > * { max-width: none; }

  /* Startseite: Text und Portrait nebeneinander */
  .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 3rem;
    align-items: start;
  }
  .home-grid .aside {
    margin: 0;
    padding-top: 0;
    border-top: 0;
    position: sticky;
    top: 3rem;
  }
}

@media (min-width: 90rem) {
  :root { --measure: 44rem; }
}

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

@media print {
  .sidenav, .topbar, .pager, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .main { padding: 0; }
  a { color: inherit; text-decoration: none; }
  .content { max-width: none; }
}
