/* Live Event Galerie - Logo + 3x2 Raster passen in den Viewport; Fotos vollstaendig sichtbar */

:root {
  --overlay: rgba(8, 10, 18, 0.58);
  --slot-radius: clamp(12px, 1.2vmin, 24px);
  --slot-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  --gap: clamp(10px, 1.8vmin, 28px);
  --safe-top: clamp(12px, 2.5vmin, 40px);
  --safe-side: clamp(16px, 3.5vmin, 56px);
  --safe-bottom: clamp(12px, 2.5vmin, 40px);
  --brand-h: clamp(48px, 7vmin, 88px);
  --anim-enter: 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #f4f5f8;
  overflow: hidden;
  background: #0c0e14;
}

/* Eine Spalte: alles was sichtbar ist, skaliert in den verfuegbaren Platz */
.stage {
  position: relative;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage__bg {
  position: absolute;
  inset: 0;
  background: #0c0e14 url("assets/background.jpg") center / cover no-repeat;
  z-index: 0;
}

.stage__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.brand,
.gallery {
  position: relative;
  z-index: 2;
}

.brand {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: var(--safe-top) var(--safe-side) clamp(8px, 1.2vmin, 16px);
  pointer-events: none;
}

.brand__logo {
  display: block;
  height: var(--brand-h);
  width: auto;
  max-width: min(40vw, 420px);
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

.brand__logo[src=""],
.brand__logo:not([src]) {
  display: none;
}

.gallery {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0 var(--safe-side) var(--safe-bottom);
}

.gallery__grid {
  width: 100%;
  max-width: min(1920px, 96vw);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.slot {
  min-width: 0;
  min-height: 0;
  border-radius: var(--slot-radius);
  box-shadow: var(--slot-shadow);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.slot__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

/* Ganzes Foto sichtbar: Zentrieren per inset + max Groesse (zuverlaessiger als flex+img 100%) */
.slot__inner img {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.slot--empty .slot__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  pointer-events: none;
}

/* Nur Opacity animieren - kein transform auf dem Bild (sonst Abschneiden/Ruckeln) */
.slot--enter .slot__inner img {
  animation: slotEnter var(--anim-enter) both;
}

@keyframes slotEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
