/* 
 * Custom Animations CSS
 * 
 * This file contains specialized animations for the Amplify Development website.
 * The primary animations include:
 * 1. A handwriting effect for the tagline using a script font
 * 2. A scale/fade animation for the logo on page load
 */

/* Import Dancing Script - a beautiful handwritten font for the tagline */
@import url('https://fonts.googleapis.com/css2?family=Satisfy&family=Dancing+Script:wght@400;700&display=swap');

/* 
 * Simpler typewriter effect with two steps
 */
.hero-tagline {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 1.4rem;
    color: #FFFFFF;
    text-align: center;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
    line-height: 1.6;
    overflow: visible;  /* Changed from hidden to ensure all text is visible */
    height: auto;       /* Auto height instead of fixed */
    padding-bottom: 10px; /* Add some padding */
}

.hero-tagline br {
    display: block;
}

.hero-tagline span {
    display: inline-block;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

/* First line characters */
.hero-tagline span:nth-child(1) { animation-delay: 0.1s; }
.hero-tagline span:nth-child(2) { animation-delay: 0.2s; }
.hero-tagline span:nth-child(3) { animation-delay: 0.3s; }
.hero-tagline span:nth-child(4) { animation-delay: 0.4s; }
.hero-tagline span:nth-child(5) { animation-delay: 0.5s; }
.hero-tagline span:nth-child(6) { animation-delay: 0.6s; }
.hero-tagline span:nth-child(7) { animation-delay: 0.7s; }
.hero-tagline span:nth-child(8) { animation-delay: 0.8s; }
.hero-tagline span:nth-child(9) { animation-delay: 0.9s; }
.hero-tagline span:nth-child(10) { animation-delay: 1.0s; }
.hero-tagline span:nth-child(11) { animation-delay: 1.1s; }
.hero-tagline span:nth-child(12) { animation-delay: 1.2s; }
.hero-tagline span:nth-child(13) { animation-delay: 1.3s; }
.hero-tagline span:nth-child(14) { animation-delay: 1.4s; }
.hero-tagline span:nth-child(15) { animation-delay: 1.5s; }
.hero-tagline span:nth-child(16) { animation-delay: 1.6s; }
.hero-tagline span:nth-child(17) { animation-delay: 1.7s; }
.hero-tagline span:nth-child(18) { animation-delay: 1.8s; }

/* Second line characters - with increased delay to ensure they appear after first line */
.hero-tagline span:nth-child(19) { animation-delay: 2.3s; }
.hero-tagline span:nth-child(20) { animation-delay: 2.4s; }
.hero-tagline span:nth-child(21) { animation-delay: 2.5s; }
.hero-tagline span:nth-child(22) { animation-delay: 2.6s; }
.hero-tagline span:nth-child(23) { animation-delay: 2.7s; }
.hero-tagline span:nth-child(24) { animation-delay: 2.8s; }
.hero-tagline span:nth-child(25) { animation-delay: 2.9s; }
.hero-tagline span:nth-child(26) { animation-delay: 3.0s; }
.hero-tagline span:nth-child(27) { animation-delay: 3.1s; }
.hero-tagline span:nth-child(28) { animation-delay: 3.2s; }
.hero-tagline span:nth-child(29) { animation-delay: 3.3s; }
.hero-tagline span:nth-child(30) { animation-delay: 3.4s; }
.hero-tagline span:nth-child(31) { animation-delay: 3.5s; }
.hero-tagline span:nth-child(32) { animation-delay: 3.6s; }
.hero-tagline span:nth-child(33) { animation-delay: 3.7s; }
.hero-tagline span:nth-child(34) { animation-delay: 3.8s; }
.hero-tagline span:nth-child(35) { animation-delay: 3.9s; }
.hero-tagline span:nth-child(36) { animation-delay: 4.0s; }
.hero-tagline span:nth-child(37) { animation-delay: 4.1s; }
.hero-tagline span:nth-child(38) { animation-delay: 4.2s; }
.hero-tagline span:nth-child(39) { animation-delay: 4.3s; }
.hero-tagline span:nth-child(40) { animation-delay: 4.4s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 
 * Container for the typewriter effect with fixed dimensions
 * This prevents layout shifts during animation
 */
.typewriter {
    display: flex;
    justify-content: center;
    position: relative;
    margin: 0.5rem auto;
    width: 100%;
    text-align: center;
    padding: 0;
    max-width: 280px;
    min-height: 3.5em;
    overflow: visible;
}

/* Mobile hero logo animation refinements */
.hero-mobile-logo {
    margin: 0 auto 1rem;
    animation: logoAnimation 2.2s ease-out;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    transform-origin: center center;
    overflow: visible;
    position: relative;
    z-index: 1005;
}

.mobile-logo-img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Modified animation to create a spinning effect */
@keyframes logoAnimation {
    0% {
        opacity: 0;
        transform: rotate(-15deg);
    }
    40% {
        opacity: 0.8;
        transform: rotate(8deg);
    }
    70% {
        transform: rotate(-5deg);
    }
    85% {
        transform: rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}
