/* =============================================
   FANTOMSTORE — Efeitos visuais 2026
   Splash loader + animações scroll + objetos 3D decorativos
   Aditivo — não substitui nada do CSS original do index.php
   ============================================= */

/* =============================================
   SPLASH LOADER — tela inicial com logo + tagline
   ============================================= */
#fs-splash {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, #2A0B5E 0%, #0a0a1a 70%, #050510 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
    overflow: hidden;
}
#fs-splash.fs-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Anel orbital decorativo */
#fs-splash::before {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 157, 0.15);
    animation: fs-spin-slow 8s linear infinite;
}
#fs-splash::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 0, 255, 0.10);
    animation: fs-spin-slow 14s linear infinite reverse;
}
@keyframes fs-spin-slow {
    to { transform: rotate(360deg); }
}

/* Logo central pulsante */
.fs-splash-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-shadow:
        0 0 60px rgba(139, 92, 246, 0.6),
        0 0 120px rgba(0, 255, 157, 0.25),
        inset 0 0 20px rgba(0, 0, 0, 0.05);
    animation: fs-logo-pulse 2.4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
.fs-splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@keyframes fs-logo-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 60px rgba(139, 92, 246, 0.6), 0 0 120px rgba(0, 255, 157, 0.25), inset 0 0 20px rgba(0,0,0,0.05);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 80px rgba(139, 92, 246, 0.85), 0 0 160px rgba(0, 255, 157, 0.4), inset 0 0 20px rgba(0,0,0,0.05);
    }
}

/* Tagline com fade-in palavra por palavra */
.fs-splash-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    text-align: center;
    color: #fff;
    letter-spacing: 0.4px;
    max-width: 90vw;
    z-index: 2;
    line-height: 1.4;
}
.fs-splash-tagline .fs-w {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    animation: fs-word-in 0.5s cubic-bezier(.2,.8,.2,1) forwards;
}
.fs-splash-tagline .fs-accent {
    background: linear-gradient(135deg, #00FF9D, #FF00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
@keyframes fs-word-in {
    to { opacity: 1; transform: translateY(0); }
}

/* Barra de progresso fina embaixo */
.fs-splash-bar {
    position: absolute;
    bottom: 8%;
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    z-index: 2;
}
.fs-splash-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, #00FF9D, transparent);
    animation: fs-bar-slide 1.5s ease-in-out infinite;
}
@keyframes fs-bar-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Particles decorativas no splash */
.fs-splash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00FF9D;
    box-shadow: 0 0 8px #00FF9D;
    opacity: 0;
    animation: fs-particle-float 4s ease-in-out infinite;
}
.fs-splash-particle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.fs-splash-particle:nth-child(2) { top: 70%; left: 80%; animation-delay: 0.6s; background: #FF00FF; box-shadow: 0 0 8px #FF00FF; }
.fs-splash-particle:nth-child(3) { top: 30%; right: 20%; animation-delay: 1.2s; }
.fs-splash-particle:nth-child(4) { bottom: 25%; left: 25%; animation-delay: 1.8s; background: #FF00FF; box-shadow: 0 0 8px #FF00FF; }
.fs-splash-particle:nth-child(5) { top: 50%; left: 5%; animation-delay: 2.4s; }
.fs-splash-particle:nth-child(6) { bottom: 35%; right: 8%; animation-delay: 0.3s; background: #FFD700; box-shadow: 0 0 8px #FFD700; }
@keyframes fs-particle-float {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    25%      { opacity: 1; }
    50%      { opacity: 0.8; transform: translateY(-30px) scale(1.2); }
    75%      { opacity: 0.4; }
}

/* =============================================
   OBJETOS DECORATIVOS 3D (entre seções)
   Hexágonos, esferas e formas que flutuam atrás do conteúdo
   ============================================= */
.fs-decor {
    position: absolute;
    pointer-events: none;
    opacity: 0.55;
    z-index: 0;
    will-change: transform;
}

.fs-decor-orb {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.5), rgba(0, 255, 157, 0.18) 50%, transparent 70%);
    filter: blur(24px);
    animation: fs-orb-float 16s ease-in-out infinite;
}
.fs-decor-orb.pink {
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 255, 0.45), rgba(139, 92, 246, 0.2) 50%, transparent 70%);
    animation-duration: 20s;
    animation-direction: reverse;
}
.fs-decor-orb.green {
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 157, 0.5), rgba(0, 200, 120, 0.2) 50%, transparent 70%);
    animation-duration: 18s;
}
@keyframes fs-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.1); }
    66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.fs-decor-hex {
    width: 80px;
    height: 92px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(0, 255, 157, 0.05));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(139, 92, 246, 0.18);
    animation: fs-hex-spin 20s linear infinite;
    opacity: 0.35;
}
.fs-decor-hex.small { width: 50px; height: 58px; animation-duration: 14s; }
.fs-decor-hex.large { width: 120px; height: 138px; animation-duration: 28s; opacity: 0.25; }
@keyframes fs-hex-spin {
    to { transform: rotate(360deg); }
}

.fs-decor-grid-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(rgba(139, 92, 246, 0.18) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.5;
    animation: fs-grid-pulse 6s ease-in-out infinite;
}
@keyframes fs-grid-pulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.6; }
}

/* Posicionamento dos decorativos nas seções */
section { position: relative; }
section[id="recursos"] .fs-decor-orb { top: 10%; right: -80px; }
section[id="produtos-destaque"] .fs-decor-hex { top: 8%; left: 5%; }
section[id="produtos-destaque"] .fs-decor-orb.pink { bottom: 5%; right: 8%; }
section[id="testimonials"] .fs-decor-grid-dots { top: 15%; left: 4%; }
section[id="projetos-oficiais"] .fs-decor-hex.large { top: -30px; right: 8%; }
section[id="faq"] .fs-decor-orb.green { top: 20%; left: -60px; }

/* =============================================
   SCROLL REVEAL — animações ao entrar no viewport
   ============================================= */
.fs-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
    will-change: opacity, transform;
}
.fs-reveal.fs-revealed {
    opacity: 1;
    transform: translateY(0);
}
.fs-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.fs-reveal-left.fs-revealed {
    opacity: 1;
    transform: translateX(0);
}
.fs-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.fs-reveal-right.fs-revealed {
    opacity: 1;
    transform: translateX(0);
}
.fs-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.fs-reveal-scale.fs-revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger pra filhos (se quiser usar com .fs-reveal-stagger no parent) */
.fs-reveal-stagger > .fs-reveal:nth-child(1).fs-revealed { transition-delay: 0.05s; }
.fs-reveal-stagger > .fs-reveal:nth-child(2).fs-revealed { transition-delay: 0.12s; }
.fs-reveal-stagger > .fs-reveal:nth-child(3).fs-revealed { transition-delay: 0.19s; }
.fs-reveal-stagger > .fs-reveal:nth-child(4).fs-revealed { transition-delay: 0.26s; }
.fs-reveal-stagger > .fs-reveal:nth-child(5).fs-revealed { transition-delay: 0.33s; }

/* =============================================
   HERO badge glow — sem mexer no banner principal
   ============================================= */
.hero-badge {
    box-shadow: 0 0 24px rgba(0, 255, 157, 0.18);
    animation: fs-badge-glow 3s ease-in-out infinite;
}
@keyframes fs-badge-glow {
    0%, 100% { box-shadow: 0 0 24px rgba(0, 255, 157, 0.18); }
    50%      { box-shadow: 0 0 36px rgba(0, 255, 157, 0.35), 0 0 60px rgba(255, 0, 255, 0.15); }
}

/* =============================================
   SECTION TRANSITIONS — borda sutil iluminada
   ============================================= */
section + section {
    position: relative;
}
section + section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    pointer-events: none;
}

/* =============================================
   FEATURE CARDS — hover 3D tilt
   ============================================= */
.feature-card {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease;
    will-change: transform;
}
.feature-card:hover {
    transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
    box-shadow:
        0 20px 50px -10px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3);
}

/* =============================================
   BUTTONS — pulse no primário
   ============================================= */
.hero-buttons .btn:not(.btn-outline) {
    position: relative;
    overflow: hidden;
}
.hero-buttons .btn:not(.btn-outline)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.hero-buttons .btn:not(.btn-outline):hover::after {
    transform: translateX(100%);
}

/* =============================================
   REDUCED MOTION — respeita preferência do usuário
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    #fs-splash, .fs-decor, .fs-decor-orb, .fs-decor-hex, .fs-decor-grid-dots,
    .fs-splash-logo, .fs-splash-tagline .fs-w, .fs-splash-bar::after,
    .fs-splash-particle, .hero-badge {
        animation: none !important;
    }
    .fs-reveal, .fs-reveal-left, .fs-reveal-right, .fs-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
    .feature-card:hover { transform: none; }
}

/* =============================================
   MOBILE — decorativos menores e splash mais compacto
   ============================================= */
@media (max-width: 768px) {
    .fs-decor-orb { width: 120px; height: 120px; filter: blur(18px); }
    .fs-decor-hex { width: 60px; height: 70px; }
    .fs-decor-hex.large { width: 90px; height: 104px; }
    .fs-decor-grid-dots { width: 140px; height: 140px; }
    #fs-splash::before { width: 280px; height: 280px; }
    #fs-splash::after { width: 360px; height: 360px; }
    .fs-splash-logo { width: 90px; height: 90px; padding: 14px; }
    .fs-splash-bar { width: 160px; }
}
