/* --- FONTES E VARIÁVEIS GLOBAIS --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Cores Premium */
    --primary-blue: #0D268F;
    --primary-dark: #06144b;
    --primary-light: #4c6ef5;
    --accent-green: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.4);

    --text-dark: #1e293b;
    --text-light: #64748b;

    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #eef2ff;

    --pure-white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);

    --font-primary: 'Outfit', sans-serif;
    /* Mais moderno que Montserrat */
    --font-secondary: 'Inter', sans-serif;
}

/* --- RESET BÁSICO E ESTILOS GLOBAIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-dark);
    line-height: 1.7;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    /* Parallax effect on bg */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    /* Mais largo para telas modernas */
    margin: 0 auto;
    padding: 0 24px;
}

/* --- TIPOGRAFIA --- */
h1,
h2,
h3 {
    font-family: var(--font-primary);
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tight tracking for modern look */
}

h1 {
    font-size: 4rem;
    /* Maior e mais impactante */
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Texto gradiente */
}

h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 600;
}

p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 1.125rem;
    font-weight: 400;
}

section {
    padding: 120px 0;
    position: relative;
}

.text-green {
    color: var(--accent-green);
}

.text-primary {
    color: var(--primary-blue);
}

/* --- GLASSMORPHISM UTILS --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
}

/* --- BOTÕES (CALL TO ACTION) --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-blue) 100%);
    color: var(--pure-white);
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(13, 38, 143, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(13, 38, 143, 0.6);
}

.cta-button-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid rgba(13, 38, 143, 0.1);
    box-shadow: none;
}

.cta-button-secondary:hover {
    border-color: var(--primary-blue);
    background: rgba(13, 38, 143, 0.05);
    transform: translateY(-2px);
    box-shadow: none;
}

/* --- CABEÇALHO --- */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-actions {
    display: flex;
    display: flex;
    align-items: center;
}

/* Canvas de Partículas */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    /* Sutil */
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    /* Texto ocupa mais espaço */
    align-items: center;
    gap: 80px;
    position: relative;
    z-index: 1;
}

.hero-text {
    position: relative;
}

.hero-text p {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 40px;
}

/* Efeito de destaque no Hero */
.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(13, 38, 143, 0.05);
    color: var(--primary-blue);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(13, 38, 143, 0.1);
}

/* --- SEÇÃO DE VANTAGENS (CARDS) --- */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 100px auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.feature-card {
    background: var(--pure-white);
    padding: 40px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(13, 38, 143, 0.1);
}

.feature-card h3 {
    margin-top: 20px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(13, 38, 143, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    margin-bottom: 24px;
    font-size: 24px;
}

/* --- SEÇÃO WEB CHATBOT (SHOWCASE) --- */
.webchat-showcase {
    background: linear-gradient(180deg, transparent 0%, rgba(13, 38, 143, 0.03) 100%);
    padding: 120px 0;
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-list li:last-child {
    border-bottom: none;
}

.chatbot-preview {
    background: var(--pure-white);
    border-radius: 24px;
    box-shadow: 0 30px 60px -12px rgba(13, 38, 143, 0.15);
    overflow: hidden;
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    /* Efeito 3D sutil */
    transition: transform 0.5s ease;
}

.chatbot-preview:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.preview-header {
    background: var(--primary-blue);
    padding: 24px;
    color: white;
}

.preview-body {
    background: #f8fafc;
    padding: 30px;
    min-height: 350px;
}

/* --- SEÇÃO API RAG --- */
.api-showcase {
    background: var(--pure-white);
    padding: 120px 0;
}

.api-content-reverse {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.api-showcase .showcase-text {
    order: 2;
}

.api-showcase .showcase-visual {
    order: 1;
}

.api-preview-card {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 40px 80px -20px rgba(13, 38, 143, 0.3);
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
    border: 1px solid #333;
    transform: perspective(1000px) rotateY(2deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.api-preview-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #111;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.code-title {
    margin-left: 10px;
    color: #858585;
    font-size: 0.85rem;
    font-family: var(--font-secondary);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
}

.code-body pre {
    margin: 0;
    line-height: 1.6;
}

.token.keyword {
    color: #569cd6;
}

.token.string {
    color: #ce9178;
}

.token.property {
    color: #9cdcfe;
}

.token.punctuation {
    color: #d4d4d4;
}

.token.comment {
    color: #6a9955;
    font-style: italic;
}

/* --- SEÇÃO DE CONTATO --- */
.contact-section {
    padding-bottom: 120px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    /* Sem gap, colados */
    background: var(--primary-blue);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(13, 38, 143, 0.25);
}

.contact-text {
    padding: 80px;
    color: var(--pure-white);
    position: relative;
    z-index: 1;
}

.contact-text h2 {
    color: var(--pure-white);
    -webkit-text-fill-color: initial;
    /* Reset gradient text */
    background: none;
}

.contact-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.contact-action {
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* --- RODAPÉ --- */
.footer {
    background: var(--pure-white);
    padding: 80px 0 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin: 0 auto 40px auto;
    }

    .showcase-content {
        grid-template-columns: 1fr;
    }

    .api-content-reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .api-showcase .showcase-text {
        order: 1;
        /* Retorna a ordem normal no mobile */
    }

    .api-showcase .showcase-visual {
        order: 2;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-text {
        padding: 60px 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .header {
        padding: 15px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-actions .cta-button:not(.cta-button-secondary) {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

/* --- MODAL DE LOGIN (CORRIGIDO) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 38, 143, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--pure-white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-blue);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--primary-blue);
}

/* Form Styles inside Modal */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: all 0.2s;
    background: #f8fafc;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(13, 38, 143, 0.1);
}

.password-input-group {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
}

.password-toggle-btn:hover {
    color: var(--primary-blue);
}

.login-help-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-help-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}