/*
Theme Name: Studio Portella
Author: Leonardo Portella
Description: Tema Portfolio Alta Performance (Clean & Optimized)
Version: 2.3
*/

/* =========================================
   1. CORE & VARS
   ========================================= */
:root {
    --primary: #8b5cf6;       /* Roxo Base */
    --primary-glow: #7c3aed;  /* Roxo Neon */
    --dark-bg: #050505;       /* Fundo Principal */
    --card-bg: rgba(15, 15, 15, 0.6); /* Cards Translúcidos */
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html { scroll-behavior: smooth; }

body { 
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden; 
    line-height: 1.6;
    margin: 0; padding: 0;
    /* Fundo sutil quadriculado */
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

h1, h2, h3, h4, .btn { font-family: 'Montserrat', sans-serif; }
ul { list-style: none; padding: 0; margin: 0; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }
section { padding: 100px 0; position: relative; overflow: visible; content-visibility: auto; }
.hero { content-visibility: visible !important; }

.text-gradient {
    background: linear-gradient(90deg, #fff 20%, #a78bfa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hover-glow { 
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    will-change: transform, box-shadow; 
}
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
    border-color: var(--primary);
    transform: translateY(-5px);
}

/* =========================================
   SCROLL REVEAL
   ========================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* =========================================
   2. FOGUETE
   ========================================= */
#rocket-overlay {
    position: fixed; bottom: -150px; left: 50%; transform: translateX(-50%);
    z-index: 99999; pointer-events: none;
    display: flex; flex-direction: column; align-items: center;
    opacity: 0; transition: opacity 0.2s;
}
.rocket-icon { font-size: 80px; color: #fff; filter: drop-shadow(0 0 20px var(--primary)); transform: rotate(-45deg); }
.rocket-fire {
    width: 20px; height: 30px; background: orange; border-radius: 50%;
    margin-top: -10px; box-shadow: 0 0 20px orangered;
    animation: flicker 0.1s infinite alternate; display: none;
}
.launching-animation { animation: flyToTop 1.5s cubic-bezier(0.45, 0, 0.55, 1) forwards; opacity: 1 !important; }
@keyframes flyToTop {
    0% { bottom: 50px; transform: translateX(-50%) scale(0.8); }
    20% { bottom: 50px; transform: translateX(-50%) scale(1.2); }
    100% { bottom: 150vh; transform: translateX(-50%) scale(0.5); opacity: 0; }
}
@keyframes flicker { from { opacity: 0.8; transform: scale(1); } to { opacity: 1; transform: scale(1.2); } }

/* =========================================
   3. HEADER
   ========================================= */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 5, 0.8); backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 0;
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 42px; width: auto; filter: brightness(0) invert(1); }

.nav-menu { display: flex; gap: 30px; }
.nav-link { 
    font-size: 13px; font-weight: 700; text-transform: uppercase; color: #ccc; 
    letter-spacing: 0.5px; position: relative;
}
.nav-link:hover { color: var(--primary); text-shadow: 0 0 10px rgba(139,92,246,0.4); }

.mobile-toggle { display: none; }
.header-actions { display: flex; gap: 15px; align-items: center; }

.lang-switcher { display: flex; gap: 5px; }
.lang-btn {
    background: transparent; border: 1px solid #333; color: #888;
    padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 700; transition: 0.3s;
}
.lang-btn:hover { color: #fff; border-color: #555; }
.lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }

.contact-btn {
    background: transparent; border: 1px solid var(--primary); color: #fff;
    padding: 8px 22px; border-radius: 50px; font-size: 13px; font-weight: 700; text-transform: uppercase;
}
.contact-btn:hover { background: var(--primary); box-shadow: 0 0 15px rgba(139,92,246,0.5); }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero { 
    text-align: center; padding: 180px 0 100px; min-height: 90vh;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.4), rgba(5, 5, 5, 0.95)), 
                url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=1920&auto=format&fit=crop');
    background-size: cover; background-position: center; background-blend-mode: overlay;
    filter: hue-rotate(65deg) saturate(1.8) brightness(0.8);
    opacity: 0.6; z-index: 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}
.hero h1 { 
    font-size: clamp(2rem, 5vw, 4rem); line-height: 1.1; font-weight: 800; margin-bottom: 25px; 
    letter-spacing: -1px; text-shadow: 0 0 30px rgba(0,0,0,0.9); 
    width: 100%; max-width: 900px; margin-left: auto; margin-right: auto;
}
.hero-services-tags { display: flex; gap: 12px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.service-tag {
    background: rgba(139, 92, 246, 0.15); padding: 6px 18px; border-radius: 20px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; color: #d8b4fe;
    border: 1px solid rgba(139, 92, 246, 0.3); letter-spacing: 1px; backdrop-filter: blur(5px);
}
.hero p { font-size: 1.15rem; color: #e0e0e0; max-width: 700px; margin: 0 auto 40px; text-shadow: 0 2px 4px rgba(0,0,0,0.9); }
.btn-hero {
    background: linear-gradient(90deg, #6d28d9, #8b5cf6); color: #fff;
    padding: 16px 45px; border-radius: 50px; font-weight: 700; font-size: 16px;
    box-shadow: 0 10px 30px rgba(109, 40, 217, 0.3); display: inline-flex; align-items: center; gap: 12px; z-index: 2;
}
.btn-hero:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(124, 58, 237, 0.6); }

/* =========================================
   5. SEÇÕES GERAIS (Diff, Ponte, Planos)
   ========================================= */
.section-header { text-align: center; margin-bottom: 70px; }
.sub-title { color: var(--primary); font-weight: 700; letter-spacing: 2px; font-size: 13px; text-transform: uppercase; display: block; margin-bottom: 15px; }
.section-header h2 { font-size: 2.8rem; font-weight: 700; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.card-box {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 40px 30px; text-align: left; transition: 0.4s; position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.card-icon { font-size: 35px; margin-bottom: 20px; display: block; color: var(--primary); }
.card-box h3 { font-size: 20px; margin-bottom: 10px; color: #fff; }
.card-box p { font-size: 15px; color: #999; line-height: 1.6; }

.bridge-section {
    padding: 100px 0; background: radial-gradient(circle at center, rgba(139, 92, 246, 0.05) 0%, #050505 70%);
    border-top: 1px solid rgba(139, 92, 246, 0.1); border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    margin: 40px 0; text-align: center;
}
.terminal-window {
    background: rgba(10, 10, 10, 0.8); border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px; padding: 30px 40px; display: inline-block;
    box-shadow: 0 0 40px rgba(0,0,0,0.5); backdrop-filter: blur(10px); max-width: 900px; width: 90%;
}
.bridge-text { font-size: 1.6rem; font-weight: 500; color: #e2e2e2; margin: 0; font-family: 'Fira Code', monospace; line-height: 1.5; }
.cmd-prefix { color: #4ade80; margin-right: 10px; font-weight: 700; }
.cursor-blink { display: inline-block; width: 10px; height: 1.2em; background-color: var(--primary); vertical-align: text-bottom; margin-left: 5px; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.highlight-typed { color: var(--primary-glow); font-weight: 700; text-shadow: 0 0 10px rgba(139, 92, 246, 0.5); }

.plan-card { 
    text-align: center; padding: 50px 30px; border-radius: 16px; 
    background: rgba(12, 12, 12, 0.8); border: 1px solid var(--border-color); transition: 0.4s; 
    position: relative; overflow: hidden;
}
.plan-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%); transition: 0.5s;
}
.plan-card:hover::before { transform: translateX(100%); transition: 0.7s; }
.plan-card h3 { font-size: 22px; margin-bottom: 10px; color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px; }
.plan-card h3 i { color: var(--primary); font-size: 1.2rem; }
.plan-desc { color: #888; margin-bottom: 30px; font-size: 14px; }
.plan-card.featured {
    background: rgba(15, 11, 26, 0.9); border: 1px solid var(--primary);
    transform: scale(1.05); z-index: 2; box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
}
.plan-btn {
    display: block; width: 100%; padding: 14px; border-radius: 8px;
    font-weight: 600; cursor: pointer; text-transform: uppercase; font-size: 13px; transition: 0.3s;
}
.plan-btn.outline { background: transparent; border: 1px solid #333; color: #fff; }
.plan-btn.outline:hover { border-color: #fff; background: rgba(255,255,255,0.05); }
.plan-btn.solid { background: var(--primary); border: none; color: #fff; box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4); }
.plan-btn.solid:hover { background: var(--primary-glow); transform: translateY(-2px); box-shadow: 0 0 20px rgba(124, 58, 237, 0.6); }

.about-flex { display: flex; align-items: center; gap: 60px; }
.about-img { width: 100%; border-radius: 20px; border: 1px solid #333; filter: grayscale(20%); transition: 0.3s; }
.about-img:hover { filter: grayscale(0%); border-color: var(--primary); box-shadow: 0 0 25px rgba(124, 58, 237, 0.2); }

/* =========================================
   6. PORTFÓLIO (NATURAL FLOW & COLOR GRADE)
   ========================================= */
.portfolio-grid-area { position: relative; padding: 40px 0; }
.project-card { position: relative; z-index: 1; perspective: 1000px; cursor: pointer; }

/* A JANELA (Moldura) */
.video-window {
    position: relative; border-radius: 16px; background: #000; overflow: hidden; aspect-ratio: 16/9;
    border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    backface-visibility: hidden; transform: translateZ(0); will-change: transform; 
}

/* O VÍDEO */
.video-display {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: grayscale(80%) contrast(1.1) brightness(0.9);
    transform: scale(1.05); transition: filter 0.5s ease, transform 0.8s ease;
}

/* MARCA D'ÁGUA */
.capivara-mark {
    position: absolute; bottom: 15px; right: 15px; width: 45px; height: auto; opacity: 0.3; z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)); transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none;
}

/* INTERAÇÃO */
.project-card:hover { z-index: 100; }
.project-card:hover .video-window {
    transform: scale(1.15) translateY(-10px); border-color: var(--primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 30px rgba(139, 92, 246, 0.3);
}
.project-card:hover .video-display { filter: grayscale(0%) contrast(1.1) saturate(1.1) brightness(1.05); transform: scale(1); }
.project-card:hover .capivara-mark { opacity: 0.7; transform: scale(1.1); }
.project-info { margin-top: 20px; transition: opacity 0.4s, transform 0.4s; opacity: 0.7; }
.project-card:hover .project-info { opacity: 0.3; transform: translateY(5px); }
.p-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; display: block; }
.p-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.p-desc { font-size: 13px; color: #888; }

/* =========================================
   7. FOOTER (CLEAN & ESTÁTICO)
   ========================================= */
#footer {
    position: relative;
    background: #020202; 
    padding: 80px 0 40px; 
    border-top: 1px solid #1a1a1a;
}
/* Removido o efeito de luz/blur que seguia o mouse */

.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; 
    gap: 50px; margin-bottom: 50px; align-items: start;
}

/* Links do Footer - Padrão */
.footer-links li a {
    display: inline-block; color: #888; text-decoration: none;
    transition: all 0.2s ease; margin-bottom: 8px; font-size: 15px;
}
.footer-links li a:hover {
    color: var(--primary);
    padding-left: 5px; /* Apenas um movimento sutil */
}
/* Removida a setinha ::before */

/* Branding */
.footer-brand-interactive {
    display: inline-flex; align-items: center; gap: 20px;
    margin-bottom: 25px; cursor: pointer; text-decoration: none;
}
.footer-logo-img { width: 90px; height: auto; filter: brightness(0) invert(1); }
.footer-brand-tagline {
    font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px;
    line-height: 1.3; color: #fff; text-transform: uppercase;
    border-left: 2px solid #333; padding-left: 20px;
}
.footer-promise { color: #666; line-height: 1.6; font-size: 14px; max-width: 90%; }

/* Títulos das Colunas */
.footer-col-title {
    color: #fff; font-size: 16px; font-weight: 700; text-transform: uppercase;
    margin-bottom: 25px; display: block; letter-spacing: 1px;
}

/* Informações de Contato */
.contact-info-item {
    color: #a3a3a3; margin-bottom: 12px; font-size: 14px;
    display: flex; align-items: center; gap: 10px;
}
.contact-info-item i { color: var(--primary); width: 18px; text-align: center; }

/* Ícones Sociais - Botões */
.footer-social { display: flex; gap: 12px; margin-top: 25px; }
.social-btn {
    width: 42px; height: 42px; background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: 0.3s; font-size: 18px;
}
.social-btn:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); }

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; 
    text-align: center; color: #444; font-size: 12px; 
}

/* =========================================
   8. MEDIA QUERIES & OTIMIZAÇÃO MOBILE (ANTI-LAG)
   ========================================= */
@media (max-width: 991px) {
    .grid-3 { grid-template-columns: 1fr; gap: 20px; }
    .about-flex { flex-direction: column-reverse; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .footer-brand-interactive { flex-direction: column; gap: 10px; justify-content: center; width: 100%; }
    .footer-brand-tagline { border-left: none; border-top: 2px solid #333; padding-left: 0; padding-top: 15px; }
    .footer-promise { margin: 0 auto; }
    .footer-social, .contact-info-item { justify-content: center; }
}

@media (max-width: 768px) {
    /* --- ANTI-LAG DO PORTFÓLIO E MENU (ESSENCIAL) --- */
    .card-box, .nav-menu, .terminal-window, .video-window, .service-tag {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .nav-menu { background: #080808 !important; }
    .card-box, .terminal-window { background: rgba(15, 15, 15, 0.95) !important; }
    .video-window { background: #000 !important; border: 1px solid #222 !important; }

    /* Reduz escala e remove sombras pesadas */
    .project-card:hover .video-window { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.8) !important; }
    .project-card:hover .video-display { filter: none !important; }
    .hover-glow:hover { box-shadow: none !important; transform: translateY(-2px) !important; }

    /* Ajustes Gerais */
    body, html { overflow-x: hidden; width: 100%; }
    .container { padding: 0 15px; width: 100%; }
    section { padding: 60px 0; }
    .hero { padding: 130px 0 60px; min-height: auto; }
    .header-actions { display: none; }
    
    .mobile-toggle { 
        display: block; font-size: 26px; color: #fff; 
        cursor: pointer; z-index: 1100; margin-right: 10px; 
    }
    
    .nav-menu {
        position: fixed; top: 0; right: -100%;
        width: 80%; height: 100vh;
        flex-direction: column;
        justify-content: center; align-items: center;
        gap: 25px; padding: 20px;
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 50px rgba(0,0,0,0.9);
        transition: 0.4s ease; z-index: 1050;
    }
    .nav-menu.active { right: 0; }
    .nav-link { font-size: 18px; }

    .hero h1 { 
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important; line-height: 1.2; 
        margin-bottom: 20px; width: 100%; word-wrap: break-word;
    }
    .btn-hero { width: 100%; justify-content: center; }
    .footer-links li a:hover { padding-left: 0; }
}
/* =========================================
   REAÇÃO DA CAPIVARA (VOLTA DA ANIMAÇÃO)
   ========================================= */

/* 1. Reação do Logo no Rodapé */
.footer-brand-interactive:hover .footer-logo-img {
    transform: scale(1.15) rotate(-3deg); /* Pulo e giradinha */
    filter: brightness(0) invert(1) drop-shadow(0 0 15px var(--primary-glow)); /* Brilho Roxo */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito elástico */
}

/* 2. Reação da Marca d'água no Portfólio (se tiver) */
.project-card:hover .capivara-mark {
    opacity: 1 !important;
    transform: scale(1.2) rotate(5deg) !important; /* Mais visível */
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}
/* Modal de Idioma Estilo Studio Portella */
.lang-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none; /* Escondido por padrão via JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lang-modal-content {
    max-width: 450px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--primary);
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.2);
    animation: modalAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lang-modal-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.lang-modal-options .plan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Mobile fix */
@media (max-width: 480px) {
    .lang-modal-content { padding: 30px 20px; }



}