/* ==========================================================================
   Gatekeeper Lead Modal — Fronteira de Negócios
   Estética editorial de luxo, dark glassmorphism e foco na conversão.
   ========================================================================== */

/* Bloqueio do scroll da página enquanto o popup estiver aberto */
body.gatekeeper-locked {
  overflow: hidden !important;
  touch-action: none !important;
}

/* Overlay com desfoque de fundo */
.gatekeeper-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(3, 47, 53, 0.88) 0%, rgba(1, 20, 23, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
}

.gatekeeper-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Card central do popup */
.gatekeeper-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, rgba(8, 48, 54, 0.95) 0%, rgba(3, 28, 33, 0.98) 100%);
  border: 1px solid rgba(134, 227, 238, 0.28);
  border-radius: 20px;
  padding: 38px 34px;
  box-shadow: 
    0 35px 80px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(88, 199, 219, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s;
  overflow: hidden;
}

.gatekeeper-overlay.active .gatekeeper-modal {
  transform: translateY(0) scale(1);
}

/* Efeito decorativo de luz de fundo dentro do card */
.gatekeeper-modal::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 240, 121, 0.18), transparent 70%);
  pointer-events: none;
}

/* Tag de categoria / Passaporte */
.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c1f079;
  background: rgba(193, 240, 121, 0.12);
  border: 1px solid rgba(193, 240, 121, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.gatekeeper-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c1f079;
  box-shadow: 0 0 8px #c1f079;
}

/* Título e descrição */
.gatekeeper-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin: 0 0 12px;
}

.gatekeeper-title em {
  font-style: normal;
  color: #8ce7f0;
}

.gatekeeper-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 26px;
}

/* Formulário */
.gatekeeper-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gatekeeper-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.gatekeeper-field label {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.gatekeeper-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.gatekeeper-icon {
  position: absolute;
  left: 16px;
  color: #62a1ab;
  pointer-events: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.gatekeeper-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(2, 34, 39, 0.65);
  border: 1px solid rgba(134, 227, 238, 0.24);
  border-radius: 12px;
  padding: 15px 16px 15px 44px;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.gatekeeper-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

.gatekeeper-input:focus {
  outline: none;
  border-color: #c1f079;
  background: rgba(3, 42, 48, 0.85);
  box-shadow: 0 0 0 3px rgba(193, 240, 121, 0.2);
}

.gatekeeper-input:focus + .gatekeeper-icon,
.gatekeeper-input-wrapper:focus-within .gatekeeper-icon {
  color: #c1f079;
}

.gatekeeper-input.has-error {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
}

.gatekeeper-error-msg {
  display: none;
  font-size: 12px;
  color: #ff8b8b;
  margin-top: 3px;
  font-weight: 500;
}

.gatekeeper-error-msg.visible {
  display: block;
  animation: gatekeeperShake 0.3s ease;
}

/* Botão de envio */
.gatekeeper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  background: #c1f079;
  color: #043b43;
  border: none;
  border-radius: 100px;
  padding: 17px 26px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, background-color 0.2s;
  box-shadow: 0 8px 24px rgba(193, 240, 121, 0.25);
  position: relative;
  overflow: hidden;
}

.gatekeeper-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(193, 240, 121, 0.38);
  background: #d1f793;
}

.gatekeeper-btn:active:not(:disabled) {
  transform: translateY(0);
}

.gatekeeper-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

/* Spinner de carregamento */
.gatekeeper-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 59, 67, 0.3);
  border-top-color: #043b43;
  border-radius: 50%;
  animation: gatekeeperSpin 0.7s linear infinite;
}

.gatekeeper-btn.is-loading .gatekeeper-btn-text {
  opacity: 0.85;
}

.gatekeeper-btn.is-loading .gatekeeper-spinner {
  display: inline-block;
}

/* Rodapé com segurança */
.gatekeeper-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.gatekeeper-footer svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  opacity: 0.7;
}

/* Mensagem de Sucesso */
.gatekeeper-success-box {
  display: none;
  text-align: center;
  padding: 20px 10px;
  animation: gatekeeperFadeUp 0.4s ease forwards;
}

.gatekeeper-success-box.visible {
  display: block;
}

.gatekeeper-success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: rgba(193, 240, 121, 0.15);
  border: 2px solid #c1f079;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c1f079;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 0 25px rgba(193, 240, 121, 0.35);
}

.gatekeeper-success-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.gatekeeper-success-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

/* Animações */
@keyframes gatekeeperSpin {
  to { transform: rotate(360deg); }
}

@keyframes gatekeeperShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes gatekeeperFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade mobile */
@media (max-width: 520px) {
  .gatekeeper-modal {
    padding: 30px 22px;
    border-radius: 16px;
  }
  
  .gatekeeper-title {
    font-size: 1.45rem;
  }
  
  .gatekeeper-desc {
    font-size: 13.5px;
    margin-bottom: 20px;
  }

  .gatekeeper-input {
    padding: 13px 14px 13px 40px;
    font-size: 14px;
  }

  .gatekeeper-btn {
    padding: 15px 20px;
    font-size: 14px;
  }
}
