/* ==========================================================================
   Christian Köhler · Werkverzeichnis – öffentliches Design "Atelier"
   Papier- und Umbratöne, oxblutroter Akzent, Playfair Display + Source Sans 3.
   ========================================================================== */

:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d4;
  --ivory: #fbf8f1;
  --ink: #1f1a15;
  --umber: #5b4a3a;
  --stone: #8b7c6b;
  --line: #d8cdb8;
  --line-strong: #bfb197;
  --accent: #8a2e2b;
  --accent-dark: #6d2320;
  --gold: #a9873f;
  --sage: #5f6e58;
  --shadow: 0 1px 2px rgba(31, 26, 21, 0.06), 0 12px 32px -18px rgba(31, 26, 21, 0.35);
  --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

button {
  font: inherit;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.5rem 1rem;
  z-index: 100;
}

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

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.kicker--muted {
  color: var(--stone);
}

.lede {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--umber);
  max-width: 60ch;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gold);
  margin: 0 0 1.5rem;
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

/* --------------------------------------------------------------------------
   Header und Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 238, 227, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__signature {
  height: 2.6rem;
  width: auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
}

.brand__sub {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  font-weight: 500;
  border-radius: var(--radius);
  background: none;
  border: 0;
}

.site-nav__link:hover,
.site-nav__link[aria-expanded="true"] {
  background: var(--paper-2);
  text-decoration: none;
}

.site-nav__link svg {
  width: 0.8rem;
  height: 0.8rem;
  opacity: 0.6;
}

.site-nav__menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 14rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  display: none;
  z-index: 60;
}

.site-nav__item.is-open > .site-nav__menu {
  display: block;
}

.site-nav__menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--ink);
}

.site-nav__menu a:hover {
  background: var(--paper);
  color: var(--accent);
  text-decoration: none;
}

.site-nav__menu-label {
  padding: 0.35rem 1rem 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.site-nav__menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.4rem 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.icon-btn:hover {
  background: var(--paper-2);
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-toggle {
  display: none;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--ivory);
}

.search-panel.is-open {
  display: block;
}

.search-panel form {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 0;
}

.search-panel input {
  flex: 1;
  font: inherit;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ivory);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}

.btn--small {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

/* Mobile-Navigation */
@media (max-width: 900px) {
  .site-header__inner {
    min-height: 4rem;
  }

  .brand__text {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    inset: 4rem 0 0 0;
    background: var(--paper);
    margin: 0;
    padding: 1rem var(--gutter) 2rem;
    display: none;
    overflow-y: auto;
    z-index: 55;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__item {
    border-bottom: 1px solid var(--line);
  }

  .site-nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0;
    font-family: var(--serif);
    font-size: 1.15rem;
  }

  .site-nav__menu {
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.5rem 0.75rem;
  }

  .site-nav .icon-btn--search {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Startseite
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(169, 135, 63, 0.12), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 500;
  margin-bottom: 0.4em;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__dates {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--umber);
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero__figure {
  margin: 0;
}

.frame {
  display: block;
  background: var(--ivory);
  padding: 0.75rem;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(169, 135, 63, 0.25);
}

.frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero__figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--stone);
}

.hero__figure figcaption a {
  color: var(--umber);
  font-family: var(--serif);
  font-size: 1rem;
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.section--tint {
  background: var(--ivory);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section__head h2 {
  margin: 0;
}

.section__head .kicker {
  margin-bottom: 0.35rem;
}

.section__more {
  font-weight: 600;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.intro .prose p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding: 0.08em 0.12em 0 0;
  color: var(--accent);
}

.aside-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.aside-card h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

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

.link-list li + li {
  border-top: 1px solid var(--line);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  color: var(--ink);
  font-weight: 500;
}

.link-list a::after {
  content: "→";
  color: var(--gold);
}

.link-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.stat__value {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
}

.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

/* Kategorie-Kacheln */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  color: var(--ivory);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tile:hover img {
  transform: scale(1.04);
}

.tile__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(180deg, transparent, rgba(31, 26, 21, 0.85));
}

.tile__name {
  font-family: var(--serif);
  font-size: 1.35rem;
  display: block;
}

.tile__count {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.tile--plain {
  background: var(--ink);
}

.tile:hover {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Werkliste
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
}

.page-head h1 {
  margin-bottom: 0.35rem;
}

.page-head__meta {
  color: var(--stone);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

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

.chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--umber);
  font-size: 0.92rem;
  background: var(--ivory);
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
}

.filter-bar__right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--umber);
  cursor: pointer;
}

.toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.inline-search {
  display: flex;
  gap: 0.4rem;
}

.inline-search input {
  font: inherit;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  min-width: 14rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2rem 1.5rem;
}

.work-card {
  display: block;
  color: var(--ink);
}

.work-card:hover {
  text-decoration: none;
}

.work-card__frame {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory);
  border: 1px solid var(--line-strong);
  padding: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(169, 135, 63, 0.2);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}

.work-card:hover .work-card__frame {
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(169, 135, 63, 0.35);
  transform: translateY(-2px);
}

.work-card__frame img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.work-card__frame--placeholder {
  color: var(--line-strong);
}

.work-card__frame--placeholder svg {
  width: 40%;
  height: auto;
}

.work-card__body {
  padding: 0.85rem 0.1rem 0;
}

.work-card__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card__meta {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

.work-card__meta span + span::before {
  content: "·";
  margin: 0 0.4rem;
}

.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--umber);
}

.empty h2 {
  margin-bottom: 0.5rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 3rem 0 1rem;
}

.pagination a,
.pagination span {
  min-width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--ivory);
}

.pagination a:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.pagination .is-current {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}

.pagination .gap {
  border: 0;
  background: transparent;
  color: var(--stone);
}

/* --------------------------------------------------------------------------
   Werk-Detailseite
   -------------------------------------------------------------------------- */

.work {
  padding: clamp(1.5rem, 4vw, 3rem) 0 3rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--stone);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--umber);
}

.breadcrumb span::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--line-strong);
}

.work__layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.stage {
  position: sticky;
  top: 5.5rem;
}

.stage__main {
  position: relative;
  background: var(--ivory);
  border: 1px solid var(--line-strong);
  padding: 1rem;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(169, 135, 63, 0.25);
  min-height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage__image {
  border: 0;
  background: none;
  padding: 0;
  cursor: zoom-in;
  max-width: 100%;
}

.stage__image img {
  max-height: min(70vh, 720px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.stage__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(251, 248, 241, 0.92);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.stage__arrow svg {
  width: 1.2rem;
  height: 1.2rem;
}

.stage__main:hover .stage__arrow,
.stage__arrow:focus-visible {
  opacity: 1;
}

.stage__arrow--prev {
  left: 0.75rem;
}

.stage__arrow--next {
  right: 0.75rem;
}

.stage__document {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--umber);
}

.stage__document svg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: var(--line-strong);
}

.stage__caption {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--stone);
}

.stage__caption p {
  margin: 0.25rem 0;
}

.stage__notes {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--ivory);
  border-left: 3px solid var(--gold);
  font-size: 0.95rem;
  color: var(--umber);
}

.stage__notes strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.25rem;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.thumb {
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0.75;
  transition: opacity 0.15s, border-color 0.15s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--stone);
}

.thumb:hover,
.thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.work__info h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 500;
}

.work__category {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.meta {
  margin: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.meta > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.meta dt {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  padding-top: 0.2rem;
}

.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.meta dd small {
  color: var(--stone);
}

.work__section {
  margin-top: 2rem;
}

.work__section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.source-box {
  padding: 0.75rem 1rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.source-type {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.2rem;
}

.work-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.work-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--ink);
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.work-nav a:hover {
  border-color: var(--line-strong);
  background: var(--ivory);
  text-decoration: none;
}

.work-nav__label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}

.work-nav__title {
  font-family: var(--serif);
}

.work-nav--next {
  text-align: right;
  align-items: flex-end;
  grid-column: 2;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 12, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lightbox__stage img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  transition: transform 0.05s linear;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__stage img.is-zoomed {
  cursor: grabbing;
}

.lightbox__caption {
  color: rgba(251, 248, 241, 0.8);
  font-size: 0.95rem;
  padding: 0.75rem 1rem 1.25rem;
  text-align: center;
  max-width: 70ch;
}

.lightbox__caption a {
  color: #e6c98a;
}

.lightbox__btn {
  position: absolute;
  background: rgba(251, 248, 241, 0.1);
  color: var(--ivory);
  border: 1px solid rgba(251, 248, 241, 0.25);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox__btn:hover {
  background: rgba(251, 248, 241, 0.22);
}

.lightbox__btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
}

.lightbox__prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__hint {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(251, 248, 241, 0.55);
}

@media (max-width: 720px) {
  .lightbox__hint {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Redaktionelle Seiten
   -------------------------------------------------------------------------- */

.article {
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
}

.article__head {
  max-width: 72ch;
  margin-bottom: 2.5rem;
}

.prose {
  max-width: 72ch;
  font-size: 1.1rem;
  line-height: 1.75;
}

.prose h1 {
  font-size: 1.9rem;
  margin-top: 2.5rem;
}

.prose h1:first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
}

.prose p + p {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--gold);
  color: var(--umber);
  font-family: var(--serif);
  font-style: italic;
}

.prose img {
  margin: 1.5rem 0;
}

.prose iframe {
  width: 100%;
  border: 1px solid var(--line-strong);
  margin: 1.5rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

/* Schülerliste */
.students {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.students th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--line-strong);
}

.students td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.students__name {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.students ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--umber);
  font-size: 0.95rem;
}

.students li + li {
  margin-top: 0.2rem;
}

.students .muted {
  color: var(--stone);
}

@media (max-width: 720px) {
  .students thead {
    display: none;
  }

  .students tr {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .students td {
    display: block;
    padding: 0.15rem 0;
    border: 0;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  background: var(--ink);
  color: rgba(251, 248, 241, 0.75);
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: rgba(251, 248, 241, 0.85);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer h3 {
  color: var(--ivory);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 248, 241, 0.5);
  margin-bottom: 0.9rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

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

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(251, 248, 241, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: rgba(251, 248, 241, 0.5);
}

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero__grid,
  .intro,
  .work__layout {
    grid-template-columns: 1fr;
  }

  .stage {
    position: static;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .meta > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .work-nav {
    grid-template-columns: 1fr;
  }

  .work-nav--next {
    grid-column: 1;
    text-align: left;
    align-items: flex-start;
  }

  .filter-bar__right {
    margin-left: 0;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* Suche innerhalb der mobilen Navigation */
.site-nav__item--search {
  display: none;
}

@media (max-width: 900px) {
  .site-nav__item--search {
    display: block;
    padding: 1rem 0;
    border-bottom: 0;
  }

  .site-nav__item--search .inline-search input {
    flex: 1;
    min-width: 0;
  }
}

/* Aufmacher: Rahmen liegt eng am Bild, kein Passepartout; leichter Zoom schneidet
   helle Scan-Ränder ab. Hochformate wachsen nicht über die Seitenhöhe hinaus. */
.hero__figure {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.hero__figure .frame {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: var(--umber);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero__figure .frame img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(62vh, 620px);
  transform: scale(1.06);
  transform-origin: center;
}

/* Mobil: backdrop-filter würde das fixierte Menü auf die Kopfzeile beschränken */
@media (max-width: 900px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--paper);
  }
}
