/* Lead Gate – inherits the theme's fonts and text colour; only the button uses the accent. */

.lead-gate-wrap {
  position: relative;
  margin: 0 0 2em;
}

/* Locked state: a short, blurred, fading preview of what's next. */
html:not(.lead-gate-unlocked) .lead-gate-wrap:not(.is-unlocked) .lead-gate-locked {
  max-height: 240px;
  overflow: hidden;
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 90%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 90%);
}

html.lead-gate-unlocked .lead-gate-box,
.lead-gate-wrap.is-unlocked .lead-gate-box {
  display: none;
}

.lead-gate-wrap.is-unlocked .lead-gate-locked {
  animation: lead-gate-reveal 0.5s ease-out;
}
.lead-gate-locked:focus { outline: none; }

@keyframes lead-gate-reveal {
  from { opacity: 0.35; filter: blur(4px); }
  to   { opacity: 1;    filter: blur(0); }
}

/* The form card */
.lead-gate-box {
  --lead-gate-accent: #1a56db;
  position: relative;
  margin: -64px auto 0;
  max-width: 34em;
  padding: 1.75em 1.75em 1.5em;
  background: var(--lead-gate-bg, #fff);
  color: inherit;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-top: 4px solid var(--lead-gate-accent);
  border-radius: 6px;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
  font-size: 1rem;
  line-height: 1.5;
}

.lead-gate-box .lead-gate-title {
  margin: 0 0 0.35em;
  font-size: 1.3em;
  font-weight: 700;
  line-height: 1.25;
}

.lead-gate-box .lead-gate-sub {
  margin: 0 0 1.25em;
  opacity: 0.8;
}

.lead-gate-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75em;
  margin-bottom: 0.9em;
}

.lead-gate-field {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  font-size: 0.85em;
  font-weight: 600;
  margin: 0;
}

.lead-gate-field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  padding: 0.7em 0.8em;
  border: 1px solid rgba(127, 127, 127, 0.45);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  margin: 0;
}

.lead-gate-field input:focus {
  outline: 2px solid var(--lead-gate-accent);
  outline-offset: 1px;
  border-color: var(--lead-gate-accent);
}

.lead-gate-field input[aria-invalid="true"] {
  border-color: #c81e1e;
}

.lead-gate-consent {
  display: flex;
  gap: 0.6em;
  align-items: flex-start;
  font-size: 0.85em;
  opacity: 0.85;
  margin: 0 0 1.1em;
  cursor: pointer;
}
.lead-gate-consent input {
  margin: 0.25em 0 0;
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  accent-color: var(--lead-gate-accent);
}
.lead-gate-consent a { color: inherit; text-decoration: underline; }

.lead-gate-btn {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85em 1em;
  border: 0;
  border-radius: 4px;
  background: var(--lead-gate-accent);
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.lead-gate-btn:hover { filter: brightness(1.08); }
.lead-gate-btn:focus-visible { outline: 3px solid var(--lead-gate-accent); outline-offset: 2px; }
.lead-gate-btn:disabled { opacity: 0.7; cursor: wait; }

.lead-gate-msg {
  margin: 0.75em 0 0;
  font-size: 0.875em;
  color: #c81e1e;
  min-height: 1em;
}
.lead-gate-msg:empty { display: none; }

/* Honeypot – hidden from people, visible to bots */
.lead-gate-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .lead-gate-box { padding: 1.35em 1.1em 1.2em; margin-top: -48px; }
  .lead-gate-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .lead-gate-wrap.is-unlocked .lead-gate-locked { animation: none; }
}
