/* ============================================================================
   MI PORTAFOLIO · TOKENS
   Dirección: "terminal financiera × prensa económica mexicana".
   Esta hoja define SOLO fuentes, variables y el neutralizado de la estética
   genérica (radios, sombras, gradientes). Los componentes viven en
   mp-editorial.css.

   Las rutas de fuentes son RELATIVAS a propósito: sync-www reescribe
   /static/ → / en html/js/webmanifest pero NO en .css, así que una ruta
   absoluta se rompería dentro del bundle nativo. "../fonts/" resuelve bien
   tanto en /static/css/ (web) como en /css/ (Capacitor).
   ========================================================================== */

/* ─────────────────────────── FUENTES LOCALES ─────────────────────────────
   Empaquetadas en frontend/fonts (OFL 1.1, ver OFL-*.txt). Sin CDN: la app
   nativa arranca sin red. Subsets latin + latin-ext vía unicode-range, así
   que en español solo baja el subset "latin".                              */

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-italic-400-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/source-serif-4-italic-400-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: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/source-serif-4-400-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/source-serif-4-400-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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-400-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-400-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-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;
}

/* ─────────────────────────────── TOKENS ───────────────────────────────── */
:root {
  /* Tipografía — tres roles, sin excepción */
  --ff-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --ff-sans:  'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ff-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Tinta y papel. Base cálida (sesgo amarillo), no el negro azulado genérico. */
  --tinta:        #0B0B0A;  /* fondo de página */
  --tinta-panel:  #131210;  /* celda / panel */
  --tinta-alta:   #191713;  /* panel elevado, hover */
  --tinta-honda:  #080807;  /* pozos, inputs */

  /* Reglas: hairlines cálidas, nunca azules */
  --regla:        #2A2721;  /* hairline estándar */
  --regla-suave:  #1E1C18;  /* separador interno */
  --regla-fuerte: #4A443A;  /* regla de sección / doble */

  /* Texto marfil */
  --papel:    #F2EEE4;  /* 17.0:1  — titulares, cifras protagonistas */
  --papel-2:  #CFC8B8;  /* 11.8:1  — texto corrido */
  --papel-3:  #9A9284;  /*  6.4:1  — meta, etiquetas */
  --papel-4:  #847D70;  /*  4.8:1  — mínimo AA para texto tenue */

  /* Acento único: ámbar de tinta de sello. Solo acciones e interacción.
     Se eligió ámbar y NO verde precisamente para que el verde quede
     reservado a la dirección de mercado y no compitan semánticamente. */
  --sello:        #D79A3C;  /* 8.0:1 — texto/borde de acento */
  --sello-vivo:   #EDB259;  /* hover */
  --sello-solido: #C98A2B;  /* fondo de botón; encima va --tinta */
  --sello-tenue:  rgba(215,154,60,.12);

  /* Dirección de mercado. NUNCA decorativos. */
  --alza:       #6FAE7E;  /* 7.5:1 */
  --baja:       #DB7B68;  /* 6.6:1 */
  --alza-tenue: rgba(111,174,126,.12);
  --baja-tenue: rgba(219,123,104,.12);

  /* Geometría de prensa: esquinas casi rectas, cero sombra. */
  --radio:      2px;
  --radio-nulo: 0px;
  --hairline:   0.5px;

  /* Micro-interacciones sobrias */
  --t-rapida: 120ms;
  --t-media:  160ms;
  --easing:   cubic-bezier(.2, 0, .2, 1);

  /* Safe areas (se leen desde el harness de verificación) */
  --sa-top:    env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --sa-left:   env(safe-area-inset-left, 0px);
  --sa-right:  env(safe-area-inset-right, 0px);
}

/* En pantallas no-retina 0.5px puede desaparecer: subimos a 1px. */
@media (max-resolution: 1.5dppx) {
  :root { --hairline: 1px; }
}

/* ──────────────────── NEUTRALIZADO DE LA ESTÉTICA GENÉRICA ────────────────
   Tailwind se inyecta en runtime DESPUÉS de esta hoja, así que aquí sí hace
   falta !important: es la única forma de ganarle a las utilidades ya
   repartidas por 400 KB de markup sin renombrar una sola clase.            */

/* Cero sombras, cero glow. */
*, *::before, *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Radios: 0–2px. Los circulares (avatares, puntos, pills de estado) se
   respetan aparte más abajo. */
[class*="rounded"] { border-radius: var(--radio) !important; }
.rounded-none      { border-radius: 0 !important; }

/* Cero gradientes: se aplanan al color de panel. */
[class*="bg-gradient-"] {
  background-image: none !important;
  background-color: var(--tinta-panel) !important;
}

/* Cero glassmorphism. */
[class*="backdrop-blur"], [class*="backdrop-filter"] {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* El fondo radial del shell y el "bg-grid" desaparecen: papel plano. */
html, body { background-image: none !important; }
.bg-grid   { background-image: none !important; }

/* Transiciones sobrias: nada por encima de 160ms, sin rebotes. */
.transition, [class*="transition-"] {
  transition-duration: var(--t-media) !important;
  transition-timing-function: var(--easing) !important;
}

/* `rounded-full` incluido: las píldoras son la firma visual de la plantilla
   genérica que hay que dejar atrás. Lo ÚNICO que sigue siendo circular son
   los puntos de estado y los controles nativos de formulario. */
.mp-punto,
input[type="radio"],
input[type="checkbox"] { border-radius: 999px !important; }

/* Los puntos de estado de Tailwind son cuadraditos de 1–2 unidades
   (w-1 / w-1.5 / w-2) con rounded-full: ésos sí conservan el círculo. */
[class*="rounded-full"][class*="w-1"],
[class*="rounded-full"][class*="w-2"],
[class*="rounded-full"][class*="w-1.5"],
[class*="rounded-full"][class*="w-2.5"] { border-radius: 999px !important; }

/* El avatar del portafolio y el logo son marcas, no tarjetas: cuadrados. */
#port-active-avatar { border-radius: var(--radio) !important; }
header img[alt="Mi Portafolio"] { border-radius: 0 !important; }
