/* ══════════════════════════════════════════════════════════════
   Shared Lead-Magnet Modal — My Eastern Astrology
   Include on any page to capture emails via Substack in exchange
   for the free BaZi Starter Guide PDF. Pair with lead-modal.js.
   ══════════════════════════════════════════════════════════════ */

:root {
  --lm-white: #FAF5EE;
  --lm-off-white: #F0E8DF;
  --lm-light-gray: #E8D0D8;
  --lm-mid-gray: #6B5F58;
  --lm-dark: #4B2C3F;
  --lm-accent: #9B5C70;
  --lm-accent-deep: #7A3D52;
  --lm-accent-light: #f5e8ed;
  --lm-radius: 18px;
  --lm-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Overlay ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 14, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.is-open { display: flex; animation: lmFadeIn 0.28s ease-out; }

/* ── Card ── */
.modal-card {
  position: relative;
  background: var(--lm-white);
  border-radius: var(--lm-radius);
  max-width: 440px;
  width: 100%;
  padding: 40px 32px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  animation: lmSlideUp 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--lm-mid-gray);
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--lm-transition), color var(--lm-transition);
  line-height: 1;
}
.modal-close:hover { background: var(--lm-off-white); color: var(--lm-dark); }

.modal-cover {
  width: 96px; height: 96px;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(75, 44, 63, 0.22);
  background: linear-gradient(135deg, #4B2C3F 0%, #7A3D52 50%, #9B5C70 100%);
}
.modal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--lm-accent-deep);
  text-align: center;
  margin-bottom: 8px;
}
.modal-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--lm-dark);
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.25;
}
.modal-desc {
  font-size: 14px;
  color: var(--lm-mid-gray);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-input {
  font-family: inherit;
  font-size: 15px;
  color: var(--lm-dark);
  background: var(--lm-white);
  border: 1.5px solid var(--lm-light-gray);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--lm-transition);
  width: 100%;
}
.modal-input:focus { border-color: var(--lm-accent); }

.modal-submit {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--lm-white);
  background: var(--lm-dark);
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--lm-transition);
}
.modal-submit:hover { background: var(--lm-accent-deep); }
.modal-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.modal-disclaimer {
  font-size: 12px;
  color: var(--lm-mid-gray);
  text-align: center;
  line-height: 1.5;
  margin-top: 14px;
}

.modal-success { text-align: center; padding: 12px 0 4px; }
.modal-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--lm-accent-light);
  color: var(--lm-accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.modal-success-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--lm-dark);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.modal-success-desc {
  font-size: 14px;
  color: var(--lm-mid-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}
.modal-success-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--lm-accent-deep);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.modal-success-link:hover { color: var(--lm-dark); }

@keyframes lmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lmSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════════════════════════
   Inline lead-capture cards embedded in blog posts
   ══════════════════════════════════════════════════════════════ */

.lead-card {
  background: linear-gradient(135deg, #FAF5EE 0%, #f5e8ed 100%);
  border: 1px solid var(--lm-light-gray);
  border-radius: var(--lm-radius);
  padding: 32px 28px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}
.lead-card-cover {
  flex-shrink: 0;
  width: 88px; height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #4B2C3F 0%, #7A3D52 50%, #9B5C70 100%);
  box-shadow: 0 6px 18px rgba(75, 44, 63, 0.18);
}
.lead-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-card-body { flex: 1; min-width: 0; }
.lead-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--lm-accent-deep);
  margin-bottom: 6px;
}
.lead-card-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--lm-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}
.lead-card-desc {
  font-size: 14px;
  color: var(--lm-mid-gray);
  line-height: 1.55;
  margin: 0 0 14px;
}
.lead-card-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--lm-white);
  background: var(--lm-dark);
  border: none;
  padding: 11px 22px;
  border-radius: 980px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--lm-transition);
}
.lead-card-btn:hover { background: var(--lm-accent-deep); }

@media (max-width: 640px) {
  .lead-card { flex-direction: column; text-align: center; padding: 28px 20px; }
  .lead-card-cover { width: 80px; height: 80px; }
}
