/* -------------------------------------------------------
   Promo popup (homepage "Grow your business" popup)
   Opened by main.js with mainClass "promo-mfp".
------------------------------------------------------- */
.subscribe-popup {
  --promo-base: var(--base-color, #dd6531);
  --promo-violet: #ef5f43;
  --promo-pink: #f38c4b;
  --promo-ink: var(--dark-gray, #292d36);
  --promo-muted: var(--medium-gray, #808291);
  --promo-ease-spring: cubic-bezier(0.2, 0.9, 0.25, 1.25);
  --promo-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

/* Backdrop */
.promo-mfp.mfp-bg {
  background: rgba(41, 45, 54, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.promo-mfp.mfp-bg.mfp-ready {
  opacity: 1;
}

.promo-mfp.mfp-bg.mfp-removing {
  opacity: 0;
}

/* Card */
.promo-card {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  border-radius: 28px;
  padding: 2px;
  box-shadow: 0 30px 80px -20px rgba(221, 101, 49, 0.45), 0 10px 30px -10px rgba(41, 45, 54, 0.4);
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  transition: opacity 0.35s ease, transform 0.6s var(--promo-ease-spring);
}

.promo-mfp.mfp-ready .promo-card {
  opacity: 1;
  transform: none;
}

.promo-mfp.mfp-removing .promo-card {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.3s ease;
}

/* Rotating gradient border */
.promo-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.promo-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  aspect-ratio: 1;
  background: conic-gradient(from 0deg, var(--promo-base), var(--promo-pink), #ffc49b, var(--promo-violet), var(--promo-ink), var(--promo-base));
  transform: translate(-50%, -50%);
  animation: promo-spin 6s linear infinite;
}

.promo-inner {
  position: relative;
  border-radius: 26px;
  background: #fff;
  overflow: hidden;
}

/* Hero */
.promo-hero {
  position: relative;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--promo-ink) 0%, #5a2611 50%, var(--promo-base) 100%);
  background-size: 200% 200%;
  animation: promo-gradient-shift 10s ease infinite;
  overflow: hidden;
}

.promo-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  animation: promo-grid-pan 12s linear infinite;
}

.promo-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.7;
}

.promo-orb-1 {
  width: 160px;
  height: 160px;
  background: #f38c4b;
  top: -60px;
  left: -40px;
  animation: promo-float-a 9s ease-in-out infinite;
}

.promo-orb-2 {
  width: 130px;
  height: 130px;
  background: #ffb347;
  bottom: -50px;
  right: -30px;
  animation: promo-float-b 11s ease-in-out infinite;
}

.promo-orb-3 {
  width: 90px;
  height: 90px;
  background: #ef5f43;
  top: 30px;
  right: 30%;
  animation: promo-float-a 13s ease-in-out infinite reverse;
}

.promo-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(10px);
}

.promo-mfp.mfp-ready .promo-badge {
  animation: promo-rise 0.6s var(--promo-ease-out) 0.15s forwards;
}

.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: promo-dot-pulse 1.8s ease-out infinite;
}

/* Body */
.promo-body {
  padding: 26px 30px 22px;
  text-align: center;
}

.promo-title {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--promo-ink);
  opacity: 0;
  transform: translateY(14px);
}

.promo-gradient-text {
  font-weight: 700;
  background: linear-gradient(90deg, var(--promo-base), var(--promo-violet), var(--promo-pink), var(--promo-base));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: promo-text-flow 6s linear infinite;
}

.promo-sub {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--promo-muted);
  opacity: 0;
  transform: translateY(14px);
}

.promo-mfp.mfp-ready .promo-title {
  animation: promo-rise 0.6s var(--promo-ease-out) 0.3s forwards;
}

.promo-mfp.mfp-ready .promo-sub {
  animation: promo-rise 0.6s var(--promo-ease-out) 0.4s forwards;
}

.promo-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

.promo-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--promo-ink);
  background: #fdf6f2;
  border: 1px solid #f6e6dd;
  opacity: 0;
  transform: translateX(-18px);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.promo-mfp.mfp-ready .promo-list li {
  animation: promo-slide 0.55s var(--promo-ease-out) calc(0.5s + var(--i) * 0.1s) forwards;
}

.promo-list li:hover {
  background: #fff;
  border-color: rgba(221, 101, 49, 0.3);
  box-shadow: 0 8px 20px -10px rgba(221, 101, 49, 0.45);
}

.promo-li-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--promo-base), var(--promo-pink));
  box-shadow: 0 6px 14px -6px rgba(221, 101, 49, 0.7);
  transition: transform 0.35s var(--promo-ease-spring);
}

.promo-list li:hover .promo-li-icon {
  transform: rotate(-8deg) scale(1.1);
}

/* CTA */
.promo-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--promo-pink), var(--promo-violet), var(--promo-pink));
  background-size: 200% 100%;
  box-shadow: 0 14px 30px -12px rgba(239, 95, 67, 0.8);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(14px);
  transition: background-position 0.5s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.promo-mfp.mfp-ready .promo-cta {
  animation: promo-rise 0.6s var(--promo-ease-out) 0.85s forwards;
}

.promo-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: promo-shine 3.2s ease-in-out 1.6s infinite;
  z-index: -1;
}

.promo-cta:hover,
.promo-cta:focus-visible {
  color: #fff;
  background-position: 100% 0;
  box-shadow: 0 18px 36px -12px rgba(221, 101, 49, 0.85);
}

.promo-cta:focus-visible {
  outline: 3px solid rgba(221, 101, 49, 0.35);
  outline-offset: 3px;
}

.promo-cta-wa {
  font-size: 20px;
}

.promo-cta-arrow {
  transition: transform 0.3s var(--promo-ease-spring);
}

.promo-cta:hover .promo-cta-arrow {
  transform: translateX(5px);
}

/* Close buttons (keep the mfp-close class so Magnific closes on click) */
.subscribe-popup button.mfp-close.promo-x,
.subscribe-popup button.mfp-close.promo-x:active {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.35s var(--promo-ease-spring), background-color 0.25s ease;
}

.subscribe-popup button.mfp-close.promo-x:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(90deg);
}

.subscribe-popup button.mfp-close.promo-x i {
  pointer-events: none;
}

.subscribe-popup button.mfp-close.promo-later,
.subscribe-popup button.mfp-close.promo-later:active {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin-top: 12px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--promo-muted);
  opacity: 0;
  background: transparent;
  transition: color 0.2s ease;
}

.promo-mfp.mfp-ready .subscribe-popup button.mfp-close.promo-later {
  animation: promo-fade 0.5s ease 1s forwards;
}

.subscribe-popup button.mfp-close.promo-later:hover {
  color: var(--promo-ink);
  text-decoration: underline;
}

.subscribe-popup button.mfp-close.promo-x::before,
.subscribe-popup button.mfp-close.promo-later::before {
  display: none;
}

.subscribe-popup button.mfp-close:focus-visible {
  outline: 2px solid var(--promo-base);
  outline-offset: 2px;
}

/* Keyframes */
@keyframes promo-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes promo-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes promo-grid-pan {
  to { background-position: 22px 22px, 22px 22px; }
}

@keyframes promo-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.15); }
}

@keyframes promo-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-25px, -15px) scale(1.1); }
}

@keyframes promo-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
}

@keyframes promo-rise {
  to { opacity: 1; transform: none; }
}

@keyframes promo-slide {
  to { opacity: 1; transform: none; }
}

@keyframes promo-fade {
  to { opacity: 1; }
}

@keyframes promo-text-flow {
  to { background-position: 300% 0; }
}

@keyframes promo-shine {
  0% { left: -60%; }
  45%, 100% { left: 130%; }
}

/* Small screens */
@media (max-width: 575px) {
  .subscribe-popup {
    padding: 8px;
  }

  .promo-hero {
    height: 96px;
  }

  .promo-body {
    padding: 22px 20px 18px;
  }

  .promo-title {
    font-size: 21px;
  }

  .promo-list li {
    font-size: 14px;
  }
}

/* Short screens (laptops): keep the CTA above the fold */
@media (max-height: 760px) {
  .promo-body {
    padding-top: 20px;
  }

  .promo-sub {
    margin-bottom: 14px;
  }

  .promo-list {
    gap: 8px;
    margin-bottom: 16px;
  }

  .promo-list li {
    padding: 8px 12px;
  }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .subscribe-popup *,
  .subscribe-popup *::before,
  .subscribe-popup *::after,
  .promo-card {
    animation: none !important;
    transition: none !important;
  }

  .promo-card,
  .promo-badge,
  .promo-title,
  .promo-sub,
  .promo-list li,
  .promo-cta,
  .subscribe-popup button.mfp-close.promo-later {
    opacity: 1 !important;
    transform: none !important;
  }

  .promo-cta::after {
    display: none;
  }
}
