/* Hero Section - Pac-Man Style Llamita Animation */

.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: calc(var(--header-height) + var(--space-4)) var(--space-6) var(--space-6);
}

/* Animated Gradient Background */
.hero-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #4facfe 75%, 
        #00f2fe 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero Content Wrapper */
.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    gap: var(--space-3);
}

/* Brand at Top */
.hero-brand-top {
    text-align: center;
    color: white;
    margin-top: 0;
    margin-bottom: var(--space-2);
    max-width: 900px;
}

.hero-title {
    margin-bottom: var(--space-2);
}

.patachay-text {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: var(--font-bold);
    color: white;
    display: inline-block;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-size: var(--text-4xl);
    color: white;
    font-weight: var(--font-bold);
    margin: var(--space-2) 0;
    letter-spacing: 0;
    text-transform: none;
}

.hero-brand-top .hero-description {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin: var(--space-3) auto 0;
    line-height: var(--leading-relaxed);
    max-width: 700px;
    font-weight: var(--font-normal);
}

/* Animation Arena - Pac-Man Style */
.animation-arena {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 240px;
    margin: var(--space-4) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: var(--space-4);
}

/* Llamita Pac-Man */
.llamita-pacman {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1); /* Flip by DEFAULT to face RIGHT */
    width: 140px;
    height: 140px;
    transition: left 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

#llamitaImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(255, 107, 0, 0.5));
    transition: transform 0.1s ease;
}

/* Flip when changing direction - REMOVE scaleX to face LEFT */
.llamita-pacman.flip {
    transform: translateY(-50%) scaleX(1);
}

/* Chomping animation */
.llamita-pacman.chomping #llamitaImg {
    animation: chomp 0.2s ease-in-out infinite;
}

@keyframes chomp {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.85);
    }
}

/* Fire Particles when eating */
.fire-particles {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    pointer-events: none;
    opacity: 0;
}

.fire-particles.active {
    opacity: 1;
}

.fire-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ff6b00, #ff9500, transparent);
    border-radius: 50%;
    animation: particle-float 0.6s ease-out forwards;
}

@keyframes particle-float {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--px), var(--py)) scale(0);
        opacity: 0;
    }
}

/* Text Container for Letters */
.text-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    font-size: 2.4rem;
    font-weight: var(--font-bold);
    color: white;
    white-space: nowrap;
    pointer-events: none;
    font-family: var(--font-display);
    z-index: 5;
}

.text-letter {
    display: inline-block;
    opacity: 1;
    transition: all 0.2s ease;
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.8),
                 0 0 40px rgba(99, 102, 241, 0.5);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.text-letter.eaten {
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

.text-letter.vomited {
    animation: vomit-letter 0.3s ease-out forwards;
}

@keyframes vomit-letter {
    0% {
        opacity: 0;
        transform: translateX(-50px) scale(0.5) rotate(-90deg);
    }
    60% {
        transform: translateX(0) scale(1.2) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0);
    }
}

/* Bottom Content */
.hero-bottom-content {
    text-align: center;
    color: white;
    max-width: 800px;
    margin-bottom: var(--space-6);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta .btn {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% {
        top: 10px;
        opacity: 1;
    }
    100% {
        top: 30px;
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: calc(var(--header-height) + var(--space-4)) var(--space-4) var(--space-6);
    }
    
    .hero-content-wrapper {
        gap: var(--space-3);
    }
    
    .hero-brand-top {
        margin-bottom: var(--space-3);
    }
    
    .animation-arena {
        height: 140px;
        margin: var(--space-4) 0;
        padding: var(--space-3);
    }
    
    .llamita-pacman {
        width: 70px;
        height: 70px;
        left: 15px;
    }
    
    .text-container {
        font-size: 1.2rem;
        gap: 4px;
    }
    
    .hero-brand-top .hero-description {
        font-size: var(--text-base);
        padding: 0 var(--space-3);
        margin-top: var(--space-3);
    }
    
    .hero-cta {
        flex-direction: column;
        padding: 0 var(--space-3);
        gap: var(--space-2);
    }
    
    .hero-cta .btn {
        width: 100%;
        padding: var(--space-3) var(--space-6);
    }
    
    .hero-tagline {
        font-size: var(--text-2xl);
        margin: var(--space-2) 0;
    }
    
    .patachay-text {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    .animation-arena {
        height: 120px;
    }
    
    .llamita-pacman {
        width: 55px;
        height: 55px;
        left: 10px;
    }
    
    .text-container {
        font-size: 1rem;
        gap: 3px;
    }
    
    .patachay-text {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .hero-tagline {
        font-size: var(--text-xl);
    }
    
    .hero-brand-top .hero-description {
        font-size: var(--text-sm);
    }
}
