:root {
  --asset-version: "20260604-v3";
  --stage-max: 1760px;
  --edge: clamp(22px, 4.6vw, 92px);
  --map-width: min(67vw, 1120px);
  --marker-size: clamp(48px, 4.05vw, 70px);
  --carousel-gap: clamp(12px, 1.15vw, 20px);
  --items-per-view: 4;
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, .22);
  font-family: Arial, Helvetica, sans-serif;
  color: #050505;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background-image: url("../assets/img/ui/Hintergrund-Desktop.png?v=20260604-v3");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #f4f7f8;
}

button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(100%, var(--stage-max));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(34px, 5.6vh, 74px) var(--edge) clamp(24px, 4vh, 52px);
  display: grid;
  grid-template-columns: minmax(270px, 31%) minmax(700px, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(10px, 2vw, 42px);
  align-items: start;
}

.intro-panel {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 5;
  padding-top: clamp(8px, 1vh, 14px);
}

.title-art {
  display: block;
  width: min(100%, 385px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(7px 8px 3px rgba(0, 0, 0, .28));
}

.claim {
  margin: clamp(44px, 8vh, 98px) 0 0 clamp(2px, .4vw, 8px);
  max-width: 385px;
  font-size: clamp(20px, 1.45vw, 28px);
  line-height: 1.42;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .01em;
}

.map-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: center;
  width: var(--map-width);
  max-width: 100%;
  padding-top: clamp(4px, 1.4vh, 18px);
}

.map-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
  isolation: isolate;
}

.berlin-map {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.venue-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--marker-size);
  aspect-ratio: 150 / 120;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  transform-origin: center;
  z-index: 2;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .19));
  transition: transform .18s ease, filter .18s ease;
}

.venue-marker img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.venue-marker:hover,
.venue-marker:focus-visible {
  transform: translate(-50%, -50%) scale(1.13);
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .24));
  z-index: 5;
  outline: none;
}

.carousel-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  display: grid;
  grid-template-columns: clamp(42px, 5vw, 76px) minmax(0, 1fr) clamp(42px, 5vw, 76px);
  gap: clamp(14px, 1.6vw, 26px);
  align-items: center;
  width: min(100%, 1640px);
  margin: clamp(4px, 2.5vh, 28px) auto 0;
}

.carousel-viewport {
  overflow: hidden;
  min-width: 0;
  outline: none;
}

.carousel-viewport:focus-visible {
  outline: 3px solid rgba(224, 25, 73, .75);
  outline-offset: 8px;
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform .38s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.venue-thumb {
  flex: 0 0 calc((100% - var(--carousel-gap) - var(--carousel-gap) - var(--carousel-gap)) / 4);
  aspect-ratio: 16 / 9;
  padding: 0;
  border: clamp(2px, .25vw, 4px) solid #087fbe;
  background: #101010;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.venue-thumb:hover,
.venue-thumb:focus-visible {
  transform: translateY(-3px);
  border-color: #e31d4f;
  box-shadow: 0 14px 24px rgba(0,0,0,.27);
  outline: none;
}

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

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  transition: transform .16s ease, opacity .16s ease;
}

.carousel-arrow img {
  display: block;
  width: min(100%, 62px);
  height: auto;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  transform: scale(1.08);
  outline: none;
}

.carousel-arrow:disabled {
  opacity: .25;
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: min(5vw, 52px);
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
  margin: 0;
  width: 90vw;
  max-width: 1680px;
  max-height: 90vh;
  display: grid;
  place-items: center;
}

.lightbox-img {
  display: block;
  width: 90vw;
  max-width: 1680px;
  max-height: 86vh;
  object-fit: contain;
  border: 4px solid rgba(255,255,255,.15);
  box-shadow: var(--shadow-soft);
  animation: venueZoom .36s cubic-bezier(.2, .7, .2, 1) both;
}

.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(0,0,0,.7);
  opacity: .86;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .18);
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
  transition: transform .16s ease, background .16s ease;
}

.lightbox-close {
  top: clamp(16px, 3vw, 34px);
  right: clamp(18px, 3vw, 38px);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 46px;
  line-height: 46px;
}

.lightbox-nav {
  top: 50%;
  width: clamp(46px, 5vw, 72px);
  height: clamp(64px, 9vw, 110px);
  transform: translateY(-50%);
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1;
}

.lightbox-nav--prev { left: clamp(8px, 2vw, 30px); }
.lightbox-nav--next { right: clamp(8px, 2vw, 30px); }

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, .16);
  outline: none;
}

.lightbox-close:hover,
.lightbox-close:focus-visible { transform: scale(1.08); }
.lightbox-nav:hover,
.lightbox-nav:focus-visible { transform: translateY(-50%) scale(1.08); }

body.is-lightbox-open { overflow: hidden; }

@keyframes venueZoom {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

@media (orientation: portrait), (max-width: 900px) {
  :root {
    --edge: clamp(20px, 4.8vw, 44px);
    --map-width: min(112vw, 1080px);
    --marker-size: clamp(40px, 6.9vw, 70px);
    --items-per-view: 2;
    --carousel-gap: clamp(12px, 3vw, 20px);
  }

  body {
    min-height: 100svh;
    background-image: url("../assets/img/ui/Hintergrund-Mobil.png?v=20260604-v3");
    background-position: center top;
  }

  .site-shell {
    min-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-content: start;
    row-gap: clamp(14px, 2.2vh, 28px);
    padding: clamp(48px, 6.8vh, 84px) var(--edge) clamp(28px, 4.5vh, 60px);
  }

  .intro-panel {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
  }

  .title-art {
    width: min(78vw, 520px);
  }

  .claim {
    margin: clamp(32px, 4.6vh, 58px) auto 0;
    max-width: 820px;
    font-size: clamp(24px, 4.4vw, 38px);
    line-height: 1.45;
  }

  .map-panel {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: var(--map-width);
    max-width: none;
    margin-top: clamp(2px, 1vh, 14px);
    transform: translateX(-1.5%);
  }

  .carousel-panel {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: clamp(34px, 7.2vw, 54px) minmax(0, 1fr) clamp(34px, 7.2vw, 54px);
    gap: clamp(8px, 2vw, 16px);
    width: min(86vw, 760px);
    margin-top: clamp(8px, 1.8vh, 24px);
  }

  .venue-thumb {
    flex-basis: calc((100% - var(--carousel-gap)) / 2);
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .venue-thumb:hover,
  .venue-thumb:focus-visible {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: none;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-img {
    width: 92vw;
    max-height: 76vh;
  }

  .lightbox-caption { bottom: 12px; }

  .lightbox-nav {
    top: auto;
    bottom: 22px;
    width: 50px;
    height: 56px;
    font-size: 54px;
    transform: none;
  }

  .lightbox-nav:hover,
  .lightbox-nav:focus-visible { transform: scale(1.06); }
}

@media (max-width: 520px) {
  :root { --marker-size: clamp(32px, 8.1vw, 44px); }
  .site-shell { padding-inline: 16px; }
  .claim { font-size: clamp(20px, 5.2vw, 28px); }
  .map-panel { width: 116vw; }
  .carousel-panel { grid-template-columns: 30px minmax(0,1fr) 30px; width: min(84vw, 430px); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
