:root {
  --nacht: #0b0906;
  --karte: #15110a;
  --tief: #0f0b06;
  --linie: #3d3220;
  --gold: #d4aa5c;
  --gold-hell: #f2d69a;
  --schrift: #e9dcc2;
  --leise: #9c8c70;
  --gruen: #93a468;
  --stempel: #a8503a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nacht);
  background-image:
    radial-gradient(135% 65% at 50% -8%, #221a10 0%, var(--nacht) 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 4px);
  color: var(--schrift);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Bodoni Moda", Didot, Georgia, serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 .6rem;
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hell); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

main { max-width: 1060px; margin: 0 auto; padding: 0 1.1rem 4rem; }

/* getippte Aktenbeschriftung ------------------------------------------ */
.getippt {
  font-family: "Courier Prime", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--leise);
  margin: 0 0 .7rem;
}

/* Kopf und Fuss ------------------------------------------------------- */
.kopf {
  max-width: 1060px; margin: 0 auto; padding: 1.2rem 1.1rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem;
  align-items: center; justify-content: space-between;
}
.marke { text-decoration: none; color: var(--schrift); display: block; }
.marke-name {
  display: block;
  font-family: "Bodoni Moda", Didot, serif;
  font-size: 1.15rem; letter-spacing: .06em;
}
.marke-claim {
  display: block;
  font-family: "Courier Prime", monospace;
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.kopf-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .92rem; }

.fuss {
  max-width: 1060px; margin: 0 auto; padding: 2rem 1.1rem 3rem;
  border-top: 1px solid var(--linie); color: var(--leise); font-size: .93rem;
}
.fuss-kontakt { margin-top: 0; }
.fuss-klein { font-size: .85rem; max-width: 50ch; }

/* Meldungen ----------------------------------------------------------- */
.meldungen { max-width: 1060px; margin: 0 auto; padding: 0 1.1rem; }
.meldung {
  margin: 0 0 .6rem; padding: .7rem .95rem;
  border: 1px solid var(--linie); border-left: 3px solid var(--gold);
  background: var(--karte);
}
.meldung.ok { border-left-color: var(--gruen); }

/* Hero als Aktendeckel ------------------------------------------------ */
.hero {
  --hero-quer: clamp(1.2rem, 5vw, 3rem);
  --hero-hoch: clamp(1.8rem, 6vw, 3.4rem);
  margin: 1rem 0 3.4rem;
  padding: var(--hero-hoch) var(--hero-quer);
  border: 2px solid var(--gold);
  outline: 1px solid var(--linie);
  outline-offset: 6px;
  background: linear-gradient(180deg, #181208, #0d0a06);
  text-align: center;
}
.hero-bild {
  display: block;
  width: calc(100% + 2 * var(--hero-quer));
  height: auto;
  margin: calc(-1 * var(--hero-hoch)) calc(-1 * var(--hero-quer)) 1.8rem;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 74%, transparent 100%);
}
.hero-marke { color: var(--gold); margin-bottom: 1.4rem; }
.hero h1 {
  font-size: clamp(2.2rem, 8.5vw, 4.2rem);
  letter-spacing: .01em;
  margin-bottom: 1.3rem;
}
.hero-text { max-width: 54ch; margin: 0 auto; color: var(--leise); }
.zaehler {
  display: inline-block; margin: 1.7rem 0 0; padding: .5rem 1.2rem;
  border: 1px solid var(--linie);
  font-family: "Courier Prime", monospace;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}
.zaehler strong { color: var(--gold); font-size: 1rem; }

/* Abschnitte ---------------------------------------------------------- */
.linie { margin-bottom: 3.2rem; }
.linie h2, .hinweis h2, .geschwister h2 {
  font-size: 1.5rem; margin-bottom: 1.4rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--linie);
}
.hinweis { padding-top: .5rem; }
.hinweis p { max-width: 60ch; color: var(--leise); }

/* Akten --------------------------------------------------------------- */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; }
.raster.klein { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }

.akte {
  display: block; text-decoration: none; color: var(--schrift);
  border: 1px solid var(--linie); background: var(--karte); padding: .7rem;
}
a.akte:hover { border-color: var(--gold); }

.akte-foto {
  position: relative;
  aspect-ratio: 4 / 5; overflow: hidden; background: var(--tief);
  border: 1px solid var(--linie);
  display: flex; align-items: center; justify-content: center;
}
.akte-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.platzhalter { width: 48%; color: #4a3c26; }

.stempel {
  position: absolute; top: .6rem; right: .5rem;
  transform: rotate(-9deg);
  padding: .2rem .5rem;
  border: 2px solid var(--stempel);
  color: var(--stempel);
  background: rgba(11, 9, 6, .55);
  font-family: "Courier Prime", monospace;
  font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
}
.stempel.fest {
  position: static; display: inline-block; transform: rotate(-2deg);
  margin: .6rem 0 0; font-size: .78rem;
}

.akte-text { padding: .8rem .2rem .2rem; }
.deckname {
  font-size: 1.35rem; margin: 0 0 .5rem;
  color: var(--gold-hell); letter-spacing: .02em;
}
.deckname.klein { font-size: 1.05rem; margin: 0; }

.felder { margin: 0; display: grid; gap: .3rem; }
.felder > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; align-items: baseline; }
.felder dt {
  font-family: "Courier Prime", monospace;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leise);
}
.felder dd { margin: 0; font-size: .95rem; }
.felder.gross > div { grid-template-columns: 9rem 1fr; }
.felder.gross dd { font-size: 1.05rem; }

.offen {
  margin: .7rem 0 0;
  font-family: "Courier Prime", monospace;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gruen);
}
.status-vergeben .akte-foto img { filter: grayscale(.7) brightness(.7); }

/* Tierseite ----------------------------------------------------------- */
.tier { padding-top: 1rem; }
.rueckweg { margin: 0 0 1.6rem; font-size: .92rem; }

.tier-akte {
  border: 1px solid var(--gold);
  outline: 1px solid var(--linie); outline-offset: 5px;
  background: var(--karte);
  padding: clamp(1.3rem, 4vw, 2.2rem);
  margin-bottom: 2.6rem;
}
.tier-kopf { border-bottom: 1px solid var(--linie); padding-bottom: 1.2rem; margin-bottom: 1.4rem; }
.tier-kopf h1 { font-size: clamp(2rem, 7vw, 3.2rem); color: var(--gold-hell); margin: 0; }

.vermerk { margin-top: 1.6rem; border-top: 1px dashed var(--linie); padding-top: 1.2rem; }
.vermerk p:last-child { margin: 0; max-width: 60ch; }

.galerie {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: .9rem; margin-bottom: 3rem;
}
.galerie-bild {
  padding: 0; border: 1px solid var(--linie); background: none;
  cursor: zoom-in; overflow: hidden; font: inherit;
}
.galerie-bild:hover { border-color: var(--gold); }
.galerie-bild img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.leer { color: var(--leise); border: 1px dashed var(--linie); padding: 1.1rem; }

.lupe {
  border: 2px solid var(--gold); padding: .5rem; background: var(--tief);
  max-width: min(94vw, 900px); color: var(--schrift);
}
.lupe::backdrop { background: rgba(6, 4, 2, .9); }
.lupe img { width: 100%; height: auto; display: block; }
.lupe button { margin-top: .7rem; }

/* Formulare ----------------------------------------------------------- */
.anfrage {
  background: var(--karte); border: 1px solid var(--linie);
  border-left: 3px solid var(--gold);
  padding: clamp(1.2rem, 4vw, 1.8rem); margin-bottom: 3rem;
}
.anfrage h2 { font-size: 1.45rem; }
.anfrage-text { color: var(--leise); max-width: 54ch; }

.formular { display: flex; flex-direction: column; gap: 1rem; max-width: 34rem; margin-top: 1.3rem; }
.formular label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--leise); }
input[type="text"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
  font: inherit; color: var(--schrift); background: var(--tief);
  border: 1px solid var(--linie); padding: .62rem .75rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; }
.honigtopf { position: absolute; left: -9999px; }

button {
  font-family: "Courier Prime", monospace;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #150f07;
  background: linear-gradient(180deg, var(--gold-hell), var(--gold));
  border: 0; padding: .8rem 1.4rem; cursor: pointer; align-self: flex-start;
}
button:hover { background: var(--gold-hell); }
button.klein {
  font-size: .68rem; letter-spacing: .12em; padding: .45rem .8rem;
  color: var(--schrift); background: #221a10; border: 1px solid var(--linie);
}
button.klein:hover { background: #30250f; }

/* Verwaltung und Upload ----------------------------------------------- */
.schmal { max-width: 46rem; padding-top: 1rem; }
.schmal h1 { font-size: 2.1rem; margin-bottom: 1rem; }
.schmal h2 {
  font-size: 1.3rem; margin: 2.6rem 0 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--linie);
}

.kachel { margin: 0; display: block; color: var(--schrift); text-decoration: none; }
.kachel-bild {
  aspect-ratio: 4 / 5; overflow: hidden; background: var(--tief);
  border: 1px solid var(--linie); display: flex; align-items: center; justify-content: center;
}
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel-text { padding: .6rem .1rem 0; display: flex; flex-direction: column; gap: .35rem; }
.kachel-name { font-family: "Bodoni Moda", serif; font-size: 1.05rem; }
.kachel-detail {
  color: var(--leise); font-family: "Courier Prime", monospace;
  font-size: .7rem; letter-spacing: .1em;
}

.marker {
  font-family: "Courier Prime", monospace;
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--leise);
}
.marker::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  margin-right: .5rem; border-radius: 50%; background: currentColor; vertical-align: middle;
}
.marker.status-frei { color: var(--gruen); }
.marker.status-reserviert { color: var(--gold); }
.marker.status-vergeben { color: #6f6455; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.knopfreihe form { margin: 0; }

.anfrageliste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.anfrage-eintrag {
  background: var(--karte); border: 1px solid var(--linie);
  border-left: 3px solid var(--gold); padding: 1rem 1.1rem;
}
.anfrage-eintrag p { margin: 0 0 .35rem; }
.anfrage-eintrag.zustand-erledigt { border-left-color: var(--linie); opacity: .6; }
.anfrage-eintrag.zustand-zugesagt { border-left-color: var(--gruen); }
.anfrage-nachricht { color: var(--leise); }
.anfrage-kopf .kachel-detail { display: block; }

.klappe { border: 1px solid var(--linie); padding: .9rem 1.1rem; margin-bottom: .7rem; background: var(--karte); }
.klappe summary {
  cursor: pointer; font-family: "Bodoni Moda", serif; font-size: 1.1rem;
  display: flex; gap: .8rem; align-items: baseline; justify-content: space-between;
}
.klappe .formular { margin-top: 1.3rem; }

@media (max-width: 480px) {
  .felder > div, .felder.gross > div { grid-template-columns: 6.5rem 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
