/**
 * Torres Arboleda · Sistema Tipográfico Premium Centralizado
 *
 * Arquitectura Tipográfica:
 * 1. Primaria / UI / Métricas: 'Manrope' (Humanista, geométrica refinada, óptima para ERP y lectura técnica)
 * 2. Editorial / Prestigio: 'Newsreader' (Serif editorial contemporánea para grandes titulares y citas institucionales)
 * 3. Monospace: 'JetBrains Mono' / 'SF Mono' (Para códigos CIIU, hashes y tokens de auditoría)
 *
 * Características:
 * - Soporte diacrítico completo (español: á, é, í, ó, ú, ü, ñ, ¿, ¡)
 * - Números tabulares automáticos para finanzas y tablas
 * - Escala tipográfica fluida y consistente
 * - Respeto de WCAG 2.2 AA y zoom al 200%
 */

/* ==========================================================================
   1. DECLARACIONES @FONT-FACE (WOFF2 LOCALES OPTIMIZADOS)
   ========================================================================== */

/* --- MANROPE (400, 500, 600, 700, 800) --- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- NEWSREADER (Serif Editorial: 400, 400 Italic, 600, 600 Italic, 700) --- */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/newsreader-italic-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/newsreader-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/newsreader-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/newsreader-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/newsreader-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. SISTEMA DE TOKENS TIPOGRÁFICOS (:root)
   ========================================================================== */
:root {
  /* Familias Tipográficas */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, Monaco, monospace;

  /* Asignaciones Semánticas */
  --font-primary: var(--font-sans);
  --font-display: var(--font-serif);
  --font-interface: var(--font-sans);
  --font-code: var(--font-mono);

  /* Compatibilidad Bootstrap & Sneat */
  --bs-body-font-family: var(--font-sans);
  --bs-font-sans-serif: var(--font-sans);
  --bs-font-monospace: var(--font-mono);

  /* Escala de Tamaños (Fluid & Modular) */
  --text-3xs: 0.625rem;   /* 10px - Micro etiquetas y notas legales mínimas */
  --text-2xs: 0.6875rem;  /* 11px - Indicadores secundarios y metadata comprimida */
  --text-xs:  0.75rem;    /* 12px - Badges, captions, tooltips, hints */
  --text-sm:  0.84375rem; /* 13.5px - Tablas densas, campos de formulario, navegación lateral */
  --text-base: 0.9375rem; /* 15px - Cuerpo de texto en ERP y dashboards */
  --text-md:  1.0625rem;  /* 17px - Cuerpo de lectura editorial y extractos */
  --text-lg:  1.1875rem;  /* 19px - Subtítulos destacados, headers de tarjetas */
  --text-xl:  1.375rem;   /* 22px - H4 y títulos modales */
  --text-2xl: 1.625rem;   /* 26px - H3 y títulos de secciones secundarias */
  --text-3xl: 2.0rem;     /* 32px - H2 y encabezados de página */
  --text-4xl: 2.625rem;   /* 42px - H1 de landing pages y títulos de artículos */
  --text-5xl: 3.5rem;     /* 56px - Hero principal */

  /* Pesos Tipográficos */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Alturas de Línea (Line Heights) */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.28;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;
  --leading-loose: 1.85;

  /* Espaciado Entre Letras (Tracking) */
  --tracking-tighter: -0.035em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.06em;
  --tracking-widest: 0.12em;
}

/* ==========================================================================
   3. REGLAS BASE GLOBALES DE RENDERIZADO TIPOGRÁFICO
   ========================================================================== */
html, body {
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Textos editoriales y de contenido */
p {
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-normal);
}

/* Encabezados por defecto con jerarquía armónica */
h1, .h1 {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--brand, var(--ta-green, #023524));
}

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

h3, .h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
}

h4, .h4 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-normal);
}

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

h6, .h6 {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ==========================================================================
   4. CLASES DE UTILIDAD TIPOGRÁFICA
   ========================================================================== */

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

.font-serif,
.font-display,
.font-editorial {
  font-family: var(--font-serif) !important;
}

.font-mono {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* Grandes Titulares Editoriales (Prestigio para Landing, Hero, Artículos y Citas) */
.hero-editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.5vw, 3.75rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--brand, var(--ta-green, #023524));
  text-wrap: balance;
}

.section-editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--brand, var(--ta-green, #023524));
}

.article-editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: var(--brand, var(--ta-green, #023524));
  text-wrap: balance;
}

.lead-editorial {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: #4b5563;
  font-weight: var(--font-weight-regular);
}

.editorial-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.45;
  color: var(--brand, #023524);
  border-left: 3px solid var(--gold, #b68737);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
}

/* Eyebrows, Overlines y Metadata de Categoría */
.eyebrow-caps,
.workspace-label,
.catalog-menu-label {
  font-family: var(--font-sans);
  font-size: var(--text-3xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold, #b68737);
}

/* Badges y Etiquetas de Estado */
.badge-label,
.role-badge,
.tag-badge {
  font-family: var(--font-sans);
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1.3;
}

/* ==========================================================================
   5. TRATAMIENTO DE DATOS, TABLAS Y CIFRAS NUMÉRICAS (TABULAR NUMS)
   ========================================================================== */
.tabular-nums,
.table td.tabular-nums,
.document-cell,
.amount-cell,
.kpi-number,
.stat-card strong,
.invoice-number strong,
.invoice-numeric,
.invoice-net strong,
.price-value,
.account-number,
.date-cell {
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

.amount-cell {
  text-align: right;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.kpi-number {
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.025em;
  line-height: var(--leading-none);
}

/* ==========================================================================
   6. RESPONSIVIDAD Y AJUSTES DE ESCALA
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --text-3xl: 1.75rem;
    --text-4xl: 2.2rem;
    --text-5xl: 2.75rem;
  }
}
