/* ============================================================
   Promocional Becas · Revelación (1c)
   Colores/tipografía vía design tokens del tema (css/tokens/*).
   Los colores del CTA los da el sistema de botones (c-btn--primary);
   aquí solo vive su layout (pill, tamaños, anillo, transform).
   ============================================================ */

.pb {
  --pb-blue: var(--color-primary, #006FBA);
  --pb-blue-deep: var(--CTA-Primary-main, #003053);
  --pb-orange: var(--color-accent, #F68B1F);
  --pb-white: var(--color-bg-white, #FFFFFF);
  --pb-ease: cubic-bezier(.22, 1, .36, 1);
  box-sizing: border-box;
  background: var(--pb-white);
  font-family: var(--font-family-base, "Work Sans", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
.pb *, .pb *::before, .pb *::after { box-sizing: border-box }

.pb__inner { padding: 20px 16px }
.pb__card {
  position: relative;
  isolation: isolate;
  background: var(--pb-blue);
  color: var(--pb-white);
  border-radius: var(--radius-xl, 16px);
  padding: 32px 20px 34px;
  overflow: hidden;
}

/* luz que sigue al cursor: solo escritorio con puntero fino; JS de presentación,
   sin eventos GA4. En reposo (o sin JS) queda fija en 70%/40% */
@media (hover: hover) and (pointer: fine) {
  .pb__card {
    --pb-mx: 70%;
    --pb-my: 40%;
  }
  .pb__card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(720px circle at var(--pb-mx) var(--pb-my), rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 62%);
  }
}
.pb__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px }

/* ---------- copy ---------- */
.pb__overline {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--pb-white);
}
.pb__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pb-orange);
  box-shadow: 0 0 0 6px rgba(246, 139, 31, .28); flex: 0 0 auto;
}
.pb__title {
  margin: 16px 0 12px;
  font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.8px;
  color: var(--pb-white); text-wrap: balance;
}
.pb__title strong, .pb__title b {
  font-weight: 600; color: var(--pb-white);
  text-decoration: underline; text-decoration-color: var(--pb-orange);
  text-decoration-thickness: 4px; text-underline-offset: 5px;
}
.pb__title em, .pb__title i { font-style: italic }
.pb__lede { margin: 0 0 22px; font-size: 16px; line-height: 1.55; font-weight: 400; color: var(--pb-white) }
.pb__lede strong, .pb__lede b { font-weight: 600; color: var(--pb-white) }
.pb__legal { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--pb-white) }

/* ---------- CTA (layout; colores desde c-btn--primary) ---------- */
/* !important: theme-overrides fija en .c-btn border-radius 14px y peso 400 con !important;
   aquí manda el spec del diseño (pill + 600). Los pesos van literales en todo el módulo
   porque el template redefine --font-weight-semibold a 500 */
.pb .pb__cta {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 12px 28px;
  border-radius: var(--radius-full, 999px) !important; border: 1px solid var(--pb-blue-deep);
  font-family: inherit; font-size: 16px; font-weight: 600 !important; text-decoration: none;
  transition: background .16s var(--pb-ease), border-color .16s var(--pb-ease), transform .16s var(--pb-ease);
}
.pb .pb__cta svg { width: 22px; height: 22px; flex: 0 0 auto }
.pb .pb__cta:hover, .pb .pb__cta:focus-visible { border-color: var(--pb-orange); transform: translateY(-2px) }
.pb .pb__cta:active { transform: translateY(1px) scale(.985) }
.pb .pb__cta:focus-visible { outline: 3px solid #86C1F3; outline-offset: 2px }
.pb .pb__cta::after {
  content: ""; position: absolute; inset: -7px; border-radius: var(--radius-full, 999px);
  border: 2px solid rgba(255, 255, 255, .75); opacity: 0; pointer-events: none;
}

/* ---------- enlace de WhatsApp (texto simple bajo el CTA) ---------- */
.pb__whats { margin: 12px 0 0; text-align: center; font-size: 14px; line-height: 1.4 }
.pb .pb__whatsLink {
  color: var(--pb-white);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color .16s var(--pb-ease), text-decoration-color .16s var(--pb-ease);
}
.pb .pb__whatsLink:hover { color: var(--pb-orange); text-decoration-color: var(--pb-orange) }
.pb .pb__whatsLink:focus-visible { outline: 3px solid #86C1F3; outline-offset: 2px; border-radius: 4px }

/* ---------- medidor ---------- */
.pb__meter {
  padding: 22px 20px 18px; border-radius: var(--radius-xl, 16px);
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
}
.pb__meterHead {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--pb-white);
}
.pb__meterFoot {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 10px;
  font-size: 12px; color: var(--pb-white);
}
.pb__number {
  display: flex; align-items: baseline; gap: 2px; margin-top: 8px;
  font-size: 76px; line-height: 1; font-weight: 700; letter-spacing: -4px;
  font-variant-numeric: tabular-nums; color: var(--pb-white);
}
.pb__pct {
  font-size: .4em; letter-spacing: -2px; color: var(--pb-orange);
  align-self: flex-start; margin-top: .22em; font-weight: 600;
}
.pb__pct sup { font-size: .42em; letter-spacing: 0; vertical-align: super }
.pb__reel { display: inline-block; height: 1em; overflow: hidden; vertical-align: top }
.pb__reelTrack { display: flex; flex-direction: column }
.pb__reelTrack span { display: block; height: 1em }
.pb__bar { margin-top: 14px; height: 6px; border-radius: var(--radius-full, 999px); background: rgba(255, 255, 255, .28); overflow: hidden }
.pb__bar i { display: block; height: 100%; width: 0; border-radius: var(--radius-full, 999px); background: var(--pb-orange) }

/* ---------- animación (se dispara al entrar en viewport: .pb--in) ---------- */
@keyframes pb-rise { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes pb-roll { to { transform: translateY(var(--pb-end)) } }
@keyframes pb-fill { to { width: 100% } }
@keyframes pb-ring { 0% { opacity: .85; transform: scale(.96) } 100% { opacity: 0; transform: scale(1.14) } }

.pb--in [data-pb-anim="1"] { animation: pb-rise .6s var(--pb-ease) both }
.pb--in [data-pb-anim="2"] { animation: pb-rise .6s var(--pb-ease) .1s both }
.pb--in [data-pb-anim="3"] { animation: pb-rise .6s var(--pb-ease) .25s both }
.pb--in .pb__meter { animation: pb-rise .7s var(--pb-ease) .2s both }
/* --pb-end llega inline desde module.html según el porcentaje configurado */
.pb--in [data-pb-reel="tens"] .pb__reelTrack { animation: pb-roll 1.7s cubic-bezier(.16, .9, .22, 1) .2s both }
.pb--in [data-pb-reel="ones"] .pb__reelTrack { animation: pb-roll 2.1s cubic-bezier(.16, .9, .22, 1) .45s both }
.pb--in .pb__bar i { animation: pb-fill 2s cubic-bezier(.2, .8, .2, 1) .3s both }
.pb--in .pb__cta::after { animation: pb-ring 1.3s ease-out 2.3s 1 both }

/* estado en reposo: contenido visible aunque el JS no cargue */
.pb:not(.pb--in) .pb__reelTrack { transform: translateY(var(--pb-end, 0)) }
.pb:not(.pb--in) .pb__bar i { width: 100% }

/* ---------- escritorio ---------- */
@media (min-width: 900px) {
  .pb__inner { padding: 40px 24px; max-width: 1200px; margin: 0 auto }
  .pb__card { border-radius: 24px; padding: 56px 64px }
  .pb__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center }
  .pb__title { margin: 18px 0 14px; font-size: 52px; line-height: 1.06; letter-spacing: -1.6px }
  .pb__title strong, .pb__title b { text-decoration-thickness: 5px; text-underline-offset: 7px }
  .pb__lede { margin: 0 0 28px; font-size: 18px; max-width: 44ch }
  .pb .pb__cta { width: auto; min-width: 240px; min-height: 52px; padding: 14px 32px; font-size: 17px }
  /* CTA de ancho auto alineado a la izquierda: el enlace se centra bajo su ancho mínimo */
  .pb__whats { text-align: center; max-width: 240px }
  .pb__legal { margin: 16px 0 0 }
  .pb__meter { padding: 28px 28px 24px; border-radius: 24px }
  .pb__number { margin-top: 10px; font-size: 132px; letter-spacing: -6px }
  .pb__pct { font-size: .42em }
  .pb__bar { margin-top: 18px }
  .pb__meterFoot { font-size: 13px }
}

@media (prefers-reduced-motion: reduce) {
  .pb * { animation: none !important; transition: none !important }
  .pb .pb__reelTrack { transform: translateY(var(--pb-end, 0)) }
  .pb__bar i { width: 100% }
}
