@font-face {
  font-family: "NanMetrifyBStandard";
  src: url(../fonts/NaNMetrifyBStandard/NaNMetrifyBStandard-VF.woff2) format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
}

body {
  font-family: "NanMetrifyBStandard", sans-serif;
  font-weight: 300;
  background-color: whitesmoke;
  font-variation-settings: "slnt" 0;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}
h5 {
  font-size: 0.8rem;
  font-weight: 700;
}

img {
  display: block;
  backface-visibility: hidden;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5vh;
  z-index: 500;
}

.nav {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start; 
  height: 100%;
}

.nav p {
  cursor: pointer;
}

.nav-trigger {
  flex-shrink: 0;
}

/* "BUTTON"/CONTAINER */

.title-container {
  background-color: green;
  border-radius: 15px;
  padding: 0.5vh 0.8rem;
  color: white;
  font-size: 4vh;
  line-height: 1;
  height: auto;
  min-height: 5vh;
  display: flex;
  align-items: center;
  width: fit-content;
  box-sizing: border-box;
}

/* PROJECT TITLE */
.project-label {
  position: fixed;
  bottom: 5vh;
  left: 0;
  cursor: pointer;
  z-index: 300;
  transition: top 0.6s ease, transform 0.6s ease;
}

/* X */
.label-close {
  display: none;
  margin-right: 0.5rem;
}

.project-label.is-open .label-close,
.nav-trigger.is-open .label-close,
.floating-link.is-open .label-close {
  display: inline;
}

/* EMAIL/INSTA/IMPRINT BUTTONS */

.floating-links {
  margin-left: auto; 
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  z-index: 300;
}

.floating-link {
  
  transform: translateX(400%);
  transition: transform 0.4s ease;
  cursor: pointer;
  text-decoration: none;
}

.floating-links.is-open .floating-link {
  transform: translateX(0);
}

/* 3D MODELL */

.threed-panel {
  position: fixed;
  right: 0;
  width: 100vw;
  height: 100%;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.threed-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#three-canvas {
  width: 100%;
  height: 100%;
}

/* PANELS PANELS PANELS PANELS */

/* INFO PANEL */
.info-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 100vh;
  border-radius: 0 15px 15px 0;
  background-color: whitesmoke;
  padding: 5vh 1rem 11vh 1rem;

  pointer-events: none;
  z-index: 200;

  visibility: visible;
  transform: translateX(-100%);
  transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
  overflow: hidden; 
}

/* INFO-PANEL UI */
.panel-view {
  height: 100%;
  padding: 2vh 0 8vh;
  overflow-y: auto; 
  scrollbar-width: none;
  mask-image: linear-gradient(
  to bottom,
  transparent 0%,
  black 2%,
  black 85%,
  transparent 100%
);
-webkit-mask-image: linear-gradient(
  to bottom,
  transparent 0%,
  black 2%,
  black 85%,
  transparent 100%
);
}

.panel-view::-webkit-scrollbar {
  display: none; 
}

.info-panel.is-open {
  pointer-events: all;
  transform: translateX(0);
}

/* INFO-PANEL TEXT */
.panel-text {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-content: start;
}

.panel-text h3 {
  grid-column: 1 / -1;
}
.panel-text h4 {
  grid-column: 1 / -1;
}
.panel-text p {
  grid-column: 1 / -1;
}
.panel-text h5 {
  grid-column: 1;
}
.panel-text span {
  grid-column: 2 / 4;
}
.panel-text a {
  grid-column: 2 / 4;
  color: green;
  text-decoration: none;
  font-weight: 700;
}  


/* ABOUT PANEL */
.about-panel {
  z-index: 400;
  padding-bottom: 0;
  height: auto;
}

.about-panel .panel-view {
  padding-bottom: 20px;
  mask-image: none;
}

/* IMPRINT */

.imprint-panel {
  left: auto;
  right: 0;
  width: calc(100vw - 400px); 
  border-radius: 15px 0 0 15px;
  background-color: green;
  transform: translateX(100%); 
  z-index: 400;
}

.imprint-panel.is-open {
  transform: translateX(0);
}

.imprint-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-content: start;
}
.imprint-text h4 {
  color: whitesmoke;
}
.imprint-text p {
  color: whitesmoke;
}

/* CAROUSEL */

.project {
  scroll-snap-align: center;
}

.carousel {
  overflow-x: scroll;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  height: 90dvh;
}

.carousel-track.first-last {
  height: 95dvh;
}

.carousel-item {
  flex-shrink: 0; 
  overflow: hidden;
  height: 100%;
}

.carousel-item img {
  height: 100%;
  object-fit: cover;
}

.carousel-item video {
  height: 100%;
  object-fit: cover;
}


@media (max-width: 520px) {
  .project {
    display: flex;
    overflow: hidden;
  }
  .carousel {
    scroll-snap-type: x mandatory;  
  }
  .carousel-track {
    align-items: center;
  }
  .carousel-item {
    width: 100vw;
    height: auto;
    aspect-ratio: 1 / 1.414;
    scroll-snap-align: center;
    align-items: center;
  }
  .carousel-item img,
  .carousel-item video {
    height: 100%;
    object-fit: unset;
    display: block;
  }
  .carousel-item.landscape {
    aspect-ratio: 1.414 / 1;
    width: 200%;
  }

  .project-label {
    bottom: 0;
  }

  .info-panel {
    width: 100vw;
  }

  .floating-links {
    position: fixed;
    top: 80%;
    right: 0;
    transform: translateY(-50%);
    height: auto;
    flex-direction: column;
    align-items: flex-end;
  }

}