/* ==========================================================================
   NexaAutomate AI — Estilos customizados
   Tokens de design, glassmorphism, animações e componentes premium.
   ========================================================================== */

:root {
    --color-dark: #030308;
    --color-card: #0a0a14;
    --color-primary: #3b82f6;
    --color-accent: #8b5cf6;
    --color-neon: #06b6d4;
    --border-color: rgba(255, 255, 255, 0.08);

    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    background-color: var(--color-dark);
    color: #f8fafc;
    overflow-x: hidden;
    cursor: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Permitir seleção e interação normal apenas dentro de inputs e formulários */
input,
textarea,
select,
.input-premium {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Cursor customizado */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-neon);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(6, 182, 212, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Fundo 3D (rede neural) */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* Utilitários de glassmorphism */
.glass {
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.1);
    transform: translateY(-5px);
}

/* Gradientes de texto animados */
.text-gradient {
    background: linear-gradient(to right, #3b82f6, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textShine 4s linear infinite;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

/* Reveal no scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Atrasos escalonados para o reveal */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* Atrasos das animações de blob */
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* Ocultar cursor customizado em telas touch */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Bento grid — brilho que segue o mouse */
.bento-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.bento-glow:hover::before {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 1;
}

/* Accordion do FAQ */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 1.5rem;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--color-neon);
}

/* Textura de ruído cinematográfico (noise overlay) */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 9998; /* Abaixo do cursor, acima do fundo */
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.04;
    mix-blend-mode: overlay;
}

/* Campos de formulário premium */
.input-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    transition: all 0.3s ease;
}

.input-premium:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
    outline: none;
}

/* Botões magnéticos */
.magnetic-wrap {
    display: inline-block;
}

.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}
