/* ==========================================================================
   Pricing page: "Black Friday exclusive" Directory Stack strip
   ========================================================================== */

.fmg-stack {
  --fmg-stack-ink: #17153a;
  position: relative;
  z-index: 1; /* lets the card shadow fall onto the banner without a seam */
  margin-bottom: -1px; /* overlap: fractional heights showed a hairline of the page behind */
  padding: 36px 0 1px;
  background: #0d1235; /* same as --fmg-deal-bg, so both deals share one background */
  color: var(--fmg-stack-ink);
}

/* With the coupon banner switched off, close the navy area below the strip. */
.fmg-stack:has(+ #pricing-plan-section) {
  padding-bottom: 40px;
}

/* With the coupon banner switched off, the plan cards pull up into this section. */
@media (min-width: 1200px) {
  .fmg-stack:has(+ #pricing-plan-section) {
    padding-bottom: 136px;
  }
}

.fmg-stack__wrap {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.fmg-stack__badge {
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--fmg-stack-ink);
  color: #f7d56e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.fmg-stack__ring {
  padding: 2px;
  border-radius: 18px;
  background: linear-gradient(115deg, #f7d56e, #ff8f6b, #7b6ff6, #f7d56e);
  background-size: 300% 300%;
  box-shadow: 0 10px 28px rgba(90, 79, 243, .2);
  animation: fmg-stack-shift 8s linear infinite;
}

.fmg-stack__card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 24px 14px;
  border-radius: 16px;
  background: #fff;
}

/* Logos: fan -> row -> fan. Hover holds the row. */
.fmg-stack__deck {
  position: relative;
  flex-shrink: 0;
  width: 276px;
  height: 84px;
}

.fmg-stack__logo {
  position: absolute;
  top: 12px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid #eceef6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(23, 21, 58, .14);
  transform: translateX(var(--sx));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  animation:
    fmg-stack-in .6s cubic-bezier(.2, .8, .2, 1) var(--d) both,
    fmg-stack-fan 7s cubic-bezier(.65, 0, .35, 1) calc(var(--d) + .6s) infinite;
}

.fmg-stack__logo:nth-child(1) { --x: 84px;  --r: -10deg; --sx: 0px;   --d: 0s; }
.fmg-stack__logo:nth-child(2) { --x: 100px; --r: -3deg;  --sx: 72px;  --d: .08s; }
.fmg-stack__logo:nth-child(3) { --x: 116px; --r: 4deg;   --sx: 144px; --d: .16s; }
.fmg-stack__logo:nth-child(4) { --x: 132px; --r: 11deg;  --sx: 216px; --d: .24s; }

.fmg-stack__card:hover .fmg-stack__logo {
  animation: fmg-stack-in .6s var(--d) both;
}

.fmg-stack__logo img {
  display: block;
  width: 40px;
  height: 40px;
}

.fmg-stack__copy {
  display: flex;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fmg-stack .fmg-stack__copy p {
  margin: 0;
}

.fmg-stack .fmg-stack__kicker {
  color: #c8352e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
}

.fmg-stack .fmg-stack__title {
  color: var(--fmg-stack-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.fmg-stack .fmg-stack__text {
  color: #55577a;
  font-size: 14px;
  line-height: 1.5;
}

.fmg-stack__text strong {
  color: var(--fmg-stack-ink);
  font-weight: 700;
}

.fmg-stack__buy {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.fmg-stack__price {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.fmg-stack a.fmg-stack__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--fmg-stack-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.fmg-stack a.fmg-stack__cta:hover {
  background: #2a2760;
  color: #fff;
}

.fmg-stack a.fmg-stack__cta:focus-visible {
  outline: 3px solid #5a4ff3;
  outline-offset: 3px;
}

@keyframes fmg-stack-shift {
  to { background-position: 300% 50%; }
}

@keyframes fmg-stack-in {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes fmg-stack-fan {
  0%, 10%, 92%, 100% { transform: translateX(var(--x)) rotate(var(--r)); }
  22%, 80% { transform: translateX(var(--sx)) rotate(0deg); }
}

/* The site container is too narrow for one row below this width. */
@media (max-width: 991.98px) {
  .fmg-stack__card {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .fmg-stack__buy {
    flex: 1 0 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 767.98px) {
  .fmg-stack {
    padding-top: 32px;
  }

  .fmg-stack__card {
    padding: 18px 16px 16px;
  }

  .fmg-stack__deck {
    height: 60px;
    margin-right: -69px;
    transform: scale(.75);
    transform-origin: left center;
  }

  .fmg-stack__logo {
    top: 0;
  }

  .fmg-stack__copy {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fmg-stack__ring,
  .fmg-stack .fmg-stack__logo {
    animation: none !important;
    transition: none;
  }
}
