/* ==========================================
   SISTEMA DE TIPOGRAFIA BUSCALEGIS
   ========================================== */

/* Import das fontes principais */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==========================================
   VARIÁVEIS DE TIPOGRAFIA
   ========================================== */
:root {
    /* Font Family */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Font Sizes - Sistema escalável */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
}

/* ==========================================
   CLASSES UTILITÁRIAS DE TEXTO
   ========================================== */

/* Tamanhos de Texto */
.text-xs {
    font-size: var(--text-xs);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-base {
    font-size: var(--text-base);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-xl {
    font-size: var(--text-xl);
}

.text-2xl {
    font-size: var(--text-2xl);
}

.text-3xl {
    font-size: var(--text-3xl);
}

.text-4xl {
    font-size: var(--text-4xl);
}

/* Pesos de Fonte */
.font-light {
    font-weight: var(--font-light);
}

.font-normal {
    font-weight: var(--font-normal);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* Line Heights */
.leading-tight {
    line-height: var(--leading-tight);
}

.leading-snug {
    line-height: var(--leading-snug);
}

.leading-normal {
    line-height: var(--leading-normal);
}

.leading-relaxed {
    line-height: var(--leading-relaxed);
}

.leading-loose {
    line-height: var(--leading-loose);
}

/* ==========================================
   COMPONENTES TIPOGRÁFICOS
   ========================================== */

/* Títulos Hierárquicos */
.heading-1 {
    font-family: var(--font-primary);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

.heading-2 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

.heading-3 {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

.heading-4 {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

.heading-5 {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.heading-6 {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

/* Texto Corpo */
.body-large {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
}

.body-normal {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.body-small {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-secondary);
}

/* Labels e UI Text */
.label-large {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.label-medium {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.label-small {
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* Caption e Metadados */
.caption {
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-light);
}

/* Código */
.code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-primary);
}

/* ==========================================
   ESTILOS BASE DO SISTEMA
   ========================================== */

/* Reset e Base */
* {
    font-family: var(--font-primary);
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Títulos HTML */
h1,
.h1 {
    font-family: var(--font-primary);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h2,
.h2 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

h3,
.h3 {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

h4,
.h4 {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

h5,
.h5 {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

h6,
.h6 {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

/* Parágrafos */
p {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Links */
a {
    font-family: var(--font-primary);
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Inputs e Forms */
input,
textarea,
select {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
}

/* Buttons */
button {
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
}

/* ==========================================
   RESPONSIVIDADE TIPOGRÁFICA
   ========================================== */

/* Mobile */
@media (max-width: 768px) {
    :root {
        --text-xs: 0.6875rem;
        /* 11px */
        --text-sm: 0.8125rem;
        /* 13px */
        --text-base: 0.9375rem;
        /* 15px */
        --text-lg: 1.0625rem;
        /* 17px */
        --text-xl: 1.1875rem;
        /* 19px */
        --text-2xl: 1.375rem;
        /* 22px */
        --text-3xl: 1.625rem;
        /* 26px */
        --text-4xl: 2rem;
        /* 32px */
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --text-xs: 0.71875rem;
        /* 11.5px */
        --text-sm: 0.84375rem;
        /* 13.5px */
        --text-base: 0.96875rem;
        /* 15.5px */
        --text-lg: 1.09375rem;
        /* 17.5px */
        --text-xl: 1.21875rem;
        /* 19.5px */
        --text-2xl: 1.4375rem;
        /* 23px */
        --text-3xl: 1.75rem;
        /* 28px */
        --text-4xl: 2.125rem;
        /* 34px */
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }

    h1 {
        font-size: 18pt;
    }

    h2 {
        font-size: 16pt;
    }

    h3 {
        font-size: 14pt;
    }

    h4 {
        font-size: 13pt;
    }

    h5 {
        font-size: 12pt;
    }

    h6 {
        font-size: 11pt;
    }
}