:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: #191917;
  background: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #fff;
}

body {
  margin: 0;
  color: #191917;
  background: #fff;
}

a {
  color: inherit;
}

/* Collection single: own header, global navigation later. */
body:has(.collection-viewer) .site-header {
  display: none;
}

/* --------------------------------
   SITE HEADER
   -------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 2rem;
  right: 2rem;
  z-index: 30;

  height: 4.5rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #fff;

  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-header a {
  text-decoration: none;
}

.site-title {
  font-weight: 500;
}


/* --------------------------------
   NORMAL PAGES
   -------------------------------- */

main {
  width: min(1100px, calc(100% - 4rem));
  margin-inline: auto;
}

.intro,
.page-header {
  max-width: 44rem;
}


/* --------------------------------
   COLLECTION VIEWER
   -------------------------------- */

.collection-viewer {
  width: 100vw;
  margin-left: calc(50% - 50vw);

  height: 100dvh;
  overflow: hidden;
}

.collection-track {
  height: 100%;

  display: flex;
  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.collection-track::-webkit-scrollbar {
  display: none;
}


/* --------------------------------
   ONE SLIDE
   -------------------------------- */

.collection-slide {
  position: relative;

  flex: 0 0 100vw;
  height: 100%;

  scroll-snap-align: start;
  scroll-snap-stop: always;

  display: flex;
  align-items: center;
  justify-content: center;
}


/* --------------------------------
   IMAGE
   -------------------------------- */

.slide-image {
  margin: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/*
   Absichtlich "etwas zu klein".

   Nicht das Bild füllt die Seite.
   Die Seite lässt Raum um das Bild.
*/

.slide-image img {
  display: block;

  width: auto;
  height: auto;

  max-width: 66vw;
  max-height: 62vh;

  object-fit: contain;
}

.slide-image.portrait img {
  height: 84vh;
  width: auto;

  max-width: 66vw;
  max-height: 84vh;
}


/* --------------------------------
   COLLECTION TEXT SLIDE
   -------------------------------- */

.collection-text {
  width: min(36rem, calc(100% - 4rem));

  font-size: 1.08rem;
  line-height: 1.7;
}

.collection-lead {
  margin-top: 0;
  margin-bottom: 2.2rem;

  font-size: 1.4rem;
  line-height: 1.45;
}

.collection-text p:last-child {
  margin-bottom: 0;
}


/* --------------------------------
   INVISIBLE NAVIGATION
   -------------------------------- */

.nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;

  width: 24vw;

  z-index: 5;

  text-decoration: none;
}

.nav-prev {
  left: 0;
  cursor: url("/cursors/arrow-left.svg") 16 16, w-resize;
}

.nav-next {
  right: 0;
  cursor: url("/cursors/arrow-right.svg") 16 16, e-resize;
}


/* --------------------------------
   COLLECTION LIST
   -------------------------------- */

.collection-list {
  display: flex;
  flex-direction: column;
  gap: 5rem;

  margin-top: 8rem;
}

.collection-list h2 {
  margin: 0;

  font-size: 2rem;
  font-weight: 400;
}

.collection-list h2 a {
  text-decoration: none;
}


/* --------------------------------
   MOBILE
   -------------------------------- */

@media (max-width: 700px) {

  .site-header {
    width: calc(100% - 2rem);
    height: 3.5rem;
  }

  .collection-viewer {
    height: 100dvh;
  }

  .slide-meta {
    left: 1rem;
    right: 1rem;
  }

  .slide-image img {
    max-width: 88vw;
    max-height: 68vh;
  }

  .collection-text {
    width: calc(100% - 3rem);
  }

  .nav-zone {
    width: 28vw;
  }
}

/* --------------------------------
   COLLECTION HEADER
   -------------------------------- */

.collection-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5rem;
  z-index: 30;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;

  padding: 0 2rem;
  background: #fff;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.collection-header-title {
  justify-self: start;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.collection-header-subtitle {
  justify-self: center;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 400;
  color: #555;
  white-space: nowrap;
}

.collection-header-count {
  justify-self: end;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .collection-header {
    height: 3.5rem;
    padding: 0 1rem;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
  }

  .collection-header-title,
  .collection-header-subtitle {
    font-size: 0.72rem;
  }

  .collection-header-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .collection-header-count {
    font-size: 0.62rem;
  }
}

/* --------------------------------
   COVER ENTRY HINT
   -------------------------------- */

.cover-next {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-next-hint {
  width: 2.2rem;
  height: 2.2rem;
  overflow: visible;
  pointer-events: none;
}

.cover-next-hint path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* --------------------------------
   COLLECTION TEXT FRAME
   -------------------------------- */

/*
   The invisible cover image is used only as a sizing reference.
   It therefore inherits the exact same 66vw / 62vh geometry as the
   visible cover, including portrait, square and landscape crops.
*/
.collection-text-frame {
  position: relative;
  display: inline-block;
  max-width: 66vw;
  max-height: 62vh;
}

.collection-text-sizer {
  display: block;
  width: auto;
  height: auto;
  max-width: 66vw;
  max-height: 62vh;
  visibility: hidden;
}

.collection-text-frame .collection-text {
  position: absolute;
  inset: 0;

  width: auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);

  display: flex;
  flex-direction: column;
  justify-content: center;

  border: 1px solid #dedede;

  overflow: auto;
}

@media (max-width: 700px) {
  .cover-next-hint {
    width: 1.8rem;
    height: 1.8rem;
  }

  .collection-text-frame,
  .collection-text-sizer {
    max-width: 88vw;
    max-height: 68vh;
  }

  .collection-text-frame .collection-text {
    padding: 1.5rem;
  }
}
.image-caption {
  max-width: min(32rem, 100%);
  margin-top: 0.8rem;

  align-self: flex-start;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.45;
  font-weight: 400;
  color: #555;
}


/* =========================================
   COLLECTIONS OVERVIEW
   ========================================= */

.collections-page {
  padding: 7rem 0 10rem;
}

.collections-page-header {
  margin-bottom: 7rem;
}

.collections-page-header h1 {
  margin: 0;

  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.collections-overview {
  display: grid;

  grid-template-columns: repeat(3, 280px);

  justify-content: center;
  align-items: start;

  column-gap: clamp(4rem, 8vw, 8rem);
  row-gap: 9rem;
}

.collection-tile {
  width: 280px;
}

.collection-tile-link {
  display: block;

  color: inherit;
  text-decoration: none;
}

.collection-tile-cover {
  display: block;

  width: 280px;
  height: auto;
}

.collection-tile-meta {
  margin-top: 0.85rem;
}

.collection-tile-meta h2 {
  margin: 0;

  font-size: 0.78rem;
  line-height: 1.3;
  font-weight: 500;
}

.collection-tile-meta p {
  margin: 0.25rem 0 0;

  font-size: 0.72rem;
  line-height: 1.4;

  color: #666;
}

.collection-tile-link:hover h2 {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}


@media (max-width: 1100px) {

  .collections-overview {
    grid-template-columns: repeat(2, 280px);
    column-gap: clamp(4rem, 10vw, 7rem);
  }

}


@media (max-width: 700px) {

  .collections-page {
    padding: 5rem 0 7rem;
  }

  .collections-page-header {
    margin-bottom: 5rem;
  }

  .collections-overview {
    grid-template-columns: minmax(0, 280px);
    row-gap: 6rem;
  }

  .collection-tile,
  .collection-tile-cover {
    width: min(280px, 100%);
  }

}


/* back to Collections */

.collections-back {
  margin-right: 1.05rem;

  color: inherit;
  text-decoration: none;

  font-size: 0.9rem;
  line-height: 1;

  opacity: 0.38;

  pointer-events: auto;
}

.collections-back:hover {
  opacity: 1;
}
.collection-header-title {
  grid-column: 1;
  justify-self: start;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.collection-header-subtitle {
  grid-column: 2;
  justify-self: center;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 400;
  color: #555;
  white-space: nowrap;
}

.collection-header-count {
  grid-column: 3;
  justify-self: end;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.image-caption-subject {
  font-weight: 500;
}

.image-caption-description {
  margin-top: 0.2rem;
}
