/* ------------------------------ RESET ------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: #e7e7e7;
  overflow-x: hidden;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

header {
  flex-shrink: 0;
}

h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  all: unset;
  cursor: pointer;
}

/* ------------------------------ TOP BAR ------------------------------ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.7cm;
  background-color: #f6ff00;
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 1000;
  color: #e7e7e7;
}

.top-bar-infos {
  background-color: #0026ff;
}

.scrolling-text {
  white-space: nowrap;
  position: absolute;
  overflow: hidden;
  color: black;
  width: 100%;
}

.scrolling-text-infos {
  color: #e7e7e7;
}

.scrolling-text span {
  display: inline-block;
  padding-left: 100%;
  -moz-animation: scroll 22s linear infinite;
  -webkit-animation: scroll 22s linear infinite;
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ------------------------------ HEADER ------------------------------ */
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 2rem 2rem 0 2rem;
}

.header-infos {
  padding: 2rem 2rem 0 2rem;
}

/* HOVER */
/* hide brackets by default */
.infos-btn::before,
.infos-btn::after,
.studio-name::before,
.studio-name::after {
  content: "";
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* show brackets on hover */
.infos-btn:hover::before,
.studio-name:hover::before {
  content: "[ ";
  opacity: 1;
}

.infos-btn:hover::after,
.studio-name:hover::after {
  content: " ]";
  opacity: 1;
}

.infos-btn,
h1 {
  z-index: 999;
}

/* ---------------- SLIDER WRAPPER ---------------- */
.slider-wrapper {
  position: relative;
  overflow: hidden;
  transition: transform 0.8s ease;
  scroll-behavior: smooth;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding-bottom: 4dvh;
}

.slider-wrapper.active {
  transform: translateY(-13dvh);
}

.slider-scroll-container {
  position: relative;
  width: 100%;
  height: 75dvh;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  cursor: pointer;
}

.slider-scroll-container-infos {
  cursor: grab;
}

.slider-scroll-container::-webkit-scrollbar {
  display: none;
}

.slider-scroll-container.dragging {
  cursor: grabbing; /* hand closes while dragging */
  cursor: -webkit-grabbing; /* Safari/WebKit fallback */
}

/* ---------------- IMAGE SLIDER ---------------- */
.slider-track {
  display: flex;
  height: 75dvh;
}

.slider-track img {
  flex: 0 0 33.3vw;
  height: 100%;
  width: 33.3%;
  object-fit: cover;
  scroll-snap-align: start;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  pointer-events: all; /* ensure pointer events still reach JS */
}

/* ---------------- PROJECT DESCRIPTIONS ---------------- */
.project-descriptions {
  width: 100%;
  overflow: hidden;
  display: none;
}

.project-descriptions.visible {
  display: flex;
  opacity: 1;
  position: absolute;
  top: 84%;
}

.project-first {
  padding-left: 2rem;
  width: (66.6vw - 2rem);
  margin: 0;
}

.description-track {
  display: flex;
}

.project {
  display: grid;
  width: 66.6vw;
  padding-right: 1rem;
  grid-template-columns: 11.1% 1fr;
  gap: 1rem;
}

.name {
  text-wrap: wrap;
}

/* ---------------- MORE/LESS BUTTON ---------------- */
.more-btn {
  position: absolute;
  bottom: 4rem;
  left: 2rem;
  background: #f6ff00;
  padding: 0 0.2rem;
}

.more-btn-infos {
  display: none;
  background: #0026ff;
  color: #e7e7e7;
}

/* ---------------- ABOUT ---------------- */

.about {
  display: flex;
  flex-wrap: nowrap;
  max-width: 100vw;
  margin: 0 auto;
  padding: 2rem 2rem 0 2rem;
  box-sizing: border-box;
  gap: 1rem;
  position: absolute;
  z-index: 888;
}

/* 9-column grid system */

.col-0 {
  flex: 0 0 calc(100% / 9);
}

.col-1 {
  flex: 0 0 calc((100% / 9) * 4);
}
.col-2 {
  flex: 0 0 calc(100% / 9);
}
.col-3 {
  flex: 0 0 calc(100% / 9);
}
.col-4 {
  flex: 0 0 calc((100% / 9));
}

/* ------------------------------ FOOTER ------------------------------ */
footer {
  margin-top: 3cm;
  padding: 3rem 2rem 0.5rem 2rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
}

footer p:nth-child(1) {
  flex: 0 0 calc(100% / 9);
}
footer p:nth-child(2) {
  flex: 0 0 calc(100% / 9 * 2);
}
footer p:nth-child(3) {
  flex: 0 0 calc(100% / 9);
}
footer p:nth-child(4) {
  flex: 0 0 calc(100% / 9);
}

/* ------------------------------ MEDIA QUERIES ------------------------------ */

/* Tablets */
@media (max-width: 1024px) {
  *,
  h1 {
    font-size: 11px;
  }

  header,
  .header-infos {
    padding-top: 3rem;
  }

  .about {
    display: none;
  }

  .about.visible {
    display: flex;
    position: absolute;
    top: 86%;
    width: max-content;
    flex-wrap: nowrap;
  }

  .col-0 {
    display: none;
  }

  .col-1 {
    flex: 0 0 calc((100% / 9) * 7);
  }

  .slider-scroll-container {
    height: 70dvh;
    overflow-y: hidden;
  }

  .slider-wrapper.active {
    transform: translateY(-16dvh);
  }

  .more-btn-infos {
    display: block;
    margin-bottom: 3dvh;
  }

  .more-btn{
    margin-bottom: 3dvh;
  }

  .project-descriptions.visible {
    top: 81%;
  }

  /* Mobile */
  @media (max-width: 768px) {
    footer {
      display: none;
    }

    *,
    h1 {
      font-size: 12px;
    }

    body {
      height: 100dvh;
    }

    main {
      max-height: 100%;
    }

    .slider-wrapper {
      padding-bottom: 0;
      height: 100%;
    }

    .more-btn {
      margin-bottom: -2dvh;
    }

    .slider-scroll-container {
      height: 79%;
    }

    .slider-scroll-container img {
      width: 100vw;
    }

    .slider-wrapper.active {
      transform: translateY(-25%);
    }

    .project {
      width: 200vw;
      grid-template-columns: 30% 1fr;
      gap: 1rem;
    }

    .project-descriptions.visible {
      top: 76%;
    }

    .col-2 {
      flex: 0 0 calc((100% / 4));
    }

    .col-3 {
      flex: 0 0 calc((100% / 4));
    }

    .col-1 {
      flex: 0 0 100%;
      padding-bottom: 4rem;
    }

    .about.visible {
      top: 75dvh;
      overflow-y: hidden;
      flex-wrap: wrap;
      padding-bottom: 1rem;
    }

    header {
      z-index: 999;
    }
  }
}
