/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0e1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #60a5fa, #a78bfa);
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== NAVBAR ===== */
#navbar.scrolled {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #3b82f6 !important;
}

/* Mobile menu animation */
#mobile-menu-btn.active #bar1 {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.active #bar2 {
    opacity: 0;
}

#mobile-menu-btn.active #bar3 {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== HERO BACKGROUND ===== */
.grid-pattern {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15), transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
    top: 50%;
    right: -150px;
    animation-delay: -7s;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(40px, 30px) scale(1.02);
    }
}

/* ===== HOVER LIFT ===== */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

/* ===== SERVICE CARDS - 3D TILT ===== */
.service-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.15);
}

/* ===== PORTFOLIO CARDS ===== */
.portfolio-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.1);
}

/* ===== TECH CARDS ===== */
.tech-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 30px -5px rgba(59, 130, 246, 0.15);
}

/* ===== BUTTON GLOW ===== */
.btn-glow {
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger delays for children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ===== GRADIENT TEXT ANIMATION ===== */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#hero h1 span {
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
}

/* ===== TYPING CURSOR ===== */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typing-cursor {
    animation: blink 1s step-end infinite;
}

/* ===== FORM STYLES ===== */
select option {
    background: #1e293b;
    color: #fff;
}

/* ===== SECTION SEPARATORS ===== */
#servicos,
#tecnologias {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.5) 50%, rgba(15, 23, 42, 0) 100%);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .gradient-orb {
        width: 300px !important;
        height: 300px !important;
    }
}

/* ===== WHATSAPP FAB ===== */
.whatsapp-fab {
    z-index: 9999 !important;
    opacity: 1 !important;
    transform: none;
}

.animate-pulse-once {
    animation: pulse-ring 1s ease-out;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
}

/* ===== GLOW LINE DIVIDER ===== */
section + section::before {
    content: '';
    display: block;
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin: 0 auto;
}
