@import "index.css";

:root {
  --safe-area-background: #ffffff; /* Default safe area background */
}

  body {
    color: var(--fontcolor);
    background-color: var(--backgroundcolor); 
    background: var(--backgroundcolor);
    background-color: var(--safe-area-background); 
  }

.intro {
  display: none;
}

.blur-up {
  opacity: 0;
  /* -webkit-filter: blur(5px);
  filter: blur(5px);
  transition: filter 400ms, -webkit-filter 400ms; */
}

.blur-up.lazyloaded {
  opacity: 1;
  /* -webkit-filter: blur(0);
  filter: blur(0); */
}

/* -------------------------------------------------------------- S -------------------------------------------------------------- */
.project-images {
  display: none;
}

.overview {
  display: flex;
  flex-wrap: wrap;
  height: 100%;
  width: 100vw;
  padding: 0;
  margin-top: 3.5em;
}

.listed-project {
  position: relative;
  width: 4vw;
  height: auto;
  cursor: zoom-in;
}

.listed-project .project-image img {
  width: 4vw;
}

.project {
  display: block;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  cursor: zoom-in;
}

.project-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.index {
  display: none;
}

#mobile {
  display: none;
}

/* -------------------------------------------------------------- M -------------------------------------------------------------- */

.overview.m .listed-project {
  width: 16.6vw;
  cursor: zoom-in;
}

.overview.m img {
  width: 16.6vw;
}

/* -------------------------------------------------------------- L -------------------------------------------------------------- */
.overview.l {
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  width: 100vw;
  height: 100vh;
  position: static;
}

.overview.l .listed-project {
  width: auto;
  min-width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
  cursor: auto;
}

.overview.l .project {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: scroll;
  pointer-events: all;
  height: 80vh;
  width: auto;
  top: 20vh;
  position: relative;
  justify-content: center;
}

.overview.l .project-image {
  justify-content: flex-start;
}

.overview.l img {
  position: relative;
  display: block;
  height: 80vh;
  width: auto;
  cursor: zoom-in;
}

.overview.l .project-images {
  width: auto;
  display: flex;
  flex-direction: row;
}

.overview.l footer {
  height: min-content;
    scroll-snap-align: end;
}

/* -------------------------------------------------------------- L -------------------------------------------------------------- */
.overview.xl {
  margin-top: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  width: 100vw;
  height: 100vh;
  position: static;
}

.overview.xl .listed-project {
  width: auto;
  min-width: 100vw;
  height: 200vh;
  scroll-snap-align: start;
  position: relative;
  cursor: auto;
}

.overview.xl .project {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: scroll;
  pointer-events: all;
  height: 200vh;
  width: auto;
  top: -40vh;
  position: relative;
    justify-content: center;

}

.overview.xl .project-image {
  justify-content: flex-start;
}

.overview.xl img {
  position: relative;
  display: block;
  height: 200vh;
  width: auto;
  cursor: zoom-out;
}

.overview.xl .project-images {
  display: block;
  width: auto;
  display: flex;
  flex-direction: row;
}
/* -------------------------------------------------------------- INFO -------------------------------------------------------------- */
/* -------------------------------------------------------------- Base -------------------------------------------------------------- */
.project-info {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 499;
}

.listed-project:hover .project-info {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100vw;
}

.info-container-50 {
  width: 50vw;
  height: auto;
}

.info-a {
  display: grid;
  grid-template-columns: var(--leftrow) 1fr;
  padding-top: 10px;
  padding-left: 10px;
  line-height: 1.2;
  align-items: start;
  gap: 0;
}

.related {
  grid-template-columns: 1fr;
}

.related a {
  display: grid;
  grid-template-columns: var(--leftrow) 1fr;
}
.project-text {
  display: none;
}

.info-container-25 {
  display: none;
}

.project-info button {
  font-family: var(--textfont);
  font-weight: var(--textfont-weight);
  color: var(--fontcolor);
  background: none;
  font-size: 1em;
  line-height: var(--lineheight);
  height: 100%;
  width: auto;
  padding: 0;
  margin: 0;
}

.project-info button:hover {
  font-family: var(--textfont);
  font-weight: var(--textfont-weight);
  color: var(--backgroundcolor);
  background: var(--fontcolor);
  font-size: 1em;
  line-height: var(--lineheight);
  height: auto;
  width: auto;
}

/* -------------------------------------------------------------- INFO : S -------------------------------------------------------------- */

.overview.l .project-info {
  display: flex;
  position: absolute;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100vw;
  z-index: 500;
  pointer-events: all;
}

.overview.l .info-container-50 {
  width: 50vw;
  height: 8.5vh;
}

.overview.l .project-text {
  display: grid;
  grid-template-columns: var(--leftrow) 31.25vw;
  width: 50vw;
  padding: 10px;
}

.overview.l .project-text p {
  padding-block-end: 1em;
  hyphens: auto;
  text-wrap: pretty;
  hyphenate-limit-chars: auto 3;
  hyphenate-limit-lines: 2;
}

.overview.l .info-container-25 {
  display: block;
  width: 25vw;
  height: auto;
}

/* -------------------------------------------------------------- INFO : L -------------------------------------------------------------- */
/* -------------------------------------------------------------- INDEX -------------------------------------------------------------- */
.overview.i {
  display: flex;
  flex-wrap: wrap;
  overflow-y: scroll;
  height: 100%;
  padding: 0;
  margin-bottom: 3.5em;
;
}

.overview.i .index {
  display: grid;
  grid-template-columns: var(--leftrow) 31.25vw 9.375vw var(--leftrow) 1fr 1fr 4.5em;
  width: 100vw;
  font-family: var(--textfont);
  font-size: var(--fontsmall);
  line-height: 110%;
  padding-left: 10px;
  padding-right: 10px;
  z-index: 1;
  background-origin: border-box; 
}

.overview.i .listed-project {
  width: 100vw;
  overflow: hidden;
  height: auto;
  z-index: 1;
}

.overview.i .listed-project:hover {
  z-index: 999;
}

.overview.i .listed-project:hover p {
  color: var(--backgroundcolor);
  background-color: var(--fontcolor);
}

.overview.i .listed-project:hover .project {
  visibility: visible;
  z-index: 500;
}

.overview.i .project {
  position: fixed;
  top: 5px;
  left: 5px;
  width: max-content;
  height: 5vw;
  display: flex;
  pointer-events: none;
  visibility: hidden;
  z-index: 500;
}

.overview.i .project-images {
  display: flex;
  flex-direction: row;
  width: auto;
}

.overview.i img {
  position: relative;
  display: block;
  width: auto;
  height: 5vw;
  object-fit: cover;
}

.overview.i .project-info {
  display: none;
}

.overview.i.m .project {
  height: 20vw;
  width: max-content;
}

.overview.i.m img {
  height: 20vw;
}

.overview.i.l, .overview.i.xl {
  margin-top: 3.5em;
}

.overview.i.l .project-images {
  width: fit-content;
}

.overview.i.l img {
  position: relative;
  display: block;
  width: auto;
  height: 80vh;
  object-fit: cover;
}

.overview.i.l .project {
  height: 80vh;
  width: fit-content;
  left: 0;
}

.overview.i.xl .project {
  position: fixed;
  top: -40vh;
  height: 200vh;
  width: max-content;
}

.overview.i.xl img {
  height: 200vh;
}

* ------------------------------------- HEADER Archive------------------------------------- */
.button {
  color: var(--backgroundcolor);
  background: var(--fontcolor);
} 

#view button, #view .button {
  display: flex;
  position: relative;
  width: var(--headercolumn);
}

#view {
  display: grid;
  grid-template-columns: var(--headercolumn);
  grid-template-rows: repeat(2, var(--buttonheight));
  position: relative;
  top: calc(5 * var(--buttonheight));
}

#view .button {
  opacity: 0;
  pointer-events: none;
}

#view .button:nth-of-type(2) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #view .button {
  opacity: 1;
  pointer-events: all;
}

#view.i {
  display: grid;
  grid-template-columns: var(--headercolumn);
  grid-template-rows: repeat(2, var(--buttonheight));
  position: relative;
  top: calc(4 * var(--buttonheight));
}

#view.i .button {
  opacity: 0;
  pointer-events: none;
}

#view.i .button:nth-of-type(3) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #view.i .button {
  opacity: 1;
  pointer-events: all;
}

#zoom {
  display: grid;
  grid-template-columns: calc(var(--headercolumn) / 3.13);
  grid-template-rows: repeat(4, var(--buttonheight));
  position: relative;
  top: calc(6 * var(--buttonheight));
}

#zoom > button {
  opacity: 0;
  pointer-events: none;
}

#zoom > button:nth-of-type(1) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #zoom > button {
  opacity: 1;
  pointer-events: all;
}

#zoom.m {
  top: calc(5 * var(--buttonheight));
}

#zoom.m > button {
  opacity: 0;
  pointer-events: none;
}

#zoom.m > button:nth-of-type(2) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #zoom.m > button {
  opacity: 1;
  pointer-events: all;
}

#zoom.l {
  top: calc(4 * var(--buttonheight));
}

#zoom.l > button {
  opacity: 0;
  pointer-events: none;
}

#zoom.l > button:nth-of-type(3) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #zoom.l > button {
  opacity: 1;
  pointer-events: all;
}

#zoom.xl {
  top: calc(3 * var(--buttonheight));
}

#zoom.xl > button {
  opacity: 0;
  pointer-events: none;
}

#zoom.xl > button:nth-of-type(4) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #zoom.xl > button {
  opacity: 1;
  pointer-events: all;
}

#sort {
  display: grid; 
  position: relative;
  grid-template-columns: var(--headercolumn);
  grid-template-rows: repeat(4, var(--buttonheight));
  top: calc(6 * var(--buttonheight));
}

#sort > button {
  opacity: 0;
  pointer-events: none;
}

#sort > button:nth-of-type(1) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #sort > button {
  opacity: 1;
  pointer-events: all;
}

#sort.img {
  top: calc(6 * var(--buttonheight));
}

#sort.img > button {
  opacity: 0;
  pointer-events: none;
}

#sort.img > button:nth-of-type(1) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #sort.img > button {
  opacity: 1;
  pointer-events: all;
}

#sort.title {
  top: calc(5 * var(--buttonheight));
}

#sort.title > button {
  opacity: 0;
  pointer-events: none;
}

#sort.title > button:nth-of-type(2) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #sort.title > button {
  opacity: 1;
  pointer-events: all;
}

#sort.place {
  top: calc(4 * var(--buttonheight));
}

#sort.place > button {
  opacity: 0;
  pointer-events: none;
}

#sort.place > button:nth-of-type(3) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #sort.place > button {
  opacity: 1;
  pointer-events: all;
}

#sort.year {
  top: calc(3 * var(--buttonheight));
}

#sort.year > button {
  opacity: 0;
  pointer-events: none;
}

#sort.year > button:nth-of-type(4) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #sort.year > button {
  opacity: 1;
  pointer-events: all;
}

#filter {
  display: grid; 
  position: relative;
  grid-template-columns: var(--headercolumn);
  grid-template-rows: repeat(6, var(--buttonheight));
  top: calc(6 * var(--buttonheight));
}

#filter > button {
  opacity: 0;
  pointer-events: none;
}

#filter > button:nth-of-type(1) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter > button {
  opacity: 1;
  pointer-events: all;
}

#filter.Comic {
  top: calc(5 * var(--buttonheight));
}

#filter.Comic > button {
  opacity: 0;
  pointer-events: none;
}

#filter.Comic > button:nth-of-type(2) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter.Comic > button {
  opacity: 1;
  pointer-events: all;
}

#filter.Periodical {
  top: calc(4 * var(--buttonheight));
}

#filter.Periodical > button {
  opacity: 0;
  pointer-events: none;
}

#filter.Periodical > button:nth-of-type(3) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter.Periodical > button {
  opacity: 1;
  pointer-events: all;
}

#filter.Letter {
  top: calc(3 * var(--buttonheight));
}

#filter.Letter > button {
  opacity: 0;
  pointer-events: none;
}

#filter.Letter > button:nth-of-type(4) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter.Letter > button {
  opacity: 1;
  pointer-events: all;
}

#filter.Newspaper {
  top: calc(2 * var(--buttonheight));
}

#filter.Newspaper > button {
  opacity: 0;
  pointer-events: none;
}

#filter.Newspaper > button:nth-of-type(5) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter.Newspaper > button {
  opacity: 1;
  pointer-events: all;
}

#filter.Book {
  top: calc(1 * var(--buttonheight));
}

#filter.Book > button {
  opacity: 0;
  pointer-events: none;
}

#filter.Book > button:nth-of-type(6) {
  opacity: 1;
  pointer-events: all;
}

#navigation.on #filter.Book > button {
  opacity: 1;
  pointer-events: all;
}

#suche {
  position: relative;
  top: calc(6 * var(--buttonheight));
}

#suche input {
  width: var(--headercolumn); 
}

@media screen and (max-width: 1080px) {
  :root {
    --fontcolor: white;
    --backgroundcolor: black;
    --safe-area-background: #000000; /* Default safe area background */
  }

  header {
    mix-blend-mode: lighten !important;
    color: black;
  }

  #navigation {
    height: var(--buttonheight);
  }
  
  .button {
    color: var(--backgroundcolor);
    background: var(--fontcolor);
  }

  #view .button:nth-of-type(2), #view .button:nth-of-type(3), #zoom, #sort, #filter {
    display: none;
  }

  #view .button:nth-of-type(1) {
    opacity: 1;
    pointer-events: all;
  }

  #view, #view.i, #suche {
    width: fit-content;
    top: 0;
  }

  #overview {
    display: none;
  }

  #mobile {
    display: block;
    position: static;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-snap-stop: always;
    width: 100vw;
    height: 100vh;
  }

  .listed-project {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
  }

  #mobile {
    padding-bottom: 1px; 
  }
  
  .listed-project {
    margin-bottom: 1px; 
  }

  .project {
    cursor: default;
    height: 76.5vh;
    align-content: center;
  }

  .images {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: scroll;
  }

  .images img {
    width: auto;
    height: auto;
    width: auto;
    max-height: 76.5vh;
    max-width: 100vw;
  }

  .mobile-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 0.6em;
    position: relative;
    top: 0;
    height: 17vh;
  }

  .mobile-info.b {
    height: 6.5vh;
  }

  .info-container {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 100px 1fr;
    padding-top: 10px;
    padding-left: 10px;
    align-items: start;
    gap: 0;
    width: 50vw;
    height: fit-content;
}

  .info {
    display: block;
    position: relative;
    top: 0;
    height: fit-content;
  }
}

@media screen and (max-width: 600px) {
  .info-container {
    grid-template-columns: 20vw 1fr;
  }
  
  #view button, #view .about, #view, #view.i button, #view.i .about, #view.i, #suche input {
    width: 50vw;
  }

  .info-container {
    width: 100vw;
}
}