:root {
  --color-horizontal-separator: color-mix(in srgb, currentColor 50%, transparent)
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  color: #222;
  font-family: sans-serif;
  line-height: 1.5;
  margin: 0 auto;
  padding: 1rem;
  max-width: max(80vw, 768px);
}

header {
  border-block-end: 1px solid var(--color-horizontal-separator);
  margin-block-end: 1rem;
}

footer {
  border-block-start: 1px solid var(--color-horizontal-separator);
  margin-block-start: 1rem;
}

a {
  color: #00e;
}

nav.breadcrumb {
  ol {
    --bc-gap: 0.8em;

    list-style: "";
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--bc-gap);
    font-size: 0.8em;
    
    li:not(:last-child)::after {
      content: "▸";
      color: color-mix(in srgb, currentColor 50%, transparent);
      margin-inline-start: var(--bc-gap);
    }
    
    li:last-child {
      font-weight: bold;
    }
    
    a {
      color: currentColor;
    }
  }
}

.home-section {
  border-block-start: 1px solid var(--color-horizontal-separator);
  margin-block: 1rem;
}

.albums {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-inline: max(3vw, 2rem);
}

.album {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  padding-inline: 4rem;
  gap: 1rem;

  > a {
    display: block;
    position: absolute;
    inset: 0;
  }

  &:has(a:is(:hover, :focus)) {
    --rotation: 15deg;
    z-index: 1;
  }

  .album-title {
    margin: 0;
    font-weight: bold;
  }

  .images {
    display: grid;
    align-items: end;
    justify-items: center;

    picture {
      &.ratio-vertical {
        height: 125px;
        width: 100px;
      }
      &.ratio-horizontal {
        height: 100px;
        width: 125px;
      }

      &:first-child {
        transform: rotate(calc(-1 * var(--rotation, 5deg)));
      }
      &:nth-child(2) {
        transform: rotate(0deg);
      }
      &:last-child {
        transform: rotate(var(--rotation, 5deg));
      }

      grid-column: 1;
      grid-row: 1;
      position: relative;
      transform-origin: 50% 300%;
      transition: transform 250ms ease-in-out;
      display: inline-block;
      padding: 6px;
      background: white;
      border-radius: 2px;
      box-shadow: 1px 1px 2px color-mix(in srgb, black 50%, transparent);

      img {
        display: block;
        object-fit: cover;
        object-position: center;

        width: 100%;
        height: 100%;
      }
    }
  }
}


section.galerie {
  --image-height: 300px;
  --gap: 1em;
  
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);

  @media (width < 768px) {
    --image-height: 150px;
    --gap: 0.5em;
  }


  > a {
    flex-grow: var(--width);
    height: var(--image-height);
  }
  
  img {
    max-height: var(--image-height);
    max-width: 500px;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
  }
}
