:root {
    --bg-color: #050505;
    --text-main: #e6e6e6;
    --accent: #D4FF00; /* Acid Green - 2025 Trend */
    --secondary: #6B7280;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-strong: rgba(20, 20, 20, 0.95);
    --border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Space Grotesk', 'Arial', sans-serif; /* Fallback enquanto fontes carregam */
    overflow-x: hidden;
    margin: 0;
    cursor: default; /* Cursor padrão do navegador */
    font-display: swap; /* Mostra texto imediatamente, troca fonte quando carregar */
}

/* Screen reader only - visible to crawlers but hidden visually */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Typography Overrides */
h1, h2, h3, .font-display {
    font-family: 'Syne', 'Arial', sans-serif; /* Fallback enquanto fontes carregam */
    font-display: swap;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Noise Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJnoiPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjY1IiBudW1PY3RhdmVzPSIzIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjUiLz48L3N2Zz4=');
}

/* Custom Cursor */
.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(--accent);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Utilities */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.6; 
}

/* Reduzir opacidade do canvas 3D no mobile para melhorar legibilidade */
@media (max-width: 767px) {
    .canvas-container {
        opacity: 0.3;
    }
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

.text-outline {
    -webkit-text-stroke: 1px rgba(255,255,255,0.5);
    color: transparent;
    transition: all 0.3s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 1 !important;
    text-rendering: optimizeLegibility;
}
.text-outline:hover {
    -webkit-text-stroke: 1px var(--accent);
    color: var(--accent);
    text-shadow: none;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.loader-bar {
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.5s ease;
}

/* Modal & Extra Pages Styles */
.virtual-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    /* Aumentado de 5000 para 7000 para cobrir a navbar (z-6000) */
    z-index: 7000;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}
.virtual-page.active {
    transform: translateY(0);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85); /* Aumentado opacidade para compensar blur reduzido */
    backdrop-filter: blur(4px); /* Reduzido de 8px para 4px (mais performático) */
    -webkit-backdrop-filter: blur(4px);
    z-index: 8000; /* Aumentado para ficar acima das virtual-pages (z-7000) */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease; /* Reduzido de 0.3s para 0.2s */
    will-change: opacity; /* GPU acceleration */
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #111;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    transform: scale(0.95); /* Ajustado de 0.9 para 0.95 (menos movimento = mais rápido) */
    transition: transform 0.2s ease; /* Reduzido de 0.3s para 0.2s */
    will-change: transform; /* GPU acceleration */
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 5500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Form Input Styles */
.form-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 100%;
    padding: 12px;
    outline: none;
    transition: border-color 0.3s;
}
.form-input:focus {
    border-color: var(--accent);
}

/* Scroll To Top Button */
#scroll-top {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
#scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* AIO 3D Container */
#aio-particles-background {
    pointer-events: none; /* Permite clicar através das partículas */
}

#aio-particles-background canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    opacity: 0.3;
}

#aio-3d-container {
    min-height: 400px;
    pointer-events: none; /* Permite clicar através do 3D */
}

#aio-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    opacity: 0.3; /* Mais sutil quando está atrás do texto */
}

#aio-3d-container-desktop {
    pointer-events: auto; /* Permite interação com mouse no desktop */
}

#aio-3d-container-desktop canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    opacity: 1; /* Opacidade total quando está ao lado */
}

/* Marquee Optimization */
.marquee-content {
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Otimização: Remover will-change quando não está animando */
.marquee-content:not(:hover) {
    will-change: auto;
}

/* Ripple Effect for Mobile */
.ripple-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 255, 0, 0.4) 0%, rgba(212, 255, 0, 0) 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
}

/* Hamburger Button - Ensure X is fully visible */
#hamburger-btn {
    overflow: visible !important;
}

#hamburger-icon {
    overflow: visible !important;
}

/* Footer AGISCODE STUDIO - Centralização fixa mesmo com zoom */
footer h2 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Browser Animation */
.browser-demo {
    font-size: 0.75rem;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: #D4FF00;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.search-results .result-item {
    transition: opacity 0.5s ease-in;
}

.search-results .result-item.show {
    opacity: 1 !important;
}

/* AI Overview Result Styling */
.search-results .result-item[data-result="0"] {
    background: rgba(17, 24, 39, 0.5);
    border-left: 3px solid #D4FF00;
}

/* FAQ Styles */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-answer {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    display: block !important;
}

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

