/* --- Configurações e Variáveis --- */
:root {
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.4);
    
    /* Cores dos Serviços */
    --cyan: #00e5ff;
    --purple: #9d4edd;
    --green: #00ff88;  
    --pink: #ff007f;   
    --orange: #ff9100;
    --red: #ff3333; /* Nova cor para o Portfólio */
    
    --dark-bg: #030305; 
    --glass-bg: rgba(20, 20, 25, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Otimização de Fonte */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap; 
    src: local('Montserrat'), url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    /* CORREÇÃO: Removemos height: 100% fixo e overflow hidden para permitir scroll quando necessário */
    min-height: 100vh; 
    overflow-x: hidden; /* Evita rolagem lateral */
    overflow-y: auto;   /* Permite rolagem vertical se a tela for pequena */
    background-color: var(--dark-bg);
    font-family: 'Montserrat', sans-serif;
    text-rendering: optimizeLegibility;
}

body { 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    color: #fff; 
}

/* --- CAMADAS DE FUNDO --- */

#stars-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.6; pointer-events: none;
}

.map-background {
    position: fixed; top: 50%; left: 50%; width: 100%; height: 100%; z-index: 1;
    background-image: url('mapa-novo.webp'); 
    background-position: center center;
    background-size: cover; background-repeat: no-repeat;
    mix-blend-mode: screen; 
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    opacity: 0.25;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.2));
    animation: mapBreathing 20s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes mapBreathing {
    0% { transform: translate(-50%, -50%) scale(1.0); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

body::after {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 10%, rgba(3, 3, 5, 0.6) 80%, var(--dark-bg) 100%);
    z-index: 2; pointer-events: none;
}

/* --- CONTEÚDO PRINCIPAL --- */

.container {
    position: relative; z-index: 10;
    max-width: 1200px; width: 100%; 
    /* CORREÇÃO: min-height garante que o container cresça se o conteúdo for maior que a tela */
    min-height: 100vh; 
    margin: 0 auto; padding: 20px;
    display: flex; flex-direction: column; justify-content: space-between;
}

header {
    text-align: center; padding-top: 2vh;
    animation: fadeDownSubtle 1.5s ease-out;
}

h1 {
    font-size: 1rem; font-weight: 500; color: var(--gold);
    letter-spacing: 0.3em; position: relative;
    display: inline-block; padding-bottom: 15px;
}

h1::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 40px; height: 1px; background: var(--gold);
    transform: translateX(-50%); box-shadow: 0 0 10px var(--gold-glow);
    animation: widthPulse 4s ease-in-out infinite alternate;
}

main {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    gap: 40px;
    padding: 40px 0; /* Adicionado padding vertical para garantir espaço ao rolar */
}

/* --- LOGO OTIMIZADA PARA LEITURA E PROPORÇÃO --- */

.logo-container {
    position: relative; 
    animation: zoomInSubtle 1.5s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container::before {
    content: '';
    position: absolute;
    width: 120%; 
    height: 120%;
    background: radial-gradient(circle, var(--dark-bg) 40%, rgba(3,3,5,0.8) 60%, transparent 80%);
    z-index: -2; 
    filter: blur(10px); 
}

.logo-glow {
    position: absolute; width: 70%; height: 70%; left: 15%; top: 15%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    opacity: 0.5; filter: blur(35px); z-index: -1;
    animation: pulseGlow 8s infinite alternate;
}

.logo {
    width: 100%; 
    max-width: 320px; 
    height: auto; 
    object-fit: contain; 
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8)); 
    transition: transform 0.6s;
    aspect-ratio: auto; 
}

.logo:hover { transform: scale(1.03); }

/* --- SISTEMA DE BOTÕES --- */

.buttons-wrapper {
    display: flex; flex-direction: column; gap: 20px;
    width: 100%; max-width: 820px; /* Leve aumento para acomodar melhor os botões */
    animation: fadeUpSubtle 1.5s ease-out 0.3s backwards;
}

.primary-group { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.secondary-group { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

.btn {
    position: relative; display: block;
    text-decoration: none; color: white;
    background: var(--glass-bg);
    border-radius: 8px; padding: 2px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.btn-content {
    position: relative; display: flex; align-items: center;
    background: rgba(15, 15, 20, 0.7);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 6px; border: 1px solid var(--glass-border);
    z-index: 2; height: 100%;
}

/* Tamanhos */
.btn-large { width: 300px; }
.btn-large .btn-content { padding: 20px 25px; gap: 20px; }

.btn-small { width: 190px; }
.btn-small .btn-content { padding: 12px 15px; gap: 12px; justify-content: center; }

/* Bordas Coloridas */
.marketing-btn .btn-content { border-left: 2px solid var(--cyan); }
.informatica-btn .btn-content { border-right: 2px solid var(--purple); }
.apps-btn .btn-content { border-bottom: 2px solid var(--green); }
.links-btn .btn-content { border-bottom: 2px solid var(--pink); }
.catalogo-btn .btn-content { border-bottom: 2px solid var(--orange); }
/* Novo Botão Portfolio */
.portfolio-btn .btn-content { border-bottom: 2px solid var(--red); }

/* Ícones */
.icon-wrapper {
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.03);
    transition: all 0.4s ease;
}

.btn-large .icon-wrapper { width: 40px; height: 40px; }
.btn-small .icon-wrapper { width: 32px; height: 32px; }

.icon { transition: all 0.4s ease; }
.btn-large .icon { width: 24px; height: 24px; }
.btn-small .icon { width: 18px; height: 18px; }

/* Cores Ícones */
.icon-marketing .icon { color: var(--cyan); }
.icon-informatica .icon { color: var(--purple); }
.icon-apps .icon { color: var(--green); }
.icon-links .icon { color: var(--pink); }
.icon-catalogo .icon { color: var(--orange); }
.icon-portfolio .icon { color: var(--red); }

/* Textos */
.btn-text { display: flex; flex-direction: column; }
.btn-title { font-size: 1rem; font-weight: 500; letter-spacing: 0.1em; }
.btn-title-sm { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; }
.btn-subtitle { font-size: 0.6rem; opacity: 0.5; margin-top: 3px; }

/* Hover Effects */
.btn:hover { transform: translateY(-5px); }

.marketing-btn:hover .icon-wrapper { background: rgba(0, 229, 255, 0.1); box-shadow: 0 0 15px var(--cyan); }
.marketing-btn:hover .btn-content { border-color: var(--cyan); box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.1); }

.informatica-btn:hover .icon-wrapper { background: rgba(157, 78, 221, 0.1); box-shadow: 0 0 15px var(--purple); }
.informatica-btn:hover .btn-content { border-color: var(--purple); box-shadow: inset 0 0 20px rgba(157, 78, 221, 0.1); }

.apps-btn:hover .icon-wrapper { background: rgba(0, 255, 136, 0.1); box-shadow: 0 0 10px var(--green); }
.apps-btn:hover .btn-content { border-color: var(--green); }
.apps-btn:hover .icon { color: var(--green); }

.links-btn:hover .icon-wrapper { background: rgba(255, 0, 127, 0.1); box-shadow: 0 0 10px var(--pink); }
.links-btn:hover .btn-content { border-color: var(--pink); }
.links-btn:hover .icon { color: var(--pink); }

.catalogo-btn:hover .icon-wrapper { background: rgba(255, 145, 0, 0.1); box-shadow: 0 0 10px var(--orange); }
.catalogo-btn:hover .btn-content { border-color: var(--orange); }
.catalogo-btn:hover .icon { color: var(--orange); }

.portfolio-btn:hover .icon-wrapper { background: rgba(255, 51, 51, 0.1); box-shadow: 0 0 10px var(--red); }
.portfolio-btn:hover .btn-content { border-color: var(--red); }
.portfolio-btn:hover .icon { color: var(--red); }

/* Footer */
footer { text-align: center; padding-bottom: 2vh; font-size: 0.7rem; color: rgba(255, 255, 255, 0.3); }
.footer-line { width: 30px; height: 1px; background: rgba(255, 255, 255, 0.1); margin: 0 auto 15px auto; }

/* Animações */
@keyframes fadeDownSubtle { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUpSubtle { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomInSubtle { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes widthPulse { from { width: 40px; opacity: 0.5; } to { width: 60px; opacity: 1; } }
@keyframes pulseGlow { from { opacity: 0.3; transform: scale(0.8); } to { opacity: 0.5; transform: scale(1.1); } }

/* Responsividade */
@media (max-width: 768px) {
    /* CORREÇÃO: Removemos a sobrescrita de overflow desnecessária, já tratada globalmente */
    .container { height: auto; min-height: 100vh; padding: 30px 20px; gap: 30px; }
    .map-background { height: 100vh; } 
    .logo { max-width: 240px; } 
    
    .buttons-wrapper { gap: 15px; }
    .primary-group { flex-direction: column; align-items: center; gap: 15px; }
    .secondary-group { justify-content: center; gap: 10px; }
    
    .btn-large { width: 100%; max-width: 350px; }
    /* Ajuste para 4 botões pequenos no mobile (2 por linha) */
    .btn-small { width: calc(50% - 10px); min-width: 140px; } 
    .btn-small .btn-content { padding: 10px 5px; flex-direction: column; gap: 5px; text-align: center; }
    .btn-small .btn-title-sm { font-size: 0.7rem; }
}

@media (max-width: 400px) {
    .secondary-group { flex-direction: column; align-items: center; }
    .btn-small { width: 100%; max-width: 350px; flex-direction: row; }
    .btn-small .btn-content { flex-direction: row; justify-content: flex-start; padding: 15px; gap: 15px; }
    .btn-small .btn-title-sm { font-size: 0.9rem; }
}