/* ==========================================================================
   SEGUROS ÁVILA - LANDING PAGE EN CONSTRUCCIÓN
   Diseño Cinemático, Minimalista y Nubes Atmosféricas en Movimiento
   ========================================================================== */

:root {
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Paleta Corporativa Seguros Ávila */
  --color-title: #0f172a;
  --color-subtitle: #334155;
  --color-accent: #004b93; /* Azul institucional del logo */
  --color-accent-gradient: linear-gradient(135deg, #004080 0%, #0056b3 100%);
  --color-accent-hover: #003366;
  --color-accent-glow: rgba(0, 75, 147, 0.45);
  
  --color-white: #ffffff;
  --color-dark: #090e17;
  
  --shadow-text: 0 2px 18px rgba(255, 255, 255, 0.95), 0 1px 4px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y estructura base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background-color: #cdd5df;
  color: var(--color-subtitle);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. FONDO CON EL ÁVILA Y CAPAS DE NUBES EN MOVIMIENTO ACTIVO
   ========================================================================== */

.bg-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Imagen base del Ávila en Caracas */
.bg-image {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  filter: brightness(0.98) contrast(1.04) saturate(0.95);
  transform: scale(1.02);
  animation: bgBreathing 25s ease-in-out infinite alternate;
}

@keyframes bgBreathing {
  0% { transform: scale(1.02) translateY(0); }
  100% { transform: scale(1.06) translateY(-10px); }
}

/* Canvas de Nubes Volumétricas en Movimiento Continuo */
.clouds-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.92;
}

/* Capas CSS de Bruma y Niebla Desplazándose Activamente */
.cloud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 250%;
  height: 100%;
  background-repeat: repeat-x;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Capa 1: Nubes densas sobre las cumbres del Ávila */
.cloud-layer-1 {
  z-index: 3;
  background-image: 
    radial-gradient(ellipse 65% 45% at 20% 35%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 55% 40% at 65% 25%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 65%),
    radial-gradient(ellipse 75% 50% at 85% 45%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  background-size: 1300px 100%;
  animation: driftClouds 28s linear infinite;
  opacity: 0.85;
  filter: blur(16px);
}

/* Capa 2: Bruma media envolvente */
.cloud-layer-2 {
  z-index: 4;
  background-image: 
    radial-gradient(ellipse 70% 45% at 30% 55%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 65%),
    radial-gradient(ellipse 60% 35% at 75% 50%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 60%);
  background-size: 1050px 100%;
  animation: driftClouds 19s linear infinite reverse;
  opacity: 0.75;
  filter: blur(20px);
}

/* Capa 3: Niebla baja y difusa */
.cloud-layer-3 {
  z-index: 5;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% 80%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 75%),
    radial-gradient(ellipse 70% 40% at 15% 70%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
  background-size: 1500px 100%;
  animation: driftClouds 35s linear infinite;
  opacity: 0.8;
  filter: blur(26px);
}

@keyframes driftClouds {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Overlay sutil para garantizar legibilidad perfecta del texto */
.bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: 
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.25) 0%, rgba(235, 240, 246, 0.5) 60%, rgba(200, 215, 230, 0.65) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(235, 242, 250, 0.5) 100%);
}

/* ==========================================================================
   2. BOTÓN FLOTANTE RÁPIDO DE WHATSAPP
   ========================================================================== */

.quick-contact-pill {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 50;
}

.whatsapp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  color: #128c7e;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.whatsapp-badge i {
  font-size: 1.05rem;
  color: #25d366;
}

.whatsapp-badge:hover {
  background: #ffffff;
  color: #075e54;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.25);
}

/* ==========================================================================
   3. CONTENEDOR PRINCIPAL Y COMPOSICIÓN
   ========================================================================== */

.main-container {
  position: relative;
  z-index: 10;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 48px 24px 32px 24px;
  text-align: center;
}

.content-box {
  margin: auto 0;
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logotipo */
.logo-wrapper {
  margin-bottom: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  max-width: 180px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.08));
  transition: var(--transition);
}

.brand-logo:hover {
  transform: scale(1.02);
}

/* Badge de Estado */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--color-title);
  margin-bottom: 20px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Titular Principal Solicitado */
.main-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.18;
  color: var(--color-title);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  max-width: 760px;
  text-shadow: var(--shadow-text);
}

/* Subtítulo Solicitado */
.description {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  line-height: 1.65;
  color: var(--color-subtitle);
  max-width: 640px;
  margin: 0 auto 34px auto;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   4. FORMULARIO DE NOTIFICACIÓN & CAPTURA DE EMAIL (HONEYPOT & FORMSUBMIT)
   ========================================================================== */

.form-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.notify-form {
  position: relative;
  width: 100%;
}

/* Campo Honeypot Oculto (Invisible para humanos, captura bots) */
.honeypot-field {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.notify-form .input-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 6px 6px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.notify-form .input-group:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 12px 34px var(--color-accent-glow), 0 0 0 3px rgba(0, 75, 147, 0.15);
  transform: translateY(-2px);
}

.input-field-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.field-icon {
  color: #94a3b8;
  font-size: 1.1rem;
  transition: var(--transition);
}

.notify-form .input-group:focus-within .field-icon {
  color: var(--color-accent);
}

.notify-form input[type="email"] {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-dark);
  outline: none;
}

.notify-form input[type="email"]::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Botón NOTIFÍCAME */
.btn-notify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-accent-gradient);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--color-accent-glow);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-notify:hover {
  background: linear-gradient(135deg, #003366 0%, #004b93 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--color-accent-glow);
}

.btn-notify:active {
  transform: translateY(1px);
}

/* Estado de carga */
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-notify.is-loading .btn-text,
.btn-notify.is-loading .btn-icon {
  display: none;
}

.btn-notify.is-loading .btn-loader {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mensajes de Feedback */
.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 22px;
  transition: var(--transition);
}

.form-status.success {
  color: #0f766e;
  background: rgba(204, 251, 241, 0.85);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

.form-status.error {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.85);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

/* ==========================================================================
   5. PIE DE PÁGINA: REDES SOCIALES Y COPYRIGHT SOLICITADO
   ========================================================================== */

.main-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  width: 100%;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #475569;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--color-title);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 75, 147, 0.15);
}

/* ==========================================================================
   TOOLTIPS DINÁMICOS ("MUY PRONTO")
   ========================================================================== */

.has-tooltip {
  position: relative;
}

/* Globo del tooltip */
.has-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px) scale(0.92);
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 100;
}

/* Flechita del tooltip */
.has-tooltip::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 100;
}

/* Mostrar tooltip al pasar el cursor o al enfocar */
.has-tooltip:hover::before,
.has-tooltip:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Orientación hacia abajo para el botón superior de WhatsApp */
.quick-contact-pill .has-tooltip::before {
  top: calc(100% + 10px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px) scale(0.92);
}

.quick-contact-pill .has-tooltip::after {
  top: calc(100% + 2px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
  border-top-color: transparent;
  border-bottom-color: #0f172a;
}

.quick-contact-pill .has-tooltip:hover::before,
.quick-contact-pill .has-tooltip:focus-visible::before {
  transform: translateX(-50%) translateY(0) scale(1);
}

.quick-contact-pill .has-tooltip:hover::after,
.quick-contact-pill .has-tooltip:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

.copyright-text {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 640px) {
  .main-container {
    padding: 32px 18px 24px 18px;
  }

  .quick-contact-pill {
    top: 18px;
    right: 18px;
  }

  .whatsapp-badge span {
    display: none;
  }

  .whatsapp-badge {
    padding: 8px 10px;
    border-radius: 50%;
  }

  .brand-logo {
    max-width: 140px;
  }

  .main-title {
    font-size: 1.85rem;
    margin-bottom: 12px;
  }

  .description {
    font-size: 0.95rem;
    margin-bottom: 26px;
  }

  .notify-form .input-group {
    flex-direction: column;
    padding: 10px;
    border-radius: 20px;
    gap: 10px;
  }

  .input-field-container {
    width: 100%;
    padding: 4px 8px;
  }

  .btn-notify {
    width: 100%;
    padding: 13px 20px;
    border-radius: 12px;
  }

  .social-link {
    width: 35px;
    height: 35px;
    font-size: 0.88rem;
  }

  .copyright-text {
    font-size: 0.78rem;
    line-height: 1.4;
  }
}
