/* ============================================================
   IYBS · Community popup
   ============================================================ */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 350ms ease, visibility 350ms ease;
}

.popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.popup-card {
  position: relative;
  background: var(--teal-deep);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  overflow: hidden;
  transform: translateY(24px) scale(0.97);
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.popup-overlay.is-visible .popup-card {
  transform: translateY(0) scale(1);
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease;
  z-index: 1;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Inner layout ── */
.popup-inner {
  display: flex;
  align-items: stretch;
  min-height: 280px;
}

/* Cover column */
.popup-cover-wrap {
  flex-shrink: 0;
  width: 160px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem;
}

.popup-cover {
  width: 110px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* Body column */
.popup-body {
  flex: 1;
  padding: 2.25rem 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.popup-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.8;
  margin: 0;
}

.popup-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--warm-white);
  margin: 0;
  line-height: 1.2;
}

.popup-gift-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 0.25rem 0 0;
  line-height: 1.3;
}

.popup-gift-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.5;
}

.popup-lead {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0.25rem 0 0.5rem;
}

.popup-cta {
  display: inline-block;
  align-self: flex-start;
  background: var(--gold);
  color: var(--teal-deep);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  margin-top: 0.25rem;
}

.popup-cta:hover {
  background: var(--gold-light);
  color: var(--teal-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 164, 94, 0.4);
}

.popup-trust {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .popup-inner {
    flex-direction: column;
    min-height: unset;
  }

  .popup-cover-wrap {
    width: 100%;
    padding: 1.5rem 1.5rem 1rem;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
  }

  .popup-cover {
    width: 72px;
  }

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

  .popup-cta {
    align-self: stretch;
    text-align: center;
  }
}
