/**
 * Pejeperro Hero - Estilos v1.2.0
 * Compatible con Safari/iOS
 */

.hero-pejeperro * { box-sizing: border-box; margin: 0; padding: 0; }

.hero-pejeperro {
    position: relative; width: 100%; height: 100vh; min-height: 650px;
    background: linear-gradient(180deg, var(--peje-fondo-1) 0%, var(--peje-fondo-2) 35%, var(--peje-fondo-3) 65%, var(--peje-fondo-1) 100%);
    overflow: hidden; display: flex; justify-content: center; align-items: center;
    font-family: 'Dosis', sans-serif;
}

.hero-particles-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

.hero-underwater-light {
    position: absolute; top: -50%; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%);
    width: 150%; height: 100%;
    background: radial-gradient(ellipse at center top, rgba(100, 180, 220, 0.08) 0%, rgba(60, 140, 180, 0.04) 30%, transparent 60%);
    pointer-events: none; z-index: 2; animation: lightPulse 8s ease-in-out infinite;
}

@keyframes lightPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.hero-corals {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 280px;
    pointer-events: none; z-index: 2; opacity: 0;
    animation: coralsReveal 2s ease forwards; animation-delay: 1s;
}

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

.hero-vignette {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(5,15,20,0.8) 100%);
    pointer-events: none; z-index: 3;
}

.hero-content { position: relative; z-index: 10; text-align: center; padding: 20px; margin-bottom: 60px; }

.hero-logo-wrapper {
    -webkit-filter: drop-shadow(0 10px 40px rgba(0,0,0,0.5)); filter: drop-shadow(0 10px 40px rgba(0,0,0,0.5));
    animation: float 6s ease-in-out infinite; animation-delay: 2s;
}

.hero-logo {
    width: 480px; max-width: 85vw; height: auto; opacity: 0;
    -webkit-transform: scale(0.9) translateY(20px); transform: scale(0.9) translateY(20px);
    animation: logoReveal 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
}

@keyframes logoReveal {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(0.5deg); }
    75% { transform: translateY(-5px) rotate(-0.5deg); }
}

.hero-phrases {
    margin-top: 40px; min-height: 100px; display: flex; align-items: center; justify-content: center;
    position: relative; width: 100%; max-width: 95vw; padding: 0 20px;
}

.hero-phrase {
    font-family: 'Dosis', sans-serif !important;
    font-size: clamp(1.4rem, 4.5vw, 2.2rem) !important; font-weight: 600 !important;
    color: var(--peje-texto) !important; letter-spacing: 0.1em; text-transform: uppercase;
    opacity: 0; position: absolute; text-align: center; width: 100%; line-height: 1.5;
    text-shadow: 0 2px 15px rgba(0,0,0,0.6);
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
}

.hero-phrase .wave-letter {
    display: inline-block; animation: waveFloat 3s ease-in-out infinite; animation-play-state: paused;
}

.hero-phrase.active .wave-letter { animation-play-state: running; }

@keyframes waveFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    75% { transform: translateY(4px) rotate(-1deg); }
}

.hero-phrase.active { animation: phraseIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hero-phrase.exit { animation: phraseOut 1s cubic-bezier(0.7, 0, 0.84, 0) forwards; }

@keyframes phraseIn { 0% { opacity: 0; transform: translateY(40px) scale(0.9); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes phraseOut { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-25px) scale(0.95); } }

.hero-line {
    width: 100px; height: 2px;
    background: linear-gradient(90deg, transparent, #5ba3c0, #e8a090, transparent);
    margin: 30px auto 0; opacity: 0; animation: lineReveal 1.2s ease forwards; animation-delay: 2.5s;
}

@keyframes lineReveal { from { opacity: 0; width: 0; } to { opacity: 1; width: 100px; } }

.hero-scroll {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 10; opacity: 0; animation: fadeInUp 1s ease forwards; animation-delay: 3.5s;
}

.hero-scroll-mouse { width: 26px; height: 42px; border: 2px solid rgba(91, 163, 192, 0.4); border-radius: 13px; position: relative; }

.hero-scroll-wheel {
    width: 4px; height: 8px; background: rgba(91, 163, 192, 0.6); border-radius: 2px;
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel { 0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); } 50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.hero-pejeperro:hover { cursor: crosshair; }

@media (max-width: 768px) {
    .hero-pejeperro { min-height: 100svh; }
    .hero-logo { width: 320px; }
    .hero-phrases { margin-top: 30px; min-height: 80px; }
    .hero-phrase { font-size: 1.1rem !important; }
    .hero-corals { height: 180px; }
}

@media (max-width: 480px) {
    .hero-logo { width: 280px; }
    .hero-phrase { font-size: 1rem !important; }
}
