/*
 * Chasing Experiences Exit Popup — v2
 * Styles match the Chasing Experiences Vlog + App brand tokens:
 *   --paper #F4F7FA, --paper-soft #E8EEF4, --ink #1A2A3A,
 *   --ink-deep #0F1B28, --ink-soft #2E465E, --ink-mute #6F8499,
 *   --accent #BFD7E8, --accent-warm #3E5266
 */

#cexp-popup,
#cexp-popup * {
  box-sizing: border-box;
}

.cexp-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Newsreader", Georgia, serif;
}

.cexp-popup[hidden] {
  display: none;
}

.cexp-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 40, .58);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.cexp-popup__dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 48px);
  background: #F4F7FA;
  border: 1px solid rgba(26, 42, 58, .14);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .35);
  overflow: hidden;
  animation: cexp-popup-in .25s ease-out;
}

@keyframes cexp-popup-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cexp-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: rgba(244, 247, 250, .92);
  color: #1A2A3A;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.cexp-popup__close:hover {
  background: #F4F7FA;
  transform: scale(1.05);
}

/* ── Hero: tilted "memory card" mockup on a soft gradient ── */
.cexp-popup__hero {
  flex: 0 0 44%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(191, 215, 232, .65) 0%, rgba(232, 238, 244, .2) 60%),
    linear-gradient(160deg, #E8EEF4 0%, #BFD7E8 100%);
  overflow: hidden;
}

.cexp-popup__hero::before {
  /* Soft "horizon" line — a nod to the app's mark */
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 28%;
  height: 1px;
  background: rgba(15, 27, 40, .14);
}

.cexp-popup__mockup {
  width: 100%;
  max-width: 240px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow:
    0 24px 40px -16px rgba(15, 27, 40, .35),
    0 2px 4px rgba(15, 27, 40, .08);
  overflow: hidden;
  transform: rotate(-2deg);
  position: relative;
  z-index: 1;
}

.cexp-popup__mockup-photo {
  position: relative;
  height: 130px;
  overflow: hidden;
  background: #BFD7E8;
}

.cexp-popup__mockup-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cexp-popup__mockup-date {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  background: rgba(15, 27, 40, .82);
  color: #F4F7FA;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  border-radius: 99px;
  z-index: 2;
}

.cexp-popup__mockup-body {
  padding: 14px 14px 16px;
}

.cexp-popup__mockup-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #1A2A3A;
  margin: 0 0 4px;
}

.cexp-popup__mockup-title em {
  font-style: italic;
  font-weight: 400;
  color: #3E5266;
}

.cexp-popup__mockup-desc {
  font-family: "Newsreader", Georgia, serif;
  font-size: 11px;
  line-height: 1.45;
  color: #2E465E;
  margin: 0 0 10px;
}

.cexp-popup__mockup-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cexp-popup__mockup-tags span {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .12em;
  padding: 3px 7px;
  background: #F4F7FA;
  border-radius: 99px;
  color: #6F8499;
}

.cexp-popup__hero-caption {
  position: relative;
  z-index: 1;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(15, 27, 40, .6);
  text-align: center;
}

/* ── Body: kicker + headline + copy + form ── */
.cexp-popup__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px;
  overflow-y: auto;
}

.cexp-popup__kicker {
  margin: 0 0 10px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #6F8499;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cexp-popup__kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: #6F8499;
}

.cexp-popup__title {
  margin: 0 0 14px;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #1A2A3A;
}

.cexp-popup__title em {
  font-style: italic;
  font-weight: 400;
  color: #3E5266;
}

.cexp-popup__copy {
  margin: 0 0 20px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 15px;
  line-height: 1.6;
  color: #2E465E;
}

.cexp-popup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.cexp-popup__form input[type="email"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #6F8499;
  background: #ffffff;
  font: inherit;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #1A2A3A;
}

.cexp-popup__form input[type="email"]:focus {
  outline: none;
  border-color: #3E5266;
  box-shadow: 0 0 0 3px rgba(62, 82, 102, .14);
}

.cexp-popup__cta {
  padding: 14px 22px;
  background: #1A2A3A;
  color: #F4F7FA;
  border: 0;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease;
}

.cexp-popup__cta:hover {
  background: #3E5266;
}

.cexp-popup__fine {
  margin: 14px 0 0;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  color: #6F8499;
  letter-spacing: .04em;
}

.cexp-popup__fine a {
  color: #3E5266;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cexp-popup__fine a:hover {
  color: #1A2A3A;
}

/* Step switcher — STEP 1 (form) vs STEP 2 (inline success). */
.cexp-popup__step[hidden] {
  display: none;
}

.cexp-popup__step--success {
  animation: cexp-popup-fade .2s ease-out;
}

@keyframes cexp-popup-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cexp-popup__success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-bottom: 14px;
  background: #BFD7E8;
  color: #1A2A3A;
}

/* WordPress screen-reader-text helper if the theme doesn't define it */
.cexp-popup .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Honeypot — off-screen (not display:none, which bots fill more readily) */
.cexp-popup__hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .cexp-popup {
    padding: 0;
    align-items: flex-end;
  }
  .cexp-popup__dialog {
    flex-direction: column;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .cexp-popup__hero {
    flex: 0 0 auto;
    padding: 28px 24px 20px;
  }
  .cexp-popup__mockup {
    max-width: 220px;
  }
  .cexp-popup__hero-caption {
    font-size: 9px;
  }
  .cexp-popup__body {
    padding: 24px 22px 28px;
  }
  .cexp-popup__title {
    font-size: 24px;
  }
  .cexp-popup__copy {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .cexp-popup__mockup {
    max-width: 200px;
  }
  .cexp-popup__hero {
    padding: 24px 16px 16px;
  }
  .cexp-popup__body {
    padding: 20px 18px 24px;
  }
}
