/* ══════════════════════════════════════════════════════════
   CAMPUS — Vorstellungsseite
   lupe.css · Bild anklicken: Bild nach vorn, Hintergrund unscharf

   Gilt für jedes Bild der Seite. Ändert keine bestehende Regel;
   die Lupe legt sich nur darüber.
   ══════════════════════════════════════════════════════════ */

/* ── Anfassbare Bilder ──────────────────────────────────────
   Nur Inhaltsbilder bekommen die Lupe. Bildmarken (CAMPUS,
   IBUV) und leere Bildplätze bleiben unberührt: lupe.js setzt
   die Klasse .lupe-ziel ausschließlich auf Inhaltsbilder. */

.lupe-ziel {
  position: relative;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><g fill='none' stroke='%23ffffff' stroke-width='5' stroke-linecap='round'><circle cx='12.5' cy='12.5' r='8'/><path d='M18.4,18.4L26,26'/></g><g fill='none' stroke='%2312365e' stroke-width='2.3' stroke-linecap='round'><circle cx='12.5' cy='12.5' r='8'/><path d='M18.4,18.4L26,26'/></g></svg>") 12 12, pointer;
}
.lupe-ziel img { transition: filter var(--uebergang); }

/* Schleier über dem Bild, damit das Zeichen zu lesen ist */
.lupe-ziel::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(10,32,57,.16);
  opacity: 0;
  transition: opacity var(--uebergang);
  pointer-events: none;
}

/* Lupenzeichen in der Mitte – kein Pluszeichen */
.lupe-ziel::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: rgba(255,255,255,.94) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'><g fill='none' stroke='%2312365e' stroke-width='2.1' stroke-linecap='round'><circle cx='11' cy='11' r='7.2'/><path d='M16.2,16.2L23,23'/></g></svg>") center / 26px 26px no-repeat;
  box-shadow: 0 10px 26px -12px rgba(10,32,57,.75);
  opacity: 0;
  transform: scale(.82);
  transition: opacity var(--uebergang), transform var(--uebergang);
  pointer-events: none;
}

.lupe-ziel:hover::before,
.lupe-ziel:focus-visible::before { opacity: 1; }
.lupe-ziel:hover::after,
.lupe-ziel:focus-visible::after { opacity: 1; transform: none; }

/* Kleine Bilder: kleineres Zeichen */
.lupe-ziel.zeichenfeld::after,
.lupe-ziel.bildfeld--auftakt::after {
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  background-size: 21px 21px;
}

/* ── Die Lupe selbst ───────────────────────────────────── */
.lupe {
  position: fixed; inset: 0; z-index: 200;
  display: grid;
  /* minmax(0,1fr): ohne das darf das Bild die Zeile aufdrücken
     und schiebt die Bildunterschrift aus dem Sichtfeld. */
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  padding: clamp(16px, 4vw, 48px) clamp(12px, 4vw, 48px) clamp(12px, 2.4vw, 28px);
  gap: 16px;

  /* Hintergrund unscharf */
  background: rgba(245, 244, 240, .74);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);

  opacity: 0;
  transition: opacity 220ms ease;
}
.lupe[hidden] { display: none !important; }
.lupe--offen { opacity: 1; }

/* Ohne backdrop-filter (ältere Browser): kräftigere Fläche statt Unschärfe */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lupe { background: rgba(245, 244, 240, .97); }
}

.lupe__bild {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  display: block;
  background: #fff;
  border: 1px solid var(--rand);
  box-shadow: 0 50px 90px -40px rgba(10,32,57,.6);
  transform: scale(.975);
  transition: transform 260ms cubic-bezier(.22,.61,.36,1);
  cursor: zoom-out;
}
.lupe--offen .lupe__bild { transform: none; }

.lupe__fuss {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: center; gap: 6px 16px;
  max-width: 88ch;
  text-align: center;
}
.lupe__wort {
  font-size: .86rem;
  line-height: 1.5;
  color: var(--text);
}
.lupe__taste {
  /* 20.09.2026: von .72rem (11,5px) auf 12,8px – am Schreibtisch
     stand hier die kleinste Schrift der ganzen Seite. */
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gedaempft);
}

.lupe__schliessen {
  position: fixed; top: clamp(12px, 2.4vw, 26px); right: clamp(12px, 2.4vw, 26px);
  min-width: 44px; height: 48px; padding: 0 20px 0 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--schrift-text); font-size: 1rem; font-weight: 600;
  background: var(--kenn); color: #fff;
  border: 0; border-radius: 2px;
  cursor: pointer;
  transition: background var(--uebergang), transform var(--uebergang);
}
.lupe__schliessen:hover { background: var(--kenn-tief); }
.lupe__schliessen:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--kenn); }
.lupe__schliessen svg { width: 18px; height: 18px; }

/* Seite hinter der Lupe stillstellen */
body.lupe-offen { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lupe, .lupe__bild, .lupe__schliessen,
  .lupe-ziel::before, .lupe-ziel::after { transition: none; }
  .lupe__bild { transform: none; }
}

@media (max-width: 720px) {
  .lupe-ziel::after { width: 46px; height: 46px; margin: -23px 0 0 -23px; background-size: 21px 21px; }
  .lupe__schliessen { height: 48px; padding: 0 16px 0 12px; }
}
