/* =========================================================
   Popup de campanha · Leilão 14º Prêmio RCM
   Usa <dialog> nativo: foco preso, ESC e ::backdrop sem dependências.
   ========================================================= */
.rcm-popup {
  border: 0; padding: 0; background: transparent; overflow: visible;
  width: min(1100px, calc(100vw - 32px));
  max-width: none; max-height: none;
  margin: auto;
}
.rcm-popup::backdrop {
  background: rgba(10, 18, 14, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.rcm-popup[open] { animation: rcm-pop-in .42s cubic-bezier(.2,.7,.2,1) both; }
.rcm-popup[open]::backdrop { animation: rcm-fade .3s ease both; }
@keyframes rcm-pop-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rcm-fade { from { opacity: 0; } to { opacity: 1; } }

.rcm-popup__frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  /* proporção original da arte: 1921 × 827 */
  aspect-ratio: 1921 / 827;
  max-width: 100%;
  background: #2e6a1e;
}
.rcm-popup__frame img { width: 100%; height: 100%; object-fit: contain; }

/* Área clicável sobre o botão original da arte.
   Medida no arquivo 1921×827: contorno da pílula em x 820–1274, y 527–586,
   com ~4px de folga para o toque. */
.rcm-popup__hotspot {
  position: absolute;
  left: 42.48%; top: 63.24%; width: 24.1%; height: 8.2%;
  border-radius: 999px;
  display: block;
  transition: background-color .2s, box-shadow .2s;
}
.rcm-popup__hotspot:hover { background-color: rgba(255,255,255,.14); box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.rcm-popup__hotspot:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rcm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rcm-popup__close {
  position: absolute; top: -14px; right: -14px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #16201b; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  transition: transform .2s;
}
.rcm-popup__close:hover { transform: rotate(90deg); }
.rcm-popup__close svg { width: 18px; height: 18px; }

/* Em telas estreitas a arte fica baixa e o botão original fica pequeno
   demais para toque. A arte não é alterada; um botão equivalente aparece abaixo. */
.rcm-popup__mobile-cta { display: none; }
@media (max-width: 640px) {
  .rcm-popup { width: calc(100vw - 24px); }
  .rcm-popup__frame { border-radius: 12px 12px 0 0; box-shadow: none; }
  .rcm-popup__close { top: -12px; right: -6px; width: 40px; height: 40px; }
  .rcm-popup__mobile-cta {
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: #1d5a2e; text-decoration: none;
    font: 500 16px/1.2 "Outfit", system-ui, sans-serif;
    padding: 16px; border-radius: 0 0 12px 12px; min-height: 52px;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
  }
  .rcm-popup__mobile-cta:hover { background: #eef7f0; }
}
@media (prefers-reduced-motion: reduce) {
  .rcm-popup[open], .rcm-popup[open]::backdrop { animation: none; }
}
