/**
 * IGREJINHA MOTION DESIGN
 * Portal Turístico com Vida Própria
 * Inspirado em Lusion.co, Active Theory, Obys Agency
 */

/* ==========================================================================
   VARIÁVEIS DINÂMICAS E PALETA DE CORES
   ========================================================================== */
:root {
    /* Paleta Igrejinha - Cores Vivas */
    --igrejinha-azul-montanha: #3D5473;
    --igrejinha-turquoise: #18C5D9;
    --igrejinha-ouro-sol: #D9984A;
    --igrejinha-coral-vida: #D93B18;
    --igrejinha-profundo: #0D0D0D;
    --igrejinha-branco: #FFFFFF;
    
    /* Gradientes Orgânicos */
    --gradient-ceu-igrejinha: linear-gradient(135deg, #3D5473 0%, #18C5D9 60%, #D9984A 100%);
    --gradient-por-do-sol: linear-gradient(45deg, #D9984A 0%, #D93B18 70%, #3D5473 100%);
    --gradient-cachoeira: linear-gradient(180deg, #18C5D9 0%, #3D5473 50%, #0D0D0D 100%);
    --gradient-noturno: linear-gradient(225deg, #0D0D0D 0%, #3D5473 40%, #18C5D9 100%);
    
    /* Tipografia Dinâmica */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Poppins', var(--font-primary);
    
    /* Motion Variables */
    --ease-organic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bouncy: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

/* ==========================================================================
   RESET ORGÂNICO E BASE
   ========================================================================== */
* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--igrejinha-profundo);
    background: var(--igrejinha-branco);
    overflow-x: hidden;
    cursor: auto; /* Cursor padrão restaurado */
}

/* Cursor Customizado - REMOVIDO */
/* CSS do cursor customizado removido conforme solicitação */

/* ==========================================================================
   PRELOADER EXPERIENCIAL - "RESPIRAÇÃO DE IGREJINHA"
   ========================================================================== */
.organic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gradient-ceu-igrejinha);
    background-size: 300% 300%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: gradientFlow 8s ease-in-out infinite;
}

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

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.breathing-logo {
    text-align: center;
    animation: logoBreathing 3s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes logoBreathing {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        filter: drop-shadow(0 0 20px rgba(24, 197, 217, 0.3));
    }
    50% { 
        transform: scale(1.1) rotate(1deg); 
        filter: drop-shadow(0 0 40px rgba(217, 152, 74, 0.5));
    }
}

.logo-igrejinha {
    width: 120px;
    height: auto;
    filter: brightness(1.1);
}

.preloader-text {
    text-align: center;
    animation: textFloating 3s ease-in-out infinite;
    margin-bottom: 2rem;
}

.preloader-text p {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6),
                 0 0 20px rgba(24, 197, 217, 0.3);
    position: relative;
}

@keyframes textFloating {
    0%, 100% { 
        transform: translateY(0px);
        text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6),
                     0 0 20px rgba(24, 197, 217, 0.3);
    }
    50% { 
        transform: translateY(-5px);
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8),
                     0 0 25px rgba(217, 152, 74, 0.4);
    }
}

.liquid-progress {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1),
                inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.wave-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--igrejinha-turquoise) 0%, 
        var(--igrejinha-ouro-sol) 50%, 
        var(--igrejinha-coral-vida) 100%
    );
    width: 0%;
    border-radius: 15px;
    animation: liquidFill 3s var(--ease-organic) forwards;
    position: relative;
    box-shadow: 0 0 20px rgba(24, 197, 217, 0.4),
                0 0 40px rgba(217, 152, 74, 0.2);
}

.wave-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 40px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes liquidFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-40px); }
    100% { transform: translateX(440px); }
}

/* Responsividade do Preloader */
@media (max-width: 768px) {
    .liquid-progress {
        width: 320px;
        bottom: 60px;
    }
    
    .preloader-text p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    @keyframes shimmer {
        0% { transform: translateX(-40px); }
        100% { transform: translateX(360px); }
    }
}

@media (max-width: 480px) {
    .liquid-progress {
        width: 280px;
        height: 10px;
    }
    
    .preloader-text p {
        font-size: 0.9rem;
    }
    
    @keyframes shimmer {
        0% { transform: translateX(-40px); }
        100% { transform: translateX(320px); }
    }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0;
    }
    10% { opacity: 1; }
    50% { 
        transform: translateY(-100px) rotate(180deg); 
        opacity: 0.8;
    }
    90% { opacity: 1; }
}

/* ==========================================================================
   HERO SECTION IMERSIVA - "DESCOBERTA DE IGREJINHA"
   ========================================================================== */
.hero-immersive {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 1;
}

.parallax-layer {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
}

.layer-mountains {
    background-image: url('../img/banners/cruzeiro_vista_aerea_com_ceu_laranjado_e_azul.jpg');
    z-index: 1;
}

.layer-foreground {
    background-image: url('../img/banners/vista_panoramica_noite_luxuosa_com_luzes.png');
    z-index: 2;
    opacity: 0;
    animation: dayNightCycle 20s ease-in-out infinite alternate;
}

@keyframes dayNightCycle {
    0% { opacity: 0; }
    100% { opacity: 0.7; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(61, 84, 115, 0.4) 0%,
        rgba(24, 197, 217, 0.2) 50%,
        rgba(217, 152, 74, 0.3) 100%
    );
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 var(--space-md);
    animation: heroFloating 4s ease-in-out infinite;
}

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

.title-morphing {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: var(--space-md);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.word-reveal {
    display: inline-block;
    overflow: visible;
    padding: 0.1em 0.05em;
    animation: wordReveal 2s var(--ease-bouncy) both;
}

.word-reveal:nth-child(1) { animation-delay: 0.5s; }
.word-reveal:nth-child(2) { animation-delay: 1s; }

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

.subtitle-typing {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: typewriter 3s steps(60) 2s both, fadeIn 0.5s ease 2s both;
}

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

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

.cta-buttons {
    display: flex !important;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    position: relative;
    z-index: 999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100%;
    min-height: 60px;
    animation: none !important; /* Remove qualquer animação que possa estar escondendo */
    transform: none !important; /* Remove qualquer transformação */
}

.btn-primary {
    position: relative;
    padding: 1rem 2.5rem;
    background: var(--gradient-por-do-sol);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--ease-organic);
    will-change: transform;
    z-index: 1000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 50px;
    background: var(--gradient-por-do-sol) !important;
    animation: none !important; /* Remove qualquer animação que possa estar escondendo */
    transform: none !important; /* Remove qualquer transformação */
}

.btn-text {
    position: relative;
    z-index: 1001 !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: white !important;
    font-weight: 600 !important;
    display: inline !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(217, 152, 74, 0.4);
}

.btn-liquid {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s var(--ease-organic);
}

.btn-primary:active .btn-liquid {
    width: 300px;
    height: 300px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    animation: breathing 3s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    position: relative;
}

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

@keyframes scrollWheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(-50%) translateY(15px); opacity: 0; }
}

/* ==========================================================================
   EFEITOS MAGNÉTICOS E INTERAÇÕES
   ========================================================================== */
.magnetic {
    transition: transform 0.3s var(--ease-organic);
}

.magnetic:hover {
    transform: scale(1.05);
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.organic-shadow {
    box-shadow: 
        0 4px 20px rgba(61, 84, 115, 0.1),
        0 8px 40px rgba(24, 197, 217, 0.05),
        0 16px 80px rgba(217, 152, 74, 0.03);
}

/* ==========================================================================
   RESPONSIVIDADE ORGÂNICA
   ========================================================================== */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 var(--space-sm);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary {
        width: 100%;
        max-width: 300px;
    }
    
    .title-morphing {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}