/* Projektordner: fünf Referenzen mit Raum zum Anschauen, im vertrauten Ordner-Look. */
main[data-route="home"] .fold {
  max-width: 740px;
  height: 260px;
  cursor: default;
  transition: height .65s cubic-bezier(.2,.9,.2,1);
}
main[data-route="home"] .fold.open {
  --project-card-height: 260px;
  --project-card-width: calc(33.333333% - 13.333333px);
  height: calc(var(--project-card-height) + var(--project-card-height) + 153px);
}
main[data-route="home"] .fold .front {
  width: 100%;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
main[data-route="home"] .fold .front:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
main[data-route="home"] .fold .cs {
  width: 66%;
  opacity: 0;
  visibility: hidden;
  transition: transform .8s cubic-bezier(.2,.9,.2,1), translate .8s cubic-bezier(.2,.9,.2,1), width .8s cubic-bezier(.2,.9,.2,1), top .8s cubic-bezier(.2,.9,.2,1), left .8s cubic-bezier(.2,.9,.2,1), opacity .3s ease;
}
main[data-route="home"] .fold.open .cs {
  width: var(--project-card-width);
  height: var(--project-card-height);
  top: 0;
  left: 0;
  translate: none;
  transform: none;
  opacity: 1;
  visibility: visible;
}
main[data-route="home"] .fold.open .cs img,
main[data-route="home"] .fold.open .cs video {
  height: auto;
  aspect-ratio: 16 / 9;
}
main[data-route="home"] .fold.open .cs:nth-of-type(1) { left: 0; transform: rotate(-2deg); }
main[data-route="home"] .fold.open .cs:nth-of-type(2) { left: calc(33.333333% + 6.666667px); transform: rotate(1deg); }
main[data-route="home"] .fold.open .cs:nth-of-type(3) { left: calc(100% - var(--project-card-width)); transform: rotate(2deg); }
main[data-route="home"] .fold.open .cs:nth-of-type(4) { left: calc(16.6667% + 3.3333px); top: calc(var(--project-card-height) + 18px); transform: rotate(-1deg); }
main[data-route="home"] .fold.open .cs:nth-of-type(5) { left: calc(50% + 10px); top: calc(var(--project-card-height) + 18px); transform: rotate(2deg); }
main[data-route="home"] .fold.open .front { height: 140px; transform: translateY(40px); }

@media (max-width: 1159px) {
  main[data-route="home"] .fold:not(.open) .cs { width: 78%; }
  main[data-route="home"] .fold.open {
    --project-card-height: clamp(190px, calc(25vw + 110px), 275px);
    height: calc(var(--project-card-height) + var(--project-card-height) + var(--project-card-height) + 165px);
  }
  main[data-route="home"] .fold.open .cs {
    width: calc(50% - 10px);
    height: var(--project-card-height);
    padding: 12px;
    top: 0;
    left: 0;
    translate: none;
    transform: none;
  }
  main[data-route="home"] .fold.open .cs b {
    font-size: clamp(.8rem, 3.8vw, 1rem);
    line-height: 1.25;
  }
  main[data-route="home"] .fold.open .cs span {
    display: block;
    font-size: clamp(.74rem, 3.3vw, .875rem);
    line-height: 1.25;
  }
  main[data-route="home"] .fold.open .cs img,
  main[data-route="home"] .fold.open .cs video {
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 10px;
  }
  main[data-route="home"] .fold.open .cs:nth-of-type(1) { left: 0; top: 0; translate: none; transform: rotate(-2deg); }
  main[data-route="home"] .fold.open .cs:nth-of-type(2) { left: calc(50% + 10px); top: 0; translate: none; transform: rotate(2deg); }
  main[data-route="home"] .fold.open .cs:nth-of-type(3) { left: 0; top: calc(var(--project-card-height) + 15px); translate: none; transform: rotate(-2deg); }
  main[data-route="home"] .fold.open .cs:nth-of-type(4) { left: calc(50% + 10px); top: calc(var(--project-card-height) + 15px); translate: none; transform: rotate(2deg); }
  main[data-route="home"] .fold.open .cs:nth-of-type(5) { left: 25%; top: calc(var(--project-card-height) + var(--project-card-height) + 30px); translate: none; transform: rotate(-1deg); }
}

@media (max-width: 500px) {
  main[data-route="home"] #referenzen > .wrap { padding-left: 16px; padding-right: 16px; }
  main[data-route="home"] .fold.open {
    --ovo-card-height: calc(56.25vw + 55px);
    height: calc(var(--project-card-height) + var(--project-card-height) + var(--ovo-card-height) + 175px);
  }
  main[data-route="home"] .fold.open .cs:nth-of-type(5) {
    left: 0;
    width: 100%;
    height: var(--ovo-card-height);
  }
}

/* Auf sehr schmalen Displays verhindern kompaktere Schalter seitliches Scrollen. */
@media (max-width: 360px) {
  main[data-route="home"] .tabs button { padding: 10px; font-size: .875rem; min-height: 44px; }
}
