/* ============================================================
   STYLE.CSS — Base Template SI (componentes obrigatórios)
   Personalize cores/fontes via variáveis no :root.
   Os estilos de SEÇÃO são criados por projeto, aqui fica só a cola.
   ============================================================ */

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

:root {
    --bg: #08080f;
    --bg-card: #131320;
    --bg-soft: #0e0e16;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #10b981;
    --line: rgba(255, 255, 255, 0.08);
    --radius: 14px;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { scroll-behavior: auto; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Anti-flash: esconde personalizações até o servidor popular */
html.lp-loading .js-personalize { visibility: hidden; }

/* ============ NAVBAR ============ */
.navbar-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(8, 8, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition: transform 0.3s ease;
}
.navbar-wrapper.hidden { transform: translateY(-100%); }
.navbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.navbar-links { display: flex; align-items: center; gap: 22px; }
.navbar-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: var(--transition); }
.navbar-links a:hover, .navbar-links a.active { color: #fff; }
.navbar-cta { padding: 10px 18px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 600; font-size: 13.5px; transition: var(--transition); }
.navbar-cta:hover { background: var(--primary-hover); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ============ DRAWER MOBILE ============ */
.mobile-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: var(--transition); z-index: 1100; }
.mobile-drawer-overlay.active { opacity: 1; visibility: visible; }
.mobile-drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw);
    background: var(--bg-card); border-right: 1px solid var(--line);
    transform: translateX(-100%); transition: transform 0.3s var(--transition); z-index: 1101;
    display: flex; flex-direction: column; padding: 20px; overflow-y: auto; overscroll-behavior: contain;
}
.mobile-drawer.active { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.drawer-brand-logo { width: 36px; height: 36px; object-fit: contain; }
.drawer-brand-name { font-family: var(--font-display); font-weight: 700; }
.drawer-slogan { font-size: 11px; color: var(--text-muted); }
.drawer-close { background: none; border: none; color: var(--text-muted); font-size: 22px; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; margin: 18px 0; }
.drawer-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: 14.5px; transition: var(--transition); }
.drawer-nav a:hover { background: rgba(255,255,255,0.05); }
.drawer-icon { width: 20px; text-align: center; }
.drawer-contact { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-muted); }
.drawer-contact-item { display: flex; align-items: center; gap: 8px; }
.contact-icon { width: 18px; text-align: center; }
.drawer-footer { margin-top: auto; padding-top: 16px; }
.drawer-footer .btn { width: 100%; }

/* ============ BOTÕES ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px; border: none;
    font-family: inherit; font-weight: 600; font-size: 14px;
    transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* ============ HERO + CAIXA DE CHAT (HOME) ============ */
.hero-section {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}
.hero-layout { width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
/* INVARIANTE: filhos de grid precisam poder encolher (sem isso, textos longos estouram o layout no mobile) */
.hero-layout > * { min-width: 0; }
.hero-chat-box {
    background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
    max-width: 440px; margin-left: auto; width: 100%;
    position: relative;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-chat-box:hover { transform: translateY(-4px); }
/* cantoneiras de visor — a caixa é um aparelho do conceito */
.hero-chat-box::before, .hero-chat-box::after {
    content: ''; position: absolute; inset: -9px; pointer-events: none; z-index: 3;
    background-repeat: no-repeat; opacity: 0.55; transition: opacity 0.4s;
}
.hero-chat-box::before {
    background-image:
        linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
        linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
    background-size: 26px 1.5px, 1.5px 26px, 26px 1.5px, 1.5px 26px;
    background-position: left 0 top 0, left 0 top 0, right 0 bottom 0, right 0 bottom 0;
}
.hero-chat-box::after {
    background-image:
        linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
        linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
    background-size: 26px 1.5px, 1.5px 26px, 26px 1.5px, 1.5px 26px;
    background-position: right 0 top 0, right 0 top 0, left 0 bottom 0, left 0 bottom 0;
}
.hero-chat-box:hover::before, .hero-chat-box:hover::after { opacity: 1; }
.chat-box-tag {
    position: absolute; top: -10px; left: 24px; z-index: 4;
    background: var(--bg-card); padding: 0 10px;
    font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.26em;
    text-transform: uppercase; color: var(--accent);
}
.chat-box-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); border-radius: 18px 18px 0 0; }
.chat-box-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; animation: avatar-ring 2.6s ease-out infinite; }
@keyframes avatar-ring { 0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.25); } 70% { box-shadow: 0 0 0 9px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
.chat-box-info { flex: 1; min-width: 0; }
.chat-box-name { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.chat-box-role { font-size: 11px; color: var(--text-muted); }
.chat-box-status { font-size: 11px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.online-dot { animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0.2); } 55% { box-shadow: 0 0 0 6px rgba(0,0,0,0); } }
.wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.wave b { width: 2px; height: 40%; background: var(--accent); border-radius: 1px; animation: wave 1.3s ease-in-out infinite; }
.wave b:nth-child(2) { animation-delay: 0.18s; }
.wave b:nth-child(3) { animation-delay: 0.36s; }
@keyframes wave { 0%, 100% { height: 35%; } 50% { height: 100%; } }
.chat-box-messages { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 200px; }
.chat-bubble { padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; max-width: 85%; }
.chat-bubble.bot { background: rgba(255,255,255,0.06); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; align-self: flex-start; }
.chat-teaser { position: absolute; left: 16px; right: 16px; bottom: 76px; display: flex; flex-direction: column; gap: 10px; opacity: 0; visibility: hidden; pointer-events: none; }
.chat-teaser.on { opacity: 1; visibility: visible; }
.chat-teaser .chat-bubble { opacity: 0; transform: translateY(8px); }
.chat-teaser.on .chat-teaser-typing { animation: teaser-cycle 9s infinite 0.5s; }
.chat-teaser.on .chat-teaser-msg { animation: teaser-cycle 9s infinite 4.8s; }
@keyframes teaser-cycle {
    0%, 6% { opacity: 0; transform: translateY(8px); }
    14%, 48% { opacity: 1; transform: none; }
    56%, 100% { opacity: 0; transform: translateY(-4px); }
}
.chat-box-cta { display: flex; flex-direction: column; gap: 11px; padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(0,0,0,0.15); border-radius: 0 0 18px 18px; }
.chat-box-cta .btn { width: 100%; }
.chat-box-statusbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-muted);
}
.chat-box-statusbar .sb-live { display: flex; align-items: center; gap: 7px; }
.chat-box-statusbar .sb-ref { color: var(--accent); }

/* ============ BOT FLUTUANTE (abre modal DIRETO) ============ */
.floating-bot-container { position: fixed; bottom: 24px; right: 24px; z-index: 1050; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.floating-bot {
    position: relative; width: 62px; height: 62px; border-radius: 50%; cursor: pointer;
    display: grid; place-items: center; border: 2px solid var(--primary);
    background: var(--bg-card); box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    opacity: 0; visibility: hidden; transform: scale(0.5); transition: var(--transition);
}
.floating-bot.visible { opacity: 1; visibility: visible; transform: scale(1); }
.floating-bot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.floating-pulse { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--primary); animation: floating-ping 2s infinite; }
.floating-dot { position: absolute; bottom: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
@keyframes floating-ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.35); opacity: 0; } }

/* ============ CHAT PANEL DESKTOP COMPLEMENTAR (entra pela ESQUERDA, encosta na modal 420px) ============ */
.chat-panel { position: fixed; top: 0; bottom: 0; left: 0; right: 420px; z-index: 1201; background: var(--bg-card); color: var(--text); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 60px); overflow-y: auto; }
.chat-panel.active { transform: translateX(0); }
@media (max-width: 1023px) { .chat-panel { display: none !important; } }

/* ============ MODAL DE CHAT (entra pela DIREITA, full-height) ============ */
.chat-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); opacity: 0; visibility: hidden; transition: var(--transition); z-index: 1200; }
.chat-modal-overlay.active { opacity: 1; visibility: visible; }
.chat-modal { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); background: var(--bg-card); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 1201; display: flex; flex-direction: column; }
.chat-modal.active { transform: translateX(0); }
.chat-modal-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.modal-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.modal-info { flex: 1; min-width: 0; }
.modal-name { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.modal-role { font-size: 11px; color: var(--text-muted); }
.modal-status { font-size: 11px; color: var(--accent); font-weight: 600; }
.chat-modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; }
.chat-modal-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.chat-modal-footer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-modal-footer input { flex: 1; padding: 11px 14px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); outline: none; }
.send-btn { width: 44px; border-radius: 10px; border: none; background: var(--primary); color: #fff; }
.typing-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing-bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ============ FOOTER ============ */
.footer { padding: 60px 24px 0; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand-logo { width: 44px; height: 44px; object-fit: contain; }
.footer-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.footer-slogan { color: var(--text-muted); font-size: 13px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.footer-col a { color: var(--text-muted); font-size: 13.5px; transition: var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1240px; margin: 0 auto; padding: 18px 0 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 12.5px; color: var(--text-muted); }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.06); border: 1px solid var(--line); font-size: 15px; transition: var(--transition); }
.footer-social a:hover { background: var(--primary); }

/* ============ PÁGINAS INTERNAS (sobre, soluções, contato, legal) ============ */
.page-hero { padding: 150px 24px 60px; text-align: center; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
.page-hero p { color: var(--text-muted); font-size: 16px; max-width: 640px; margin: 14px auto 0; }
.page-content { max-width: 900px; margin: 0 auto; padding: 20px 24px 80px; }
.page-content h2 { font-family: var(--font-display); font-size: 24px; margin: 30px 0 12px; }
.page-content p { color: var(--text-muted); font-size: 15px; margin-bottom: 14px; line-height: 1.7; }

/* ============ CONTATO (SEM formulário — CTA + canais + FAQ) ============ */
.contact-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0; }
.contact-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-align: center; }
.contact-card-icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.contact-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 10px; }
.contact-card a { color: var(--primary); font-weight: 600; font-size: 13.5px; }

.faq { margin: 40px 0; }
.faq h2 { font-family: var(--font-display); font-size: 26px; text-align: center; margin-bottom: 24px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-question { width: 100%; padding: 16px 20px; background: var(--bg-card); border: none; color: var(--text); font-family: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; font-size: 18px; color: var(--primary); }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 200px; }
.faq-answer p { padding: 0 20px 16px; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }

/* ============ RESPONSIVO ============
   ⚠️ INVARIANTE OBRIGATÓRIO — NÃO REMOVA/ALTERE:
   Em TODAS as páginas (home e internas), o hero é UMA coluna abaixo de 900px.
   Se o CSS do site criar variações de hero (ex.: .hero-inner .hero-layout),
   adicione o override equivalente DENTRO deste media query com a MESMA
   especificidade — nunca fora dele (a regra de fora vence e quebra o mobile). */
@media (max-width: 900px) {
    .navbar-links { display: none; }
    .navbar-cta { display: none; }
    .hamburger { display: flex; }
    .hero-layout, .hero-inner .hero-layout, .legal-hero .hero-layout { grid-template-columns: 1fr; gap: 32px; }
    .hero-chat-box { margin-left: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .page-hero { padding: 120px 20px 40px; }
    .contact-channels { grid-template-columns: 1fr; }
}
