/* ============================================================
   SVHArchiv — Vitrine-Header & -Footer (Menü-Variante C, E-33)
   Dunkelblauer Grund, Fraunces-Wortmarke, dünne weit gesetzte
   Navigation mit grüner Akzentlinie, Mega-Panel „Archivzugang",
   Anmelden-Pill. Lädt nach svh-design.css (Prio 100).
   ============================================================ */

:root {
  --vit-grund:   #072A43;
  --vit-plateA:  #123C5A;
  --vit-plateB:  #0F3650;
  --vit-hell:    #EDEEF0;
  --vit-neben:   #9FB2C2;
  --vit-label:   #7E96AC;
  --vit-gruen:   #63bd83;
  --vit-linie:   rgba(237, 238, 240, 0.16);
  --vit-rand:    rgba(237, 238, 240, 0.14);
}

/* ---------- Grundgerüst ---------- */
.svh-vit {
  position: relative;
  z-index: 90;
  background: var(--vit-grund);
  font-family: 'Montserrat', system-ui, sans-serif;
}
.svh-vit-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.svh-vit a { text-decoration: none; }
.svh-vit button { font: inherit; }

/* ---------- Kopfzeile ---------- */
.svh-vit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}
.svh-vit-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 25px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--vit-hell);
}
.svh-vit-brand:hover,
.svh-vit-brand:focus { color: #ffffff; }
.svh-vit-konto {
  display: flex;
  align-items: center;
  gap: 24px;
}
.svh-vit-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vit-label);
}
.svh-vit-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--vit-grund);
  background: var(--vit-gruen);
  padding: 9px 20px;
  border-radius: 999px;
  min-height: 0;
  line-height: 1.4;
}
.svh-vit-pill:hover,
.svh-vit-pill:focus { background: #78cc95; color: var(--vit-grund); }
.svh-vit-logout {
  font-size: 11px;
  color: var(--vit-neben);
  border-bottom: 1px solid var(--vit-linie);
  padding-bottom: 1px;
}
.svh-vit-logout:hover,
.svh-vit-logout:focus { color: var(--vit-hell); }

/* ---------- Hauptnavigation ---------- */
.svh-vit-nav { margin-top: 30px; }
.svh-vit-liste {
  list-style: none;
  margin: 0;
  padding: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 44px;
  border-bottom: 1px solid var(--vit-linie);
}
.svh-vit-punkt { margin: 0; display: flex; align-items: center; gap: 6px; }
.svh-vit-punkt > a {
  display: inline-block;
  padding: 2px 0 6px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--vit-neben);
  border-bottom: 2px solid transparent;
}
.svh-vit-punkt > a:hover,
.svh-vit-punkt > a:focus { color: var(--vit-hell); }
.svh-vit-punkt.ist-aktiv > a {
  color: var(--vit-hell);
  border-bottom-color: var(--vit-gruen);
}
.svh-vit-mega-knopf,
.svh-vit-suche-knopf {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--vit-neben);
  padding: 4px;
  min-height: 0;
  display: inline-flex;
  align-items: center;
}
.svh-vit-mega-knopf:hover, .svh-vit-mega-knopf:focus,
.svh-vit-suche-knopf:hover, .svh-vit-suche-knopf:focus { color: var(--vit-hell); background: none; }
.svh-vit-mega-knopf svg { transition: transform 0.18s ease; }
.svh-vit-mega-knopf[aria-expanded="true"] svg { transform: rotate(180deg); }
.svh-vit-suche-punkt { margin-left: auto; }

/* ---------- Suche ---------- */
.svh-vit-suche {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 560px;
  margin: 16px 0 2px auto;
}
.svh-vit-suche[hidden] { display: none; }
.svh-vit-suche input[type="search"] {
  flex-grow: 1;
  min-width: 0;
  background: rgba(237, 238, 240, 0.06);
  border: 1px solid var(--vit-rand);
  border-radius: 999px;
  color: var(--vit-hell);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 18px;
}
.svh-vit-suche input[type="search"]::placeholder { color: var(--vit-label); }
.svh-vit-suche button[type="submit"] {
  background: var(--vit-gruen);
  color: var(--vit-grund);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 20px;
  cursor: pointer;
  min-height: 0;
}
.svh-vit-suche button[type="submit"]:hover { background: #78cc95; }

/* ---------- Mega-Panel ---------- */
.svh-vit-mega { padding: 30px 0 34px 0; }
.svh-vit-mega[hidden] { display: none; }
.svh-vit-mega-gitter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.svh-vit-fach { display: block; }
.svh-vit-flaeche {
  display: block;
  height: 96px;
  background: var(--vit-plateA);
  border: 1px solid var(--vit-rand);
  border-radius: 2px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.svh-vit-flaeche.ist-tief { background: var(--vit-plateB); }
.svh-vit-fach:hover .svh-vit-flaeche,
.svh-vit-fach:focus .svh-vit-flaeche {
  background: #16486B;
  border-color: var(--vit-gruen);
}
.svh-vit-fach-name {
  display: block;
  margin-top: 13px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--vit-hell);
}
.svh-vit-fach-text {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vit-label);
  line-height: 1.6;
}
.svh-vit-mega-fuss {
  margin: 26px 0 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--vit-label);
}

/* ---------- Burger (nur mobil sichtbar) ---------- */
.svh-vit-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 0;
  flex-direction: column;
  gap: 5px;
}
.svh-vit-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--vit-hell);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.svh-vit-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.svh-vit-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.svh-vit-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Vitrine-Footer-Leiste ---------- */
.svh-vit-fuss {
  background: var(--vit-grund);
  font-family: 'Montserrat', system-ui, sans-serif;
}
.svh-vit-fuss-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 30px 24px;
}
.svh-vit-fuss-marke {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 300;
  color: var(--vit-hell);
}
.svh-vit-fuss-nav {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--vit-linie);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
}
.svh-vit-fuss-nav a {
  font-size: 12px;
  color: var(--vit-neben);
  text-decoration: none;
}
.svh-vit-fuss-nav a:hover,
.svh-vit-fuss-nav a:focus { color: var(--vit-hell); }

/* ---------- Mobil ---------- */
@media (max-width: 920px) {
  .svh-vit-top { padding-top: 16px; padding-bottom: 14px; }
  .svh-vit-brand { font-size: 21px; }
  .svh-vit-label { display: none; }
  .svh-vit-burger { display: inline-flex; }
  .svh-vit-nav { margin-top: 0; display: none; }
  .svh-vit.menue-offen .svh-vit-nav { display: block; }
  .svh-vit-liste {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--vit-linie);
    border-bottom: 0;
    padding-bottom: 8px;
  }
  .svh-vit-punkt {
    justify-content: space-between;
    border-bottom: 1px solid var(--vit-linie);
  }
  .svh-vit-punkt > a {
    flex-grow: 1;
    padding: 14px 0;
    font-size: 14px;
    border-bottom: 0;
  }
  .svh-vit-punkt.ist-aktiv > a { color: var(--vit-gruen); }
  .svh-vit-mega-knopf { padding: 14px 10px; }
  .svh-vit-suche-punkt { margin-left: 0; }
  .svh-vit-suche-knopf { display: none; }
  .svh-vit.menue-offen .svh-vit-suche,
  .svh-vit-suche { margin: 0; }
  .svh-vit.menue-offen .svh-vit-suche[hidden] { display: flex; padding: 14px 0; }
  .svh-vit-mega { padding: 18px 0 22px 0; }
  .svh-vit-mega-gitter { grid-template-columns: 1fr 1fr; gap: 16px; }
  .svh-vit-flaeche { height: 56px; }
  .svh-vit-fach-name { font-size: 15px; margin-top: 9px; }
  .svh-vit-mega-fuss { margin-top: 18px; }
}
@media (max-width: 480px) {
  .svh-vit-mega-gitter { grid-template-columns: 1fr; }
  .svh-vit-flaeche { display: none; }
  .svh-vit-fach-name { margin-top: 0; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .svh-vit-mega-knopf svg,
  .svh-vit-burger span,
  .svh-vit-flaeche { transition: none; }
}

/* ---------- Vitrinen-Öffnungsanimation (beim Betreten des Archivzugangs) ---------- */
.svh-vit-tueren {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #072A43;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: svhTuerenEin 0.25s ease-out;
}
@keyframes svhTuerenEin { from { opacity: 0; } to { opacity: 1; } }
.svh-vit-tueren .svh-vit-rahmen {
  position: relative;
  width: min(72vw, 760px);
  height: min(70vh, 560px);
  border: 2px solid rgba(237, 238, 240, 0.28);
  border-radius: 3px;
  box-shadow: 0 0 0 10px #0F3650, 0 30px 80px rgba(0, 0, 0, 0.55);
  perspective: 1200px;
  overflow: visible;
  display: flex;
}
.svh-vit-fluegel {
  position: relative;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg,
    rgba(237, 238, 240, 0.16), rgba(237, 238, 240, 0.05) 38%,
    rgba(237, 238, 240, 0.20) 55%, rgba(237, 238, 240, 0.07));
  border: 1px solid rgba(237, 238, 240, 0.30);
  backface-visibility: visible;
}
.svh-vit-fluegel.ist-links  { transform-origin: left center;  animation: svhTuerLinks  2.6s ease-in forwards; }
.svh-vit-fluegel.ist-rechts { transform-origin: right center; animation: svhTuerRechts 2.6s ease-in forwards; }
.svh-vit-fluegel.ist-links::after,
.svh-vit-fluegel.ist-rechts::after {
  content: "";
  position: absolute;
  top: 44%;
  width: 5px;
  height: 64px;
  border-radius: 3px;
  background: rgba(237, 238, 240, 0.55);
}
.svh-vit-fluegel.ist-links::after  { right: 10px; }
.svh-vit-fluegel.ist-rechts::after { left: 10px; }

/* Ruckeliges Aufschwingen = „Knarren" auch im Bild (Stick-Slip) */
@keyframes svhTuerLinks {
  0%   { transform: rotateY(0deg); }
  16%  { transform: rotateY(-13deg); }
  22%  { transform: rotateY(-10deg); }
  42%  { transform: rotateY(-36deg); }
  50%  { transform: rotateY(-32deg); }
  72%  { transform: rotateY(-60deg); }
  78%  { transform: rotateY(-56deg); }
  100% { transform: rotateY(-82deg); }
}
@keyframes svhTuerRechts {
  0%   { transform: rotateY(0deg); }
  16%  { transform: rotateY(13deg); }
  22%  { transform: rotateY(10deg); }
  42%  { transform: rotateY(36deg); }
  50%  { transform: rotateY(32deg); }
  72%  { transform: rotateY(60deg); }
  78%  { transform: rotateY(56deg); }
  100% { transform: rotateY(82deg); }
}
.svh-vit-tueren .svh-vit-dahinter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 300;
  color: #EDEEF0;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: svhDahinterEin 0.8s ease-out 1.3s forwards;
  pointer-events: none;
}
@keyframes svhDahinterEin { to { opacity: 1; } }

/* ---------- Willkommensgrusz hinter den Tueren (31.10.2026) ----------
   Eine Sprechblase und eine Figur, die sie spricht. Beides reines CSS/SVG:
   kein fremder Server, keine Bibliothek -- dieselbe Linie wie das selbst
   erzeugte Tuerknarren. Die Figur ist Beiwerk (aria-hidden); vorgelesen
   wird der Text der Blase. */
.svh-vit-tueren .svh-vit-dahinter {
  /* Das Einblenden macht jetzt jedes Teil selbst (Blase 0,85 s, Figur 0,7 s).
     Bliebe hier die alte Sammel-Einblendung bei 1,3 s stehen, laegen beide
     bis dahin unsichtbar darin und ihre eigenen Zeiten waeren wirkungslos. */
  opacity: 1;
  animation: none;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(6px, 1.4vw, 18px);
  padding: 0 18px;
}
.svh-vit-tueren .svh-vit-blase {
  position: relative;
  max-width: min(60vw, 520px);
  margin: 0 0 26px;
  padding: clamp(12px, 1.8vw, 20px) clamp(16px, 2.4vw, 26px);
  background: var(--vit-hell);
  color: var(--vit-grund);
  border-radius: 18px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(17px, 2.5vw, 30px);
  line-height: 1.25;
  letter-spacing: 0.005em;
  text-align: left;
  text-wrap: balance;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  transform-origin: right bottom;
  animation: svhBlaseAuf 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s backwards;
}
/* Zipfel zur Figur hin */
.svh-vit-tueren .svh-vit-blase::after {
  content: '';
  position: absolute;
  right: -13px;
  bottom: 16px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 14px solid var(--vit-hell);
}
@keyframes svhBlaseAuf {
  from { opacity: 0; transform: scale(0.82) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.svh-vit-tueren .svh-vit-figur {
  flex: 0 0 auto;
  width: clamp(76px, 11vw, 132px);
  height: auto;
  animation: svhFigurEin 0.45s ease-out 0.7s backwards,
             svhFigurWippt 1.6s ease-in-out 1.0s 2;
}
@keyframes svhFigurEin {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes svhFigurWippt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%      { transform: translateY(-5px) rotate(-1.6deg); }
  65%      { transform: translateY(-2px) rotate(1.2deg); }
}
/* Der Mund macht das Sprechen: schnelles Auf und Zu, solange die Blase steht */
.svh-vit-tueren .svh-vit-mund {
  transform-origin: center;
  animation: svhMundSpricht 0.26s steps(1, end) 1.0s 7;
}
@keyframes svhMundSpricht {
  0%   { transform: scaleY(0.35); }
  50%  { transform: scaleY(1.15); }
  100% { transform: scaleY(0.55); }
}

/* Wer keine Bewegung will, bekommt Blase und Figur ruhig und sofort. */
@media (prefers-reduced-motion: reduce) {
  .svh-vit-tueren .svh-vit-blase,
  .svh-vit-tueren .svh-vit-figur,
  .svh-vit-tueren .svh-vit-mund { animation: none; }
}

/* Schmale Schirme: die Figur tritt zurueck, der Grusz bleibt. */
@media (max-width: 520px) {
  .svh-vit-tueren .svh-vit-figur { display: none; }
  .svh-vit-tueren .svh-vit-blase { margin-bottom: 0; text-align: center; }
  .svh-vit-tueren .svh-vit-blase::after { display: none; }
}
.svh-vit-tueren .svh-vit-ueberspringen {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7E96AC;
}

/* ============================================================
   Schutzschild gegen Ally-Kontrastschemata (PO-Entscheid 28.10.)
   Das Barrierefreiheits-Widget (ea11y) erzwingt per
   *:not(#ea11y-root)…-Regeln (Spezifität 2 IDs, !important)
   weiße Flächen und schwarze Schrift auf der ganzen Seite.
   Vitrine-Header, -Footer und -Türanimation bleiben davon
   unberührt; der restliche Seiteninhalt folgt weiter der
   Widget-Auswahl. Die :not(#ea11y-root)-Dreierkette hebt jede
   Regel hier auf 3 IDs und gewinnt damit den Gleichstand der
   !important-Deklarationen.
   ============================================================ */

.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root),
.svh-vit-fuss:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root),
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) {
  background-color: var(--vit-grund) !important;
}

/* Grundzustand aller Vitrine-Kinder: Flächen durchsichtig, Schrift gedämpft hell */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) *,
.svh-vit-fuss:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) *,
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) * {
  background-color: transparent !important;
  color: var(--vit-neben) !important;
}

/* Helle Akzente */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-brand,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-punkt.ist-aktiv > a,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-punkt > a:hover,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-punkt > a:focus,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fach-name,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-suche input[type="search"],
.svh-vit-fuss:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fuss-marke,
.svh-vit-fuss:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fuss-nav a:hover,
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-dahinter {
  color: var(--vit-hell) !important;
}

/* Gedämpfte Beschriftungen */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-label,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fach-text,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-mega-fuss,
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-ueberspringen {
  color: var(--vit-label) !important;
}

/* Grüne Pille & Such-Knopf */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-pill,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-suche button[type="submit"] {
  background-color: var(--vit-gruen) !important;
  color: var(--vit-grund) !important;
}

/* Suchfeld & Mega-Vitrinenflächen */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-suche input[type="search"] {
  background-color: rgba(237, 238, 240, 0.06) !important;
}
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-flaeche {
  background-color: var(--vit-plateA) !important;
}
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-flaeche.ist-tief {
  background-color: var(--vit-plateB) !important;
}
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fach:hover .svh-vit-flaeche,
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fach:focus .svh-vit-flaeche {
  background-color: #16486B !important;
}

/* Burger-Balken */
.svh-vit:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-burger span {
  background-color: var(--vit-hell) !important;
}

/* Türanimation: Glas-Verlauf und Rahmen-Schatten zurückholen */
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-fluegel {
  background-image: linear-gradient(105deg,
    rgba(237, 238, 240, 0.16), rgba(237, 238, 240, 0.05) 38%,
    rgba(237, 238, 240, 0.20) 55%, rgba(237, 238, 240, 0.07)) !important;
}
.svh-vit-tueren:not(#ea11y-root):not(#ea11y-root):not(#ea11y-root) .svh-vit-rahmen {
  box-shadow: 0 0 0 10px #0F3650, 0 30px 80px rgba(0, 0, 0, 0.55) !important;
}
