/* =====================================================================
   Planet 5 — Shared Landing Page Popup
   Bottom-sheet on mobile, centered modal on desktop.
   Triggers: 15s timer OR 50% scroll OR exit-intent (whichever first).
   30-day cookie suppression after dismiss/submit.
   ===================================================================== */

.p5-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.p5-popup.is-open {
  display: block;
  pointer-events: auto;
}

.p5-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.p5-popup.is-open .p5-popup__backdrop {
  opacity: 1;
}

.p5-popup__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #fafaf8;
  padding: 32px 24px 28px;
  border-top: 1px solid rgba(244, 194, 39, 0.25);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.p5-popup.is-open .p5-popup__panel {
  transform: translateY(0);
}

.p5-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.p5-popup__close:hover,
.p5-popup__close:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
}

.p5-popup__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f4c227;
  margin: 0 0 14px;
}

.p5-popup__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: #ffffff;
}

.p5-popup__body {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 22px;
  font-weight: 300;
}

.p5-popup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p5-popup__input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.p5-popup__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.p5-popup__input:focus {
  outline: none;
  border-color: #f4c227;
  background: rgba(255, 255, 255, 0.1);
}

.p5-popup__submit {
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: #f4c227;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}

.p5-popup__submit:hover {
  background: #ffd33b;
}

.p5-popup__submit:active {
  transform: translateY(1px);
}

.p5-popup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.p5-popup__footnote {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
  margin: 14px 0 0;
  text-align: center;
}

.p5-popup__success {
  display: none;
  padding: 12px 0 4px;
}

.p5-popup.is-success .p5-popup__form,
.p5-popup.is-success .p5-popup__title,
.p5-popup.is-success .p5-popup__body,
.p5-popup.is-success .p5-popup__footnote {
  display: none;
}

.p5-popup.is-success .p5-popup__success {
  display: block;
}

.p5-popup__success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  color: #f4c227;
  margin: 0 0 10px;
}

.p5-popup__success-body {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

/* Desktop: centered modal */
@media (min-width: 720px) {
  .p5-popup__panel {
    bottom: auto;
    left: 50%;
    top: 50%;
    right: auto;
    width: min(480px, calc(100% - 40px));
    transform: translate(-50%, -45%) scale(0.96);
    border: 1px solid rgba(244, 194, 39, 0.18);
    border-radius: 6px;
    padding: 44px 40px 36px;
  }

  .p5-popup.is-open .p5-popup__panel {
    transform: translate(-50%, -50%) scale(1);
  }

  .p5-popup__close {
    top: 14px;
    right: 14px;
  }
}

/* STICKY MOBILE CTA BAR */
.p5-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(26, 26, 26, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(244, 194, 39, 0.22);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  gap: 10px;
  align-items: center;
}

.p5-sticky-cta.is-visible {
  transform: translateY(0);
}

.p5-sticky-cta__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1a1a;
  background: #f4c227;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.p5-sticky-cta__btn:hover {
  background: #ffd33b;
}

.p5-sticky-cta__close {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p5-sticky-cta__close:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 768px) {
  .p5-sticky-cta {
    display: none;
  }
}

/* INLINE FORM SUCCESS */
.p5-inline-success {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: #f4c227;
  padding: 18px 0;
  text-align: center;
}
