/* ═══════════════════════════════════════════════════════════════
   ACJTECH.IO — WELCOME SPLASH MODAL OVERLAY (SCOPED CSS)
   ═══════════════════════════════════════════════════════════════ */

/* Modal Container (Fixed Fullscreen Overlay) */
#welcome-landing-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  display: none;
  justify-content: center;
  align-items: flex-start;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 30px 16px 60px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;

  /* Scoped CSS Variables */
  --primary:      #1D4ED8;
  --primary-dark: #1E3A8A;
  --primary-light:#EFF6FF;
  --primary-mid:  #BFDBFE;
  --accent:       #0F6E56;
  --accent-light: #ECFDF5;
  --accent-mid:   #A7F3D0;
  --purple:       #7C3AED;
  --purple-light: #F5F3FF;
  --purple-mid:   #DDD6FE;
  --orange:       #C2410C;
  --orange-light: #FFF7ED;
  --orange-mid:   #FED7AA;
  --red:          #E11D48;
  --red-light:    #FFF1F2;
  --red-mid:      #FECDD3;
  --dark:         #0F172A;
  --text:         #1E293B;
  --muted:        #64748B;
  --border:       #E2E8F0;
  --bg:           #F8FAFC;
  --white:        #FFFFFF;
  --font:         'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Custom Scrollbar for Modal */
#welcome-landing-modal::-webkit-scrollbar {
  width: 8px;
}
#welcome-landing-modal::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
#welcome-landing-modal::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}
#welcome-landing-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

/* State: Active */
#welcome-landing-modal.is-active {
  opacity: 1;
  visibility: visible;
}

/* State: Closing */
#welcome-landing-modal.is-closing {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 1, 1), visibility 0.3s ease;
}

#welcome-landing-modal.is-closing .welcome-modal-wrapper {
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1);
}

/* Prevent double scrolling on website body */
body.welcome-modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Scope box-sizing and resets */
#welcome-landing-modal * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Modal Inner Wrapper */
#welcome-landing-modal .welcome-modal-wrapper {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#welcome-landing-modal.is-active .welcome-modal-wrapper {
  transform: translateY(0) scale(1);
}

/* ── Sticky Top Floating Bar ── */
#welcome-landing-modal .welcome-modal-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#welcome-landing-modal .welcome-topbar-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #E2E8F0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#welcome-landing-modal .topbar-dot {
  width: 8px;
  height: 8px;
  background-color: #38BDF8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38BDF8;
  display: inline-block;
  flex-shrink: 0;
}

#welcome-landing-modal .welcome-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#welcome-landing-modal .welcome-topbar-enter-btn {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 18px;
  border-radius: 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}

#welcome-landing-modal .welcome-topbar-enter-btn:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E3A8A);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.55);
  transform: translateY(-1px);
}

#welcome-landing-modal .welcome-topbar-close-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

#welcome-landing-modal .welcome-topbar-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 1);
  transform: scale(1.08);
}

/* ── Contenedor principal Infografía ── */
#welcome-landing-modal .infografia {
  background: var(--white);
  max-width: 780px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  font-family: var(--font);
}

/* ── Cabecera ── */
#welcome-landing-modal .header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 32px 28px 28px;
  text-align: center;
  color: var(--white);
}
#welcome-landing-modal .header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
#welcome-landing-modal .logo-cloud {
  width: 52px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
#welcome-landing-modal .logo-text {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
#welcome-landing-modal .logo-text span {
  color: #93C5FD;
}
#welcome-landing-modal .logo-io {
  background: rgba(255,255,255,.25);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 2px;
}
#welcome-landing-modal .header-tagline {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .02em;
}
#welcome-landing-modal .header-sub {
  font-size: 13px;
  opacity: .8;
}

/* ── Flecha conectora ── */
#welcome-landing-modal .arrow {
  text-align: center;
  font-size: 22px;
  color: var(--primary);
  padding: 4px 0;
  background: var(--bg);
}

/* ── Capa genérica ── */
#welcome-landing-modal .layer {
  border-bottom: 1px solid var(--border);
}
#welcome-landing-modal .layer-header {
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-align: center;
}
#welcome-landing-modal .layer-body {
  padding: 16px 20px 20px;
  background: var(--white);
}

/* ── Grid de iconos ── */
#welcome-landing-modal .icon-grid {
  display: grid;
  gap: 10px;
}
#welcome-landing-modal .icon-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px 10px;
  text-align: center;
}
#welcome-landing-modal .icon-emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
  line-height: 1;
}
#welcome-landing-modal .icon-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
#welcome-landing-modal .icon-desc {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}

/* ── 4 Pilares ── */
#welcome-landing-modal .pilares {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
}
#welcome-landing-modal .pilar {
  border-radius: 10px;
  padding: 16px 10px 12px;
  text-align: center;
  border: 1.5px solid;
}
#welcome-landing-modal .pilar-key {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
#welcome-landing-modal .pilar-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
#welcome-landing-modal .pilar-items {
  font-size: 10px;
  line-height: 1.6;
  opacity: .8;
}

/* ── Alertas ── */
#welcome-landing-modal .alertas-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
}

/* ── Diferenciadores ── */
#welcome-landing-modal .dif-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
#welcome-landing-modal .dif {
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid var(--border);
}
#welcome-landing-modal .dif-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
}
#welcome-landing-modal .dif-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
#welcome-landing-modal .dif-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── CTA ── */
#welcome-landing-modal .cta-wrap {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 28px 24px;
  text-align: center;
  color: #fff;
}
#welcome-landing-modal .cta-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
#welcome-landing-modal .cta-sub {
  font-size: 13px;
  opacity: .8;
  margin-bottom: 20px;
}
#welcome-landing-modal .cta-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}
#welcome-landing-modal .cta-btn-main {
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#welcome-landing-modal .cta-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}
#welcome-landing-modal .cta-btn-sec {
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease;
}
#welcome-landing-modal .cta-btn-sec:hover {
  background: rgba(255,255,255,0.1);
}
#welcome-landing-modal .cta-btn-enter {
  background: #0F172A;
  color: #93C5FD;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 20px;
  border: 1.5px solid #93C5FD;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#welcome-landing-modal .cta-btn-enter:hover {
  background: #1E293B;
  color: #FFFFFF;
  border-color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
#welcome-landing-modal .cta-trust {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
#welcome-landing-modal .trust-item {
  font-size: 11px;
  opacity: .7;
}

/* ── Footer ── */
#welcome-landing-modal .footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
#welcome-landing-modal .footer-logo {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
#welcome-landing-modal .footer-logo span {
  color: #93C5FD;
}
#welcome-landing-modal .footer-info {
  font-size: 11px;
}

/* ── Responsive Rules ── */
@media (max-width: 650px) {
  #welcome-landing-modal {
    padding: 12px 8px 40px;
  }
  #welcome-landing-modal .welcome-modal-topbar {
    padding: 8px 12px;
    margin-bottom: 10px;
  }
  #welcome-landing-modal .welcome-topbar-badge span:last-child {
    font-size: 11px;
  }
  #welcome-landing-modal .welcome-topbar-enter-btn {
    font-size: 11px;
    padding: 6px 12px;
  }
  #welcome-landing-modal .icon-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  #welcome-landing-modal .pilares {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #welcome-landing-modal .alertas-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #welcome-landing-modal .dif-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  #welcome-landing-modal .header {
    padding: 24px 16px;
  }
  #welcome-landing-modal .logo-text {
    font-size: 28px;
  }
  #welcome-landing-modal .header-tagline {
    font-size: 15px;
  }
  #welcome-landing-modal .cta-btns {
    flex-direction: column;
    width: 100%;
  }
  #welcome-landing-modal .cta-btn-main,
  #welcome-landing-modal .cta-btn-sec,
  #welcome-landing-modal .cta-btn-enter {
    width: 100%;
    justify-content: center;
  }
}
