.section-title,
.section-subtitle {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Initial hidden state */
.section-title.animate-init,
.section-subtitle.animate-init {
  opacity: 0;
  transform: translateY(20px);
}

/* Triggered when in view */
.section-title.animate-show,
.section-subtitle.animate-show {
  opacity: 1;
  transform: translateY(0);
}

/* Your custom styles */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, #ad49ff, #ffffff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 5rem;
  text-align: center;
  max-width: 800px;
  margin-inline:auto;
}



.animated-heading {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  white-space: nowrap;
  overflow: hidden;
  color: #ba68fe; /* fallback */
  font-size: clamp(1.5rem, 5vw, 3rem); /* responsive */
 
}
.animated-heading span{
  font-family: "Bruno Ace SC", sans-serif;
}

.fade-wave {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1em;
  justify-content: center;
  white-space: normal;
}

.word {
  display: inline-flex;
  white-space: nowrap; /* keeps letters in each word together */
}

.letter {
  animation: colorCycle 3s ease-in-out infinite;
  font-weight: 500;
}

/* Space styling */
.space {
  width: 0.2em;
  display: inline-block;
  animation: none;
  opacity: 1;
}

/* === Staggered delay by word and letter === */
.word-1 .letter:nth-child(1) { animation-delay: 0s; }
.word-1 .letter:nth-child(2) { animation-delay: 0.1s; }
.word-1 .letter:nth-child(3) { animation-delay: 0.2s; }

.word-2 .letter:nth-child(1) { animation-delay: 0.4s; }
.word-2 .letter:nth-child(2) { animation-delay: 0.5s; }
.word-2 .letter:nth-child(3) { animation-delay: 0.6s; }
.word-2 .letter:nth-child(4) { animation-delay: 0.7s; }

.word-3 .letter:nth-child(1) { animation-delay: 0.9s; }
.word-3 .letter:nth-child(2) { animation-delay: 1.0s; }
.word-3 .letter:nth-child(3) { animation-delay: 1.1s; }
.word-3 .letter:nth-child(4) { animation-delay: 1.2s; }
.word-3 .letter:nth-child(5) { animation-delay: 1.3s; }

/* 🔁 Smooth color-shifting animation */
@keyframes colorCycle {
  0%, 100% {
    color: #ffa366; /* peachy pink */
  }
  50% {
    color: #b366ff; /* soft purple-blue */
  }
}

/* 📱 Fallback for very narrow screens */
@media (max-width: 300px) {
  .animated-heading {
    font-size: 1.1rem;
  }
}


