/* typography.css */

/* Importar fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
        /* Sistema tipográfico principal */
        --font-logo: 'Orbitron', sans-serif;       /* Solo para el logo principal */
        --font-display: 'Space Grotesk', sans-serif; /* Para títulos y elementos destacados */
        --font-body: 'Inter', sans-serif;           /* Para texto general y UI */
    
    /* Tamaños refinados siguiendo escala modular */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.1rem + 0.25vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.2rem + 0.25vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.4rem + 0.5vw, 2rem);
    --text-3xl: clamp(2rem, 1.8rem + 1vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 2.3rem + 1.5vw, 3.5rem);
    
    /* Pesos de fuente optimizados */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Espaciado de letras ajustado para aspecto futurista */
    --tracking-tight: -0.02em;
    --tracking-normal: 0.01em;  /* Ligeramente espaciado para modernidad */
    --tracking-wide: 0.05em;    /* Más espaciado para títulos futuristas */
}

/* Estilos base */
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    font-weight: var(--font-regular);
    color: #2c3e50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Jerarquía futurista de encabezados */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    margin-top: 0;
    line-height: 1.2;
    font-weight: var(--font-medium);
}

h1, .h1 {
    position: relative;
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    background: linear-gradient(120deg, #1a237e, #534bae, #1a237e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 5s ease infinite;
    text-shadow: 0px 2px 4px rgba(26,35,126,0.1);
}

h2, .h2 {
    font-size: var(--text-3xl);
    background: linear-gradient(120deg, #1a237e, #534bae);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

/* Logo futurista */
.logo {
    font-family: var(--font-logo);
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
}
.logo-full {
    font-family: var(--font-display);
    font-weight: var(--font-light);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* Navegación moderna */
.nav-link {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* Contenido principal */
p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    margin-bottom: 1.5em;
}

/* Elementos de control */
button, .button {
    font-family: var(--font-display);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

input, select, textarea {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

/* Estadísticas y números con aspecto tecnológico */
.stats-value {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-normal);
}

/* Valores y métricas */
.metric-value, .gini-value {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    font-size: var(--text-3xl);
    letter-spacing: var(--tracking-tight);
    background: linear-gradient(120deg, #1a237e, #534bae);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.metric-label {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* Análisis y descripción */
.analysis-text, 
.comparison-text {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--neutral, #2c3e50);
}

/* Clases de utilidad */
.font-display {
    font-family: var(--font-display) !important;
}

.font-body {
    font-family: var(--font-body) !important;
}

.font-number {
    font-feature-settings: "tnum" 1, "lnum" 1;
}


/* Efecto para valores numéricos importantes */
.gini-value, .metric-value {
    position: relative;
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    background: linear-gradient(120deg, #1a237e, #534bae);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gini-value::after, .metric-value::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 4px;
    height: 4px;
    background: #1a237e;
    border-radius: 50%;
    animation: blink 2s infinite;
}


/* Animaciones */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}



/* Efecto hover en la navegación */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1a237e, transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: translateX(100%);
}














/* Resto del código igual... */

.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); }

.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* Ajustes para características OpenType */
.caps {
    font-variant-caps: small-caps;
    letter-spacing: 0.05em;
}

.liga {
    font-feature-settings: "liga" 1, "dlig" 1;
}

/* Optimizaciones de renderizado */
@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min-resolution: 2dppx) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    :root {
        /* Ajustamos tamaños para móvil */
        --text-4xl: clamp(2rem, 1.8rem + 1vw, 2.5rem);
        --text-3xl: clamp(1.8rem, 1.6rem + 1vw, 2rem);
        --text-2xl: clamp(1.4rem, 1.2rem + 0.5vw, 1.6rem);
    }

    .metric-value, 
    .gini-value {
        font-size: var(--text-2xl);
    }

    .analysis-text, 
    .comparison-text {
        font-size: var(--text-base);
        line-height: 1.6;
    }
}