/* ============================================
   ANIMAÇÕES ULTRA PREMIUM - EFEITOS NOIR
   Hanrafeth Brito Salão de Beleza
   Movimento Cinematográfico e Sofisticado
   ============================================ */

/* ============================================
   KEYFRAMES - ANIMAÇÕES ESPECIAIS
   ============================================ */

/* Fade In Elegante com Blur */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reveal Cinematográfico Premium */
@keyframes cinematicReveal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes luxuryReveal {
    0% {
        opacity: 0;
        transform: translateY(80px) rotateX(20deg);
        filter: blur(25px);
    }
    40% {
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
        filter: blur(0);
    }
}

@keyframes noirReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
        filter: blur(15px) brightness(0.5);
    }
    50% {
        filter: blur(5px) brightness(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) brightness(1);
    }
}

/* Scale e Zoom Sofisticados */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    50% {
        transform: scale(1.08);
    }
    70% {
        transform: scale(0.94);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes elegantPop {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-5deg);
        filter: blur(10px);
    }
    60% {
        transform: scale(1.06) rotate(1deg);
        filter: blur(2px);
    }
    80% {
        transform: scale(0.97) rotate(-0.5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0);
    }
}

/* Shimmer Dourado Luxuoso */
@keyframes goldShimmer {
    0% {
        background-position: -300% center;
    }
    100% {
        background-position: 300% center;
    }
}

@keyframes luxuryShimmer {
    0% {
        background-position: -400% center;
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
    100% {
        background-position: 400% center;
        filter: brightness(1);
    }
}

/* Flutuação Etérea */
@keyframes etherealFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(1.5deg);
    }
    50% {
        transform: translateY(-25px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-1.5deg);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-18px);
    }
}

/* Glow Dourado Pulsante */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(212, 168, 83, 0.25);
    }
    50% {
        box-shadow: 0 0 60px rgba(212, 168, 83, 0.55);
    }
}

@keyframes warmGlow {
    0%, 100% {
        box-shadow: 
            0 0 25px rgba(212, 168, 83, 0.25),
            0 0 50px rgba(107, 45, 60, 0.12);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(212, 168, 83, 0.5),
            0 0 80px rgba(107, 45, 60, 0.25);
    }
}

@keyframes noirGlow {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(212, 168, 83, 0.2),
            inset 0 0 30px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(212, 168, 83, 0.4),
            inset 0 0 20px rgba(0, 0, 0, 0.2);
    }
}

/* Rotação Elegante */
@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gentleSway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* Bounce Premium */
@keyframes elegantBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-18px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    50% {
        transform: scale(1.12);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Expansão de Linhas Douradas */
@keyframes lineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 120px;
        opacity: 1;
    }
}

@keyframes lineExpandCenter {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes lineGlow {
    0% {
        transform: scaleX(0);
        box-shadow: 0 0 0 rgba(212, 168, 83, 0);
    }
    50% {
        box-shadow: 0 0 25px rgba(212, 168, 83, 0.6);
    }
    100% {
        transform: scaleX(1);
        box-shadow: 0 0 15px rgba(212, 168, 83, 0.3);
    }
}

/* Gradient Shift Sofisticado */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes colorWave {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(15deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

/* Sparkle - Brilho Estrela Diamante */
@keyframes sparkleRotate {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.5) rotate(180deg);
    }
}

@keyframes diamondSparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% {
        filter: brightness(1.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(180deg);
        filter: brightness(2);
    }
    75% {
        filter: brightness(1.5);
    }
}

/* Slide Elegante com Glow */
@keyframes slideInGlow {
    0% {
        opacity: 0;
        transform: translateX(-50px);
        box-shadow: 0 0 0 rgba(212, 168, 83, 0);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 168, 83, 0.5);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        box-shadow: 0 0 0 rgba(212, 168, 83, 0);
    }
}

/* Ripple Effect Noir */
@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes rippleGold {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.7;
        border-color: rgba(212, 168, 83, 0.6);
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
        border-color: rgba(212, 168, 83, 0);
    }
}

/* Breathing - Respiração Suave */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.88;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

/* Typewriter Cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Text Reveal */
@keyframes textReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* Particle Float */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) rotate(720deg);
        opacity: 0;
    }
}

/* Magnetic Hover Effect */
@keyframes magneticPull {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
   APLICAÇÃO DAS ANIMAÇÕES - ELEMENTOS
   ============================================ */

/* Header - Entrada Cinematográfica */
.header {
    animation: fadeInDown 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.logo a {
    animation: fadeIn 1.4s ease-out 0.5s both;
}

.logo-text::before,
.logo-text::after {
    animation: diamondSparkle 4s ease-in-out infinite;
}

/* Hero Section - Impacto Máximo Cinematográfico */
.hero-title {
    animation: luxuryReveal 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-description {
    animation: cinematicReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.hero-ctas {
    animation: fadeInUp 1.1s ease-out 0.9s both;
}

/* Botões CTAs - Entrada Cascata Elegante */
.hero-ctas .cta-btn:nth-child(1) {
    animation: elegantPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.1s both;
}

.hero-ctas .cta-btn:nth-child(2) {
    animation: elegantPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.3s both;
}

.hero-ctas .cta-btn:nth-child(3) {
    animation: elegantPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1.5s both;
}

/* Botões - Efeito Ripple Premium no Hover */
.cta-btn {
    position: relative;
    overflow: hidden;
}

.cta-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
}

.cta-btn:hover::after {
    width: 400px;
    height: 400px;
}

.cta-btn:active {
    transform: scale(0.95);
}

/* SEO Sections - Reveal Progressivo Suave */
.seo-section {
    opacity: 0;
    animation: noirReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.seo-section:nth-child(1) { animation-delay: 0.1s; }
.seo-section:nth-child(2) { animation-delay: 0.15s; }
.seo-section:nth-child(3) { animation-delay: 0.2s; }
.seo-section:nth-child(4) { animation-delay: 0.25s; }
.seo-section:nth-child(5) { animation-delay: 0.3s; }
.seo-section:nth-child(6) { animation-delay: 0.35s; }
.seo-section:nth-child(7) { animation-delay: 0.4s; }
.seo-section:nth-child(8) { animation-delay: 0.45s; }

.seo-section h2::after {
    animation: lineGlow 1s ease-out 0.6s both;
    transform-origin: center;
}

/* WhatsApp Float - Entrada e Pulso Premium */
.whatsapp-float a {
    animation: bounceIn 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 2.2s both;
}

.whatsapp-float a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: ripple 3s ease-out infinite;
}

/* Business Embed */
.business-embed-section h2 {
    animation: cinematicReveal 1.1s ease-out;
}

.business-embed-section iframe {
    animation: scaleIn 1.2s ease-out 0.5s both;
}

/* Footer - Reveal Noir */
.footer {
    animation: fadeIn 1.2s ease-out;
}

.footer::before {
    animation: gradientShift 6s ease infinite;
    background-size: 300% 300%;
}

.footer-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.2s; }
.footer-section:nth-child(2) { animation-delay: 0.35s; }
.footer-section:nth-child(3) { animation-delay: 0.5s; }

/* Links Footer - Underline Animado Dourado */
.footer-section ul li a {
    position: relative;
}

.footer-section ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--oro-champagne), var(--oro-radiant));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(212, 168, 83, 0.5);
}

.footer-section ul li a:hover::after {
    width: 100%;
}

/* Sitemap */
.sitemap-section {
    animation: fadeInUp 0.9s ease-out;
}

.sitemap-list li {
    opacity: 0;
    animation: slideInGlow 0.7s ease-out forwards;
}

/* Staggered Animation para Lista */
.sitemap-list li:nth-child(1) { animation-delay: 0.05s; }
.sitemap-list li:nth-child(2) { animation-delay: 0.1s; }
.sitemap-list li:nth-child(3) { animation-delay: 0.15s; }
.sitemap-list li:nth-child(4) { animation-delay: 0.2s; }
.sitemap-list li:nth-child(5) { animation-delay: 0.25s; }
.sitemap-list li:nth-child(6) { animation-delay: 0.3s; }
.sitemap-list li:nth-child(7) { animation-delay: 0.35s; }
.sitemap-list li:nth-child(8) { animation-delay: 0.4s; }
.sitemap-list li:nth-child(9) { animation-delay: 0.45s; }
.sitemap-list li:nth-child(10) { animation-delay: 0.5s; }
.sitemap-list li:nth-child(11) { animation-delay: 0.55s; }
.sitemap-list li:nth-child(12) { animation-delay: 0.6s; }

/* ============================================
   CLASSES UTILITÁRIAS DE ANIMAÇÃO
   ============================================ */

/* Hover Effects Premium */
.hover-lift {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-float);
}

.hover-glow:hover {
    animation: warmGlow 2.5s ease-in-out infinite;
}

.hover-noir-glow:hover {
    animation: noirGlow 2s ease-in-out infinite;
}

.hover-scale {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.04);
}

.hover-rotate:hover {
    animation: gentleSway 0.6s ease-in-out;
}

/* Efeitos Especiais Premium */
.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--oro-deep) 0%,
        var(--oro-champagne) 20%,
        var(--oro-radiant) 40%,
        var(--oro-champagne) 60%,
        var(--oro-deep) 80%,
        var(--oro-champagne) 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: luxuryShimmer 5s linear infinite;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 3px;
    background: var(--gradient-oro-shine);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.floating {
    animation: etherealFloat 6s ease-in-out infinite;
}

.breathing {
    animation: breathing 5s ease-in-out infinite;
}

/* ============================================
   LOADING STATES PREMIUM NOIR
   ============================================ */

/* Skeleton Loading Noir */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--noir-charcoal) 25%,
        var(--noir-smoke) 50%,
        var(--noir-charcoal) 75%
    );
    background-size: 200% 100%;
    animation: goldShimmer 2s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* Loading Spinner Dourado */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(212, 168, 83, 0.15);
    border-top-color: var(--oro-champagne);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

/* Dots Loading Elegante */
@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}

.loading-dots span {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--oro-champagne);
    border-radius: 50%;
    margin: 0 5px;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-left {
    transform: translateX(-60px);
}

.animate-on-scroll.from-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(60px);
}

.animate-on-scroll.from-right.visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-up {
    transform: scale(0.85);
}

.animate-on-scroll.scale-up.visible {
    transform: scale(1);
}

/* Delay Classes */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }
.delay-900 { transition-delay: 0.9s; }
.delay-1000 { transition-delay: 1s; }

/* ============================================
   FOCUS ANIMATIONS ACESSÍVEIS
   ============================================ */

@keyframes focusRing {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(212, 168, 83, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 168, 83, 0);
    }
}

.cta-btn:focus,
a:focus {
    animation: focusRing 0.8s ease-out;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page-enter {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ============================================
   CURSOR EFFECTS (Desktop Only)
   ============================================ */

@media (hover: hover) {
    .cursor-glow {
        position: relative;
    }

    .cursor-glow::before {
        content: '';
        position: absolute;
        width: 150px;
        height: 150px;
        background: radial-gradient(circle, rgba(212, 168, 83, 0.15) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .cursor-glow:hover::before {
        opacity: 1;
    }
}

/* ============================================
   ACESSIBILIDADE - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
    
    .shimmer-text {
        animation: none;
    }
    
    .floating,
    .breathing {
        animation: none;
    }
    
    .whatsapp-float a::before {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }

    .logo-text::before,
    .logo-text::after {
        animation: none;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    .cta-btn::after {
        display: none;
    }

    .footer::before {
        animation: none;
    }

    .seo-section {
        opacity: 1;
    }

    .footer-section {
        opacity: 1;
    }

    .sitemap-list li {
        opacity: 1;
    }

    .hero-title,
    .hero-description,
    .hero-ctas,
    .hero-ctas .cta-btn {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Hardware acceleration para animações suaves */
.cta-btn,
.whatsapp-float a,
.sitemap-section,
.logo a,
.footer-section,
.seo-section {
    will-change: transform, opacity;
}

/* Limpar will-change após animação */
.animation-complete {
    will-change: auto;
}

/* Contain para melhor performance */
.seo-section {
    contain: layout style;
}

.footer-section {
    contain: layout;
}
