/* Shared gate overlay — used by every lead-magnet page.
   Background content stays in the DOM and scrollable; it's blurred
   and click-inert while the modal is up. Submit success removes
   body.gated → content unlocks with a short fade. */

body.gated {
  overflow: auto;
}

/* Blur + disable the actual content. The modal sits outside this
   wrapper so it stays sharp. */
body.gated #content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s ease;
}

/* Modal overlay — fixed, so the background scrolls behind it. */
.gate-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  pointer-events: none; /* let the background scroll through the gaps */
  background: linear-gradient(180deg, rgba(14,14,15,0.12), rgba(14,14,15,0.08));
}

.gate-modal {
  pointer-events: auto;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 0.5px solid #e2ddd6;
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.04);
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
  color: #0e0e0f;
  animation: gate-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes gate-in {
  from { transform: translateY(10px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1);        opacity: 1; }
}

.gate-lock {
  font-size: 28px;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1;
}

.gate-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: 6px;
  font-weight: 400;
}

.gate-title em {
  font-style: italic;
  color: #854F0B;
}

.gate-sub {
  text-align: center;
  color: #6b6e76;
  font-size: 13px;
  margin-bottom: 18px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gate-field label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888580;
  font-weight: 500;
}

.gate-field input {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 0.5px solid #d9d3c9;
  border-radius: 10px;
  background: #faf8f3;
  color: #0e0e0f;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.gate-field input:focus {
  border-color: #854F0B;
  background: #ffffff;
}

.gate-field input::placeholder {
  color: #b0aa9f;
}

.gate-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 6px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.gate-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: #854F0B;
  flex-shrink: 0;
}

.gate-consent a {
  color: #0C447C;
  text-decoration: underline;
}

.gate-submit {
  margin-top: 10px;
  background: #0e0e0f;
  color: #f5f2ec;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s;
}

.gate-submit:hover:not(:disabled) { background: #1f1f22; }
.gate-submit:active:not(:disabled) { transform: translateY(1px); }
.gate-submit:disabled { opacity: 0.6; cursor: wait; }

.gate-error {
  color: #992929;
  font-size: 12.5px;
  background: #FBEAEA;
  border: 0.5px solid #E5A0A0;
  border-radius: 8px;
  padding: 8px 12px;
  display: none;
}

.gate-error.visible { display: block; }

.gate-footer {
  text-align: center;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0aa9f;
  margin-top: 14px;
}

/* Unlock animation: when .gated is removed, content un-blurs smoothly. */
body:not(.gated) .gate-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* ── intl-tel-input overrides — match the rest of the form ── */
.gate-form .iti { width: 100%; display: block; }
.gate-form .iti__tel-input {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 0.5px solid #d9d3c9;
  border-radius: 10px;
  background: #faf8f3;
  color: #0e0e0f;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
.gate-form .iti__tel-input:focus {
  border-color: #854F0B;
  background: #ffffff;
}
.gate-form .iti--separate-dial-code .iti__selected-flag {
  background: #faf8f3;
  border-radius: 10px 0 0 10px;
  border-right: 0.5px solid #d9d3c9;
}
.gate-form .iti__country-list {
  font-family: inherit;
  font-size: 13px;
  border-radius: 10px;
  border: 0.5px solid #d9d3c9;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.gate-form .iti__country { padding: 8px 10px; }
.gate-form .iti__selected-dial-code { font-size: 14px; color: #0e0e0f; }
