/* 1. VARIÁVEIS E ESTILOS GERAIS */
:root {
    --color-background: #fdfdff;
    --color-text-dark: #121421;
    --color-primary: #440099;
    --color-primary-light: #5a00cc;
    --color-secondary: #D1A103;
    --color-secondary-light: #f0e68c;
    --color-dark-blue-1: #001f30;
    --color-dark-blue-2: #3a476a;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: var(--font-body); 
    background-color: #F5F5F5;
    color: var(--color-text-dark); 
    line-height: 1.7; 
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden;
}
body.nav-open {
    overflow: hidden;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; }
h1 { font-size: 3.5rem; line-height: 1.2; letter-spacing: -1px; margin-bottom: 1rem; }
h2 { font-size: 2.8rem; line-height: 1.2; letter-spacing: -0.5px; }
h3 { font-size: 1.6rem; margin-bottom: 1.2rem; }
section { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.cta-button { display: inline-block; padding: 14px 32px; background-color: var(--color-primary); color: #fff; text-decoration: none; font-family: var(--font-title); font-weight: 600; border-radius: 8px; transition: all 0.3s ease-in-out; box-shadow: 0 4px 15px rgba(68, 0, 153, 0.2); }
.cta-button:hover { background-color: var(--color-primary-light); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(68, 0, 153, 0.3); }

/* 2. HEADER E NAVEGAÇÃO */
.main-header { background-color: rgba(253, 253, 255, 0.85); backdrop-filter: blur(10px); padding: 20px 0; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #e8eaf0; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-title); font-size: 1.8rem; font-weight: 800; text-decoration: none; color: var(--color-text-dark); letter-spacing: 0.5px; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.03); }
.logo span { background: linear-gradient(45deg, var(--color-secondary), var(--color-secondary-light)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 12px rgba(209, 161, 3, 0.5); }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 35px; }
.main-nav a { text-decoration: none; color: var(--color-text-dark); font-weight: 600; position: relative; padding-bottom: 5px; }
.main-nav a:not(.nav-cta)::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-primary); transition: width 0.3s ease-in-out; }
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { padding: 10px 24px; box-shadow: none; color: #fff !important; }
.nav-cta:hover { box-shadow: 0 4px 15px rgba(68, 0, 153, 0.2); transform: translateY(-2px); }
.mobile-nav-toggle { display: none; }

/* 3. SEÇÕES */
.hero-section { position: relative; padding: 120px 0; background: linear-gradient(120deg, var(--color-text-dark) 0%, #00121c 100%); color: #fff; overflow: hidden; }
#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: left; }
.hero-content .subtitle { font-size: 1.25rem; max-width: 650px; margin-bottom: 2.5rem; line-height: 1.6; opacity: 0.9; }
.hero-cta { background-color: var(--color-secondary); color: var(--color-text-dark); box-shadow: 0 4px 15px rgba(209, 161, 3, 0.2); }
.hero-cta:hover { background-color: #e8b82a; box-shadow: 0 8px 20px rgba(209, 161, 3, 0.3); }

.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 30px; }
.service-card { grid-column: span 2; }
.service-card:nth-child(4) { grid-column: 2 / span 2; }
.service-card:nth-child(5) { grid-column: 4 / span 2; }
.service-card { display: flex; flex-direction: column; background-color: #E6E6E6; padding: 30px; border: 1px solid #dcdcdc; border-radius: 16px; box-shadow: 0 0 60px rgba(0, 0, 0, 0.12); opacity: 0; transform: translateY(30px); transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.4s ease, border-color 0.3s ease; }
.service-card.is-visible { opacity: 1; transform: translateY(0); }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 65px rgba(0, 0, 0, 0.18); border-color: var(--color-primary); }
.service-card h3 { color: var(--color-primary); font-weight: 600; font-size: 1.4rem; margin-bottom: 1rem; }
.service-card p { flex-grow: 1; margin-bottom: 20px; }
.service-card a { color: var(--color-primary); text-decoration: none; font-weight: 700; align-self: flex-start; }

.impact-section { background: linear-gradient(120deg, var(--color-dark-blue-2) 0%, var(--color-text-dark) 100%); color: var(--color-background); overflow-x: hidden; }
.section-title.dark h2 { color: #fff; }
.impact-intro { text-align: center; max-width: 800px; margin: -40px auto 50px; opacity: 0.8; font-size: 1.1rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: 40px; max-width: 900px; margin: 0 auto; }
.metric-card { display: flex; flex-direction: column; justify-content: center; align-items: center; background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%); padding: 40px; border-radius: 16px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.15); position: relative; opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.metric-card.is-visible { opacity: 1; transform: translateY(0); }
.metric-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 16px; border: 2px solid transparent; background: linear-gradient(45deg, var(--color-primary), var(--color-secondary)) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; opacity: 0; transition: opacity 0.3s ease-in-out; }
.metric-card:hover::before { opacity: 1; }
.metric-value { display: flex; align-items: baseline; gap: 10px; margin-bottom: 15px; }
.metric-number { display: block; font-family: var(--font-title); font-size: 4.5rem; font-weight: 800; line-height: 1; background: linear-gradient(45deg, var(--color-secondary-light), var(--color-secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 20px rgba(209, 161, 3, 0.4); }
.metric-unit { font-family: var(--font-title); font-size: 2rem; font-weight: 600; color: var(--color-secondary); opacity: 0.8; }
.metric-card p { font-size: 1rem; line-height: 1.5; opacity: 0.8; max-width: 300px; }

.differentiator-item { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; }
.differentiator-item.reverse { flex-direction: row-reverse; }
.differentiator-text { flex: 1; }
.differentiator-icon { flex: 1; max-width: 250px; margin: 0 auto; }
.differentiator-icon img { width: 100%; height: auto; object-fit: contain; }
.differentiator-text h3 { line-height: 1.4; }

.final-cta-wrapper { text-align: center; margin-top: 100px; padding-top: 60px; border-top: 1px solid #e0e0e0; }
.final-cta-wrapper h2 { color: var(--color-text-dark); font-size: 2.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.final-cta-wrapper p { color: var(--color-text-dark); margin-top: 20px; margin-bottom: 40px; font-size: 1.1rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.final-cta { background-color: var(--color-secondary); color: var(--color-text-dark); }
.final-cta:hover { background-color: #e8b82a; }

/* 4. FOOTER */
.main-footer { background-color: var(--color-text-dark); color: var(--color-background); padding: 80px 0 30px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--color-dark-blue-2); }
.footer-logo { display: flex; justify-content: center; align-items: center; }
.footer-logo img { height: 200px; width: auto; }
.footer-links h4, .footer-contact h4 { font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--color-secondary); }
.footer-links ul, .footer-contact ul { list-style: none; }
.footer-links li, .footer-contact li { margin-bottom: 15px; }
.footer-links a, .footer-contact a { color: var(--color-background); text-decoration: none; opacity: 0.8; transition: opacity 0.3s ease, color 0.3s ease; display: flex; align-items: center; gap: 12px; }
.footer-links a:hover, .footer-contact a:hover { opacity: 1; color: var(--color-secondary-light); }
.footer-contact svg { flex-shrink: 0; }
.footer-copyright { text-align: center; margin-top: 30px; opacity: 0.6; font-size: 0.9rem; }

/* ========================================================= */
/* 5. RESPONSIVIDADE (MEDIA QUERIES)                         */
/* ========================================================= */

/* TABLETS (até 992px) - PONTO DE QUEBRA AJUSTADO */
@media (max-width: 992px) {
    /* Esconde o menu de desktop e mostra o botão hambúrguer */
    .main-nav {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
    /* Outros ajustes para tablets */
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.4rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card { grid-column: span 1; }
    .service-card:nth-child(4), .service-card:nth-child(5) { grid-column: span 1; }
    .service-card:nth-child(5) { grid-column: 1 / -1; }
    .differentiator-item, .differentiator-item.reverse { flex-direction: column; gap: 40px; text-align: center; }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .footer-links a, .footer-contact a { justify-content: center; }
}

/* CELULARES (até 768px) */
@media (max-width: 768px) {
    section { padding: 60px 0; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.3rem; }
    .container { padding: 0 25px; }

    /* --- ESTILO DO MENU MODAL --- */
    .mobile-nav-toggle {
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    .hamburger-line {
        display: block; width: 25px; height: 3px; background-color: var(--color-text-dark);
        margin: 5px 0; transition: all 0.3s ease-in-out;
    }
    .main-nav {
        display: flex; /* Garante que o menu exista e possa ser animado */
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background-color: rgba(18, 20, 33, 0.9); /* Fundo escuro semitransparente */
        backdrop-filter: blur(5px);
        justify-content: center; align-items: center;
        opacity: 0; /* Começa invisível */
        pointer-events: none; /* Não pode ser clicado quando invisível */
        transition: opacity 0.4s ease;
        z-index: 1000;
    }
    .main-nav.is-active {
        opacity: 1;
        pointer-events: auto;
    }
    .main-nav ul {
        list-style: none; flex-direction: column; gap: 40px;
        transform: translateY(20px); /* Posição inicial da animação */
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
        transition-delay: 0.2s; /* Anima depois que o fundo aparece */
    }
    .main-nav.is-active ul {
        transform: translateY(0);
        opacity: 1;
    }
    .main-nav a { font-size: 1.8rem; color: #fff; } /* Links brancos no overlay */
    .nav-cta {
        border: 2px solid var(--color-primary);
        background-color: transparent;
    }
    .nav-cta:hover {
        background-color: var(--color-primary);
    }
    body.nav-open .mobile-nav-toggle {
        position: fixed; right: 25px;
    }
    body.nav-open .hamburger-line {
        background-color: #fff; /* Linhas brancas para o "X" */
    }
    body.nav-open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    body.nav-open .hamburger-line:nth-child(2) { opacity: 0; }
    body.nav-open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Layouts de 1 coluna */
    .services-grid, .metrics-grid {
        grid-template-columns: 1fr;
    }
    .service-card:nth-child(5) { grid-column: 1; }
    .final-cta-wrapper h2 { font-size: 2rem; }
}