/* ═══════════════════════════════════════════
   ETERNITY THREAD — Entry Popup
   ═══════════════════════════════════════════ */

.popup-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: popupFade 250ms ease;
}

.popup-backdrop.is-open {
  display: flex;
}

@keyframes popupFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.popup {
  position: relative;
  background-color: var(--color-white);
  color: var(--color-black);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.35);
  animation: popupPop 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupPop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Image side */
.popup__media {
  position: relative;
  background-color: var(--color-grey-100);
  min-height: 520px;
  overflow: hidden;
}

.popup__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Content side */
.popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-7);
  text-align: left;
}

.popup__eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

.popup__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-black);
  margin: 0;
}

.popup__subtext {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-black);
  color: var(--color-white);
  border: 1px solid var(--color-black);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  align-self: flex-start;
  margin-top: var(--space-2);
}

.popup__cta:hover {
  background-color: var(--color-white);
  color: var(--color-black);
}

.popup__cta svg {
  width: 16px;
  height: 16px;
}

.popup__decline {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  align-self: flex-start;
  transition: color var(--transition-fast);
}

.popup__decline:hover {
  color: var(--color-black);
}

/* Close button */
.popup__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--color-black);
  z-index: 2;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.popup__close:hover {
  background-color: var(--color-white);
  transform: scale(1.05);
}

.popup__close svg {
  width: 20px;
  height: 20px;
}

/* Mobile — full-screen takeover */
@media (max-width: 720px) {
  .popup-backdrop {
    padding: 0;
  }

  .popup {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
    max-width: 100%;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .popup__media {
    min-height: 0;
  }

  .popup__content {
    padding: var(--space-6) var(--space-5);
    overflow-y: auto;
  }

  .popup__cta {
    align-self: stretch;
    justify-content: center;
  }

  .popup__decline {
    align-self: center;
  }
}

body.popup-open {
  overflow: hidden;
}