/**
 * Reset e Base - Normalizações fundamentais
 * 
 * ESPECIFICIDADE: Nível 1 - Elementos simples
 * PRIORIDADE: Carregamento #2
 * CUIDADO: Não usar !important aqui
 */

/* ===== FORÇAR TEMA CLARO - DESABILITAR MODO ESCURO ===== */
/* Força o tema claro em todo o site, ignorando preferência do sistema */
:root {
    color-scheme: light !important;
}

html,
body {
    color-scheme: light !important;
}

/* Desabilita completamente qualquer estilo de modo escuro */
@media (prefers-color-scheme: dark) {
    :root,
    html,
    body {
        color-scheme: light !important;
        background-color: #ffffff !important;
        color: #333333 !important;
    }
}

/* ===== RESET BÁSICO ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== ELEMENTOS BASE ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== TIPOGRAFIA BASE ===== */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--spacing-md) 0;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark-gray);
}

p {
    margin: 0 0 var(--spacing-md) 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== LISTAS ===== */
ul, ol {
    margin: 0 0 var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

li {
    margin-bottom: var(--spacing-xs);
}

/* ===== FORMULÁRIOS ===== */
button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    border: 1px solid var(--gray);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
}

/* ===== MÍDIA ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== UTILITÁRIOS DE LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-md) * -0.5);
}

.col {
    flex: 1;
    padding: 0 calc(var(--spacing-md) * 0.5);
}

/* ===== VISIBILIDADE ===== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== SECTIONS GERAIS ===== */
.section {
    padding: var(--spacing-3xl) 0;
}

.section--dark {
    background-color: var(--black);
    color: var(--white);
}

.section--light {
    background-color: var(--light-gray);
}

/* ===== SECTION HEADERS ===== */
.section__header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section__tag {
    display: inline-block;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.section__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--black);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.section__description {
    font-size: var(--font-size-lg);
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Classes de compatibilidade (antigas) */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-tag {
    display: inline-block;
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--black);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== HIGHLIGHTS E ELEMENTOS COMUNS ===== */
.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
/* Foco visível para navegação por teclado */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Links skip para acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* ===== MELHORIAS DE UX ===== */
/* Transições suaves em interações */
button,
a,
input,
textarea,
select {
    transition: all var(--transition-normal);
}

/* Estados hover mais acessíveis */
button:hover:not(:disabled),
a:hover {
    transform: translateY(-1px);
}

/* Cursor adequado para elementos interativos */
button,
a,
input[type="submit"],
input[type="button"],
label {
    cursor: pointer;
}

/* Elementos desabilitados */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== SCROLL SUAVE E PERFORMANCE ===== */
/* Scroll container otimizado */
.scroll-container {
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* ===== RESPONSIVIDADE GLOBAL ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section__header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section__title {
        font-size: var(--font-size-xl);
    }
}

@media (max-width: 576px) {
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .footer,
    .scroll-indicator,
    .back-to-top,
    [data-aos] {
        display: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .section {
        page-break-inside: avoid;
    }
}
