:root {
    --primary: #3b82f6; /* Royal Blue */
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --bg-dark: #020617;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    --accent: #8b5cf6;
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at center, #020b1f 0%, #020617 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Background grid & Glow effect */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        linear-gradient(rgba(2, 6, 23, 0.7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 6, 23, 0.7) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 80px 80px, 80px 80px;
    background-position: center;
    pointer-events: none;
    z-index: -1;
}

section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-glass);
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Hero Section - SaaS / Fintech Style */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 10%;
    z-index: 10;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 20px;
    letter-spacing: -3px;
    background: linear-gradient(to bottom, #fff 40%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neon-pulse 4s infinite ease-in-out;
}

@keyframes neon-pulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.5)); transform: scale(1.02); }
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-gray);
    max-width: 800px;
    margin-top: 10px;
    margin-bottom: 40px;
    letter-spacing: 1px;
    margin-left: auto;
    margin-right: auto;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 80px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    padding: 48px;
    transition: var(--transition);
    height: 100%;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.pillar-num {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pillar-num::after {
    content: '';
    height: 1px;
    width: 40px;
    background: var(--primary);
}

/* Horizontal Method Bubbles */
.method-row {
    margin-top: 40px;
    z-index: 5;
}

.method-bubble {
    width: 180px;
    height: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);
}

.method-bubble:hover {
    transform: scale(1.1) translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 0 40px var(--primary-glow);
    background: rgba(59, 130, 246, 0.1);
}

.bubble-num {
    background: var(--primary);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
}

.method-bubble span {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

/* Modal System (Popup) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    padding-bottom: 15vh;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 60%;
    max-width: 900px;
    padding: 60px 50px;
    position: relative;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-top: 4px solid var(--primary);
    text-align: center;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.modal-bubble-num {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.modal-header h3 {
    font-size: 2rem;
    color: #fff;
}

.modal-body {
    line-height: 1.8;
    font-size: 1.3rem;
    color: #fff;
    text-align: left;
    padding: 0 20%;
    width: 100%;
    margin: 0 auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.5;
    transition: 0.3s;
}

.close-modal:hover {
    opacity: 1;
}

/* Section Gaps */
section {
    padding: 60px 5%; /* Tightened gaps */
}

/* Floating Elements (Background Camada Secundária) */
.float-symbol {
    position: fixed;
    font-family: monospace;
    color: var(--primary);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    font-size: 1.5rem;
    filter: blur(1px);
    user-select: none;
}

@media (max-width: 768px) {
    .spider-container {
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .method-bubble {
        position: static;
        width: 100%;
        height: auto;
        border-radius: 20px;
        transform: none !important;
    }
    #comunicacao div {
        grid-template-columns: 1fr !important;
    }
}

/* Puzzle Animations */
.puzzle-piece {
    transition: var(--transition);
}
.puzzle-piece:hover {
    transform: rotate(5deg) scale(1.1);
}

/* Scroll reveal overrides */
.reveal {
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.2s ease;
}

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

/* Team Section */
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.team-member {
    display: flex;
    gap: 20px;
    align-items: center;
}

.member-info h4 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 60px 5%;
    }
    
    .team-container {
        grid-template-columns: 1fr;
    }
}
