/* El Mentor de la Libertad · Piezas comunes de todas las páginas menos la portada:
   cabecera (la misma barra oscura que la portada), ventana «Solicitar plaza» y banda de plazas.
   La usan las apps (inflación, compra periódica, futuro), la calculadora de retiro, el aviso de privacidad
   y las nóminas de Nicolas y del Godín. La portada tiene las mismas piezas en /assets/home.css.
   Letras: Barlow Condensed + JetBrains Mono (cargarlas en el <head> de cada página).
   Código: /assets/standalone.js (cabecera que se esconde + barra de progreso) + /assets/waitlist.js (ventana). */

/* ---------- Cabecera ---------- */
.mlh {
  position: sticky; top: 0; z-index: 50;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: rgba(4, 4, 4, .93); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid #1f2729;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}
.mlh.mlh-hidden { transform: translateY(calc(-100% - 2px)); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .mlh { background: rgba(2, 2, 2, .96); } }
.mlh-bar { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding-block: 13px; }
.mlh-brand { display: block; flex: none; line-height: 0; text-decoration: none; }
.mlh-logo { display: block; height: 39px; width: auto; }
.mlh-nav { display: flex; gap: 28px; margin-left: auto; font: 500 .74rem/1 "JetBrains Mono", ui-monospace, Menlo, monospace; }
.mlh-nav a { position: relative; white-space: nowrap; text-decoration: none; text-transform: uppercase; letter-spacing: .14em; color: #f3f0e8; transition: color .25s; }
.mlh-nav a:hover, .mlh-nav a[aria-current="page"] { color: #ffc27a; }
.mlh-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: #ff9a1f; transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s cubic-bezier(.16, 1, .3, 1); }
.mlh-nav a:hover::after, .mlh-nav a:focus-visible::after, .mlh-nav a[aria-current="page"]::after { transform: scaleX(1); }
.mlh-cta {
  position: relative; overflow: hidden; isolation: isolate; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 .74rem/1.1 "JetBrains Mono", ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: #ffc27a; background: linear-gradient(180deg, rgba(255, 154, 31, .20), rgba(255, 154, 31, .10));
  border: 1px solid rgba(255, 154, 31, .7); border-radius: 12px; padding: 11px 18px;
  box-shadow: 0 0 22px -6px rgba(255, 154, 31, .45), inset 0 0 14px rgba(255, 154, 31, .08);
  transition: background .2s, box-shadow .2s, transform .2s;
}
.mlh-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 200, 120, .35), transparent); transform: skewX(-18deg); transition: left .8s cubic-bezier(.16, 1, .3, 1); }
.mlh-cta:hover { background: linear-gradient(180deg, rgba(255, 154, 31, .32), rgba(255, 154, 31, .18)); box-shadow: 0 0 30px -4px rgba(255, 154, 31, .6), inset 0 0 16px rgba(255, 154, 31, .12); transform: translateY(-1px); }
.mlh-cta:hover::after { left: 130%; }
.mlh a:focus-visible { outline: 2px solid #ff9a1f; outline-offset: 3px; }
@media (max-width: 1040px) { .mlh-nav { gap: 18px; } .mlh-nav a { letter-spacing: .1em; } }
/* Con cinco apps en el menú no caben por debajo de ~940 px: ahí se esconde, como en el móvil */
@media (max-width: 940px) { .mlh-nav { display: none; } .mlh-cta { margin-left: auto; } }
@media (max-width: 620px) {
  .mlh-bar { padding-block: 11px; }
  .mlh-logo { height: 34px; }
  .mlh-cta { padding: 9px 13px; font-size: .68rem; letter-spacing: .1em; }
}
/* barra de progreso de lectura (cabecera con data-progress) */
.mlh-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 90; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, rgba(255, 154, 31, 0), #ff9a1f 35%, #ffd08a); box-shadow: 0 0 12px rgba(255, 154, 31, .8); pointer-events: none; }

/* ---------- Ventana «Reserva tu llamada» (/assets/waitlist.js, abre Calendly) ---------- */
.wl-lock, .wl-lock body { overflow: hidden; }
.ml-cal-wait, .ml-cal-wait * { cursor: progress !important; }   /* la agenda de Calendly está cargando */
.wl-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; }
.wl-modal[hidden] { display: none; }
.wl-backdrop { position: absolute; inset: 0; background: rgba(2, 2, 2, .66); -webkit-backdrop-filter: blur(10px) saturate(.9); backdrop-filter: blur(10px) saturate(.9); opacity: 0; transition: opacity .25s ease; }
.wl-card { position: relative; box-sizing: border-box; width: min(520px, 100%); max-height: calc(100dvh - 40px); overflow: auto; text-align: center; color: #f2e9dd;
  background: radial-gradient(90% 65% at 50% 0%, rgba(255, 154, 31, .26), transparent 68%), #0a0a0a;
  border: 1px solid rgba(255, 154, 31, .6); border-radius: 24px; padding: 36px 32px 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 154, 31, .18);
  opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .25s ease, transform .3s cubic-bezier(.16, 1, .3, 1); }
.wl-modal.open .wl-backdrop { opacity: 1; }
.wl-modal.open .wl-card { opacity: 1; transform: none; }
.wl-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(242, 233, 221, .22); background: rgba(255, 255, 255, .04); color: #f2e9dd; cursor: pointer; padding: 0; }
.wl-close:hover { border-color: #ff9a1f; color: #ff9a1f; }
.wl-close svg { width: 18px; height: 18px; }
.wl-logo { display: block; height: 76px; width: auto; max-width: 100%; margin: 0 auto 20px; }
.wl-kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 14px; font: 500 .74rem/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: #ffc27a; }
.wl-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff9a1f; animation: wl-pulse 2.6s ease-out infinite; }
@keyframes wl-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 154, 31, .6); } 70% { box-shadow: 0 0 0 9px rgba(255, 154, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 154, 31, 0); } }
.wl-card h2 { font: 500 clamp(36px, 7vw, 50px)/1.05 "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; color: #fff; margin: 0 0 12px; letter-spacing: .012em; }
.wl-card h2 em { font-style: normal; color: inherit; text-decoration: underline; text-decoration-color: #ff9a1f; text-decoration-thickness: .13em; text-underline-offset: .1em; text-decoration-skip-ink: none; }
.wl-card p { margin: 0 auto 22px; max-width: 40ch; color: #cfc6b9; font-size: 1.05rem; line-height: 1.45; }
.wl-form { display: grid; gap: 12px; }
.wl-modal .btn { position: relative; overflow: hidden; display: inline-flex; text-decoration: none; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; cursor: pointer;
  font: 600 1.3rem/1.1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #ff9a1f;
  background: linear-gradient(180deg, rgba(255, 154, 31, .22), rgba(255, 154, 31, .1)); border: 1px solid rgba(255, 154, 31, .75); border-radius: 14px; padding: 16px 22px;
  box-shadow: 0 0 26px -6px rgba(255, 154, 31, .5), inset 0 0 14px rgba(255, 154, 31, .08); filter: none; }
.wl-modal .btn:hover { background: linear-gradient(180deg, rgba(255, 154, 31, .34), rgba(255, 154, 31, .18)); }
.wl-modal .btn::before, .wl-modal .btn::after { content: none; }   /* sin el punto de los botones píldora de las apps */
.wl-card .wl-legal { margin: 14px auto 0; font-size: .82rem; color: #6b7376; }
.wl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) { .wl-card { padding: 32px 20px 22px; } .wl-logo { height: 64px; } }

/* ---------- Banda de plazas (solo con 2 plazas libres o menos; /assets/waitlist.js + /plazas.json) ---------- */
.ml-band { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 60; box-sizing: border-box;
  width: min(600px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 9px 9px 9px 20px; border-radius: 999px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif; color: #f2e9dd; background: rgba(10, 10, 10, .94); border: 1px solid rgba(255, 154, 31, .4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6), 0 0 30px -10px rgba(255, 154, 31, .45);
  opacity: 0; transform: translate(-50%, calc(100% + 30px)); transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.ml-band.in { opacity: 1; transform: translate(-50%, 0); }
.ml-band .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ff9a1f; animation: wl-pulse 2.6s ease-out infinite; }
.ml-band-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ml-band-text b { font: 600 1.15rem/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.ml-band.is-full .ml-band-text b { color: #ff9a1f; }
.ml-band-text span { font-size: .82rem; line-height: 1.25; color: #a3a9ab; }
.ml-band-btn { flex: none; display: inline-flex; align-items: center; font: 600 1rem/1 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #000; background: #ff9a1f; border-radius: 999px; padding: 12px 18px; text-decoration: none; white-space: nowrap; }
.ml-band-btn:hover { filter: brightness(1.08); }
.ml-band-x { flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6b7376; cursor: pointer; }
.ml-band-x:hover, .ml-band-x:focus-visible { color: #fff; background: rgba(255, 255, 255, .09); outline: none; }
.ml-band-x svg { width: 16px; height: 16px; }
.ml-band-on body { padding-bottom: 92px; }
@media (max-width: 480px) { .ml-band { gap: 10px; padding: 7px 5px 7px 16px; } .ml-band-btn { padding: 11px 14px; } }

@media (prefers-reduced-motion: reduce) {
  .mlh, .wl-card, .wl-backdrop, .ml-band { transition: none; }
  .wl-kicker .dot, .ml-band .dot { animation: none; }
  .mlh-progress { display: none; }
}
