/* Hero Text Animation Effects - Professional & Elegant */

/* Typewriter Effect for Hero Paragraphs */
.hero-typewriter {
  overflow: hidden;
  border-right: 2px solid transparent;
  white-space: nowrap;
  animation: typewriter 3s steps(40, end) 1s both,
    blink-cursor 1s step-end infinite 4s;
  max-width: 100%;
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-cursor {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: rgba(255, 255, 255, 0.8);
  }
}

/* Floating Text Effect */
.hero-floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Word Reveal Animation */
.hero-word-reveal {
  overflow: hidden;
}

.hero-word-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: wordReveal 0.8s ease-out forwards;
}

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

/* Stagger the word animations */
.hero-word-reveal .word:nth-child(1) {
  animation-delay: 0.5s;
}
.hero-word-reveal .word:nth-child(2) {
  animation-delay: 0.7s;
}
.hero-word-reveal .word:nth-child(3) {
  animation-delay: 0.9s;
}
.hero-word-reveal .word:nth-child(4) {
  animation-delay: 1.1s;
}
.hero-word-reveal .word:nth-child(5) {
  animation-delay: 1.3s;
}
.hero-word-reveal .word:nth-child(6) {
  animation-delay: 1.5s;
}
.hero-word-reveal .word:nth-child(7) {
  animation-delay: 1.7s;
}
.hero-word-reveal .word:nth-child(8) {
  animation-delay: 1.9s;
}
.hero-word-reveal .word:nth-child(9) {
  animation-delay: 2.1s;
}
.hero-word-reveal .word:nth-child(10) {
  animation-delay: 2.3s;
}
.hero-word-reveal .word:nth-child(11) {
  animation-delay: 2.5s;
}
.hero-word-reveal .word:nth-child(12) {
  animation-delay: 2.7s;
}

/* Subtle Glow Effect for Text */
.hero-glow {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  animation: gentleGlow 4s ease-in-out infinite alternate;
}

@keyframes gentleGlow {
  from {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  }
}

/* Slide in from sides */
.hero-slide-in-left {
  transform: translateX(-100px);
  opacity: 0;
  animation: slideInLeft 1.2s ease-out 0.8s forwards;
}

.hero-slide-in-right {
  transform: translateX(100px);
  opacity: 0;
  animation: slideInRight 1.2s ease-out 1s forwards;
}

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Professional Scale-in Effect */
.hero-scale-in {
  transform: scale(0.8);
  opacity: 0;
  animation: scaleIn 1s ease-out 1.2s forwards;
}

@keyframes scaleIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Breathing Text Effect for Continuous Engagement */
.hero-breathing {
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Professional Fade-in with Bounce */
.hero-fade-bounce {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeBounce 1.2s ease-out 0.6s forwards;
}

@keyframes fadeBounce {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gentle Fade-In Effect - Ultra Subtle */
.hero-gentle-fade {
  opacity: 0;
  animation: gentleFadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes gentleFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .hero-typewriter {
    white-space: normal;
    border-right: none;
    animation: mobileTypewriter 2s ease-out 1s both;
  }

  @keyframes mobileTypewriter {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero-floating {
    animation: mobileFloat 4s ease-in-out infinite;
  }

  @keyframes mobileFloat {
    0%,
    100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-5px);
    }
  }

  .hero-gentle-fade {
    animation: gentleFadeIn 1.2s ease-out 0.3s forwards;
  }
}

/* Accessibility - Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-typewriter,
  .hero-floating,
  .hero-word-reveal .word,
  .hero-glow,
  .hero-slide-in-left,
  .hero-slide-in-right,
  .hero-scale-in,
  .hero-breathing,
  .hero-fade-bounce,
  .hero-gentle-fade {
    animation: none;
    opacity: 1;
    transform: none;
    text-shadow: none;
  }
}

/* Enhanced Text Styling for Professional Look */
.hero-text-enhanced {
  letter-spacing: 0.5px;
  line-height: 1.4;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
