*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --sepia: #231B18;
  --cream: #F2EEE3;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Courier Prime', sans-serif;
  background-color: var(--sepia);
  transition: background-color .3s ease-in-out;
}

body.initial-load {
  background-color: #000;
}

body.colored {
  background-color: var(--cream);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Arnie', sans-serif;
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  text-transform: uppercase;
}

h3 {
  font-size: 2.5rem;
}

img {
  width: 100%;
  display: block;
  max-width: 100%;
  background-color: var(--cream);
}

.loading-animation {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: 400;
  color: #fff;
  transition: all .5s cubic-bezier(0.550, 0.085, 0.680, 0.530);
  font-family: 'Arnie', sans-serif;

  & .load-text-wrap {
    display: flex;
    gap: .5ch;
    overflow: hidden;

    & p {
      margin: 0;
      display: inline-block;
    }

    & .loadtext {
      translate: 0 100%;
      transition: translate 1s cubic-bezier(0.250, 0.460, 0.450, 0.940);
    }

    & .loadtext.swipe {
      translate: 0;
    }
  }
}

.loading-animation.hide {
  translate: 0 -100%;
}

[data-animation="fadeIn"] {
  opacity: 0;
  transition: opacity ease-in-out 1s;
}

[data-animation="fadeIn"].visible {
  opacity: 1;
}

.subtitle {
  font-size: .8rem;
  opacity: .7;

  &::before {
    content: "[";
  }

  &::after {
    content: "]";
  }
}

.fade-in-title {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in-visible {
  opacity: 1;
}

.hide-cursor * {
  cursor: none;
}

#cursor {
  mix-blend-mode: difference;
  pointer-events: none;
  translate: -50% -50%;
  display: inline-block;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 999;

  & .circle {
    transition: width .2s ease-out;
    width: 20px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: #fff;

  }

  & [data-label="view"] {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    opacity: 0;
    color: #000;
    font-size: .75em;
  }

  &.cursor-grow {
    & .circle {
      width: 70px;
    }
  }
}

@keyframes switch {
  0% {
    background-image: url(../img/img1.webp);
  }

  25% {
    background-image: url(../img/img2.webp);
  }

  50% {
    background-image: url(../img/img3.webp);
  }

  75% {
    background-image: url(../img/img4.webp);
  }

  100% {
    background-image: url(../img/img5.webp);
  }
}

.button-wrap {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.button {
  z-index: 1;
  position: relative;
  text-align: center;
  color: var(--cream);
  text-decoration: none;
  transition: opacity .5s ease-in-out;

  &::after {
    content: '';
    background-color: var(--cream);
    position: absolute;
    width: 105%;
    height: 0;
    bottom: -15%;
    left: 50%;
    right: 50%;
    translate: -50%;
    transform-origin: left;
    z-index: 2;
    mix-blend-mode: difference;
    transition: width .3s ease-in-out, height .3s ease-out, opacity .3s ease-in-out;
  }

  &::before {
    content: '';
    background-color: var(--cream);
    position: absolute;
    width: 105%;
    height: 1px;
    bottom: -15%;
    left: 50%;
    right: 50%;
    translate: -50%;
    opacity: .25;
    transform-origin: left;
  }

  &:hover::after {
    height: 125%;
  }
}

.hero {
  min-height: 250vh;
  height: 250vh;
  background-color: var(--sepia);
  color: var(--cream);
  position: relative;

  & .non-sticky-scroll {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
  }

  & .sticky-scroll {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transition: background-color .3s ease-in-out;
  }

  & .img-wrap {
    max-width: 991px;
    width: 100%;
    inset: 50%;
    position: absolute;
    translate: -50% -50%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 2rem;
  }

  & .img-wrap.fadeIn .img-placeholder {
    opacity: 1;
    translate: 0 0;
  }

  & .img-placeholder {
    width: 25%;
    background-size: cover;
    aspect-ratio: 2 / 3;
    opacity: 0;
    translate: 0 -10%;
    transition: translate 1.5s cubic-bezier(0.250, 0.460, 0.450, 0.940), opacity .5s ease-in-out;
    animation: switch 2s steps(1) infinite;
  }

  & .container {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    height: 100%;

    & .mask:nth-child(1) {
      top: 0;
      left: 0;
      text-align: left;
    }

    & .mask:nth-child(2) {
      bottom: 0;
      left: 50%;
      translate: -50% 0;
      text-align: center;

      & h2 {
        translate: 0 10%;
      }
    }

    & .mask:nth-child(3) {
      top: 0;
      right: 0;
      text-align: right;
    }
  }

  & h2 {
    font-size: clamp(2.25rem, 2.5rem + 12.25vw, 12.5rem);
    flex: 1;
    text-align: center;
    line-height: .9;
    transition: all .3s ease-in-out;
    /* position: absolute; */
  }

  & .mask {
    flex: 1;
    position: absolute;
    overflow: hidden;
  }

}

.sticky-scroll.colored {
  background-color: var(--cream);
  color: var(--sepia);
}

.head-wrap {
  padding: 2rem .5rem .5rem 2rem;
  margin-bottom: 5rem;
  position: sticky;
  top: 0;
  z-index: -1;
}

.img-hover-block {
  position: relative;

  &.onBlack {
    color: var(--cream);
  }

  & img {
    transition: opacity .3s ease-in-out;
  }

  .label-wrap {
    opacity: 0;
    bottom: 5%;
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: right .3s ease-in-out, opacity .3s ease-in-out;

    & p {
      margin: 0;
    }
  }

  .label-left {
    left: 0;
    transition: left .3s ease-in-out, opacity .3s ease-in-out;
  }

  .label-right {
    right: 0;
  }

  /* &:hover .label-left {
    opacity: 1;
    left: 5%;
  }

  &:hover .label-right {
    opacity: 1;
    right: 5%;
  } */

  &::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    opacity: 0;
    background: linear-gradient(#F2EEE300, #F2EEE380);
    transition: opacity .3s ease-out;
  }

  /* 
  &:hover::before {
    opacity: 1;
  } */
}

.grid-container {
  max-width: 1440px;
  margin-inline: auto;
  padding: .5rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  gap: 1.25rem;
}

& .img-series-wrap {
  padding-block: 12rem;
  width: 100%;
  display: flex;
  gap: 1.25rem;

  & .img-hover-block {
    flex: 1;
    margin: 0;
  }
}

#content-1 {
  padding-top: 5rem;


  & .img-hover-block:nth-child(1) {
    grid-column: 1 / 5;
  }

  & .img-hover-block:nth-child(2) {
    margin-top: 5rem;
    grid-column: -5 / -1;
  }

  & .img-series-wrap {
    grid-column: 3/-3;

    & .img-hover-block {
      margin: 0;
    }
  }
}

#content-2 {
  & .grid-container {
    & .img-hover-block {
      grid-column: 4 / -4;
    }

    & .img-series-wrap {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      align-items: end;
      gap: 1.25rem;

      & .img-hover-block:nth-child(1) {
        grid-column: 1 / 7;
      }

      & .img-hover-block:nth-child(2) {
        grid-column: -5 / -1;
      }
    }
  }
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - 1rem));
  }
}

#content-3 {
  padding-top: 5rem;

  & .marquee {
    position: sticky;
    top: 0;
    display: flex;
    gap: 1rem;
    overflow: hidden;
    width: 100%;

    &:hover .marquee-content {
      animation-play-state: paused;
    }

    & .marquee-content {
      animation: scroll 15s linear infinite;
      min-width: 100%;
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 1rem;

      & .subtitle {
        font-size: 2rem;
        padding-inline: 2rem;
      }

      & .marquee-text {
        line-height: 1;
        text-wrap: nowrap;
        font-size: 20vw;
      }
    }
  }

  & .grid-container {
    & .img-hover-block:nth-child(1) {
      grid-column: 2 / -2;
    }

    & .img-hover-block:nth-child(2) {
      margin-top: 10rem;
      grid-column: 5 / -5;
    }
  }
}

#contentCollage {
  padding-top: 5rem;

  .head-wrap {
    position: static;
    text-align: right;
    margin-bottom: 1rem;
    padding-top: 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;

    & .horIndicator {
      width: 150px;
      height: 1.5px;
      background-color: #000;
      position: relative;
    }
  }

  .lottie {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;

    & h4 {
      font-size: 1.25rem;
    }

    & .subtitle {
      margin-block: .5rem;
    }
  }

  .inner-lottie-wrap {
    display: flex;
    align-items: center;
    gap: .25rem;
  }

  & .sidescroll {
    height: 200vh;
  }

  & .sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: clip;
    min-height: 100vh;
  }

  & .slider {
    display: grid;
    grid-auto-flow: column;
    gap: 12vw;
    width: fit-content;

    & .img-hover-block {
      width: 600px;
      aspect-ratio: 4 / 3;

      & img {
        object-fit: contain;
        height: 100%;
      }

      &:hover img:nth-child(1) {
        opacity: 0;
      }

      & img:nth-child(1) {
        position: absolute;
      }

      & .blinkimg {
        display: none;
        position: absolute;
      }

    }
  }
}

#content-5 {
  & .text-wrap {
    grid-column: 2 / -2;
    margin-top: 10rem;
    padding: 2rem;

    & .p-wrap {
      display: flex;
      align-items: baseline;
      justify-content: center;
      gap: 3rem;
      margin-bottom: 2rem;

      & .text {
        font-family: 'Arnie', sans-serif;
        font-size: 2rem;
        max-width: 45ch;
        margin: 0;
      }

      & .subtitle {
        margin: 0;
        max-width: 40ch;
      }
    }
  }
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  height: 100vh;
  margin-inline: auto;
  width: 100%;
  /* background-color: var(--cream); */
  position: relative;
  flex-direction: column;
  gap: 3rem;
  padding-inline: 1rem;

  & div:nth-child(1) {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: inherit;
    justify-content: center;
    gap: 1rem;
  }

  & .footer-title {
    font-size: 30vw;
    translate: 0 10%;
    transition: color .3s ease-in-out;
  }


  & .button-wrap {
    background-color: var(--cream);
  }

  & .button {
    color: var(--sepia);

    &::after {
      opacity: 0;
    }

    &::before {
      background-color: var(--sepia);
    }
  }
}

.footer-nav {
  margin-top: 5rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-top: 1px solid var(--sepia);

  & a {
    color: var(--sepia);
    text-decoration: none;
    font-size: .75rem;
  }

  & div {
    display: inherit;
    flex-direction: inherit;
    gap: 1rem;
  }

  & p {
    margin: 0;
    font-family: 'Arnie', sans-serif;
  }
}


@media screen and (max-width: 991px) {

  /* GENEREAL ADJUSTMENTS */

  .hide-cursor * {
    cursor: auto;
  }

  #cursor {
    display: none;
  }

  /* HERO ADJUSTMENTS */

  .hero {
    & .button-wrap {
      z-index: 1;
      mix-blend-mode: difference;

      & a {
        mix-blend-mode: difference;
        cursor: pointer;
      }
    }

    & .non-sticky-scroll {
      flex-direction: column-reverse;
      gap: 2rem;
      height: 100dvh;
    }

    & .img-wrap {
      position: static;
      flex-direction: column;
      inset: auto;
      translate: 0;
      overflow: hidden;
    }

    & .img-wrap .img-placeholder {
      width: 50%;
      max-height: 300px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      opacity: 1;
      translate: 0 0;

      &.img-reveal {
        translate: 0 100%;
      }

      &:nth-child(2) {
        display: none;
      }
    }

    & .img-wrap.fadeIn .img-placeholder {
      translate: 0 0;
    }

    & .sticky-scroll {
      height: 100dvh;
    }
  }

  /* CONTENT-1 ADJUSTMENTS */

  #content-1 {
    padding-top: 5rem;

    & .img-hover-block:nth-child(1) {
      grid-column: 1 / 6;
    }

    & .img-hover-block:nth-child(2) {
      grid-column: -6 / -1;
    }

    & .img-series-wrap {
      padding-block: 5rem;
      gap: 2rem;
      grid-column: 2/-2;
    }
  }

  /* CONTENT-2 ADJUSTMENTS */

  #content-2 {
    & .grid-container {
      & .img-hover-block {
        grid-column: 4 / -4;
      }

      & .img-series-wrap {
        grid-column: 1 / -1;
        grid-template-columns: repeat(12, 1fr);
        gap: 1.25rem;
        padding-block: 5rem;

        & .img-hover-block:nth-child(1) {
          grid-column: 1 / 8;
        }

        & .img-hover-block:nth-child(2) {
          margin-top: 5rem;
          grid-column: -8 / -1;
        }
      }
    }
  }

  /* CONTENT-3 ADJUSTMENTS */

  #content-3 {
    & .marquee {
      position: sticky;
      top: 45%;
    }

    & .grid-container {

      & .img-hover-block:nth-child(2) {
        margin-top: 5rem;
        grid-column: 4 / -4;
      }
    }
  }


  /* CONTENT-COLLAGE ADJUSTMENTS */

  #contentCollage {
    & .sidescroll {
      height: 200vh;
    }

    & .sticky {
      min-height: 100dvh;
    }

    & .slider {

      & .img-hover-block {
        width: 350px;
        pointer-events: none;


        & img:nth-child(1) {
          display: none;
        }

        & .blinkimg {
          display: block;
          opacity: 1;
          /* transition: opacity .3s ease-in-out; */
          animation: fadeInLoop 2s steps(2) infinite;
        }
      }
    }
  }

}

@media screen and (max-width: 768px) {

  /* GENERAL ADJUSTMENTS */

  h3 {
    font-size: 2rem;
  }

  .head-wrap {
    padding: 1rem;

    top: 2rem;

    & .subtitle {
      margin-block: .5rem;
    }
  }

  /* CONTENT-1 ADJUSTMENTS */

  #content-1 {
    padding-top: 5rem;

    & .img-hover-block:nth-child(1) {
      grid-column: 1 / 9;
    }

    & .img-hover-block:nth-child(2) {
      grid-column: -9 / -1;
    }

    & .img-series-wrap {
      padding-block: 5rem;
      gap: 5rem;
      grid-column: 3/-3;
      flex-direction: column;
    }
  }

  /* CONTENT-2 ADJUSTMENTS */

  #content-2 {
    & .grid-container {
      & .img-hover-block {
        grid-column: 3 / -3;
      }

      & .img-series-wrap {

        & .img-hover-block:nth-child(1) {
          grid-column: 1 / 10;
        }

        & .img-hover-block:nth-child(2) {
          grid-column: -10 / -1;
        }
      }
    }
  }

  /* CONTENT-3 ADJUSTMENTS */

  #content-3 {
    & .marquee {
      position: sticky;
      top: 45%;
    }

    & .grid-container {
      & .img-hover-block:nth-child(1) {
        grid-column: 1 / -1;
      }

      & .img-hover-block:nth-child(2) {
        margin-top: 5rem;
        grid-column: 2 / -2;
      }
    }
  }

  #content-5 {
    & .text-wrap {
      grid-column: 1 / -1;
      margin-top: 10rem;
      padding: 1rem;

      & .p-wrap {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        margin-bottom: 2rem;

        & .text {
          font-family: 'Arnie', sans-serif;
          font-size: 2rem;
          line-height: 1.1;
          max-width: none;
          margin: 0;
        }

        & .subtitle {
          margin: 0;
          font-size: 1rem;
          line-height: 1.4;
          max-width: none;
        }
      }
    }
  }
}

@keyframes fadeInLoop {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}