/* ==========================================================================
   DESIGN SYSTEM - BÍBLIA SAGRADA & ASSISTENTE RAG
   Identidade Visual: Azul Profundo, Azul Suave, Dourado Discreto e Neutros
   ========================================================================== */

:root {
    /* Cores Principais - Tema Claro */
    --primary: #1e3a8a;          /* Azul Profundo Majestoso */
    --primary-dark: #0f172a;     /* Azul Quase Preto */
    --primary-light: #2563eb;    /* Azul Real */
    --secondary: #0284c7;        /* Azul Céu Suave */
    --secondary-light: #e0f2fe;  /* Azul Glacial Fundo */
    --accent-gold: #d97706;      /* Dourado Nobre */
    --accent-gold-light: #fef3c7;/* Dourado Fundo Suave */
    
    /* Superfícies e Fundos */
    --background: #f8fafc;       /* Cinza Muito Claro Fundo */
    --surface: #ffffff;          /* Branco Puro Cards */
    --surface-elevated: #ffffff; /* Cards Elevados */
    --surface-hover: #f1f5f9;    /* Hover de Superfície */
    --surface-subtle: #f8fafc;   /* Fundo Leve */
    
    /* Tipografia e Cores de Texto */
    --text-primary: #0f172a;     /* Preto Azulado Principal */
    --text-secondary: #475569;   /* Cinza Médio Legível */
    --text-muted: #94a3b8;       /* Cinza Claro Suave */
    --text-inverse: #ffffff;     /* Texto em Fundo Escuro */
    
    /* Bordas e Divisores */
    --border: #e2e8f0;           /* Borda Padrão */
    --border-focus: #3b82f6;     /* Borda Foco Ativo */
    --border-subtle: #f1f5f9;    /* Divisor Quase Invisível */
    
    /* Status e Feedback */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Sombras */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 6px 0 rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.10), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-gold: 0 4px 20px -2px rgba(217, 119, 6, 0.25);
    
    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Raios de Borda */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Fontes */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    --font-serif: 'Lora', 'Merriweather', Georgia, serif;
    
    /* Alturas de Layout */
    --header-height: 72px;
}

/* ==========================================================================
   TEMA ESCURO (DARK MODE)
   ========================================================================== */

[data-theme="dark"] {
    --primary: #3b82f6;          /* Azul Vibrante para Destaque no Escuro */
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #38bdf8;
    --secondary-light: #082f49;
    --accent-gold: #fbbf24;
    --accent-gold-light: #451a03;
    
    --background: #0b1329;       /* Azul Escuro Noturno */
    --surface: #131e3d;          /* Card Noturno */
    --surface-elevated: #1a274e; /* Card Elevado Noturno */
    --surface-hover: #1e2d58;
    --surface-subtle: #0f1a38;
    
    --text-primary: #f8fafc;     /* Branco Suave */
    --text-secondary: #cbd5e1;   /* Cinza Claro Noturno */
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    
    --border: #1e293b;
    --border-focus: #60a5fa;
    --border-subtle: #17223b;
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 6px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 4px 20px -2px rgba(251, 191, 36, 0.2);
}

/* ==========================================================================
   RESET GLOBAL & ESTILOS BASE
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-light);
}

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

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   CONTAINERS & ESTRUTURA DE PÁGINA
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.container-narrow {
    max-width: 860px;
}

.container-wide {
    max-width: 1400px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--accent-gold);
    color: #ffffff;
    padding: 10px 16px;
    z-index: 9999;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: 20px;
}

/* ==========================================================================
   UTILITÁRIOS VISUAIS
   ========================================================================== */

.text-gold { color: var(--accent-gold); }
.text-primary-color { color: var(--primary); }
.text-secondary-color { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-surface { background-color: var(--surface); }
.bg-subtle { background-color: var(--surface-subtle); }

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

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--secondary-light);
    color: var(--primary);
}

[data-theme="dark"] .badge-primary {
    background-color: var(--secondary-light);
    color: var(--secondary);
}

.badge-gold {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold);
}

/* Acessibilidade - Foco Visível */
*:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}
