/* ==========================================================================
   DESIGN SYSTEM - NEXTBRND PORTAIS DE CLIENTE
   Estilo: Dark Mode Tecnológico, Sofisticado e Limpo
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Cores do Sistema (Tokens HSL) */
    --color-bg-deep: hsl(222, 47%, 6%);       /* Azul Escuro Profundo / Espacial */
    --color-bg-card: hsl(222, 47%, 10%);      /* Fundo de Painéis e Secções */
    --color-bg-card-hover: hsl(222, 47%, 14%);/* Hover de Painéis */
    
    --color-text-primary: hsl(210, 40%, 98%); /* Branco Técnico */
    --color-text-muted: hsl(215, 20%, 65%);   /* Cinza Técnico Suave */
    
    --color-accent-blue: hsl(217, 91%, 60%);  /* Azul Tecnológico Principal */
    --color-accent-purple: hsl(263, 70%, 50%);/* Roxo de Inovação */
    --color-accent-glow: rgba(59, 130, 246, 0.15);
    
    --color-error: hsl(0, 84%, 60%);          /* Vermelho Alerta (Dor) */
    --color-success: hsl(142, 71%, 45%);      /* Verde de Confirmação */
    
    /* Tipografia */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Efeitos */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);
    --shadow-purple-glow: 0 0 30px rgba(139, 92, 246, 0.2);
    
    --border-glass: 1px solid rgba(255, 255, 255, 0.07);
    --border-glass-focus: 1px solid rgba(59, 130, 246, 0.4);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* 1. Resets e Configuração Global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-bg-deep);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea {
    font-family: inherit;
    background: none;
    border: none;
    color: inherit;
}

/* 2. Layouts Utilitários */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 7rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4.5rem 0;
    }
}

/* 3. Tipografia Utilitária */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #ffffff 40%, var(--color-accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. Componentes Globais - Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-purple) 100%);
    box-shadow: var(--shadow-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent-purple) 0%, var(--color-accent-blue) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 2;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border: var(--border-glass-focus);
    transform: translateY(-2px);
}

/* 5. Cabeçalho (Navbar) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(6, 12, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-glass);
}

.nav-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent-blue);
    box-shadow: var(--shadow-glow);
}

/* 6. Secção Hero (Acima da Dobra) */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 80px;
    overflow: hidden;
}

/* Background com Efeitos de Glow */
.hero-glow-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-glow-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent-blue);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-weight: 400;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.hero-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.hero-social-icon {
    width: 20px;
    height: 20px;
    fill: var(--color-success);
}

/* 7. Secção do Problema (O Agitar da Dor) */
.problem {
    background-color: var(--color-bg-card);
    border-top: var(--border-glass);
    border-bottom: var(--border-glass);
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.problem-card {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-glass);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-error);
    transition: var(--transition-smooth);
}

.problem-card:hover::before {
    height: 100%;
}

.problem-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-md);
}

.problem-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-error);
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.problem-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* 8. Secção da Solução (A Engenharia) */
.solution {
    position: relative;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-glass);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
}

.solution-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.solution-card:hover::after {
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-purple) 100%);
}

.solution-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-glow);
}

.solution-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--color-accent-blue);
}

.solution-card:nth-child(2) .solution-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-accent-purple);
}

.solution-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.solution-card p {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* 9. Secção do Simulador de Nicho (Ecrã Funcional) */
.simulator {
    background-color: var(--color-bg-card);
    border-top: var(--border-glass);
    border-bottom: var(--border-glass);
    position: relative;
}

.simulator-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .simulator-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.selector-card {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.selector-card.active {
    background: rgba(59, 130, 246, 0.08);
    border: var(--border-glass-focus);
    box-shadow: var(--shadow-glow);
}

.selector-card:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.selector-icon {
    width: 28px;
    height: 28px;
    color: var(--color-text-muted);
    transition: var(--transition-smooth);
}

.selector-card.active .selector-icon {
    color: var(--color-accent-blue);
    transform: scale(1.1);
}

.selector-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Janela do Simulador (Mockup de Software) */
.simulator-window {
    background: hsl(222, 47%, 4%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: var(--shadow-md), 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

/* Barra superior do mockup */
.window-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-dots {
    display: flex;
    gap: 0.5rem;
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.window-dot.close { background-color: #ef4444; }
.window-dot.minimize { background-color: #f59e0b; }
.window-dot.maximize { background-color: #10b981; }

.window-url {
    background: rgba(255, 255, 255, 0.04);
    border: var(--border-glass);
    border-radius: 6px;
    padding: 0.3rem 3rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

/* Conteúdo da janela */
.window-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
}

@media (max-width: 480px) {
    .window-content {
        padding: 1.5rem;
    }
}

/* Layouts internos específicos para cada Nicho no mockup */
.mock-dashboard {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mock-dashboard.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 1;
}

.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.mock-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
}

.mock-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.mock-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-purple) 100%);
}

/* Grelha de Informações do Mockup */
.mock-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .mock-grid {
        grid-template-columns: 1fr;
    }
}

.mock-card {
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-glass);
    border-radius: 8px;
    padding: 1.25rem;
}

.mock-card h5 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Listagem de itens ou tabelas simuladas */
.mock-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.9rem;
}

.mock-status {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: hsl(35, 94%, 50%); }

/* Ação Interativa no Simulador */
.mock-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mock-action-box:hover {
    border-color: var(--color-accent-blue);
    background: rgba(59, 130, 246, 0.02);
}

.mock-action-icon {
    width: 32px;
    height: 32px;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.mock-btn-upload {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent-blue);
    cursor: pointer;
    transition: var(--transition-fast);
}

.mock-btn-upload:hover {
    background: var(--color-accent-blue);
    color: white;
}

/* Estado de Feedback Animado do Upload */
.feedback-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 26, 0.95);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
    border-radius: 0 0 16px 16px;
}

.feedback-overlay.active {
    display: flex;
}

.feedback-loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--color-accent-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 1.5rem;
}

.feedback-success-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-success);
    margin-bottom: 1.5rem;
    display: none;
}

.feedback-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feedback-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    text-align: center;
    max-width: 320px;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 10. Secção da Arquitetura (Confiança Técnica) */
.architecture-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .architecture-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.architecture-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.architecture-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.arch-feature {
    display: flex;
    gap: 1rem;
}

.arch-feature-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-accent-blue);
}

.arch-feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.arch-feature-text p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Bloco Visual do Supabase / Engenharia */
.architecture-visual {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.08) 0%, rgba(0,0,0,0) 70%);
    border: var(--border-glass);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.arch-supabase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: var(--color-success);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.arch-tech-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-row {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tech-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.tech-value {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--color-accent-blue);
}

.tech-row.success .tech-value {
    color: var(--color-success);
}

/* 11. CTA Final / Fecho Letal */
.cta-final {
    position: relative;
    background: linear-gradient(180deg, var(--color-bg-deep) 0%, var(--color-bg-card) 100%);
    border-top: var(--border-glass);
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .cta-content h2 {
        font-size: 2.2rem;
    }
}

.cta-desc {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

/* 12. Footer */
.footer {
    background: var(--color-bg-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3rem 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

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

@media (max-width: 580px) {
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

.footer-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
