/* ══════════════════════════════════════════════════════════════════════════
   email-gate.css — World-Class page gate modal + blur + exit-intent banner
   Matches existing site style (dark theme, DM Serif Display, DM Sans, red #d71920)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Blurred content wrapper ─────────────────────────────────────────────── */
.content-wrapper {
  transition: filter 200ms ease;
}
.content-wrapper.blurred {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
body.gate-active {
  overflow: hidden;
}

/* ── CTA overlay (sits above blurred content) ────────────────────────────── */
.eg-cta-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card, #161b22);
  border: 1px solid var(--border, #21262d);
  border-radius: 14px;
  padding: 36px 40px;
  max-width: 480px;
  width: calc(100% - 32px);
  text-align: center;
  z-index: 9997;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.eg-cta-overlay h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  color: var(--text, #e6edf3);
  margin: 0 0 10px;
  line-height: 1.2;
}
.eg-cta-overlay p {
  color: var(--muted, #7d8590);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.eg-cta-btn {
  display: inline-block;
  background: var(--red, #d71920);
  color: #fff;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
  min-height: 44px;
  text-decoration: none;
}
.eg-cta-btn:hover {
  background: #b51419;
  transform: translateY(-1px);
}
.eg-cta-btn:active {
  transform: translateY(0);
}

/* ── Modal backdrop ──────────────────────────────────────────────────────── */
.eg-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.eg-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.eg-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  background: var(--card, #161b22);
  border: 1px solid var(--border, #21262d);
  border-radius: 14px;
  padding: 40px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.eg-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}

.eg-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted, #7d8590);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color 150ms, background 150ms;
}
.eg-close:hover {
  color: var(--text, #e6edf3);
  background: rgba(255,255,255,0.06);
}

.eg-modal h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  color: var(--text, #e6edf3);
  margin: 0 0 10px;
  line-height: 1.2;
  padding-right: 32px;
}
.eg-modal p.eg-sub {
  font-size: 14px;
  color: var(--muted, #7d8590);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ── Trust row (logos) ───────────────────────────────────────────────────── */
.eg-trust {
  border-top: 1px solid var(--border, #21262d);
  border-bottom: 1px solid var(--border, #21262d);
  padding: 14px 0;
  margin: 0 0 20px;
}
.eg-trust-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted, #7d8590);
  text-align: center;
  margin-bottom: 10px;
}
.eg-logos {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  filter: grayscale(1);
  opacity: 0.7;
}
.eg-logo-ph {
  height: 24px;
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted, #7d8590);
  letter-spacing: 0.3px;
}

/* ── Social proof line ───────────────────────────────────────────────────── */
.eg-social-proof {
  font-size: 13px;
  color: var(--muted, #7d8590);
  text-align: center;
  margin: 0 0 16px;
}
.eg-social-proof strong {
  color: var(--text, #e6edf3);
}

/* ── Form container + HubSpot overrides ──────────────────────────────────── */
#eg-hubspot-form-container,
#eg-addcompany-form-container {
  min-height: 80px;
}
#eg-hubspot-form-container .hs-form,
#eg-addcompany-form-container .hs-form {
  font-family: 'DM Sans', sans-serif !important;
}
#eg-hubspot-form-container .hs-form label,
#eg-addcompany-form-container .hs-form label {
  color: var(--muted, #7d8590) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
#eg-hubspot-form-container input[type="email"],
#eg-hubspot-form-container input[type="text"],
#eg-addcompany-form-container input[type="email"],
#eg-addcompany-form-container input[type="text"],
#eg-addcompany-form-container input[type="url"] {
  background: var(--dark, #0d1117) !important;
  border: 1px solid var(--border, #21262d) !important;
  color: var(--text, #e6edf3) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  min-height: 44px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#eg-hubspot-form-container input[type="email"]:focus,
#eg-addcompany-form-container input[type="email"]:focus,
#eg-addcompany-form-container input[type="text"]:focus,
#eg-addcompany-form-container input[type="url"]:focus {
  outline: none !important;
  border-color: var(--red, #d71920) !important;
}
#eg-hubspot-form-container input.hs-button,
#eg-addcompany-form-container input.hs-button {
  background: var(--red, #d71920) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 28px !important;
  border-radius: 8px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  width: 100% !important;
  min-height: 44px !important;
  margin-top: 10px !important;
  transition: background 150ms !important;
}
#eg-hubspot-form-container input.hs-button:hover,
#eg-addcompany-form-container input.hs-button:hover {
  background: #b51419 !important;
}
#eg-hubspot-form-container .hs-error-msgs,
#eg-addcompany-form-container .hs-error-msgs {
  color: #f85149 !important;
  font-size: 12px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 4px 0 0 !important;
}

/* Inline business-email error */
.eg-email-error {
  color: #f85149;
  font-size: 12px;
  margin: 6px 0 0;
  line-height: 1.5;
  display: none;
}
.eg-email-error.visible {
  display: block;
}

/* ── Privacy microcopy ───────────────────────────────────────────────────── */
.eg-privacy {
  font-size: 11px;
  color: var(--muted, #7d8590);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* ── Add-company link in footer ──────────────────────────────────────────── */
.eg-add-company-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--muted, #7d8590);
  margin: 24px auto 8px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.eg-add-company-link:hover {
  color: var(--red, #d71920);
}

/* ── Success toast ───────────────────────────────────────────────────────── */
.eg-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #15803d;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10001;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.eg-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Exit-intent banner ──────────────────────────────────────────────────── */
.eg-exit-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card, #161b22);
  border-top: 2px solid var(--red, #d71920);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9996;
  transform: translateY(100%);
  transition: transform 220ms ease;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.5);
  flex-wrap: wrap;
}
.eg-exit-banner.visible {
  transform: translateY(0);
}
.eg-exit-banner p {
  color: var(--text, #e6edf3);
  font-size: 14px;
  margin: 0;
}
.eg-exit-banner p strong {
  color: var(--red, #d71920);
  margin-right: 6px;
}
.eg-exit-btn {
  background: var(--red, #d71920);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.eg-exit-btn:hover {
  background: #b51419;
}
.eg-exit-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted, #7d8590);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.eg-exit-close:hover {
  color: var(--text, #e6edf3);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .eg-cta-overlay {
    padding: 24px 20px;
    max-width: 92vw;
  }
  .eg-cta-overlay h2 {
    font-size: 20px;
  }
  .eg-modal {
    width: 90vw;
    max-width: none;
    padding: 28px 20px 24px;
  }
  .eg-modal h2 {
    font-size: 20px;
  }
  .eg-logos {
    gap: 12px;
  }
  .eg-logo-ph {
    font-size: 12px;
  }
  .eg-exit-banner {
    flex-direction: column;
    text-align: center;
    padding: 14px 20px 16px;
  }
}
