/* ============================================================
   Exit-Intent Popup · "Before you postpone"
   Matches site dark-mode design system. Uses tokens from styles.css.
   ============================================================ */

/* Backdrop */
.exit-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  padding: 24px;
}

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

/* Modal */
.exit-popup__modal {
  position: relative;
  background:
    radial-gradient(circle at 20% 0%, rgba(212, 255, 59, 0.08), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(212, 255, 59, 0.05), transparent 55%),
    #0a0a0a;
  border: 1px solid rgba(212, 255, 59, 0.18);
  border-radius: 20px;
  padding: 44px 40px 40px;
  max-width: 560px;
  width: 100%;
  color: #fff;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.exit-popup.is-open .exit-popup__modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.exit-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  padding: 0;
  font-family: inherit;
}

.exit-popup__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Eyebrow */
.exit-popup__eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d4ff3b;
  border: 1px solid rgba(212, 255, 59, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(212, 255, 59, 0.06);
  margin-bottom: 22px;
}

/* Headline */
.exit-popup__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 20px;
}

@media (min-width: 520px) {
  .exit-popup__title { font-size: 40px; }
}

/* Body copy */
.exit-popup__body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 12px;
}

.exit-popup__body strong {
  color: #fff;
  font-weight: 600;
}

.exit-popup__closer {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 32px;
  font-style: italic;
}

/* Social buttons row */
.exit-popup__socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 480px) {
  .exit-popup__socials {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .exit-popup__socials a { flex: 1 1 calc(33.333% - 7px); min-width: 120px; }
}

.exit-popup__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.exit-popup__socials a:hover {
  background: rgba(212, 255, 59, 0.08);
  border-color: rgba(212, 255, 59, 0.4);
  color: #d4ff3b;
  transform: translateY(-1px);
}

.exit-popup__socials a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* No-thanks link */
.exit-popup__decline {
  display: block;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  padding: 12px;
  cursor: pointer;
  transition: color 0.18s ease;
  margin-top: 8px;
}

.exit-popup__decline:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .exit-popup__modal {
    padding: 36px 24px 28px;
    border-radius: 16px;
  }
  .exit-popup__title { font-size: 28px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .exit-popup, .exit-popup__modal, .exit-popup__close {
    transition: none;
  }
  .exit-popup__modal { transform: none; }
}
