/* =============================================================
   ALV Design — CSS Customizado (efeitos premium)
   Complementa o Tailwind com: design tokens, glass, glow,
   cursor, aurora, noise e utilitários de animação.
   ============================================================= */

/* -------------------------------------------------------------
   1. VARIÁVEIS (Design Tokens)
   ------------------------------------------------------------- */
:root {
    --preto:      #050505;
    --grafite:    #0d0d10;
    --grafite-2:  #14141a;
    --branco:     #f5f5f7;
    --neon:       #2e6bff;
    --neon-2:     #4d9fff;
    --roxo:       #7c3aed;
    --roxo-2:     #a855f7;

    --grad-principal: linear-gradient(135deg, var(--neon) 0%, var(--roxo) 100%);
    --grad-suave:     linear-gradient(135deg, rgba(46,107,255,.15), rgba(124,58,237,.15));

    --glow-neon: 0 0 40px rgba(46,107,255,.35);
    --glow-roxo: 0 0 40px rgba(124,58,237,.35);

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------- */
* { scroll-behavior: auto; } /* Lenis controla o scroll */

html, body {
    background-color: var(--preto);
    color: var(--branco);
}

body {
    cursor: none; /* substituído pelo cursor custom (revertido em touch) */
}

/* Seleção de texto */
::selection {
    background: var(--roxo);
    color: #fff;
}

/* Scrollbar estilizada */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--preto); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--neon), var(--roxo));
    border-radius: 10px;
}

/* -------------------------------------------------------------
   3. TIPOGRAFIA UTILITÁRIA
   ------------------------------------------------------------- */
.text-gradient {
    background: var(--grad-principal);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-balance { text-wrap: balance; }

/* -------------------------------------------------------------
   4. GLASSMORPHISM
   ------------------------------------------------------------- */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
    background: rgba(13, 13, 16, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* -------------------------------------------------------------
   5. NAVBAR — estado "rolado"
   ------------------------------------------------------------- */
#navbar.scrolled {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    left: 16px; right: 16px; bottom: 6px;
    height: 1px;
    background: var(--grad-principal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease-out-expo);
}
.nav-link:hover::after { transform: scaleX(1); }

/* -------------------------------------------------------------
   6. BOTÃO COM BRILHO (Glow)
   ------------------------------------------------------------- */
.btn-glow {
    position: relative;
    overflow: hidden;
    box-shadow: var(--glow-neon);
    transition: transform .3s var(--ease-out-expo), box-shadow .3s ease;
}
.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(124, 58, 237, .55);
}
/* Brilho deslizante */
.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transition: left .6s ease;
}
.btn-glow:hover::before { left: 100%; }

/* Botão secundário (contorno) */
.btn-outline {
    border: 1px solid rgba(255,255,255,.18);
    transition: all .3s var(--ease-out-expo);
}
.btn-outline:hover {
    border-color: var(--neon-2);
    background: rgba(255,255,255,.04);
    transform: translateY(-2px);
}

/* -------------------------------------------------------------
   7. AURORA DE FUNDO (glow global)
   ------------------------------------------------------------- */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .35;
}
.aurora--neon {
    width: 45vw; height: 45vw;
    background: var(--neon);
    top: -10%; left: -5%;
    animation: aurora-move 18s ease-in-out infinite alternate;
}
.aurora--roxo {
    width: 40vw; height: 40vw;
    background: var(--roxo);
    bottom: -15%; right: -5%;
    animation: aurora-move 22s ease-in-out infinite alternate-reverse;
}
@keyframes aurora-move {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6%, 8%) scale(1.15); }
}

/* -------------------------------------------------------------
   8. NOISE OVERLAY (textura sutil)
   ------------------------------------------------------------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------
   9. CURSOR CUSTOMIZADO
   ------------------------------------------------------------- */
#cursor-dot, #cursor-ring {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    will-change: transform;
}
#cursor-dot {
    width: 6px; height: 6px;
    background: var(--neon-2);
}
#cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid rgba(255,255,255,.4);
    transition: width .25s ease, height .25s ease, background .25s ease, border-color .25s ease;
}
#cursor-ring.hover {
    width: 54px; height: 54px;
    background: rgba(124,58,237,.15);
    border-color: var(--roxo-2);
}

/* Em telas touch: some com o cursor custom e volta o padrão */
@media (hover: none), (pointer: coarse) {
    body { cursor: auto; }
    #cursor-dot, #cursor-ring { display: none; }
}

/* -------------------------------------------------------------
   10. GRID FUTURISTA (fundo de seções)
   ------------------------------------------------------------- */
.grid-bg {
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}

/* -------------------------------------------------------------
   11. CARD PREMIUM (base p/ serviços, portfólio etc.)
   ------------------------------------------------------------- */
.card-premium {
    position: relative;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 1.25rem;
    transition: transform .4s var(--ease-out-expo), border-color .4s ease, box-shadow .4s ease;
    overflow: hidden;
}
.card-premium:hover {
    transform: translateY(-6px);
    border-color: rgba(77,159,255,.4);
    box-shadow: 0 20px 50px -20px rgba(46,107,255,.35);
}
/* Brilho que segue o card no hover */
.card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%),
                rgba(124,58,237,.12), transparent 40%);
    opacity: 0;
    transition: opacity .4s ease;
}
.card-premium:hover::before { opacity: 1; }

/* -------------------------------------------------------------
   11b. TIMELINE (Processo) — ponto ativo
   ------------------------------------------------------------- */
.timeline-dot.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--neon), var(--roxo));
    box-shadow: 0 0 0 6px var(--preto), 0 0 25px rgba(124, 58, 237, .6);
    transform: scale(1.1);
}

/* -------------------------------------------------------------
   12. SCROLL INDICATOR (hero)
   ------------------------------------------------------------- */
.scroll-indicator {
    width: 26px; height: 42px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 20px;
    position: relative;
}
.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    border-radius: 4px;
    background: var(--neon-2);
    animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 1; }
    60%  { opacity: 1; transform: translateY(12px); }
    100% { opacity: 0; transform: translateY(16px); }
}

/* -------------------------------------------------------------
   12b. FORMULÁRIO
   ------------------------------------------------------------- */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--branco);
    font-size: 0.925rem;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.form-input::placeholder { color: rgba(245, 245, 247, 0.35); }
.form-input:focus {
    outline: none;
    border-color: var(--neon-2);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(46, 107, 255, 0.15);
}
.form-input.invalid {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}
/* Select: setinha e opções legíveis */
select.form-input { appearance: none; cursor: pointer; }
select.form-input option { background: var(--grafite-2); color: var(--branco); }

/* -------------------------------------------------------------
   12c. FAQ (accordion)
   ------------------------------------------------------------- */
.faq-answer { transition: height .4s var(--ease-out-expo); }
.faq-item.open .faq-icon { transform: rotate(135deg); border-color: var(--neon-2); }
.faq-item.open { border-color: rgba(77, 159, 255, 0.3); }

/* -------------------------------------------------------------
   13. UTILITÁRIOS DE ANIMAÇÃO
   ------------------------------------------------------------- */
.float-slow { animation: float 6s ease-in-out infinite; }
.float-med  { animation: float 4.5s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-18px); }
}

.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(46,107,255,.3); }
    50%      { box-shadow: 0 0 45px rgba(124,58,237,.5); }
}

/* Reveal simples (para elementos controlados via JS/GSAP) */
.reveal { opacity: 0; transform: translateY(30px); }

/* -------------------------------------------------------------
   14. ACESSIBILIDADE — respeita preferência de menos movimento
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .aurora { animation: none; }
    body { cursor: auto; }
    #cursor-dot, #cursor-ring { display: none; }
}
