/* "Explain more" hero button (rings like an incoming call) + explainer video modal.
   Shared by product pages (/pos/, /payouts/, /x402/, /integration/, /taxes/, /partners/ and their /es/ twins); the homepage keeps its own inline copy.
   Uses the design tokens from blog.css. */
.explain-btn {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 9px 24px 9px 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(94, 240, 168, .6);
  background: rgba(7, 10, 18, .62);
  color: var(--text);
  font-family: var(--font-body);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 5px rgba(94, 240, 168, .1), 0 18px 50px -14px rgba(94, 240, 168, .65);
  animation: explain-call 3.2s ease-in-out infinite;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease);
}
.explain-btn:hover, .explain-btn:focus-visible { animation-play-state: paused; background: rgba(7, 10, 18, .8); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(94, 240, 168, .16), 0 20px 56px -12px rgba(94, 240, 168, .8); }
.explain-btn:hover .explain-play, .explain-btn:focus-visible .explain-play { animation-play-state: paused; }
.explain-play {
  position: relative; flex: none;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #042316;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 22px -8px rgba(94, 240, 168, .9);
  animation: explain-handset 3.2s ease-in-out infinite;
}
.explain-play svg { width: 20px; height: 20px; margin-left: 3px; }
.explain-play::before, .explain-play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: explain-pulse 1.6s ease-out infinite;
}
.explain-play::after { animation-delay: .8s; }
.explain-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; }
.explain-txt strong { font-size: 17px; font-weight: 700; }
.explain-txt small { font-size: 13.5px; color: var(--text-soft); }
@keyframes explain-call {
  0%, 14%, 20%, 34%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  1.4% { transform: translate3d(-4.0px, 0, 0) rotate(-2.4deg); }
  2.8% { transform: translate3d(3.8px, 0, 0) rotate(2.3deg); }
  4.2% { transform: translate3d(-3.6px, 0, 0) rotate(-2.2deg); }
  5.6% { transform: translate3d(3.4px, 0, 0) rotate(2.0deg); }
  7.0% { transform: translate3d(-3.2px, 0, 0) rotate(-1.9deg); }
  8.4% { transform: translate3d(3.0px, 0, 0) rotate(1.8deg); }
  9.8% { transform: translate3d(-2.8px, 0, 0) rotate(-1.7deg); }
  11.2% { transform: translate3d(2.6px, 0, 0) rotate(1.6deg); }
  12.6% { transform: translate3d(-2.4px, 0, 0) rotate(-1.4deg); }
  21.4% { transform: translate3d(-4.0px, 0, 0) rotate(-2.4deg); }
  22.8% { transform: translate3d(3.8px, 0, 0) rotate(2.3deg); }
  24.2% { transform: translate3d(-3.6px, 0, 0) rotate(-2.2deg); }
  25.6% { transform: translate3d(3.4px, 0, 0) rotate(2.0deg); }
  27.0% { transform: translate3d(-3.2px, 0, 0) rotate(-1.9deg); }
  28.4% { transform: translate3d(3.0px, 0, 0) rotate(1.8deg); }
  29.8% { transform: translate3d(-2.8px, 0, 0) rotate(-1.7deg); }
  31.2% { transform: translate3d(2.6px, 0, 0) rotate(1.6deg); }
  32.6% { transform: translate3d(-2.4px, 0, 0) rotate(-1.4deg); }
}
@keyframes explain-handset {
  0%, 14%, 20%, 34%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  1.4% { transform: translate3d(0.0px, 0, 0) rotate(-18.0deg); }
  2.8% { transform: translate3d(0.0px, 0, 0) rotate(17.1deg); }
  4.2% { transform: translate3d(0.0px, 0, 0) rotate(-16.2deg); }
  5.6% { transform: translate3d(0.0px, 0, 0) rotate(15.3deg); }
  7.0% { transform: translate3d(0.0px, 0, 0) rotate(-14.4deg); }
  8.4% { transform: translate3d(0.0px, 0, 0) rotate(13.5deg); }
  9.8% { transform: translate3d(0.0px, 0, 0) rotate(-12.6deg); }
  11.2% { transform: translate3d(0.0px, 0, 0) rotate(11.7deg); }
  12.6% { transform: translate3d(0.0px, 0, 0) rotate(-10.8deg); }
  21.4% { transform: translate3d(0.0px, 0, 0) rotate(-18.0deg); }
  22.8% { transform: translate3d(0.0px, 0, 0) rotate(17.1deg); }
  24.2% { transform: translate3d(0.0px, 0, 0) rotate(-16.2deg); }
  25.6% { transform: translate3d(0.0px, 0, 0) rotate(15.3deg); }
  27.0% { transform: translate3d(0.0px, 0, 0) rotate(-14.4deg); }
  28.4% { transform: translate3d(0.0px, 0, 0) rotate(13.5deg); }
  29.8% { transform: translate3d(0.0px, 0, 0) rotate(-12.6deg); }
  31.2% { transform: translate3d(0.0px, 0, 0) rotate(11.7deg); }
  32.6% { transform: translate3d(0.0px, 0, 0) rotate(-10.8deg); }
}
/* desktop: lift it out of the copy column; explainer.js parks it right of the headline */
@media (min-width: 981px) {
  .pos-hero .wrap { position: relative; }
  .pos-hero .explain-btn { position: absolute; z-index: 3; right: 4%; top: 150px; margin-top: 0; }
}

.explainer-lock, .explainer-lock body { overflow: hidden; }
.explainer-modal {
  position: fixed; inset: 0; z-index: 10001; /* above the cookie banner (9999/10000) while watching */
  display: grid; place-items: center; padding: 24px;
  background: rgba(4, 6, 12, .84);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
}
.explainer-modal.open { opacity: 1; visibility: visible; }
/* capped by the viewport height too, so a phone held sideways sees the whole 16:9 frame (dvh-less browsers keep the first width) */
.explainer-dialog { width: min(1120px, 100%); width: min(1120px, 100%, calc((100dvh - 96px) * 16 / 9)); transform: translateY(18px) scale(.98); transition: transform .35s var(--ease); }
.explainer-modal.open .explainer-dialog { transform: none; }
.explainer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.explainer-langs { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.explainer-langs button {
  font: 600 13px var(--font-mono); letter-spacing: .08em;
  padding: 7px 14px; border-radius: 999px; border: 0;
  color: var(--text-muted); background: transparent; cursor: pointer;
}
.explainer-langs button[aria-pressed="true"] { color: #061021; background: var(--primary-bright); }
.explainer-actions { display: flex; align-items: center; gap: 10px; }
.explainer-cta { padding: 10px 18px; font-size: 14.5px; }
.explainer-close {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer;
}
.explainer-close svg { width: 18px; height: 18px; }
.explainer-close:hover { background: rgba(255, 255, 255, .1); }
.explainer-frame {
  aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(94, 240, 168, .08);
}
.explainer-frame video { display: block; width: 100%; height: 100%; }
.explainer-dialog.vertical { width: auto; max-width: 100%; }
/* phones held upright get the 1080x1920 cut: the frame must be 9:16 too, or the vertical video plays letterboxed in a 16:9 box */
.explainer-dialog.vertical .explainer-frame { aspect-ratio: 9 / 16; width: min(calc(100vw - 32px), calc((100dvh - 96px) * 9 / 16)); margin: 0 auto; }
@media (max-width: 860px) {
  .explainer-modal { padding: 12px; }
  .explainer-bar { gap: 8px; }
  .explainer-actions { gap: 8px; min-width: 0; }
  /* long CTAs ("Lanza tu primer pago masivo") wrap instead of widening the bar past the screen */
  .explainer-cta { padding: 9px 14px; font-size: 13.5px; white-space: normal; line-height: 1.15; text-align: center; }
}

/* the ring is a deliberate attention cue: keep it even with Reduce Motion (Safari on battery reports it) */
@media (prefers-reduced-motion: reduce) {
  .explain-btn { animation: explain-call 3.2s ease-in-out infinite !important; }
  .explain-play { animation: explain-handset 3.2s ease-in-out infinite !important; }
  .explain-play::before, .explain-play::after { animation: explain-pulse 1.6s ease-out infinite !important; }
  .explain-play::after { animation-delay: .8s !important; }
}
