/* --- RESET E BASES --- */
:root {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --text-main: #ffffff;
    --text-muted: #9e9e9e;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(255, 255, 255, 0.15);
    --footer-bg: #0a0a0a;
    --footer-card-bg: #111111;
    --footer-text: #c5c5c5;
    --footer-heading: #ffffff;
    --footer-border: rgba(255, 255, 255, 0.12);
    /* Cores do Sistema 360 */
    --metria-color: #8b5cf6;
    --mp5-color: #10b981;
    --visibox-color: #3b82f6;
    --vialicita-color: #f59e0b;
}

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

/* H1UserAgentFontSizeInSection: forçar tamanho explícito (Desktop + Mobile) — não usar UA */
h1 { font-size: 2em !important; margin: 0 0 0.5em 0 !important; line-height: 1.2; font-weight: 700; }
section h1, article h1, aside h1, nav h1 { font-size: 2em !important; margin: 0 0 0.5em 0 !important; line-height: 1.2; font-weight: 700; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Instrument Sans', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Foco visível (acessibilidade) */
:where(a, button, input, textarea):focus-visible {
    outline: 2px solid rgba(255,255,255,0.85);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Utilitários SEO */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Labels de Seção */
.section-top { margin-bottom: 60px; border-bottom: 1px solid var(--border-subtle); padding-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; }
.label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; display: block; }
h2 { font-size: 2.5rem; font-weight: 500; letter-spacing: -0.02em; }

/* --- HEADER --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 25px 0;
    z-index: 1000;
    mix-blend-mode: difference; 
    color: #fff;
    background: transparent; 
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    mix-blend-mode: normal;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: #fff; position: relative; z-index: 1002; }

/* Desktop Nav & Actions */
.desktop-nav .nav-links { display: flex; gap: 40px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; opacity: 0.8; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.social-icon { font-size: 1.1rem; opacity: 0.8; }
.social-icon:hover { opacity: 1; transform: translateY(-2px); }

.btn-menu { 
    border: 1px solid #fff; background: #fff; color: #000;
    padding: 8px 24px; border-radius: 50px; font-size: 0.9rem; font-weight: 600;
    transition: transform 0.2s;
}
.btn-menu:hover { transform: scale(1.05); }

/* --- MOBILE MENU --- */
.mobile-toggle {
    display: none;
    cursor: pointer;
    z-index: 1002;
    background: transparent;
    border: 0;
    padding: 12px;
    border-radius: 12px;
}
.bar { width: 25px; height: 2px; background-color: #fff; margin: 6px 0; transition: 0.4s; }

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #000; display: flex; flex-direction: column;
    justify-content: center; align-items: center; z-index: 1001;
    transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.mobile-menu-overlay.active { transform: translateY(0); }
.mobile-links { text-align: center; }
.m-link { font-size: 2rem; font-weight: 600; color: #fff; margin-bottom: 30px; display: block; padding: 10px 0; }
.highlight-link { color: var(--visibox-color); }
.mobile-socials { display: flex; gap: 30px; justify-content: center; margin-top: 40px; font-size: 1.5rem; }
.mobile-socials a { padding: 10px; border-radius: 12px; }

.mobile-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.mobile-toggle.active .bar:nth-child(2) { transform: rotate(45deg) translate(-5px, -6px); }

/* --- HERO (ELEGANT CENTERED) --- */
#hero {
    min-height: 100svh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.hero-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%; z-index: 0; pointer-events: none;
    animation: pulseGlow 8s infinite alternate;
}
@keyframes pulseGlow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}
.hero-content { 
    width: 100%; position: relative; z-index: 1; text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.hero-badge {
    display: inline-block; border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px; border-radius: 50px; font-size: 0.85rem;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 30px; background: rgba(255, 255, 255, 0.03);
}
.hero-display-title {
    font-size: 3.5rem; line-height: 1.2; font-weight: 500;
    letter-spacing: -0.02em; margin-bottom: 25px; color: #fff;
}
.highlight {
    color: transparent; -webkit-text-stroke: 0;
    background: linear-gradient(90deg, #fff, #888);
    -webkit-background-clip: text; background-clip: text; font-style: italic;
}
.hero-subtext {
    font-size: 1.1rem; color: var(--text-muted); max-width: 500px;
    line-height: 1.6; margin-bottom: 50px;
}
.hero-subtext .no-break { white-space: nowrap; }
.hero-footer {
    margin-top: 0; font-size: 0.9rem; color: var(--text-muted); opacity: 0.6;
    animation: bounce 2s infinite; display: flex; align-items: center; gap: 10px;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}

/* --- PROJETOS --- */
#projetos { padding: 100px 0; }
.projects-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-item { cursor: pointer; group: hover; }
.p-image {
    height: 400px; background: #1a1a1a; border-radius: 4px; margin-bottom: 20px;
    transition: transform 0.4s ease;
    background-image: radial-gradient(#333 1px, transparent 1px); background-size: 20px 20px;
}
.project-item:hover .p-image { transform: scale(0.98); opacity: 0.8; }
.p-info h3 { font-size: 1.2rem; font-weight: 500; }
.p-info p { color: var(--text-muted); font-size: 0.9rem; }

/* --- METRIKA 360 --- */
#system-360 { padding: 100px 0; background: #080808; }
.grid-360 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card-360 {
    position: relative; background: var(--card-bg); border: 1px solid var(--border-subtle);
    padding: 60px; border-radius: 16px; overflow: hidden; transition: all 0.4s ease;
    display: flex; flex-direction: column; justify-content: space-between; min-height: 350px;
}
.card-360:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.card-glow {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 60%);
    opacity: 0; transition: opacity 0.4s ease; z-index: 0;
}
.card-360:hover .card-glow { opacity: 1; }
.metria:hover .card-glow { background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 60%); }
.mp5:hover .card-glow { background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15), transparent 60%); }
.visibox:hover .card-glow { background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 60%); }
.vialicita:hover .card-glow { background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 60%); }

.card-content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

/* Estilo para a logo dentro do card (Visibox) */
.card-logo {
    max-width: 180px; height: auto; margin-bottom: 25px; display: block;
    /* Se sua logo for preta, descomente a linha abaixo para ficar branca */
    /* filter: brightness(0) invert(1); */
}

.card-360 h3 { font-size: 2rem; margin-bottom: 15px; letter-spacing: -0.02em; }
.card-360 p { color: var(--text-muted); font-size: 1rem; max-width: 400px; margin-bottom: 30px; flex-grow: 1; }
.link-arrow { font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateX(-10px); }
.card-360:hover .link-arrow { opacity: 1; transform: translateX(0); }

/* --- MÉTODO & EXPERTISE --- */
#abordagem, #expertise { padding: 100px 0; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.method-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border-subtle); border-radius: 12px; padding: 40px;
    transition: 0.3s ease; height: 100%;
}
.method-card:hover {
    border-color: rgba(255,255,255,0.2); transform: translateY(-5px);
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 100%);
}
.step-number {
    font-family: 'Instrument Sans', sans-serif; font-size: 3rem; font-weight: 700;
    color: rgba(255,255,255,0.1); margin-bottom: 20px;
}
.method-card:hover .step-number { color: rgba(255,255,255,0.3); }
.method-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.method-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

.expertise-list { display: flex; flex-direction: column; }
.xp-item {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 30px 0; border-bottom: 1px solid var(--border-subtle);
    font-size: 2.5rem; font-weight: 400; letter-spacing: -0.03em; color: var(--text-muted);
}
.xp-item:hover { color: var(--text-main); padding-left: 20px; }
.xp-action { font-size: 1rem; opacity: 0; letter-spacing: normal; }
.xp-item:hover .xp-action { opacity: 1; }

/* --- FORMULÁRIO DE CONTATO --- */
.contact-form-wrapper { max-width: 640px; margin-bottom: 80px; }
.contact-form {
    display: flex; flex-direction: column; gap: 20px;
}
.contact-form .form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 18px 22px;
    background: var(--card-bg); color: var(--text-main);
    border: 1px solid var(--border-subtle); border-radius: 12px;
    font-family: 'Instrument Sans', sans-serif; font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none; border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.btn-submit {
    align-self: flex-start;
    border: 1px solid #fff; background: #fff; color: #000;
    padding: 12px 28px; border-radius: 50px; font-size: 0.95rem; font-weight: 600;
    font-family: 'Instrument Sans', sans-serif;
    cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
    transition: transform 0.2s, opacity 0.3s;
}
.btn-submit:hover { transform: scale(1.05); }
.btn-submit:active { opacity: 0.9; }

/* --- FOOTER (contraste WCAG AA+) --- */
footer {
    margin-top: 80px;
    padding: 80px 0 0;
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    color: var(--footer-text);
}
footer .section-top .label,
footer .footer-infra-text { color: var(--footer-text); }
footer .section-top h2 { color: var(--footer-heading); }
.footer-infra-text { font-size: 1rem; line-height: 1.6; margin-bottom: 24px; }

.footer-info {
    background: var(--footer-card-bg);
    border-top: 1px solid var(--footer-border);
    padding: 50px 0 48px;
}
.footer-info-inner { padding-top: 0; }
.footer-info-header {
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--footer-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.footer-info-title {
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--footer-heading);
}
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; margin-bottom: 0; }
.footer-brand { max-width: 400px; }
.footer-brand .legal-text,
.footer-brand .address-text { font-size: 0.9rem; line-height: 1.65; margin-bottom: 16px; color: var(--footer-text); }
.footer-brand .legal-text strong { color: var(--footer-heading); font-weight: 600; }
.social-links-footer { margin-top: 20px; display: flex; gap: 20px; }
.social-links-footer a { color: var(--footer-heading); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; text-underline-offset: 4px; }
.social-links-footer a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-direction: column; gap: 15px; }
.footer-nav a { color: var(--footer-text); font-size: 0.95rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--footer-heading); transform: translateX(5px); display: inline-block; }

.footer-copyright-bar {
    padding: 28px 0 40px;
    border-top: 1px solid var(--footer-border);
    text-align: center;
}
.footer-copyright-bar .copyright-text { font-size: 0.9rem; color: var(--footer-text); margin: 0; }

/* --- ANIMAÇÃO REVEAL --- */
.reveal, .reveal-text { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active, .reveal-text.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }


/* --- MEDIA QUERIES (RESPONSIVIDADE) --- */
@media (max-width: 1024px) {
    .container { padding: 0 25px; }
    .hero-display-title { font-size: 2.8rem; }
    .grid-360 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    html { scroll-padding-top: 75px; }

    /* Header */
    .desktop-nav, .desktop-only { display: none; }
    .mobile-toggle { display: block; }
    
    /* Hero */
    .hero-display-title { font-size: 2.2rem; }
    .hero-glow { width: 300px; height: 300px; }
    .hero-subtext { font-size: 1rem; padding: 0 20px; }
    .hero-subtext .no-break { white-space: normal; }

    /* Títulos e seção */
    .section-top { flex-direction: column; align-items: flex-start; gap: 10px; }
    h2 { font-size: 2rem; }
    
    /* Grids em Pilha */
    .projects-gallery, .method-grid { grid-template-columns: 1fr; }
    .p-image { height: 300px; }
    
    /* Cards Mobile */
    .card-360 { padding: 40px 30px; min-height: auto; }
    .link-arrow { opacity: 1; transform: translateX(0); margin-top: 20px; }
    
    /* Expertise */
    .xp-item { font-size: 1.8rem; flex-direction: column; gap: 10px; }
    .xp-action { opacity: 1; font-size: 0.9rem; color: var(--visibox-color); }
    .xp-item:hover { padding-left: 0; }
    
    /* Formulário de contato */
    .contact-form .form-row { grid-template-columns: 1fr; }
    .contact-form-wrapper { margin-bottom: 50px; }

    /* Footer / Empresa */
    .footer-info { padding: 40px 0 36px; }
    .footer-info-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
    .footer-info-title { font-size: 1.5rem; }
    .footer-content { flex-direction: column; gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ========== PÁGINA INFRAESTRUTURA ========== */
.nav-links a.nav-active { opacity: 1; color: var(--visibox-color); }

/* Status do Data Center */
#status-datacenter { padding: 100px 0; background: #080808; }
.infra-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
}
.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}
.stat-icon {
    font-size: 1.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.8;
}
.stat-card:hover .stat-icon { color: var(--visibox-color); }
.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Seção Servidores */
#servidores { padding: 100px 0; }
.section-intro {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 560px;
    margin: -30px 0 50px 0;
}
.servers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.server-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    overflow: hidden;
    transition: all 0.4s ease;
}
.server-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}
.server-card-glow {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.server-card:hover .server-card-glow { opacity: 1; }

.server-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.85; }
    70% { box-shadow: 0 0 0 6px transparent; }
}
.status-operational { background: var(--mp5-color); color: var(--mp5-color); }
.status-warning { background: var(--vialicita-color); color: var(--vialicita-color); }

.server-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}
.server-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: auto;
}
.server-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.server-spec { opacity: 0.9; }
.server-region { font-size: 0.8rem; opacity: 0.7; }

.uptime-block {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}
.uptime-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.uptime-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.uptime-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--mp5-color), #34d399);
    border-radius: 6px;
    transition: width 0.6s ease;
}
.uptime-fill.uptime-warning {
    background: linear-gradient(90deg, var(--vialicita-color), #fbbf24);
}
.uptime-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.server-footer {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.server-uptime-text { display: inline-flex; align-items: center; gap: 6px; }

/* Recursos DC - usa .method-grid do base */
#recursos-datacenter { padding: 100px 0; background: #080808; }

/* Footer infra */
.footer-infra-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 480px;
}
.footer-infra-cta { margin-bottom: 60px; }

/* Responsivo Infra */
@media (max-width: 1024px) {
    .infra-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .servers-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    #status-datacenter { padding: 60px 0; }
    #servidores { padding: 60px 0; }
    .infra-stats-grid { grid-template-columns: 1fr; gap: 16px; }
    .stat-card { padding: 28px 20px; }
    .stat-value { font-size: 2rem; }
    .server-card { padding: 24px; }
    .server-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .server-role { margin-left: 0; }
}