@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap");

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

body {
  background: linear-gradient(135deg, #e8ffe8 0%, #c8f7c5 50%, #a8e6a3 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  animation: pageLoad 1s ease-out;
}

/* Floating particles background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(105, 192, 105, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(119, 221, 119, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(168, 230, 163, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes pageLoad {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-15px) rotate(1deg);
  }

  66% {
    transform: translateY(10px) rotate(-1deg);
  }
}

/* Enhanced tree splash */
.splash-container {
  height: 30vh;
  min-height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInUp 1.2s ease-out;
  gap: 2rem;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tree {
  position: relative;
  width: 100px;
  height: 100px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  animation: treeAnimate 8s linear infinite;
  margin: 50px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.tree:hover {
  transform: rotateX(-20deg) rotateY(30deg) scale(1.1);
  animation-play-state: paused;
}

@keyframes colorWave {
  0% {
    color: #ff6b9d;
  }

  25% {
    color: #4ecdc4;
  }

  50% {
    color: #45b7d1;
  }

  75% {
    color: #96ceb4;
  }

  100% {
    color: #ff6b9d;
  }
}

.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, #85e085);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-bottom: 10px solid rgba(0, 0, 25, 0.8);
  transform-origin: bottom;
  transform: rotateY(calc(90deg * var(--i))) rotateX(30deg) translateZ(57px);
  transition: all 0.3s ease;
}

.tree:hover div.branch span {
  background: linear-gradient(90deg, #7dd87d, #8ae58a, #97f297);
  box-shadow: 0 0 20px rgba(119, 221, 119, 0.4);
}

.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, #e8851f);
  border-bottom: 10px solid rgba(0, 0, 25, 0.8);
  transform-origin: bottom;
  transform: rotateY(calc(90deg * var(--i))) translateZ(15px);
  transition: all 0.3s ease;
}

.tree:hover div.stem span {
  background: linear-gradient(90deg, #d55a2e, #f08020, #ff9025);
  box-shadow: 0 0 15px rgba(223, 114, 20, 0.3);
}

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

.tree:hover .shadow {
  background: rgba(0, 0, 0, 0.4);
  filter: blur(30px);
}

/* Enhanced morph text */
.morph-text-container {
  position: relative;
  animation: fadeInScale 1.5s ease-out 0.8s both;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#morph-text-box {
  position: absolute;
  margin: auto;
  width: 100vw;
  height: 80px;
  top: 0;
  bottom: 0;
  filter: url(#threshold) blur(0.6px);
}

#morph-text1,
#morph-text2 {
  position: absolute;
  width: 100%;
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 5rem);
  text-align: center;
  user-select: none;
  animation: colorWave 6s linear infinite;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: linear-gradient(45deg, #ff6b9d, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: colorWave 6s linear infinite, shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Enhanced reference container */
.ref-container {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 1.5rem;
  padding: 2rem;
  animation: slideInUp 1.5s ease-out 1.2s both;
}

.ref-holder {
  position: relative;
  padding: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: popIn 0.8s ease-out both;
  animation-delay: calc(var(--ref-index) * 0.1s + 1.5s);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.ref-holder:nth-child(1) {
  --ref-index: 0;
}

.ref-holder:nth-child(2) {
  --ref-index: 1;
}

.ref-holder:nth-child(3) {
  --ref-index: 2;
}

.ref-holder:nth-child(4) {
  --ref-index: 3;
}

.ref-holder:nth-child(5) {
  --ref-index: 4;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(30px) rotate(-10deg);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

.ref-holder::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(45deg, #69c069, #77dd77, #85e085, #69c069);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: gradientShift 4s ease infinite;
}

.ref-holder:hover::before {
  opacity: 1;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.ref-holder:hover {
  transform: translateY(-12px) scale(1.15) rotate(5deg);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.ref-holder img {
  width: 3rem;
  height: 3rem;
  filter: saturate(0) opacity(0.7);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-holder:hover img {
  transform: scale(1.2) rotate(-5deg);
  filter: saturate(1) opacity(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Cursor trail effect */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(105, 192, 105, 0.8) 0%, rgba(119, 221, 119, 0.4) 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.1s ease;
  mix-blend-mode: screen;
}

/* Responsive design */
@media (max-width: 768px) {
  .splash-container {
    flex-direction: column;
    gap: 1rem;
    height: auto;
    min-height: 300px;
  }

  .tree {
    margin: 25px;
    transform: scale(0.8);
  }

  .ref-container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .ref-holder img {
    width: 2.5rem;
    height: 2.5rem;
  }

  #morph-text1,
  #morph-text2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
