/* GLOBAL LAYOUT
----------------------------------------------------------- */

@font-face {
  font-family: "Suisse Regular";
  src: url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.eot") format("embedded-opentype"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.woff2") format("woff2"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.woff") format("woff"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.ttf") format("truetype"),
       url("Schriften/SuisseXL/SuisseIntl-Regular-WebXL.svg") format("svg");
  font-weight: normal;
  font-style: normal;
}

:root {
  --rand: clamp(1.2rem, 1.5vw, 3.5rem);
  --color1: #ffffff;
  --color2: #000000;
}

html {
  scroll-behavior: smooth;
}

*:focus {
  outline: none;
}

body {
  font-family: "Suisse", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color1);
  color: var(--color2);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
  padding: var(--rand);
}

main {
  box-sizing: border-box;
  padding: var(--rand);
}

/* GENERAL TYPOGRAPHY
----------------------------------------------------------- */

a {
  color: var(--color2);
  transition: font-variation-settings 0.3s ease;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

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

.header {
  margin-bottom: 5rem;
}

/* GRID LAYOUT
----------------------------------------------------------- */

#project-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
}

.grid-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Items */
.grid-item {
  width: 100%;
  position: relative;
  font-size: 1rem;
}

.grid-item img,
.grid-item video {
  width: 100%;
  display: block;
  object-fit: cover;
  padding: 0.2rem;
  box-sizing: border-box;
}

/* PROJECT INFO OVERLAY */

.projectinfo {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--color2);
  font-size: 0.9rem;
  line-height: 1.1;
  padding: calc(var(--rand) / 2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  box-sizing: border-box;
}

.grid-item:hover .projectinfo,
.grid-item.touch-active .projectinfo {
  opacity: 1;
  pointer-events: auto;
}

/* LAZY MEDIA BLUR EFFEKT */

.lazy-media {
  filter: blur(20px);
  opacity: 0.4;
  transition: filter 0.8s ease, opacity 0.8s ease;
  will-change: filter, opacity;
}

.lazy-media.loaded {
  filter: blur(0);
  opacity: 1;
}

/* LOAD MORE BUTTON */

.load-more-btn {
  display: block;
  margin: 2rem auto;
  padding: 0.4rem 1.5rem;
  background: var(--color2);
  color: var(--color1);
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
  border-radius: 100px;
}

/* SICHTBARKEITS- UND ANIMATIONSSTYLES FÜR ITEMS UND BUTTON */

.grid-item,
#loadMore {
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.grid-item.visible,
#loadMore.visible {
  opacity: 1;
  filter: blur(0);
}

#loadMore.visible:hover {
  opacity: 0.4;
}


/* RESPONSIVENESS
----------------------------------------------------------- */

/* Große und sehr große Viewports */

@media only screen and (min-width: 1400px) {
  html {
    font-size: 120%;
  }
}

@media only screen and (min-width: 2000px) {
  html {
    font-size: 140%;
  }
}

/* Touch Devices */

@media (hover: none) and (pointer: coarse) {
  /* ggf. spezielles Styling für Touch */
}

/* Kleine und sehr kleine Viewports */

@media only screen and (max-width: 900px) {
  html {
    font-size: 100%;
  }
}

@media only screen and (max-width: 450px) {
  html {
    font-size: 100%;
  }
}
