/**
 * ARQUIVO: style.css
 * FUNÇÃO: Estilização Visual e Efeitos Cyberpunk
 * PROJETO: Website Suor e Silicio
 * AUTOR: Alysson Santos
 * PUBLISHER: Neural SS TEAM
 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

:root {
    --primary: #1a73e8;
    --gold: #c9a800;
    --bg: #ffffff;
    --text: #202124;
    --text-sub: #5f6368;
    --glass: rgba(255,255,255,0.55);
    --glass-border: rgba(0,0,0,0.06);
    --header-h: 80px;
    --font: 'Orbitron', sans-serif;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0,0,0,0.07);
}

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

html {
    height: 100%;
    /* Esconde scrollbar em todos os browsers sem bloquear o scroll */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}
html::-webkit-scrollbar { display: none; } /* Chrome/Safari */

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    overflow-x: hidden;
    line-height: 1.6;
    animation: fadeBody 0.6s ease;
}
@keyframes fadeBody { from { opacity: 0; } to { opacity: 1; } }

/* ===================== CANVAS ===================== */
#particle-field-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: #fff;
    pointer-events: none;
}

/* ===================== HEADER ===================== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 100;
    background: transparent;
    /* Permite que o container interno expanda verticalmente no mobile */
    overflow: visible;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ===================== BRAND ===================== */
.brand {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: default;
}

/*
 * GLITCH: display:inline-block é obrigatório para que position:absolute
 * dos pseudo-elementos seja contido dentro do próprio .glitch,
 * evitando o bug de texto vazando fora do contêiner.
 */
.glitch {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;   /* CORREÇÃO: torna-se o containing block */
    overflow: hidden;         /* CORREÇÃO: recorta pseudo-elementos que excedam */
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    /* clip-path moderno (substitui o deprecated 'clip') */
}
.glitch::before {
    left: 2px;
    color: var(--text);
    text-shadow: -2px 0 #ff00c1;
    animation: ga 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    color: var(--text);
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: gb 1.4s infinite linear alternate-reverse;
}
@keyframes ga {
    0%  { clip-path: inset(30% 0 60% 0); transform: skew(0.5deg); }
    15% { clip-path: inset(10% 0 75% 0); transform: skew(0.2deg); }
    30% { clip-path: inset(55% 0 30% 0); transform: skew(0.4deg); }
    45% { clip-path: inset(80% 0 5%  0); transform: skew(0.8deg); }
    60% { clip-path: inset(5%  0 88% 0); transform: skew(0.3deg); }
    75% { clip-path: inset(65% 0 20% 0); transform: skew(0.6deg); }
    100%{ clip-path: inset(20% 0 50% 0); transform: skew(0.4deg); }
}
@keyframes gb {
    0%  { clip-path: inset(62% 0 0%  0); }
    25% { clip-path: inset(10% 0 70% 0); }
    50% { clip-path: inset(80% 0 5%  0); }
    75% { clip-path: inset(40% 0 45% 0); }
    100%{ clip-path: inset(0%  0 80% 0); }
}

.team-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 3px rgba(201,168,0,0.4);
    vertical-align: super;
    line-height: 1;
    margin-left: 4px;
    position: relative;
    top: -0.5em;
}

/* ===================== NAV ===================== */
nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}
nav a {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.25s;
    display: block;
}
nav a:hover { color: var(--primary); background: rgba(26,115,232,0.06); }
nav a.active {
    color: var(--primary);
    background: rgba(26,115,232,0.1);
    border-bottom: 2px solid var(--primary);
}

/* ===================== BUTTON ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,115,232,0.25);
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--text);
}
.btn-secondary:hover {
    background: var(--text);
    color: #fff;
    transform: translateY(-2px);
}

/* ===================== MAIN ===================== */
#app {
    margin-top: var(--header-h);
    /* Layout exato: ocupa o restante da viewport sem criar scroll extra */
    height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===================== PAGE SECTIONS ===================== */
.page-section {
    display: none;
    /* Usa o espaço restante descontando o footer */
    flex: 1;
    width: 100%;
    overflow-y: auto; /* scroll interno se o conteúdo for maior */
    /* Esconde scrollbar interna também */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.page-section::-webkit-scrollbar { display: none; }
.page-section.active {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== HERO ===================== */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 24px;
}
.hero p {
    font-size: 1rem;
    color: var(--text-sub);
    max-width: 560px;
    margin-bottom: 40px;
    font-family: sans-serif;
    font-weight: 400;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ===================== SECTION CONTENT ===================== */
.section-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
}
.container { max-width: 1100px; margin: 0 auto; width: 100%; }

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-sub);
    font-family: sans-serif;
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 16px 40px rgba(26,115,232,0.12);
}
.card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}
.card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.card p {
    font-size: 0.85rem;
    color: var(--text-sub);
    font-family: sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* ===================== SOBRE ===================== */
.sobre-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.manifesto-card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    grid-column: 1 / -1;
    margin-bottom: 30px;
}
.manifesto-card h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text);
}
.manifesto-card p {
    font-family: sans-serif;
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.8;
}
.member-card { text-align: center; }
.member-card h3 { font-size: 1rem; margin-bottom: 6px; }

.photo-mask {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    overflow: hidden;
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(26,115,232,0.15);
    background: #000;
}
.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.5s ease;
}
.member-card:hover .member-photo {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.member-role {
    display: block;
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* ===================== APOIO ===================== */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.support-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}
.support-list li {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-sub);
    position: relative;
    padding-left: 24px;
}
.support-list li::before {
    content: '◈';
    position: absolute;
    left: 0;
    color: var(--primary);
}
.bank-details {
    background: rgba(0,0,0,0.03);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.8;
}
.btn-pix { width: 100%; justify-content: center; }
.status-msg {
    display: none;
    font-size: 0.7rem;
    color: #34c759;
    text-align: center;
    margin-top: 8px;
    font-weight: 700;
}
.status-msg.visible { display: block; animation: fadeIn 0.3s ease; }

.subscription-tiers { margin-top: 60px; }
.tiers-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.tier-card {
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s, border-color 0.3s;
    border-left: 4px solid var(--glass-border);
}
.tier-card h4 { font-size: 0.9rem; margin-bottom: 8px; color: var(--text); }
.tier-card span { font-size: 1rem; font-weight: 900; color: var(--primary); }

.tier-card.bronze { border-left-color: #cd7f32; }
.tier-card.prata { border-left-color: #c0c0c0; }
.tier-card.ouro { border-left-color: #ffd700; }
.tier-card.diamante { border-left-color: #00e5ff; }
.tier-card.platina { border-left-color: #3a3a3a; }

.tier-card:hover { transform: translateY(-8px); border-color: var(--primary); }

/* ===================== CHAT PANEL ===================== */
.chat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.2);
    z-index: 199;
    backdrop-filter: blur(2px);
}
.chat-overlay.open { display: block; animation: fadeOverlay 0.3s ease; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.chat-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -45%) scale(0.85); /* Efeito balão inflando */
    opacity: 0;
    pointer-events: none;
    width: 400px;
    max-width: 92vw;
    height: 80vh;
    max-height: 650px;
    z-index: 200;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 15px 45px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Garante que as quinas arredondadas funcionem */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-panel.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.chat-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.8);
}
.chat-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.chat-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34c759;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(52,199,89,0); }
}
.chat-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-sub);
    line-height: 1;
    transition: color 0.2s;
    font-family: sans-serif;
}
.chat-close:hover { color: var(--text); }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}
.chat-bubble {
    max-width: 82%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
    font-family: sans-serif;
}
.chat-bubble.assistant {
    background: rgba(26,115,232,0.08);
    border: 1px solid rgba(26,115,232,0.15);
    border-radius: 18px 18px 18px 4px;
    align-self: flex-start;
    color: var(--text);
}
.chat-bubble.user {
    background: var(--primary);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    align-self: flex-end;
}
.chat-bubble.typing {
    background: rgba(26,115,232,0.06);
    align-self: flex-start;
    border-radius: 18px 18px 18px 4px;
}
.typing-dots span {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--text-sub);
    border-radius: 50%;
    margin: 0 2px;
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

.chat-whatsapp-btn {
    margin: 0 16px 12px;
    display: none;
    padding: 12px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}
.chat-whatsapp-btn.visible { display: block; }
.chat-whatsapp-btn:hover { background: #1da851; transform: translateY(-1px); }

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.5); /* Mais transparente para integrar melhor */
    backdrop-filter: blur(10px);
}
.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: sans-serif;
    font-size: 0.88rem;
    background: #f8f9fa;
    transition: border-color 0.2s;
    outline: none;
}
.chat-input-area input:focus { border-color: var(--primary); background: #fff; }
.chat-send-btn {
    width: 44px; height: 44px;
    border-radius: 6px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.chat-send-btn:hover { background: #1557b0; transform: scale(1.05); }

/* ===================== FOOTER ===================== */
footer {
    background: transparent;
    padding: 16px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0; /* não encolhe no flex container do #app */
}
.footer-meta {
    font-size: 0.72rem;
    color: var(--text-sub);
    font-family: sans-serif;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}
/* Footer glitch: apenas o texto colorido, sem animação (escala pequena) */
.footer-glitch {
    font-size: 0.72rem;
    display: inline-block;
    color: var(--text);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}
/* Remove animação glitch no footer */
.footer-glitch::before,
.footer-glitch::after {
    animation: none !important;
    display: none;
}
.footer-team-tag {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 3px rgba(201,168,0,0.4);
    vertical-align: super;
    line-height: 1;
    margin-left: 2px;
    position: relative;
    top: -0.5em;
}

/* ===================== RESPONSIVE ===================== */

/* --- Tablet: shrink nav font, keep single row --- */
@media (max-width: 960px) {
    .glitch { font-size: 1.4rem; }
    nav a { font-size: 0.72rem; padding: 7px 10px; }
    .header-container { padding: 0 16px; gap: 8px; }
}

/*
 * --- Mobile/Small tablet: 2-row header ---
 * Row 1: [Brand]  ............  [Nos Apoie]
 * Row 2: [Nav links - scrollable horizontal]
 * --header-h é atualizado aqui, então calc(100vh - var(--header-h))
 * em #app e .page-section se auto-ajusta automaticamente.
 */
@media (max-width: 768px) {
    :root { --header-h: 112px; }

    header {
        height: var(--header-h);
    }

    .header-container {
        flex-wrap: wrap;          /* permite 2 linhas */
        align-content: flex-start;
        justify-content: center;  /* centraliza horizontalmente a linha 1 */
        padding: 0 12px;
        height: var(--header-h);
        gap: 0;
    }

    /* === Linha 1: Brand + Botão === */
    .brand {
        flex: 0 1 auto; /* não ocupa 100% da linha, permitindo centralizar junto com o botão */
        order: 1;
        padding-top: 14px; /* ajuste vertical */
        align-self: center;
        margin-right: 14px; /* espaço horizontal entre a logo e o botão */
    }
    .glitch { font-size: 1.1rem; }

    /* Botão 'Nos Apoie' — encolhe proporcional */
    header .btn {
        order: 2;
        align-self: center;
        margin-top: 14px; /* mesmo ajuste vertical da logo */
        font-size: 0.58rem;
        padding: 7px 12px;
        white-space: nowrap;
        letter-spacing: 0.5px;
    }

    /* === Linha 2: Nav full-width com scroll horizontal === */
    nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-top: 10px; /* espaço vertical entre a linha 1 e a linha 2 */
        padding-bottom: 6px;
    }
    nav::-webkit-scrollbar { display: none; }
    nav ul {
        flex-wrap: nowrap;
        justify-content: center; /* centraliza os links da nav */
        gap: 4px;
        padding: 0 0 2px 0;
    }
    nav a {
        font-size: 0.6rem;
        padding: 5px 9px;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }

    /* Hero e layout */
    .hero h1 { font-size: 1.7rem; }
    .sobre-wrap { grid-template-columns: 1fr; }
    
    /* Botão Fale Conosco fixo na base no mobile */
    #btn-fale-conosco {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 88%;
        justify-content: center;
        z-index: 1000;
        box-shadow: 0 6px 20px rgba(26,115,232,0.3);
    }
}

/* --- Small phones: reduz ainda mais --- */
@media (max-width: 375px) {
    :root { --header-h: 108px; }
    .glitch { font-size: 0.95rem; }
    header .btn { font-size: 0.52rem; padding: 6px 10px; }
    nav a { font-size: 0.55rem; padding: 5px 7px; }
    .hero h1 { font-size: 1.4rem; }
}
