/* ---------------------------------------------------------------------------
   Helga Duwendag-Strecker – Fotografie
   Bewusst zurückhaltend: die Fotos sollen wirken, nicht das Interface.
   Keine externen Schriften oder Skripte (DSGVO, Ladezeit).
   --------------------------------------------------------------------------- */

:root {
  --paper: #faf9f7;
  --paper-sunken: #f1efec;
  --ink: #1c1a18;
  --ink-soft: #57524c;
  --ink-faint: #8a837b;
  --line: #e2ded8;
  --accent: #8a6a4b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* --page und --gap gehen in die sizes-Konstanten in inc/seite.php ein. */
  --page: min(1280px, 100% - 3rem);
  --prose: 34rem;
  --gap: clamp(0.5rem, 1.2vw, 1rem);
  --radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16151a;
    --paper-sunken: #1e1d23;
    --ink: #ece9e4;
    --ink-soft: #b3ada4;
    --ink-faint: #7d766e;
    --line: #302e36;
    --accent: #c9a37a;
  }
}

*,
*::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: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0.5rem;
}

/* --- Kopfbereich -------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead__bar {
  width: var(--page);
  margin-inline: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(0.9rem, 2vw, 1.4rem);
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.6rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.2;
}

.wordmark span {
  display: block;
  font-family: var(--sans);
  font-size: 0.66em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.25em;
}

.masthead__end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Das Signet ist reines Schwarz auf Weiß – im dunklen Modus wird es umgekehrt,
   sonst leuchtete eine weiße Kachel aus der Seite heraus. */
.logo {
  display: block;
  flex: none;
  width: clamp(2.6rem, 5vw, 3.4rem);
  line-height: 0;
}

.logo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@media (prefers-color-scheme: dark) {
  .logo img {
    filter: invert(1);
  }
}

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.nav {
  width: var(--page);
  margin-inline: auto;
  padding-bottom: 0.9rem;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.35rem;
}

.nav a {
  display: block;
  padding-block: 0.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --- Alben-Untermenü ---
   Ein <details>, damit es ohne JavaScript aufklappt und per Tastatur
   bedienbar ist. Auf breiten Schirmen legt es sich als Feld über die Seite,
   auf schmalen rückt es eingerückt in die Liste ein. */

.nav__group summary {
  list-style: none;
  cursor: pointer;
  padding-block: 0.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}

.nav__group summary::-webkit-details-marker {
  display: none;
}

.nav__group summary::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.55em;
  vertical-align: 0.15em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  rotate: 45deg;
  transition: rotate 0.2s;
}

.nav__group details[open] summary::after {
  rotate: 225deg;
}

.nav__group summary:hover {
  color: var(--ink);
}

/* Zeigt, dass man sich in einem der Alben befindet, auch solange die Liste
   zugeklappt ist. */
.nav__group summary.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

@media (min-width: 52.0625rem) {
  .nav__group {
    position: relative;
  }
  .nav__group .nav__sub {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.55rem);
    left: -0.9rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(8.5rem, 1fr));
    gap: 0 1.5rem;
    padding: 0.9rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.28);
  }
  .nav__group .nav__sub a {
    white-space: nowrap;
  }
}

@media (max-width: 52rem) {
  .nav__sub {
    padding: 0.1rem 0 0.4rem 0.9rem;
    border-left: 1px solid var(--line);
    margin-left: 0.15rem;
  }
  .nav__group summary {
    padding-block: 0.62rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 52rem) {
  /* Eingeklappt schon beim ersten Rendern, damit die siebzehn Menüpunkte auf
     dem Telefon nicht kurz aufblitzen, bevor das Skript greift. Ohne
     JavaScript macht das <noscript>-Stylesheet die Liste wieder sichtbar. */
  .nav {
    display: none;
  }
  .nav.is-open {
    display: block;
  }
  /* Der Schalter erscheint nur, wenn er auch etwas bewirken kann. */
  .js .nav-toggle {
    display: block;
  }
  .nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.5rem;
  }
  .nav a {
    padding-block: 0.62rem;
    font-size: 0.9rem;
  }
}

/* --- Seitenkopf --------------------------------------------------------- */

main {
  width: var(--page);
  margin-inline: auto;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.page-head {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.75rem, 4vw, 3rem);
  max-width: 46rem;
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

.page-head p {
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
  max-width: var(--prose);
}

.count {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}

/* --- Inhaltsblöcke ------------------------------------------------------ */

.block + .block {
  margin-top: clamp(2.25rem, 5vw, 3.75rem);
}

.prose {
  max-width: var(--prose);
  margin-inline: auto;
  font-size: 1.05rem;
}

.prose p {
  margin: 0 0 0.85em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 600;
}

.prose .t-lg {
  font-size: 1.14em;
}

.prose .t-xl {
  font-family: var(--serif);
  font-size: 1.6em;
  line-height: 1.2;
}

.prose .ta-center {
  text-align: center;
}

.prose .ta-right {
  text-align: right;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.15;
  margin: 0;
  text-align: center;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  width: min(9rem, 40%);
  margin-inline: auto;
}

/* --- Einzelbild --------------------------------------------------------- */

.figure {
  margin: 0;
  text-align: center;
}

.figure img {
  margin-inline: auto;
  border-radius: var(--radius);
}

/* Ändert sich hier etwas, gehören die sizes-Konstanten oben in
   inc/seite.php mitgezogen – sonst lädt der Browser unbemerkt zu große
   oder zu kleine Bilddateien. */
.figure--portrait img {
  max-width: min(30rem, 100%);
}

.figure--wide img {
  max-width: min(64rem, 100%);
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* --- Galerie ------------------------------------------------------------
   Spalten statt Raster: jedes Foto behält sein Seitenverhältnis, nichts wird
   beschnitten. Das ist bei gemischten Hoch- und Querformaten das ruhigste
   Layout und kommt ohne JavaScript aus.
   ---------------------------------------------------------------------- */

/* Ändert sich hier etwas, gehören die sizes-Konstanten oben in
   inc/seite.php mitgezogen – sonst lädt der Browser unbemerkt zu große
   oder zu kleine Bilddateien. */
.gallery {
  columns: 4 15rem;
  column-gap: var(--gap);
}

/* Ändert sich hier etwas, gehören die sizes-Konstanten oben in
   inc/seite.php mitgezogen – sonst lädt der Browser unbemerkt zu große
   oder zu kleine Bilddateien. */
.gallery--few {
  columns: 3 17rem;
  max-width: 62rem;
  margin-inline: auto;
}

.shot {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
}

.shot__frame {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  overflow: hidden;
}

.shot img {
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.4s;
}

.shot img[loading="lazy"] {
  opacity: 0;
}

.shot img.is-loaded,
.no-js .shot img {
  opacity: 1;
}

@media (hover: hover) {
  .shot:hover img {
    transform: scale(1.035);
  }
}

.shot__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 0.85rem 0.7rem;
  font-size: 0.82rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.62));
  opacity: 0;
  transition: opacity 0.25s;
}

.shot:hover .shot__caption,
.shot:focus-visible .shot__caption {
  opacity: 1;
}

/* --- Lightbox ----------------------------------------------------------- */

.lightbox {
  padding: 0;
  border: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: color-mix(in srgb, #0b0a0c 96%, transparent);
  color: #f4f1ec;
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgb(8 7 9 / 0.9);
}

.lightbox__stage {
  position: absolute;
  inset: 0;
  display: grid;

  /* minmax(0, 1fr) statt der stillschweigenden auto-Zeile: eine auto-Zeile
     wächst mit ihrem Inhalt, und das Foto brächte sie auf seine volle
     Pixelhöhe. Die 0 als Untergrenze erlaubt der Zeile zu schrumpfen. */
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  padding: clamp(2.75rem, 6vw, 4.5rem) clamp(0.75rem, 5vw, 5rem);
  touch-action: pan-y;
}

.lightbox__stage img {
  /* Rasterelemente haben von Haus aus min-width/min-height: auto und dürfen
     damit nicht unter ihre Inhaltsgröße schrumpfen – bei einem Foto also
     nicht unter seine Pixelmaße. Diese Untergrenze schlägt max-height, das
     Bild wächst über die Bühne hinaus und man sieht nur den oberen Teil.
     Die beiden Nullen nehmen die Untergrenze weg. */
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__bar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(0.75rem, 3vw, 1.5rem);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b9b3ab;
}

.lightbox__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 0.9rem clamp(0.75rem, 3vw, 1.5rem) 1.1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #cec8c0;
}

.lightbox button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
}

.lightbox button:hover {
  color: #fff;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: clamp(2.75rem, 6vw, 3.75rem);
  height: clamp(2.75rem, 6vw, 3.75rem);
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  line-height: 1;
  background: rgb(255 255 255 / 0.06);
}

.lightbox__nav:hover {
  background: rgb(255 255 255 / 0.14);
}

.lightbox__nav--prev {
  left: clamp(0.4rem, 2vw, 1.25rem);
}

.lightbox__nav--next {
  right: clamp(0.4rem, 2vw, 1.25rem);
}

.lightbox__nav[disabled] {
  opacity: 0.25;
  cursor: default;
}

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

.colophon {
  border-top: 1px solid var(--line);
  background: var(--paper-sunken);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.colophon__inner {
  width: var(--page);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  justify-content: space-between;
  align-items: start;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.colophon p {
  margin: 0 0 0.35rem;
}

.colophon ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0;
}

.colophon a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.colophon a:hover {
  border-bottom-color: var(--accent);
}

/* --- Übersicht auf der Startseite --------------------------------------- */

/* Ändert sich hier etwas, gehören die sizes-Konstanten oben in
   inc/seite.php mitgezogen – sonst lädt der Browser unbemerkt zu große
   oder zu kleine Bilddateien. */
.themes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: var(--gap);
}

.theme {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-sunken) center / cover;
}

.theme img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.theme:hover img {
  transform: scale(1.05);
}

.theme span {
  position: absolute;
  inset: auto 0 0;
  padding: 3rem 1rem 0.95rem;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.15rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.68));
}

.theme small {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
  margin-top: 0.25em;
}

/* --- Prüfbericht --------------------------------------------------------
   Nur auf /pruefen/. Auf den Seiten selbst erscheint nichts davon. */

.pruefung {
  padding: 0.9rem 1.1rem;
  background: #7a2118;
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.45;
}

.pruefung__kopf {
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.pruefung ul {
  margin: 0;
  padding-left: 1.1rem;
}

.pruefung li {
  margin: 0.15rem 0;
}


.pruefung a {
  color: #fff;
}
