/* Perri Construtora - Estilos Customizados */

/* Fonte Inter */
* {
    font-family: 'Inter', sans-serif;
}

/* Hero Section Gradient */
.hero-gradient {
    background: linear-gradient(135deg, #000000 0%, #1e3a8a 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat center center;
    background-size: cover;
    animation: float 20s ease-in-out infinite;
}

/* Animação Float */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
    }
}

/* Parallax Background */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-element {
    transform: translateZ(0);
    will-change: transform;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.card-hover:hover::before {
    left: 100%;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

/* Smooth Scroll */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Form Input Focus */
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    animation: floatShapes 15s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 70%;
    animation-delay: 5s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 40%;
    animation-delay: 10s;
}

/* Animação Floating Shapes */
@keyframes floatShapes {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Text Glow Effect */
.text-glow {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Divider */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: shimmer 3s infinite;
}

/* Animação Shimmer */
@keyframes shimmer {
    0% { 
        transform: translateX(-100%); 
    }
    100% { 
        transform: translateX(100%); 
    }
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); 
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); 
    }
}

/* NOVAS ANIMAÇÕES PARA O FORMULÁRIO */

/* Container do formulário */
.form-container {
    position: relative;
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Estado de envio do formulário */
.form-sending {
    transform: scale(0.95);
    opacity: 0.7;
    pointer-events: none;
}

/* Overlay de carregamento */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 10;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner de carregamento */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Texto de carregamento */
.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
    max-width: 300px;
}

/* Animação de sucesso */
.success-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.company-logo-success {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-bounce-success {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    animation: logoBounceSuccess 0.8s ease-out;
}

.success-checkmark-small {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    animation: checkmarkPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.success-checkmark-small svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 3;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.5s ease-out 0.6s forwards;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoBounceSuccess {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(-90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* Animação de fade in/out para elementos */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Animação da logo */
.logo-bounce {
    animation: logoBounce 1s ease-out;
}

@keyframes logoBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Estados do botão */
.btn-sending {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    transform: scale(0.98);
    position: relative;
    overflow: hidden;
}

.btn-sending::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: buttonShimmer 1.5s infinite;
}

@keyframes buttonShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsividade adicional */
@media (max-width: 768px) {
    .hero-gradient::before {
        animation-duration: 10s;
    }
    
    .shape {
        animation-duration: 10s;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
    }

    .success-checkmark {
        width: 70px;
        height: 70px;
    }

    .success-checkmark-small {
        width: 30px;
        height: 30px;
    }

    .success-checkmark-small svg {
        width: 16px;
        height: 16px;
    }

    .logo-bounce-success {
        width: 70px;
        height: 70px;
    }

    .loading-subtext {
        font-size: 13px;
        max-width: 280px;
    }

    .success-checkmark svg {
        width: 35px;
        height: 35px;
    }
}

/* Melhorias de Performance */
.parallax-element,
.card-hover,
.shape {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}