/* Agrupación general del título */
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.1;
}

.poppins-bold.title {
  font-size: clamp(2rem, 4.5vw + 0.3rem, 4.2rem);
  display: inline-block;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
}

/* Teléfonos */
@media (max-width: 480px) {
  .poppins-bold.title {
    font-size: clamp(1.8rem, 5.5vw, 2.6rem);
    line-height: 1.2;
  }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .poppins-bold.title {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  }
}

/* Laptops */
@media (min-width: 769px) and (max-width: 1200px) {
  .poppins-bold.title {
    font-size: clamp(2.6rem, 3.5vw, 3.8rem);
  }
}

/* Pantallas grandes */
@media (min-width: 1201px) and (max-width: 1600px) {
  .poppins-bold.title {
    font-size: 4rem;
  }
}

/* Ultra-wide (4K o más) */
@media (min-width: 1601px) {
  .poppins-bold.title {
    font-size: 4.2rem;
  }
}



.typewriter-on-scroll {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: top;
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300; /* Light */
  font-style: italic;
  font-size: clamp(1.8rem, 4vw + 0.3rem, 3rem);
  color: #e0e0e0; /* tono claro pero no blanco puro */
  letter-spacing: 0.02em;
  width: 0;
  opacity: 0;
  animation:
    fadeInTypewriter 0.2s ease-in forwards 2.8s,
    typingDynamic 2.8s steps(30, end) forwards 3.2s;
}

/* 📱 Teléfonos */
@media (max-width: 480px) {
  .typewriter-on-scroll {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    letter-spacing: 0.01em;
  }
}

/* 📲 Tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .typewriter-on-scroll {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
  }
}

/* 💻 Laptops */
@media (min-width: 769px) and (max-width: 1200px) {
  .typewriter-on-scroll {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
  }
}

/* 🖥️ Pantallas grandes */
@media (min-width: 1201px) and (max-width: 1600px) {
  .typewriter-on-scroll {
    font-size: 3rem;
  }
}

/* 🧱 Ultra-wide (4K o más) */
@media (min-width: 1601px) {
  .typewriter-on-scroll {
    font-size: 3.4rem;
  }
}




/* Fade de opacidad de la máquina */
@keyframes fadeInTypewriter {
  to {
    opacity: 1;
  }
}

/* Animación de tipo máquina de escribir */
@keyframes typingDynamic {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* Fade escalonado */
.fade-step-1,
.fade-step-2,
.fade-step-4 {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s ease-out forwards;
}

.fade-step-1 {
  animation-delay: 0.5s;
}

.fade-step-2 {
  animation-delay: 2s;
}

.fade-step-4 {
  animation-delay: 5s;
}

/* Animación de subida */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}




/* --- ANIMACIONES BASE --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CUANDO ENTRAN A VISTA --- */
.in-view {
  opacity: 1;
  transform: none;
}

@keyframes fadeInSlow {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text .poppins-boldn {
  opacity: 0;
  animation: fadeInSlow 3s ease-out forwards;
  animation-delay: 1s;
  /* puedes ajustar el tiempo de espera */
}