/* ═══════════════════════════════════════════════════════
   UTI-CRISIS-POPUP.CSS — Site-wide modal driving traffic
   to /uti-crisis/ (gated whitepaper landing).
   Vanilla CSS, brand vocabulary only. Classes prefixed
   `pn-popup` to avoid collisions.
   ═══════════════════════════════════════════════════════ */

.pn-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(57, 55, 143, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.pn-popup[data-state="open"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease, visibility 0s linear 0s;
}

.pn-popup__card {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 70% 50% at 90% 0%, rgba(232, 32, 101, 0.16) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(143, 202, 235, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #f5f3ff 0%, #ffffff 75%);
  box-shadow: var(--shadow-cinematic-lg);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.32s ease;
}

.pn-popup__cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 75%),
    linear-gradient(160deg, #f2eef9 0%, #e4dcf3 50%, #d8caee 100%);
  overflow: hidden;
}

.pn-popup__cover img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.28),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.pn-popup[data-state="open"] .pn-popup__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pn-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(57, 55, 143, 0.06);
  color: var(--color-purple);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pn-popup__close:hover {
  background: rgba(232, 32, 101, 0.10);
  color: var(--color-coral-dark);
  transform: rotate(90deg);
}

.pn-popup__close:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.pn-popup__close svg {
  width: 16px;
  height: 16px;
}

.pn-popup__body {
  padding: 44px 32px 32px;
  overflow-y: auto;
}

.pn-popup__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-coral-dark);
  background: rgba(232, 32, 101, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--gap-md);
}

.pn-popup__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-purple);
  margin: 0 0 var(--gap-md);
}

.pn-popup__title em {
  font-style: italic;
  color: var(--color-coral-dark);
}

.pn-popup__copy {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-light);
  margin: 0 0 var(--gap-xl);
  max-width: 38ch;
}

.pn-popup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md);
}

.pn-popup__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  background: var(--color-coral);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px -8px rgba(232, 32, 101, 0.45);
}

.pn-popup__cta:hover {
  background: var(--color-coral-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(184, 0, 75, 0.5);
}

.pn-popup__cta:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 3px;
}

.pn-popup__cta svg {
  width: 14px;
  height: 14px;
}

.pn-popup__secondary {
  border: none;
  background: transparent;
  padding: 6px 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-purple-mid);
  cursor: pointer;
  transition: color 0.2s ease;
}

.pn-popup__secondary:hover {
  color: var(--color-coral-dark);
}

.pn-popup__secondary:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile takeover — full-screen card with cover stacked on top */
@media (max-width: 600px) {
  .pn-popup {
    padding: 0;
  }
  .pn-popup__card {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    background:
      radial-gradient(ellipse 80% 40% at 80% 0%, rgba(232, 32, 101, 0.18) 0%, transparent 65%),
      radial-gradient(ellipse 80% 40% at 20% 100%, rgba(143, 202, 235, 0.14) 0%, transparent 70%),
      linear-gradient(180deg, #f5f3ff 0%, #ffffff 70%);
  }
  .pn-popup__cover {
    height: 240px;
    padding: 28px 24px 16px;
    background:
      radial-gradient(ellipse 90% 60% at 50% 30%, rgba(255, 255, 255, 0.65) 0%, transparent 75%),
      linear-gradient(165deg, #f2eef9 0%, #e4dcf3 55%, #d8caee 100%);
  }
  .pn-popup__cover img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow:
      0 22px 40px rgba(57, 55, 143, 0.32),
      0 6px 14px rgba(57, 55, 143, 0.20);
  }
  .pn-popup__body {
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .pn-popup__title {
    font-size: clamp(1.75rem, 7.5vw, 2.25rem);
  }
}

/* Reduced motion — drop transitions, just opacity */
@media (prefers-reduced-motion: reduce) {
  .pn-popup,
  .pn-popup__card,
  .pn-popup__close,
  .pn-popup__cta {
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    transform: none !important;
  }
  .pn-popup[data-state="open"] {
    transition: opacity 0.2s ease, visibility 0s linear 0s;
  }
}
