/* Inline lead-magnet gate. Rendered by src/lead-magnets/lead-magnet-form.js.
   Falls back to the site palette values when the host page defines no :root vars. */

.lm-gate {
  background: #fafafa;
  background: var(--white, #fafafa);
  border: 1px solid var(--gray-100, #e5e5e5);
  border-radius: 12px;
  padding: 2rem;
  max-width: 620px;
}

.lm-gate .lm-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400, #737373);
  font-family: var(--font-mono, monospace);
  margin-bottom: 0.75rem;
}

.lm-gate .lm-blurb {
  color: var(--gray-600, #404040);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.lm-gate .lm-row {
  margin-bottom: 1rem;
}

.lm-gate .lm-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700, #262626);
  margin-bottom: 0.375rem;
}

.lm-gate .lm-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--black, #0a0a0a);
  background: var(--white, #fafafa);
  border: 1px solid var(--gray-200, #d4d4d4);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lm-gate .lm-input:focus {
  outline: none;
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.lm-gate .lm-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--gray-500, #525252);
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.lm-gate .lm-consent input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #3b82f6);
  cursor: pointer;
}

.lm-gate .lm-consent a {
  color: var(--accent, #3b82f6);
  border-bottom: 1px solid rgba(59, 130, 246, 0.35);
  text-decoration: none;
}

.lm-gate .lm-consent a:hover {
  border-bottom-color: var(--accent, #3b82f6);
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.lm-gate .lm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lm-gate .lm-err {
  color: #dc2626;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  min-height: 0;
}

.lm-gate .lm-err:empty {
  margin-bottom: 0;
}

.lm-gate .lm-submit {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white, #fafafa);
  background: var(--black, #0a0a0a);
  border: none;
  border-radius: 8px;
  padding: 0.9375rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lm-gate .lm-submit:hover:not(:disabled) {
  background: var(--gray-700, #262626);
  transform: translateY(-1px);
}

.lm-gate .lm-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.lm-gate .lm-fine {
  font-size: 0.75rem;
  color: var(--gray-400, #737373);
  line-height: 1.6;
  margin: 0.875rem 0 0;
  text-align: center;
}

.lm-gate .lm-done {
  display: none;
}

.lm-gate.is-done .lm-form {
  display: none;
}

.lm-gate.is-done .lm-done {
  display: block;
}

.lm-gate .lm-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.lm-gate .lm-done h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black, #0a0a0a);
  margin: 0 0 0.5rem;
}

.lm-gate .lm-done p {
  font-size: 0.9375rem;
  color: var(--gray-500, #525252);
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

.lm-gate .lm-done-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent, #3b82f6);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent, #3b82f6);
  padding-bottom: 2px;
}

@media (max-width: 640px) {
  .lm-gate {
    padding: 1.5rem;
  }
}
