/* La ventana de salida. Vive aparte del sitio porque se pinta en TODAS las
   paginas —la portada, el glosario y las 15 entradas— con un solo <script>.

   Ojo con las fuentes: Utility y Blackout Midnight no traen glifos acentuados.
   Por eso todo lo que se pinta con ellas aqui va sin acentos a proposito
   ("No te vayas en seco", "Entrar al grupo", "Ya quedo"). El texto de parrafo
   va en Mulish, que si los tiene. Si cambias un titulo, respeta esa regla o el
   acento va a salir en otra tipografia. */

#perreo-comunidad[hidden] { display: none; }

#perreo-comunidad {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pc-fondo {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.pc-caja {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #0d0d0d;
  border: 4px solid #fff;
  box-shadow: 11px 13px 0 var(--hue-magenta, #A6389B), 11px 13px 0 5px #000;
  padding: 34px 28px 28px;
  text-align: center;
  font-family: 'Mulish', system-ui, -apple-system, sans-serif;
}
.pc-caja:focus { outline: none; }

.pc-tache {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 30px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}
.pc-tache:hover { color: #fff; }

.pc-antetitulo {
  font-family: 'Utility', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--hue-teal, #1996C4);
  margin: 0 0 10px;
}

.pc-titulo {
  font-family: 'Blackout Midnight', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: 0.005em;
  font-size: clamp(30px, 7vw, 42px);
  color: #fff;
  text-shadow: 4px 5px 0 #000;
  margin: 0 0 14px;
}

.pc-texto {
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 22px;
  text-wrap: pretty;
}

.pc-chico {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 18px;
}

.pc-boton {
  display: block;
  width: 100%;
  font-family: 'Utility', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  padding: 14px 18px;
  color: #fff;
  background: var(--hue-magenta, #A6389B);
  box-shadow: 5px 5px 0 #000;
}
.pc-boton:hover { filter: brightness(1.13); color: #fff; }
.pc-boton:active { transform: translate(1px, 1px); }
.pc-boton[disabled] { opacity: 0.6; cursor: default; }

.pc-whats { background: #25863F; }   /* el verde de WhatsApp, oscurecido para que el blanco encima se lea */

.pc-o {
  font-family: 'Utility', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  margin: 18px 0 12px;
}

.pc-forma input[name="correo"] {
  width: 100%;
  font-family: 'Mulish', system-ui, sans-serif;
  font-size: 16px;   /* menos de 16 y iOS le hace zoom al enfocar */
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 3px solid rgba(255, 255, 255, 0.3);
  padding: 13px 14px;
  margin-bottom: 10px;
}
.pc-forma input[name="correo"]::placeholder { color: rgba(255, 255, 255, 0.38); }
.pc-forma input[name="correo"]:focus {
  outline: none;
  border-color: var(--hue-teal, #1996C4);
}

.pc-enviar { background: var(--hue-teal-dark, #136E93); }

.pc-error {
  font-size: 13.5px;
  line-height: 1.5;
  color: #FF9A8B;
  margin: 0 0 10px;
  text-align: left;
}

.pc-nel {
  display: block;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Utility', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 16px;
  padding: 8px;
}
.pc-nel:hover { color: rgba(255, 255, 255, 0.75); }

/* Lo que existe para los lectores de pantalla pero no se ve: la etiqueta del
   campo y la trampa de bots. No se usa display:none porque eso lo esconde
   tambien de los lectores. */
.pc-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  #perreo-comunidad:not([hidden]) .pc-caja { animation: pc-entra 200ms cubic-bezier(.2, .8, .3, 1); }
  @keyframes pc-entra {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}
