/* --- VARIAIS GLOBAIS E TEMAS --- */
:root {
    --font-headings: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- TEMA ESCURO (PADRÃO) --- */
body {
    --brand-purple: #BF00FF;
    --brand-cyan: #00CCFF;
    --bg-color: #000000;
    --text-color-primary: #F9FAFB;
    --text-color-secondary: #D1D5DB;
    --glass-bg: rgba(24, 24, 27, 0.5);
    --glass-border: rgba(255, 240, 220, 0.1);
    --pattern-color: rgba(255, 240, 220, 0.05);
}

/* --- TEMA CLARO --- */
body.light-theme {
    --brand-purple: #8a00c2;
    --brand-cyan: #00a1cc;
    --bg-color: #FFF0DC; /* Marfim */
    --text-color-primary: #1a1a1a;
    --text-color-secondary: #4a4a4a;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.1);
    --pattern-color: rgba(0, 0, 0, 0.03);
}


/* --- RESET E ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color-secondary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    /* CORREÇÃO: Espaçamento no topo para o cabeçalho fixo e suspenso não cobrir o conteúdo */
    padding-top: 100px; 
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--text-color-primary);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--brand-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--brand-purple);
}

/* --- COMPONENTES GLOBAIS --- */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: radial-gradient(circle at center, var(--pattern-color) 1px, transparent 1px);
    background-size: 25px 25px;
    z-index: -1;
    transition: background-image 0.3s;
}

.main-container {
    position: relative;
    z-index: 1;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    transition: background 0.3s, border 0.3s, max-height 0.5s ease-in-out;
}

.gradient-text {
    background: linear-gradient(90deg, var(--brand-purple), var(--brand-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.brand-purple-text {
    color: var(--brand-purple);
    font-weight: bold;
}

.cta-button {
    display: inline-block;
    background-color: var(--brand-purple);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background-color: var(--brand-cyan);
    color: var(--brand-dark, #000);
}

.cta-button.large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.section-tag {
    color: var(--brand-cyan);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* --- CABEÇALHO --- */
.sticky-header {
    /* CORREÇÃO: Posição fixa com o visual "suspenso" */
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%); /* Centraliza o elemento */
    width: calc(100% - 40px);
    max-width: 1100px;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-title {
    font-size: 1.2rem;
    display: block;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-button {
    display: block;
    background: none;
    border: none;
    color: var(--text-color-primary);
    cursor: pointer;
}
.menu-icon-close { display: none; }

.sticky-header.is-menu-open .menu-icon-open { display: none; }
.sticky-header.is-menu-open .menu-icon-close { display: block; }


/* --- MENU MOBILE EXPANSÍVEL --- */
.main-nav {
    position: absolute; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 25px 25px;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
}

.sticky-header.is-menu-open .main-nav {
    position: static; 
    max-height: 300px;
    opacity: 1;
    visibility: visible;
}

.main-nav a {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--text-color-primary);
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.sticky-header.is-menu-open .main-nav a {
    animation: revealText 0.8s forwards;
    animation-delay: var(--delay);
}

.main-nav a::after {
    content: '|';
    position: absolute;
    right: -5px;
    opacity: 0;
    animation: blinkCaret 0.7s infinite;
    animation-delay: var(--delay);
}

.sticky-header.is-menu-open .main-nav a::after {
    animation-play-state: running;
}


@keyframes revealText {
    from {
        opacity: 0;
        transform: translateY(-10px);
        width: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        width: 100%;
    }
}

@keyframes blinkCaret {
    50% { opacity: 1; }
}


.main-nav .cta-button {
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

/* SEÇÃO DE CORREÇÃO DE LAYOUT DO MENU MOBILE */
.sticky-header.is-menu-open .header-content {
    flex-wrap: wrap; 
    row-gap: 20px;   
}

.sticky-header.is-menu-open .header-right-group {
    display: contents; 
}

.sticky-header.is-menu-open .main-nav {
    width: 100%;
    order: 3;
    padding-top: 25px;
}

.sticky-header.is-menu-open .header-actions {
    order: 2;
}
/* FIM DA SEÇÃO DE CORREÇÃO */


/* --- LÓGICA DO TROCADOR DE TEMA --- */
.theme-switcher-button {
    background: none;
    border: none;
    color: var(--text-color-primary);
    cursor: pointer;
    padding: 5px;
}
.sun-icon { display: none; }
.moon-icon { display: block; }

body.light-theme .sun-icon { display: block; }
body.light-theme .moon-icon { display: none; }

/* --- LÓGICA DOS LOGOS POR TEMA E RESPONSIVIDADE (CORRIGIDO) --- */
.logo-desktop, .logo-mobile {
    display: none;
}
body:not(.light-theme) .logo-mobile.logo-dark {
    display: block;
}
body.light-theme .logo-mobile.logo-light {
    display: block;
}


/* --- SEÇÕES (ESTILOS ESTRUTURAIS) --- */
section {
    padding: 100px 0;
    text-align: center;
}
.hero-section h2 { font-size: 2.5rem; line-height: 1.2; }
.hero-section p { font-size: 1.1rem; max-width: 600px; margin: 20px auto 40px; }
.problem-section h3 { font-size: 2rem; margin-bottom: 20px; }
.problem-section p { max-width: 700px; margin: 0 auto; font-size: 1rem; }
.solution-section h3 { font-size: 2.5rem; margin-top: 10px; }
.solution-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 50px; }
.solution-card { padding: 40px 30px; }
.card-number { font-size: 3rem; font-weight: bold; margin-bottom: 20px; }
.card-number.purple { color: var(--brand-purple); }
.card-number.cyan { color: var(--brand-cyan); }
.solution-card h4 { font-size: 1.5rem; margin-bottom: 15px; }
.portfolio-section h3 { font-size: 2.5rem; }
.portfolio-section > .container > p { max-width: 600px; margin: 10px auto 50px; }
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.portfolio-card { border-radius: 25px; overflow: hidden; text-align: left; }
.portfolio-card img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s ease; }
.portfolio-card:hover img { transform: scale(1.1); }
.portfolio-card .card-content { padding: 25px; }
.portfolio-card h4 { font-size: 1.5rem; margin-bottom: 10px; }
.portfolio-card-cta { border: 2px dashed var(--glass-border); border-radius: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
.portfolio-card-cta h4 { font-size: 1.5rem; margin-bottom: 10px; }
.portfolio-card-cta a { font-weight: bold; margin-top: 20px; }
.contact-section { background-color: rgba(24, 24, 27, 0.5); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
body.light-theme .contact-section { background-color: rgba(255, 255, 255, 0.5); }
.contact-section h3 { font-size: 2.2rem; }
.contact-section p { max-width: 600px; margin: 20px auto 40px; }
.main-footer { padding: 40px 0; text-align: center; color: #9CA3AF; border-top: 1px solid var(--glass-border); }
.main-footer .signature { font-size: 0.9rem; margin-top: 10px; color: #6B7280; }
.to-top-button { position: fixed; bottom: 30px; right: 30px; background-color: var(--brand-purple); color: white; border: none; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, transform 0.3s; z-index: 100; }
.to-top-button.show { opacity: 1; visibility: visible; }
.to-top-button:hover { transform: scale(1.1); }


/* --- RESPONSIVIDADE --- */
@media (min-width: 768px) {
    body {
        /* Ajusta o espaçamento do topo para o desktop */
        padding-top: 110px;
    }

    .header-content {
        padding: 15px 25px;
    }
    .header-right-group {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    .main-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        padding: 0;
        max-height: none;
        opacity: 1;
        visibility: visible;
        order: 1;
    }
    .main-nav a {
        font-size: 1rem;
        opacity: 1;
        animation: none;
        transform: none;
    }
    .main-nav a::after {
        display: none;
    }
    .main-nav .cta-button {
        margin-top: 0;
        width: auto;
    }
    .mobile-menu-button { display: none; }
    .logo-title { display: none; }
    .logo { height: 40px; }

    .solution-grid { grid-template-columns: repeat(3, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-section h2 { font-size: 4rem; }
    
    .logo-mobile { display: none !important; }
    body:not(.light-theme) .logo-desktop.logo-dark { display: block; }
    body.light-theme .logo-desktop.logo-light { display: block; }
}
