/**
 * PUDMARK — Design System Typography
 * Familia única: Aileron (+ Inter / Segoe UI fallback)
 * Solo tipografía: no altera colores, espaciados ni layout.
 */

:root {
    --pmk-font-family: 'Aileron', 'Inter', 'Segoe UI', sans-serif;

    --pmk-text-h1-size: 34px;
    --pmk-text-h1-weight: 800;
    --pmk-text-h2-size: 28px;
    --pmk-text-h2-weight: 700;
    --pmk-text-h3-size: 22px;
    --pmk-text-h3-weight: 600;
    --pmk-text-h4-size: 18px;
    --pmk-text-h4-weight: 600;

    --pmk-text-body-size: 16px;
    --pmk-text-body-weight: 400;

    --pmk-text-label-size: 14px;
    --pmk-text-label-weight: 600;

    --pmk-text-secondary-size: 13px;
    --pmk-text-secondary-weight: 400;

    --pmk-text-badge-size: 12px;
    --pmk-text-badge-weight: 600;
}

/* Unifica pesos Aileron legacy (fontaileron.css) bajo una sola familia */
@font-face {
    font-family: 'Aileron';
    src: local('aileronlight');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aileron';
    src: local('aileronregular');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aileron';
    src: local('aileronregular');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aileron';
    src: local('aileronbold');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aileron';
    src: local('aileronbold');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aileron';
    src: local('aileronbold');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

html {
    font-family: var(--pmk-font-family);
    font-size: var(--pmk-text-body-size);
    font-weight: var(--pmk-text-body-weight);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* Jerarquía semántica */
h1,
.h1 {
    font-family: inherit;
    font-size: var(--pmk-text-h1-size);
    font-weight: var(--pmk-text-h1-weight);
    line-height: 1.15;
}

h2,
.h2 {
    font-family: inherit;
    font-size: var(--pmk-text-h2-size);
    font-weight: var(--pmk-text-h2-weight);
    line-height: 1.2;
}

h3,
.h3 {
    font-family: inherit;
    font-size: var(--pmk-text-h3-size);
    font-weight: var(--pmk-text-h3-weight);
    line-height: 1.25;
}

h4,
.h4 {
    font-family: inherit;
    font-size: var(--pmk-text-h4-size);
    font-weight: var(--pmk-text-h4-weight);
    line-height: 1.3;
}

h5,
.h5,
h6,
.h6 {
    font-family: inherit;
    font-weight: var(--pmk-text-h4-weight);
}

p,
li,
td,
th,
dd,
dt,
blockquote {
    font-family: inherit;
    font-size: var(--pmk-text-body-size);
    font-weight: var(--pmk-text-body-weight);
}

/* Labels y formularios */
label,
.control-label,
.form-label,
.col-form-label,
.pmk-label {
    font-family: inherit;
    font-size: var(--pmk-text-label-size);
    font-weight: var(--pmk-text-label-weight);
}

input,
select,
textarea,
.form-control,
.custom-select,
.pmk-input,
.pmk-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    font-family: inherit !important;
    font-size: var(--pmk-text-body-size);
    font-weight: var(--pmk-text-body-weight);
}

input::placeholder,
textarea::placeholder {
    font-family: inherit;
    font-weight: var(--pmk-text-body-weight);
}

/* Texto secundario */
small,
.small,
.text-muted,
.text-secondary,
.pmk-text-secondary,
.help-block,
.form-text,
.pmk-muted {
    font-family: inherit;
    font-size: var(--pmk-text-secondary-size);
    font-weight: var(--pmk-text-secondary-weight);
}

/* Badges y estados */
.badge,
.label,
.pmk-badge,
.pmk-pill,
.pmk-chip,
.pmk-status-pill,
.pmk-tag,
[class*="-badge"]:not([class*="fa-"]),
[class*="-pill"]:not([class*="fa-"]) {
    font-family: inherit;
    font-size: var(--pmk-text-badge-size);
    font-weight: var(--pmk-text-badge-weight);
}

/* Navegación, modales, tablas, chat */
.navbar,
.navbar-nav,
.dropdown-menu,
.modal,
.modal-title,
.table,
.card,
.card-title,
.card-header,
.panel,
.panel-heading,
.lobibox-notify,
.pmk-notif-item,
.pmk-profile-menu-item,
#navbar-p,
#sidebar,
.pmk-sidebar-stat-label,
.pmk-sidebar-stat-value {
    font-family: inherit;
}

button,
.btn,
a.btn,
.pmk-btn {
    font-family: inherit;
}

/* Preservar iconografía */
.fa,
.fas,
.far,
.fab,
.fal,
[class^="fa-"],
[class*=" fa-"],
.summernote .note-icon-caret,
.glyphicon {
    font-family: FontAwesome !important;
    font-weight: normal !important;
}

/* Normalización global: una sola familia en toda la plataforma */
body :where(:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.glyphicon):not(.note-icon-caret)) {
    font-family: var(--pmk-font-family) !important;
}

/* Pesos legacy cuando se usaba la familia como peso (inline) */
[style*="aileronbold"],
[style*="AileronBold"] {
    font-weight: 700 !important;
}

[style*="aileronlight"],
[style*="AileronLight"] {
    font-weight: 400 !important;
}

/* Normalización: familias legacy en atributos style */
[style*="font-family: aileronbold"],
[style*="font-family:aileronbold"],
[style*="font-family: \"aileronbold\""],
[style*="font-family: 'aileronbold'"],
[style*="font-family: aileronbold,"] {
    font-family: var(--pmk-font-family) !important;
    font-weight: 700 !important;
}

[style*="font-family: aileronlight"],
[style*="font-family: \"aileronlight\""],
[style*="font-family: 'aileronlight'"] {
    font-family: var(--pmk-font-family) !important;
    font-weight: 400 !important;
}

[style*="font-family: aileronregular"],
[style*="font-family: \"aileronregular\""],
[style*="font-family: 'aileronregular'"] {
    font-family: var(--pmk-font-family) !important;
    font-weight: 400 !important;
}

[style*="futuraMediumBT"],
[style*="Manrope"],
[style*="Space Grotesk"],
[style*="Space+Grotesk"],
[style*="Plus Jakarta"],
[style*="Poppins"],
[style*="Inter"] {
    font-family: var(--pmk-font-family) !important;
}

/* Contenedores con fuentes alternativas declaradas en CSS local */
.pmk-home-2026,
.pmk-market-page,
.pmk-client-shell,
.pmk-cot-shell,
.pmk-explore-hero,
.pmk-guest-premium,
.pmk-prov-private,
.pmk-prov-public-wrap,
.pmk-perfil-profesional,
.usuario-perfil,
.profile-pro-hero,
.pmk-profile-page,
.vp-shell,
.pmk-solicitud-shell,
.pmk-hub,
.pmk-hub-shell,
.wallet-v3,
.wallet-v3-hero,
.pmk-rw-head,
.site-error {
    font-family: var(--pmk-font-family) !important;
}

/* Hubs / billetera: anulan overrides locales (Segoe UI) */
.pmk-hub,
.pmk-hub *:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.glyphicon),
.wallet-v3,
.wallet-v3 *:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.glyphicon) {
    font-family: var(--pmk-font-family) !important;
}

/* Utilidades legacy del proyecto */
.cs-tx-n,
.cs-tx-12,
.cs-fa-2 {
    font-family: inherit !important;
}
