/* Name effect */
@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@1,900&display=swap");

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

body {
  background: #e8ffe8;
}

/* Tree splash */
.splash-container {
  height: 30vh;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tree {
  position: relative;
  width: 100px;
  height: 100px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  animation: treeAnimate 5s linear infinite;
  margin: 50px;
}

@keyframes treeAnimate {
  0% {
    transform: rotateX(-20deg) rotateY(360deg);
  }

  100% {
    transform: rotateX(-20deg) rotateY(0deg);
  }
}

@keyframes colorWave {
  0% {
    color: #ffb3ba
  }

  33% {
    color: #baffc9
  }

  66% {
    color: #bae1ff
  }

  100% {
    color: #ffb3ba
  }
}

.tree div {
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateY(calc(50px * var(--x)));
}

.tree div.branch span {
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #69c069, #77dd77);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-bottom: 10px solid #00000019;
  transform-origin: bottom;
  transform: rotateY(calc(90deg * var(--i))) rotateX(30deg) translateZ(57px);
}

.tree div.branch {
  transform: scale3d(calc(0.5 + 0.25 * var(--x)),
      calc(0.5 + 0.25 * var(--x)),
      calc(0.5 + 0.25 * var(--x))) translateY(calc(40% * var(--x) - 125px / (var(--x) + 1)));
}

.tree div.stem span {
  position: absolute;
  top: 175px;
  left: calc(50% - 15px);
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, #bb4622, #df7214);
  border-bottom: 10px solid #00000019;
  transform-origin: bottom;
  transform: rotateY(calc(90deg * var(--i))) translateZ(15px);
}

.shadow {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  filter: blur(20px);
  transform-style: preserve-3d;
  transform: rotateX(90deg) translateZ(-130px);
}

.morph-text-container {
  position: relative;
}

#morph-text-box {
  /* Center the text in the viewport. */
  position: absolute;
  margin: auto;
  width: 100vw;
  height: 80px;
  top: 0;
  bottom: 0;

  /* This filter is a lot of the magic, try commenting it out to see how the morphing works! */
  filter: url(#threshold) blur(0.6px);
}

/* Your average text styling */
#morph-text1,
#morph-text2 {
  position: absolute;
  width: 100%;
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 900;
  font-size: 80px;
  text-align: center;
  user-select: none;
  animation: colorWave 5s linear infinite;
}

.ref-container {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 1rem;
}

.ref-holder {
  img {
    width: 5rem;
    height: 5rem;

    filter: saturate(0) opacity(0.7);

    transition: all 0.2s ease-in-out;
  }

  :hover {
    img {
      transform: scale(1.2);
      filter: saturate(1) opacity(1);
    }
  }
}
