/**
 * Frontier Learning Journey card — banner-scoped, wider + compact.
 */

.upl-hero-shell {
  --fj-blue: #0056d2;
  --fj-ink: #171717;
  --fj-muted: #5b6472;
  --fj-lime: #d8f382;
  --fj-lime-soft: #eaf8c4;
  --fj-lime-text: #2f4a1a;
  --fj-green: #5b8c5d;
  --fj-icon-glow: rgba(0, 86, 210, 0.14);
  --fj-font: 'Figtree', 'Open Sans', system-ui, -apple-system, sans-serif;
}

/* Lock page scroll while the banner popup is open */
html.upl-fj-scroll-lock,
html.upl-fj-scroll-lock body {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none;
}

/* Banner-only overlay layer */
.upl-fj-popup {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 24px;
  box-sizing: border-box;
  pointer-events: none;
}

.upl-fj-popup.is-open {
  display: flex !important;
  pointer-events: auto;
}

.upl-fj-popup[hidden] {
  display: none !important;
}

.upl-hero-shell.upl-fj-active {
  overflow: hidden !important;
}

.upl-fj-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 43, 35, 0.28);
  cursor: pointer;
  pointer-events: auto;
}

.upl-fj-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100% - 20px);
  overflow: auto;
  border-radius: 24px;
  padding: 22px 28px 20px;
  font-family: var(--fj-font);
  color: var(--fj-ink);
  pointer-events: auto;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(216, 243, 130, 0.5) 0%, transparent 42%),
    radial-gradient(110% 90% at 100% 100%, rgba(177, 208, 222, 0.6) 0%, transparent 48%),
    #f7fbf8;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 48px rgba(18, 43, 35, 0.2),
    0 2px 8px rgba(18, 43, 35, 0.06);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: uplFjPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes uplFjPopIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.upl-fj-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fj-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.upl-fj-popup__close:hover {
  background: rgba(23, 23, 23, 0.06);
}

.upl-fj-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--fj-lime-soft);
  color: var(--fj-lime-text);
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  max-width: 100%;
}

.upl-fj-popup__badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: currentColor;
}

.upl-fj-popup__header {
  text-align: center;
  margin: 0 0 14px;
}

.upl-fj-popup__title {
  margin: 0 0 6px;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--fj-ink);
}

.upl-fj-popup__title em,
.upl-fj-popup__title span {
  font-style: normal;
  color: var(--fj-blue);
}

.upl-fj-popup__lead {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--fj-muted);
}

.upl-fj-popup__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 14px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.95);
}

.upl-fj-popup__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 2px 6px;
  position: relative;
}

.upl-fj-popup__stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: rgba(23, 23, 23, 0.08);
}

.upl-fj-popup__stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(91, 140, 93, 0.14);
  color: var(--fj-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.upl-fj-popup__stat-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upl-fj-popup__stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--fj-blue);
  letter-spacing: -0.02em;
}

.upl-fj-popup__stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8a93a0;
}

.upl-fj-popup__features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upl-fj-popup__feature {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.upl-fj-popup__feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--fj-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(0, 86, 210, 0.08),
    0 0 14px var(--fj-icon-glow);
}

.upl-fj-popup__feature-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upl-fj-popup__feature-icon svg.upl-fj-popup__icon-fill {
  fill: currentColor;
  stroke: none;
}

.upl-fj-popup__feature-title {
  display: block;
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fj-ink);
}

.upl-fj-popup__feature-desc {
  display: block;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fj-muted);
}

.upl-fj-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--fj-lime);
  color: var(--fj-ink) !important;
  font-family: var(--fj-font);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(91, 140, 93, 0.16);
  transition: background 0.15s ease, transform 0.15s ease;
}

.upl-fj-popup__cta:hover {
  background: #c8e86f;
  color: var(--fj-ink) !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.upl-fj-popup__cta-arrow {
  font-size: 1.05em;
  line-height: 1;
}

@media (max-width: 640px) {
  .upl-fj-popup {
    padding: 56px 12px 14px;
    align-items: flex-start;
  }

  .upl-fj-popup__dialog {
    width: 100%;
    max-height: none;
    border-radius: 20px;
    padding: 18px 16px 14px;
  }

  .upl-fj-popup__title {
    font-size: 20px;
  }

  .upl-fj-popup__stat-value {
    font-size: 17px;
  }

  .upl-fj-popup__features {
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upl-fj-popup__dialog {
    animation: none;
  }
}
