:root {
  --page: #abbab1;
  --text: #dddddd;
  --muted: #7d8891;
  --link: #d0e3f2;
  --panel: rgba(48, 58, 52, 0.22);
  --shadow: rgba(31, 39, 35, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: #ffffff;
}

button {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 42px clamp(22px, 5vw, 70px) 20px;
}

.brand {
  color: var(--text);
  font-size: clamp(18px, 2.2vw, 32px);
  line-height: 1.2;
  max-width: 360px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
  max-width: 660px;
  padding-top: 5px;
}

.nav a {
  color: var(--link);
  white-space: nowrap;
}

.nav a.active {
  color: var(--muted);
}

.app {
  width: min(1180px, calc(100vw - 44px));
  margin: 30px auto 80px;
  outline: none;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.series-card a {
  display: block;
}

.series-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--panel);
}

.series-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 380ms ease, filter 380ms ease;
}

.series-thumb.load-error::after,
.photo-frame.load-error::after {
  content: "Bild konnte nicht geladen werden";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-align: center;
}

.series-card:hover img,
.series-card:focus-within img {
  filter: brightness(1.04);
  transform: scale(1.025);
}

.series-card h2 {
  margin: 13px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--link);
}

.album-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.album-head h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.1;
}

.album-head .count {
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: zoom-in;
}

.photo-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--panel);
  box-shadow: 0 18px 38px var(--shadow);
  overflow: hidden;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

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

.photo-button:hover .photo-frame,
.photo-button:focus-visible .photo-frame {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(31, 39, 35, 0.27);
}

.contact {
  position: fixed;
  left: clamp(22px, 5vw, 70px);
  bottom: 28px;
  max-width: 250px;
  color: var(--text);
  pointer-events: none;
}

.contact p {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 16, 0.92);
  padding: 38px 82px;
}

.lightbox:fullscreen,
.lightbox.pseudo-fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 18px 64px;
  background: #070907;
}

.lightbox:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  padding: 18px 64px;
  background: #070907;
}

.lightbox.open {
  display: flex;
}

.lightbox figure {
  margin: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox img {
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 3px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox figcaption {
  min-height: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.icon-button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.close {
  top: 22px;
  right: 24px;
  font-size: 24px;
  line-height: 1;
}

.fullscreen {
  top: 16px;
  right: 60px;
  width: 110px;
  height: auto;
  gap: 5px;
  border-radius: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.fullscreen[hidden] {
  display: none !important;
}

.fullscreen:hover,
.fullscreen:focus-visible {
  background: transparent;
}

.fullscreen-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.fullscreen:hover .fullscreen-icon,
.fullscreen:focus-visible .fullscreen-icon {
  background: rgba(255, 255, 255, 0.22);
}

.fullscreen-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.lightbox:fullscreen .fullscreen-label,
.lightbox:-webkit-full-screen .fullscreen-label,
.lightbox.pseudo-fullscreen .fullscreen-label,
.lightbox.is-fullscreen .fullscreen-label {
  display: none;
}

.lightbox:fullscreen .fullscreen,
.lightbox:-webkit-full-screen .fullscreen,
.lightbox.pseudo-fullscreen .fullscreen,
.lightbox.is-fullscreen .fullscreen {
  display: none;
}

.prev,
.next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 38px;
  line-height: 1;
}

.prev {
  left: 24px;
}

.next {
  right: 24px;
}

@media (max-width: 900px) {
  .site-header {
    display: block;
    padding-top: 26px;
  }

  .brand {
    display: block;
    margin-bottom: 18px;
  }

  .nav {
    justify-content: flex-start;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact {
    position: static;
    width: min(1180px, calc(100vw - 44px));
    margin: -46px auto 32px;
  }
}

@media (max-width: 560px) {
  .app {
    width: min(100vw - 28px, 1180px);
    margin-top: 20px;
  }

  .collection-grid,
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .album-head {
    display: block;
  }

  .album-head .count {
    display: block;
    margin-top: 8px;
  }

  .lightbox {
    padding: 54px 14px 28px;
  }

  .lightbox:fullscreen,
  .lightbox:-webkit-full-screen,
  .lightbox.pseudo-fullscreen {
    padding: 10px 46px 28px;
  }

  .fullscreen {
    top: 22px;
    right: 78px;
    width: 44px;
    height: 44px;
    gap: 0;
    overflow: visible;
  }

  .fullscreen-icon {
    width: 44px;
    height: 44px;
  }

  .fullscreen-label {
    position: absolute;
    top: 48px;
    left: 50%;
    width: 78px;
    font-size: 8px;
    line-height: 1.1;
    transform: translateX(-50%);
  }

  .lightbox:fullscreen img,
  .lightbox:-webkit-full-screen img,
  .lightbox.pseudo-fullscreen img {
    max-width: none;
    max-height: none;
  }

  .prev,
  .next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}
