/* ─── Email Gate Styles ───────────────────────────────────────────────────── */

.email-gate-wrapper {
  position: relative;
  /* Clip the blurred content so it doesn't bleed outside */
  overflow: hidden;
  border-radius: 0 0 16px 16px;
}

/* Fade from transparent at top to white/card-bg below, creating a natural cutoff */
.email-gate-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.85));
  z-index: 1;
  pointer-events: none;
}

/* The floating form overlay, centred over the blurred content */
.email-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 16px;
  /* Subtle backdrop so overlay stands out from the blurred content */
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.email-gate-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 40px);
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 32px rgba(0,0,0,0.1), 0 0 0 1px rgba(16,185,129,0.1);
}

.email-gate-lock {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.email-gate-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, #111827);
  margin-bottom: 8px;
}

.email-gate-sub {
  font-size: 0.88rem;
  color: var(--text-secondary, #4B5563);
  line-height: 1.6;
  margin-bottom: 20px;
}

.email-gate-form {
  display: flex;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

.email-gate-input {
  flex: 1;
  background: var(--bg-elevated, #f1f5f9);
  border: 1px solid var(--border-light, rgba(0,0,0,0.1));
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--text-primary, #111827);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.email-gate-input:focus {
  border-color: rgba(16,185,129,0.4);
}

.email-gate-input::placeholder {
  color: var(--text-muted, #9CA3AF);
}

.email-gate-btn {
  background: var(--accent, #10B981);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.email-gate-btn:hover:not(:disabled) {
  background: var(--accent-dim, #059669);
}

.email-gate-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.email-gate-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.email-gate-msg {
  min-height: 18px;
  margin-top: 10px;
  font-size: 0.82rem;
}

.email-gate-msg.error {
  color: #ef4444;
}

.email-gate-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted, #9CA3AF);
}

/* Success state */
.email-gate-success {
  padding: clamp(24px, 3vw, 36px);
}

/* Mobile: stack the form vertically */
@media (max-width: 480px) {
  .email-gate-form {
    flex-direction: column;
  }
  .email-gate-btn {
    width: 100%;
  }
}
