/* ===== ANIMAÇÕES ===== */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glow {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */

.entrada-desvanecer.visivel,
.entrada-desvanecer.visible,
.fade-in.visivel,
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.deslizar-esquerda {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.deslizar-esquerda.visivel,
.deslizar-esquerda.visible,
.slide-in-left.visivel,
.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.deslizar-direita {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.deslizar-direita.visivel,
.deslizar-direita.visible,
.slide-in-right.visivel,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.escalar-entrada {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.escalar-entrada.visivel,
.escalar-entrada.visible,
.scale-in.visivel,
.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== EFEITOS VISUAIS ===== */
.card-plano {
    animation: fadeInUp 0.6s ease forwards;
}

.card-plano:nth-child(1) { animation-delay: 0.1s; }
.card-plano:nth-child(2) { animation-delay: 0.2s; }
.card-plano:nth-child(3) { animation-delay: 0.3s; }

/* Efeito de blur durante rolagem */
.desfoque-rolagem {
    transition: filter 0.3s ease;
}

.desfoque-rolagem.desfocado {
    filter: blur(2px);
}

/* Efeito de zoom no hero */
.hero-zoom {
    transition: transform 0.1s ease-out;
}

/* Partículas flutuantes */
.particulas-flutuantes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particula {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s infinite linear;
}

.particula:nth-child(odd) {
    background: var(--accent);
    animation-duration: 8s;
}

.particula:nth-child(3n) {
    background: var(--secondary);
    animation-duration: 10s;
}

/* Efeito de brilho */
.efeito-brilho {
    position: relative;
    overflow: hidden;
}

.efeito-brilho::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: glow 2s infinite;
}

/* Efeito de rotação 3D */
.rotacao-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.rotacao-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Efeito de profundidade */
.efeito-profundidade {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    transition: box-shadow 0.3s ease;
}

.efeito-profundidade:hover {
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
}

/* Efeito de magnetismo */
.magnetico {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Efeito de texto que aparece */
.revelacao-texto {
    overflow: hidden;
}

.revelacao-texto span {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.revelacao-texto.visivel span,
.revelacao-texto.visible span,
.text-reveal.visivel span,
.text-reveal.visible span {
    transform: translateY(0);
}

/* Efeito de loading progressivo */
.carregamento-progressivo {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.carregamento-progressivo.carregado {
    opacity: 1;
    transform: translateY(0);
}

/* Efeito de scroll snap */
.rolagem-snap {
    scroll-snap-type: y mandatory;
}

.rolagem-snap > * {
    scroll-snap-align: start;
}

/* Efeito de parallax em diferentes velocidades */
.parallax-lento {
    transform: translateY(var(--scroll-slow, 0));
}

.parallax-medio {
    transform: translateY(var(--scroll-medium, 0));
}

.parallax-rapido {
    transform: translateY(var(--scroll-fast, 0));
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.carregando {
    opacity: 0.7;
    pointer-events: none;
}

.carregando .btn-submit {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* ===== ESTADOS DE ERRO ===== */
.grupo-formulario.erro input {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.mensagem-erro {
    color: var(--secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
}

/* ===== ANIMAÇÕES DE NOTIFICAÇÃO ===== */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Manter compatibilidade com código antigo (será removido após refatoração completa) */

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.plan-card {
    animation: fadeInUp 0.6s ease forwards;
}

.plan-card:nth-child(1) { animation-delay: 0.1s; }
.plan-card:nth-child(2) { animation-delay: 0.2s; }
.plan-card:nth-child(3) { animation-delay: 0.3s; }

.blur-on-scroll {
    transition: filter 0.3s ease;
}

.blur-on-scroll.blurred {
    filter: blur(2px);
}

.hero-zoom {
    transition: transform 0.1s ease-out;
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s infinite linear;
}

.particle:nth-child(odd) {
    background: var(--accent);
    animation-duration: 8s;
}

.particle:nth-child(3n) {
    background: var(--secondary);
    animation-duration: 10s;
}

.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: glow 2s infinite;
}

.rotate-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.rotate-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

.depth-effect {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    transition: box-shadow 0.3s ease;
}

.depth-effect:hover {
    box-shadow: 
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
}

.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.visible span {
    transform: translateY(0);
}

.progressive-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.progressive-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

.scroll-snap {
    scroll-snap-type: y mandatory;
}

.scroll-snap > * {
    scroll-snap-align: start;
}

.parallax-slow {
    transform: translateY(var(--scroll-slow, 0));
}

.parallax-medium {
    transform: translateY(var(--scroll-medium, 0));
}

.parallax-fast {
    transform: translateY(var(--scroll-fast, 0));
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .btn-submit {
    background: var(--text-muted);
    cursor: not-allowed;
}

.form-group.error input {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.error-message {
    color: var(--secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
}
