/* ==========================================================
   UrbaPlanos — Vista de aterrizaje (próximo lanzamiento)
   La imagen se escala completa (sin recortar el texto) y el
   espacio sobrante se rellena con el mismo color del fondo.
   ========================================================== */

:root {
  --bg: #3f5459;          /* color exacto del borde de las imágenes */
  --focus: #ffffff;
  --ratio-w: 16;          /* proporción de la imagen de escritorio */
  --ratio-h: 9;
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body {
  overflow: hidden;       /* una sola pantalla, sin scroll */
}

.landing {
  min-height: 100vh;
  min-height: 100dvh;     /* corrige la barra del navegador en móviles */
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
           env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

/* Contenedor con la proporción exacta de la imagen:
   ocupa el máximo posible sin salirse de la pantalla. */
.stage {
  position: relative;
  aspect-ratio: var(--ratio-w) / var(--ratio-h);
  width: min(100vw, 100vh * var(--ratio-w) / var(--ratio-h));
  width: min(100vw, 100dvh * var(--ratio-w) / var(--ratio-h));
}

.stage picture,
.stage__img {
  display: block;
  width: 100%;
  height: 100%;
}

.stage__img {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Zonas clicables (escritorio 1920×1080) ---------- */
.hotspot {
  position: absolute;
  top: 80.4%;
  height: 4.8%;
  display: block;
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .2s ease, background-color .2s ease;
}

.hotspot--whatsapp { left: 21.3%; width: 16.2%; }
.hotspot--email    { left: 37.5%; width: 21.4%; }

.hotspot:hover { background-color: rgba(255, 255, 255, .08); }

.hotspot:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Pantallas verticales: imagen móvil 1080×1920 ---------- */
@media (max-aspect-ratio: 1/1) {
  :root {
    --ratio-w: 9;
    --ratio-h: 16;
  }

  .hotspot {
    top: 85.5%;
    height: 2.95%;
  }

  .hotspot--whatsapp { left: 14.2%; width: 30.9%; }
  .hotspot--email    { left: 45.1%; width: 40.8%; }
}

/* ---------- Botones flotantes de contacto ---------- */
.fab-group {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  flex-direction: column-reverse;   /* WhatsApp abajo, correo encima */
  align-items: flex-end;
  gap: 14px;
}

.fab {
  --size: 60px;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.fab__icon { width: 55%; height: 55%; }

.fab--whatsapp { background: #25d366; }
.fab--email {
  background: var(--bg);
  border: 2px solid rgba(255, 255, 255, .85);
}
.fab--email .fab__icon { width: 48%; height: 48%; }

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
}

.fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Texto del CTA: aparece a la izquierda al pasar el cursor o con el teclado */
.fab__label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  color: #2b3a3e;
  font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.fab:hover .fab__label,
.fab:focus-visible .fab__label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Un solo pulso de atención en WhatsApp al cargar la página */
.fab--whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .6);
  animation: fab-pulse 1.6s ease-out 1s 2;
  pointer-events: none;
}

@keyframes fab-pulse {
  to { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
}

/* Pantallas táctiles: sin tooltip (no hay hover) */
@media (hover: none) {
  .fab__label { display: none; }
}

/* Celulares: botones en fila, más compactos, para no tapar la imagen */
@media (max-aspect-ratio: 1/1) {
  .fab-group {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    flex-direction: row-reverse;
    gap: 12px;
  }
  .fab { --size: 52px; }
}

/* ---------- Accesibilidad ---------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hotspot,
  .fab,
  .fab__label { transition: none; }
  .fab--whatsapp::after { animation: none; }
}
