/* ============================================================
   Lead magnet popup — "Read the First 5 Chapters Free"
   Uses site variables defined in styles.css
   ============================================================ */

.aoa-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.aoa-popup-overlay.aoa-visible { opacity: 1; }

.aoa-popup {
  position: relative;
  background: var(--bg-card, #1A1A1A);
  border-top: 3px solid var(--red, #9B1D1D);
  max-width: 820px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  box-shadow: 8px 8px 0 rgba(155, 29, 29, 0.55);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}
.aoa-popup-overlay.aoa-visible .aoa-popup { transform: translateY(0); }

@media (min-width: 620px) {
  .aoa-popup { grid-template-columns: 380px 1fr; }
}

.aoa-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  background: none;
  border: none;
  color: var(--text-muted, #A09070);
  font-family: 'Space Mono', monospace;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem;
  z-index: 2;
  transition: color 0.2s;
}
.aoa-popup-close:hover { color: var(--cream, #F0E0C0); }

.aoa-popup-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 0;
}
@media (min-width: 620px) {
  .aoa-popup-cover { padding: 1.5rem 0 1.5rem 1.25rem; }
}
.aoa-popup-cover img {
  width: 100%;
  max-width: 340px;
  height: auto;
}
@media (max-width: 619px) {
  .aoa-popup-cover img { max-width: 280px; }
}

.aoa-popup-body { padding: 1.5rem 1.75rem 1.75rem; }

.aoa-popup-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #C89B3C);
  margin-bottom: 0.4rem;
}

.aoa-popup-headline {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--cream, #F0E0C0);
  margin-bottom: 0.6rem;
}

.aoa-popup-sub {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted, #A09070);
  margin-bottom: 1.25rem;
}

.aoa-popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.aoa-popup-form input[type="email"] {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border, #2A2A2A);
  color: var(--cream, #F0E0C0);
  padding: 0.7em 1em;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.aoa-popup-form input[type="email"]::placeholder { color: rgba(240, 224, 192, 0.4); }
.aoa-popup-form input[type="email"]:focus { border-color: var(--red, #9B1D1D); }

.aoa-popup-form button {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  background: var(--red, #9B1D1D);
  color: var(--cream, #F0E0C0);
  padding: 0.55em 1.6em;
  border: 2px solid var(--red, #9B1D1D);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.aoa-popup-form button:hover {
  background: var(--red-dark, #7A1515);
  border-color: var(--red-dark, #7A1515);
  color: var(--gold, #C89B3C);
}
.aoa-popup-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.aoa-popup-error {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: #E07A5F;
  margin-top: 0.5rem;
  display: none;
}
.aoa-popup-error.aoa-show { display: block; }

.aoa-popup-note {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(160, 144, 112, 0.7);
  margin-top: 0.9rem;
}

.aoa-popup-success {
  display: none;
  padding: 0.5rem 0;
}
.aoa-popup-success.aoa-show { display: block; }
.aoa-popup-success h3 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--gold, #C89B3C);
  margin-bottom: 0.5rem;
}
.aoa-popup-success p {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  color: var(--text, #F0E0C0);
}
