:root {
  --sidebar-width: 19.4vw;
  --page-padding: clamp(26px, 2.55vw, 52px);
  --nav-color: #3f3f3f;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  overflow-y: scroll;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  background: #fff;
  color: var(--nav-color);
  font-family: "univers-next-pro", sans-serif;
  font-weight: 300;
  letter-spacing: .04em;
}

a, button { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  min-height: 100svh;
  padding: clamp(34px, 5.2vw, 102px) clamp(22px, 2.5vw, 50px) 17px;
  background: #fff;
}

.wordmark {
  width: max-content;
  max-width: 100%;
  color: #303030;
  font-family: "anivers", sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 36px);
  letter-spacing: .06em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.ce_text strong{
  font-weight: 800;
  color: black;
}

.menu-toggle { display: none; }

nav { margin-top: clamp(75px, 9.6vw, 186px); }

nav a, .nav-heading {
  display: block;
  margin: 0 0 clamp(11px, .82vw, 16px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nav-color);
  font: inherit;
  font-size: clamp(13px, .8vw, 16px);
  font-size: clamp(15px, .9vw, 18px);
  letter-spacing: .04em;
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
  text-transform: normal;
}

.nav-heading { font-weight: 700; cursor: pointer; }
.project-links { margin: clamp(18px, 1.8vw, 35px) 0 clamp(20px, 2.05vw, 40px); }
.project-links a { opacity: .82; }
.project-links a.is-active { font-weight: 700; opacity: 1; }
.sidebar nav a, footer a { cursor: pointer; }
.sidebar nav a:hover, .sidebar nav a:focus-visible, footer a:hover, footer a:focus-visible, .wordmark:hover, .wordmark:focus-visible { opacity: .55; }
.sidebar nav a:focus-visible, footer a:focus-visible, .wordmark:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.instagram { width: 20px; margin-top: clamp(9px, 1vw, 20px); }
.instagram svg { display: block; width: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.instagram-dot { fill: currentColor; stroke: none; }

footer { margin-top: auto; }
footer a { display: block; color: var(--nav-color); font-size: clamp(10px, .48vw, 12px); line-height: 1.4; text-decoration: none; text-transform: uppercase; }
.mobile-footer { display: none; }

.gallery {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  min-height: 100svh;
  margin-left: var(--sidebar-width);
  padding: clamp(34px, 2.55vw, 52px) clamp(30px, 2.55vw, 52px) clamp(34px, 4.2vw, 84px) 0;
  cursor: none;
}

.gallery-loader {
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: 5;
  display: none;
  align-content: center;
  justify-items: center;
  gap: 13px;
  background: rgb(255 255 255 / .86);
  color: #4b4b4b;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.gallery.is-loading .gallery-loader { display: grid; }
.loader-spinner {
  width: 24px;
  height: 24px;
  border: 1px solid #c5c5c5;
  border-top-color: #3d3d3d;
  border-radius: 50%;
  animation: loader-spin .75s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }

.slides {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100svh - clamp(68px, 6.75vw, 136px));
}

.slide {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100svh - clamp(68px, 6.75vw, 136px));
  gap: clamp(24px, 9.2vw, 180px);
}

.slide.is-current { display: flex; }
.photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  margin: 0;
}
.slide img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center top; }
.slide.one .photo { width: 100%; }
.slide.one .photo img { width: 100%; height: 100%; }
.slide.pair .photo { width: calc(50% - clamp(12px, 4.6vw, 90px)); }
.slide.pair .photo img { width: 100%; height: 100%; }
.slide.one .photo.has-caption img,
.slide.pair .photo.has-caption img { height: calc(100% - 24px); }
.photo figcaption {
  min-height: 24px;
  padding-top: 7px;
  color: #777;
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
}

.gallery.is-start .slides { position: relative; }
.gallery.is-start .slide {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.15s ease-in-out;
}
.gallery.is-start .slide.is-current { z-index: 1; opacity: 1; }

.intro-slide {
  position: relative;
  justify-content: flex-start;
  padding: clamp(34px, 8vw, 160px);
  background-color: #fff;
}

.intro-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: brightness(.38);
}

.intro-content {
  position: relative;
  z-index: 3;
  max-width: min(760px, 77%);
  color: #fff;
  cursor: auto;
  font-family: Arial, sans-serif;
  font-size: clamp(23px, 2vw, 40px);
  line-height: 1.15;
}

.intro-content > :first-child { margin-top: 0; }
.intro-content h1, .intro-content h2, .intro-content p { margin: 0 0 .75em; font: inherit; }
.intro-content h1 { font-size: 1.25em; }
.intro-content a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .13em; }

.image-control {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 50%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: none;
}

.image-control:focus-visible { outline: 1px solid #555; outline-offset: -6px; }
.image-control.previous { left: 0; }
.image-control.next { right: 0; }

.cursor-arrow {
  position: fixed;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 0 / .48);
  color: #fff;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .12s ease;
}

.cursor-arrow svg { display: block; width: 48px; height: 48px; }
.cursor-arrow path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.cursor-arrow.is-previous svg { transform: scaleX(-1); }
.cursor-arrow.is-visible { opacity: 1; }
.counter { position: absolute; right: clamp(30px, 2.55vw, 52px); bottom: 17px; margin: 0; color: #777; font-size: 10px; letter-spacing: .08em; }

.page {
  width: calc(100% - var(--sidebar-width));
  min-height: 100svh;
  margin-left: var(--sidebar-width);
  padding: clamp(34px, 5.2vw, 102px) clamp(30px, 11vw, 220px) 80px clamp(30px, 5vw, 100px);
  overflow: visible;
}

.page-content { max-width: 720px; color: #333; }
.page h1 { margin: 0 0 40px; font-family: Arial, sans-serif; font-size: clamp(17px, 1.5vw, 30px); font-weight: 300; }
.page h2 { margin: 38px 0 12px; font-size: 15px; font-weight: 700; text-transform: uppercase; }
.page h3 { margin: 26px 0 8px; font-size: 13px; font-weight: 700; }
.page p, .page li { font-size: clamp(15px, 1.05vw, 19px); line-height: 1.55; }
.page p { margin: 0 0 18px; }
.page ul { margin: 0; padding: 0; list-style: none; }
.page li { margin-bottom: 9px; }
.page a { color: inherit; }
.text-links { margin-top: 4px !important; }
.text-links a { text-decoration: none; }
.text-links a:hover, .text-links a:focus-visible { text-decoration: underline; text-underline-offset: .16em; }
.text-back-link { display: inline-block; margin-top: 40px; text-decoration: none; }
.text-back-link:hover, .text-back-link:focus-visible { opacity: .55; }

@media (max-width: 740px) {
  :root { --sidebar-width: 100%; }
  .sidebar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    display: block;
    width: 100%;
    min-height: 0;
    padding: 20px 20px;
    background: #fff;
  }
  .wordmark { display: block; font-size: 21px; line-height: 1.1; }
  .menu-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 10px 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 100%; height: 1px; background: #333; transition: transform .2s ease, opacity .2s ease; }
  .menu-is-open .menu-toggle span:first-child { transform: translateY(7px) rotate(45deg); }
  .menu-is-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-is-open .menu-toggle span:last-child { transform: translateY(-7px) rotate(-45deg); }
  nav {
    display: none;
    max-height: calc(100svh - 118px);
    margin-top: 28px;
    padding: 8px 0 24px;
    overflow: auto;
  }
  .menu-is-open nav { display: block; }
  nav a, .nav-heading { margin: 0 0 17px; font-size: 13px; line-height: 1.2; }
  .project-links { display: block; margin: 21px 0 25px; }
  .project-links a { margin-bottom: 14px; }
  .instagram { display: block; }
  footer { display: none; }
  .mobile-footer {
    display: flex;
    gap: 15px;
    position: fixed;
    z-index: 9;
    left: 20px;
    bottom: max(17px, env(safe-area-inset-bottom));
    margin: 0;
    padding: 0;
  }
  .mobile-footer a { margin: 0; font-size: 10px; }
  .gallery { width: 100%; min-height: 100svh; margin-left: 0; padding: 76px 12px 12px; cursor: auto; }
  .gallery-loader { inset: 72px 0 0; }
  .page { width: 100%; min-height: auto; margin-left: 0; padding: 42px 24px 70px; }
  .page { padding-top: 102px; }
  .slides, .slide { min-height: calc(100svh - 88px); height: calc(100svh - 88px); }
  .slide { gap: 12px; }
  .slide.pair img { width: calc(50% - 6px); }
  .intro-slide { padding: 32px 26px; }
  .intro-content { max-width: 100%; font-size: 23px; }
  .image-control { width: 50%; }
  .cursor-arrow { display: none; }

  .gallery.is-project {
    /* Platz für die fest positionierten Links Impressum / Datenschutz. */
    padding: 76px 10px calc(62px + env(safe-area-inset-bottom));
  }
  .gallery.is-project .slides { display: block; min-height: 0; height: auto; }
  .gallery.is-project .slide,
  .gallery.is-project .slide:not(.is-current) {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 12px;
  }
  /* Bild und Bildunterschrift bilden auf dem Smartphone einen gemeinsamen,
     natürlich hohen Block – keine an die Viewport-Höhe gebundene Fläche. */
  .gallery.is-project .slide .photo {
    display: block;
    height: auto !important;
  }
  .gallery.is-project .slide.one img,
  .gallery.is-project .slide.pair img {
    width: 100%;
    height: auto !important;
    max-height: none;
    object-fit: contain;
  }
  .gallery.is-project .photo { width: 100%; }
  .gallery.is-project .photo figcaption {
    display: block;
    min-height: 0;
    padding: 8px 0 14px;
  }
  .gallery.is-project .slide.pair { flex-direction: column; }
  .gallery.is-project .intro-slide {
    min-height: min(66svh, 520px);
    padding: 38px 26px;
    background-color: #6b6b6b;
  }
  .gallery.is-project .intro-image { display: none; }
  .gallery.is-project .intro-content { color: #fff; font-size: 25px; }
  .gallery.is-project .image-control,
  .gallery.is-project .counter { display: none; }
}
