/* Acabado (fix/carga-movil-bienvenida) — la terminación de la bienvenida, en todo el sitio.
   Va al final de todo para ganar la cascada. Lo complementa assets/acabado/acabado.js, que marca:
   .ac-k  → etiquetas cortas en mayúscula que venían en letra de máquina (pasan a Instrument Sans espaciada)
   .ac-sf → títulos en serif (letra más ajustada, como la bienvenida)
   Cero texto gris: nada acá baja la opacidad del texto. */
:root { --ac-ease: cubic-bezier(.2,.75,.2,1); --ac-gold: #f2c94c; }

/* ---------- letra ---------- */
html.ml-on body { font-feature-settings: "kern" 1, "liga" 1; }
.ac-k {
  font-family: 'Instrument Sans', 'IBM Plex Sans', system-ui, sans-serif !important;
  font-weight: 600 !important; letter-spacing: .13em !important; font-variant-numeric: normal;
}
.ac-sf { letter-spacing: -.022em !important; font-weight: 400 !important; }
.ac-sf em, .ac-sf i { letter-spacing: -.01em; }
/* números: siempre de ancho fijo, para que no bailen al actualizarse */
html.ml-on [class*="num"], html.ml-on [class*="price"], html.ml-on [class*="chg"], html.ml-on td { font-variant-numeric: tabular-nums; }
::selection { background: rgba(242,201,76,.26); }

/* ---------- entrada de cada sección: de borroso a nítido, en escalera ----------
   Solo opacidad + desenfoque + un poco de movimiento, y sin dejar estilo al terminar
   (un transform que quede puesto rompería los position:fixed de adentro). */
@keyframes acIn { from { opacity: 0; filter: blur(7px); transform: translateY(12px); } to { opacity: 1; filter: none; transform: none; } }
html.ml-on section.ac-entra > :not(.ml-ph):not(script):not(style),
html.ml-on section.ac-entra > .container > *,
html.ml-on section.ac-entra > .mt-wrap > *,
html.ml-on section.ac-entra > .cal-wrap > *,
html.ml-on section.ac-entra > .nt-wrap > * { animation: acIn .75s var(--ac-ease) backwards; }
html.ml-on section.ac-entra > .container > :nth-child(2), html.ml-on section.ac-entra > .mt-wrap > :nth-child(2), html.ml-on section.ac-entra > .cal-wrap > :nth-child(2), html.ml-on section.ac-entra > .nt-wrap > :nth-child(2) { animation-delay: .05s; }
html.ml-on section.ac-entra > .container > :nth-child(3), html.ml-on section.ac-entra > .mt-wrap > :nth-child(3), html.ml-on section.ac-entra > .cal-wrap > :nth-child(3), html.ml-on section.ac-entra > .nt-wrap > :nth-child(3) { animation-delay: .1s; }
html.ml-on section.ac-entra > .container > :nth-child(4), html.ml-on section.ac-entra > .mt-wrap > :nth-child(4), html.ml-on section.ac-entra > .cal-wrap > :nth-child(4), html.ml-on section.ac-entra > .nt-wrap > :nth-child(4) { animation-delay: .15s; }
html.ml-on section.ac-entra > .container > :nth-child(n+5), html.ml-on section.ac-entra > .mt-wrap > :nth-child(n+5), html.ml-on section.ac-entra > .cal-wrap > :nth-child(n+5), html.ml-on section.ac-entra > .nt-wrap > :nth-child(n+5) { animation-delay: .2s; }

/* ---------- detalles que se repiten en todo el sitio ---------- */
/* tarjetas: borde más fino y respuesta suave al pasar el mouse */
html.ml-on :is(.ad-kpi, .ad-c, .mt-card, .cal-side > *, .pf-card, .pro-card) { transition: border-color .35s var(--ac-ease), transform .35s var(--ac-ease), box-shadow .35s var(--ac-ease); }
@media (hover: hover) {
  html.ml-on :is(.ad-kpi, .pf-card, .pro-card):hover { border-color: rgba(242,201,76,.3); transform: translateY(-2px); box-shadow: 0 24px 50px -30px rgba(0,0,0,.8); }
}
/* botones y links: el mismo subrayado que se dibuja en la bienvenida */
html.ml-on a:focus-visible, html.ml-on button:focus-visible { outline: 2px solid var(--ac-gold); outline-offset: 2px; }
/* separadores dobles (dos líneas seguidas) → una sola */
html.ml-on .ml-ph + hr, html.ml-on .ml-ph + .pf-divider { display: none; }
/* scroll más fino en todo el sitio */
html.ml-on * { scrollbar-width: thin; scrollbar-color: rgba(214,226,244,.16) transparent; }

/* ---------- pie del sitio, como el de la bienvenida ---------- */
html.ml-on body > footer.ac-foot { background: #070e1b; border-top: 1px solid rgba(226,234,245,.09); padding: 0; margin-top: 40px; }
.ac-foot .ac-fi { width: min(1360px, 100% - 96px); margin: 0 auto; padding: 64px 0 0; }
.ac-foot .ac-fg { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; padding-bottom: 56px; }
.ac-foot .ac-fb b { display: block; font: 400 30px/1 'Instrument Serif', 'DM Serif Display', Georgia, serif; letter-spacing: -.02em; color: #f6f8fc; }
.ac-foot .ac-fb b i { font-style: normal; color: var(--ac-gold); }
.ac-foot .ac-fb p { margin: 14px 0 0; max-width: 320px; font: 400 14.5px/1.55 'Instrument Sans', sans-serif; color: #f6f8fc; }
.ac-foot h4 { margin: 0 0 18px; font: 600 11.5px/1 'Instrument Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ac-gold); }
.ac-foot .ac-fg a { display: block; width: max-content; padding: 5px 0; font: 400 14.5px/1.4 'Instrument Sans', sans-serif; color: #f6f8fc; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s var(--ac-ease); }
.ac-foot .ac-fg a:hover { border-color: currentColor; }
.ac-foot .ac-fl { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 22px 0 30px; border-top: 1px solid rgba(226,234,245,.09); font: 400 12.5px/1.55 'Instrument Sans', sans-serif; color: #f6f8fc; }
.ac-foot .ac-fl p { margin: 0; max-width: 760px; }
html.ml-movil .ac-foot .ac-fi { width: calc(100% - 32px); padding-top: 48px; }
html.ml-movil .ac-foot .ac-fg { grid-template-columns: 1fr 1fr; gap: 30px; }
html.ml-movil .ac-foot .ac-fb { grid-column: 1 / -1; }

@media (prefers-reduced-motion: reduce) {
  html.ml-on section.ac-entra * { animation: none !important; }
}

/* la serif nueva tiene el ojo más chico: se compensa sola (mismo alto de minúscula que la anterior) */
.ac-sf { font-size-adjust: .47; }
html.ml-on .ml-ph-t { font-size: 48px; font-size-adjust: none; letter-spacing: -.028em !important; line-height: 1; }
html.ml-movil .ml-ph-t { font-size: 38px; }
.ml-brand b, .ml-crumb .ml-cr-g { font-size-adjust: .47; }

/* Mercados: con el menú abierto el cartel del dólar cortaba los precios → va arriba, a lo ancho */
@media (min-width: 1100px) and (max-width: 1640px) {
  html.ml-on #mercados .mt-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  html.ml-on #mercados .mt-card--dolar { grid-column: 1 / -1; }
  html.ml-on #mercados .mt-card--dolar .mt-dl .mt-spark { height: 26px; }
}

/* Warren: un círculo discreto que se abre al pasar el mouse (antes tapaba contenido a la derecha) */
html.ml-on .warren-fab { gap: 0 !important; padding: 5px !important; transition: gap .4s var(--ac-ease), padding .4s var(--ac-ease), border-color .3s, background-color .3s !important; }
html.ml-on .warren-fab .warren-fab-text { display: inline-block !important; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .45s var(--ac-ease), opacity .3s var(--ac-ease), margin .45s var(--ac-ease); }
@media (hover: hover) {
  html.ml-on .warren-fab:hover, html.ml-on .warren-fab:focus-visible { gap: 10px !important; padding: 5px 16px 5px 5px !important; }
  html.ml-on .warren-fab:hover .warren-fab-text, html.ml-on .warren-fab:focus-visible .warren-fab-text { max-width: 200px; opacity: 1; }
}
html.ml-on .warren-fab .warren-badge { width: 34px !important; height: 34px !important; }

/* University: un solo estilo de botón, sobrio (antes verde, azul y dorado) */
html.ml-on .uv-c__btn { background: transparent !important; color: #f6f8fc !important; box-shadow: inset 0 0 0 1px rgba(226,234,245,.2) !important; font-weight: 600 !important; filter: none !important; transition: box-shadow .3s var(--ac-ease), background-color .3s var(--ac-ease); }
html.ml-on .uv-c__btn:hover { box-shadow: inset 0 0 0 1px rgba(242,201,76,.7) !important; background: rgba(242,201,76,.06) !important; }

/* encabezados viejos de Portfolio y Herramientas: el encabezado parejo ya los reemplaza (dejaban una línea de más) */
html.ml-on #portfolio > .container > .section-header, html.ml-on #herramientas > .container > .section-header { display: none !important; }

/* modo claro: el botón de ingreso en tinta, con la flecha clara */
html[data-tema="claro"].ml-on .nav-login-btn { background: #0b1526 !important; color: #fffdf8 !important; }
html[data-tema="claro"].ml-on .nav-login-btn::after { background: #fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1526' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / 14px no-repeat !important; }
html[data-tema="claro"].ml-on .nav-login-btn:hover { background: #0b1526 !important; box-shadow: 0 0 0 4px rgba(11,21,38,.1); }
