/* zo-hero — hero/gallery slider for the static mirror.
   Original replacement for Slider Revolution. No framework, no jQuery.

   Geometry comes from the source slider definition:
     --zo-hero-ratio   gridwidth/gridheight  (layout: auto | fullwidth)
     .zo-hero--fullscreen                    (layout: fullscreen)

   Caption anchoring mirrors the original layer offsets:
     data-x  left | center | right     --zo-cx  horizontal offset
     data-y  top  | middle | bottom    --zo-cy  vertical offset
*/

.zo-hero {
  position: relative;
  width: 100%;
  aspect-ratio: var(--zo-hero-ratio, 1240/868);
  max-height: 86vh;
  overflow: hidden;
  background: #f2f5f7;
  isolation: isolate;
}

/* The source used fullscreen minus the 120px sticky header. */
.zo-hero--fullscreen {
  aspect-ratio: auto;
  height: calc(100vh - 120px);
  min-height: 420px;
  max-height: none;
}

.zo-hero .zo-hero__slides {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  height: 100%;
  position: relative;
}

/* The source markup gives slides ids (#private-opening, #standort) and the
   theme styles those at id specificity, so the structural rules below must
   outrank them. */
.zo-hero .zo-hero__slides > li.zo-hero__slide {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  background-color: #f2f5f7;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease;
}

.zo-hero .zo-hero__slides > li.zo-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

/* Artwork with its own text (e.g. square campaign images): fit it to the
   right half so the left-anchored caption never sits on top of it. The
   fill colour should match the artwork's background. */
.zo-hero .zo-hero__slides > li.zo-hero__slide.zo-hero__slide--art-right {
  background-color: var(--zo-slide-bg, #f2f5f7);
  background-size: contain;
  background-position: right center;
}

@media (prefers-reduced-motion: reduce) {
  .zo-hero__slide { transition: none; }
}

/* ---- captions ---- */

.zo-hero__caption {
  position: absolute;
  z-index: 2;
  max-width: min(680px, 86%);
}

.zo-hero__caption[data-x="left"]   { left: var(--zo-cx, 0); }
.zo-hero__caption[data-x="right"]  { right: var(--zo-cx, 0); }
.zo-hero__caption[data-x="center"] {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.zo-hero__caption[data-y="top"]    { top: var(--zo-cy, 0); }
.zo-hero__caption[data-y="bottom"] { bottom: var(--zo-cy, 0); }
.zo-hero__caption[data-y="middle"] { top: 50%; transform: translateY(-50%); }

.zo-hero__caption[data-x="center"][data-y="middle"] {
  transform: translate(-50%, -50%);
}

.zo-hero__caption h1,
.zo-hero__caption h2,
.zo-hero__caption h3 { margin: 0; }

/* ---- controls ---- */

.zo-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.zo-hero__arrow:hover { background: #fff; }

.zo-hero__arrow:focus-visible {
  outline: 2px solid #fd6902;
  outline-offset: 2px;
}

.zo-hero__arrow::before {
  font-family: "icomoon";
  font-size: 22px;
  line-height: 1;
  display: block;
}

.zo-hero__arrow--prev { left: 16px; }
.zo-hero__arrow--next { right: 16px; }
.zo-hero__arrow--prev::before { content: "\e908"; margin-left: -2px; }
.zo-hero__arrow--next::before { content: "\e90a"; margin-right: -2px; }

.zo-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.zo-hero__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.zo-hero__dot.is-active {
  background: #fd6902;
  transform: scale(1.25);
}

.zo-hero__dot:focus-visible {
  outline: 2px solid #fd6902;
  outline-offset: 3px;
}

.zo-hero--single .zo-hero__arrow,
.zo-hero--single .zo-hero__dots { display: none; }

/* Store pages: one shared hero caption template. Text sits bottom-left on a
   dark scrim so it stays readable on any photo; the city is the orange accent. */
.zo-hero--store .zo-hero__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 80%);
}

.zo-hero .zo-hero__caption.zo-hero__caption--store {
  left: 5vw !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  max-width: 90%;
  text-align: left;
}

.zo-hero__caption--store h1 br { display: none; }

.zo-hero .zo-hero__caption--store h1 {
  text-align: left !important;
  color: #fff;
  font-size: clamp(26px, 4vw, 50px);
  line-height: 1.1;
  letter-spacing: .06em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.zo-hero .zo-hero__caption--store h1 .slanted {
  display: block;
  margin: .15em 0 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
  text-align: left !important;
  color: #FD6902;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: 0;
}

/* Offsets in the source were desktop-only; collapse them on narrow screens.
   !important is needed because the offsets are set inline per caption. */
@media (max-width: 1024px) {
  .zo-hero__caption { --zo-cx: 5vw !important; max-width: 90%; }
}

@media (max-width: 778px) {
  .zo-hero {
    aspect-ratio: auto;
    height: clamp(320px, 78vw, 460px);
  }
  .zo-hero--fullscreen { height: clamp(360px, 90vw, 560px); }
  .zo-hero__caption { --zo-cx: 5vw !important; --zo-cy: 6vw !important; max-width: 90%; }
  /* Stack instead: caption on top, artwork below it. */
  .zo-hero--fullscreen:has(.zo-hero__slide--art-right) {
    height: clamp(480px, 135vw, 640px);
  }
  .zo-hero .zo-hero__slides > li.zo-hero__slide.zo-hero__slide--art-right {
    background-position: center bottom;
  }
  .zo-hero__slide--art-right .zo-hero__caption {
    top: var(--zo-cy);
    transform: none;
  }
  .zo-hero__arrow { width: 36px; height: 36px; }
  .zo-hero__arrow--prev { left: 8px; }
  .zo-hero__arrow--next { right: 8px; }

  /* The theme showed gallery slides uncropped on small screens. */
  .zo-hero:not(.zo-hero--single) .zo-hero__slides > li.zo-hero__slide {
    background-size: contain;
  }
}

/* The theme gives the legacy slider wrapper a fixed height; with the hero's own
   aspect ratio that made the content below slide underneath the image. */
body:not(.home) .top-container.first.slider:has(.zo-hero) {
  height: auto !important;
}
