/* Pricing page motion: the seasonal event band (commerce.js drawEvent, shown
   only while plans.sale() runs) and the price cards' entrance, glow and
   currency flip. Every animation stops under prefers-reduced-motion. */

/* commerce.js runs the price count only where this sheet is loaded */
:root { --rg-price-motion: 1; }

/* ── the event band ─────────────────────────────────────────────────────── */
.bf-event {
  --bf-gold: #f5c451; --bf-gold-2: #ffdf8a; --bf-violet: #7c5cff; --bf-pink: #ff4fa3;
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 auto 8px; max-width: min(1240px, calc(100% - 32px)); border-radius: 26px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 56px);
  color: #fff; text-align: center;
  background:
    radial-gradient(60% 90% at 12% 0%, #7c5cff55, transparent 60%),
    radial-gradient(50% 80% at 88% 100%, #ff4fa340, transparent 60%),
    radial-gradient(40% 60% at 50% 50%, #f5c45122, transparent 70%),
    linear-gradient(160deg, #07060d, #120d22 55%, #07060d);
  background-size: 140% 140%, 140% 140%, 100% 100%, 100% 100%;
  box-shadow: 0 30px 80px -40px #7c5cffaa, inset 0 0 0 1px #ffffff14;
  animation: bf-aurora 14s ease-in-out infinite alternate, bf-in 900ms cubic-bezier(.22, 1, .36, 1) both;
}
.bf-event::before {                       /* a rotating light on the band's edge */
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--bf-angle, 0deg), transparent 0 70%, var(--bf-gold) 80%, var(--bf-pink) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: bf-spin 6s linear infinite;
}
@property --bf-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes bf-spin { to { --bf-angle: 360deg; } }
@keyframes bf-aurora { from { background-position: 0% 0%, 100% 100%, 50% 50%, 0 0; }
                       to { background-position: 100% 30%, 0% 70%, 50% 50%, 0 0; } }
@keyframes bf-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

/* drifting sparks */
.bf-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bf-sky i {
  position: absolute; left: calc(var(--i) * 5.6% + 1%); top: calc(var(--i) * 4.4% + 6%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--bf-gold-2);
  box-shadow: 0 0 10px 2px #f5c45199; opacity: 0;
  animation: bf-spark calc(5s + var(--i) * .23s) ease-in-out calc(var(--i) * -.61s) infinite;
}
.bf-sky i:nth-child(3n) { background: #fff; box-shadow: 0 0 8px 1px #ffffffaa; width: 2px; height: 2px; }
.bf-sky i:nth-child(4n) { background: #c9b8ff; box-shadow: 0 0 10px 2px #7c5cffaa; }
@keyframes bf-spark {
  0% { opacity: 0; transform: translateY(40px) scale(.6); }
  25% { opacity: 1; }
  70% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.2); }
}

.bf-inner { position: relative; max-width: 860px; margin: 0 auto; }
.bf-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 7px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase;
  color: #07060d; background: linear-gradient(110deg, var(--bf-gold), var(--bf-gold-2) 50%, var(--bf-gold));
  background-size: 200% 100%; animation: bf-gold 3.4s linear infinite; box-shadow: 0 10px 30px -12px #f5c451; }
.bf-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0245e; box-shadow: 0 0 0 0 #e0245e88;
  animation: bf-pulse 1.6s ease-out infinite; }
@keyframes bf-pulse { 0% { box-shadow: 0 0 0 0 #e0245e99; } 100% { box-shadow: 0 0 0 12px #e0245e00; } }
@keyframes bf-gold { to { background-position: -200% 0; } }

.bf-title { margin: 4px 0 18px; font-size: clamp(30px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.04em;
  font-weight: 800; }
.bf-title span {
  background: linear-gradient(100deg, #fff 0%, #fff 38%, var(--bf-gold-2) 48%, #fff 58%, #fff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: bf-shine 4.5s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes bf-shine { 0%, 30% { background-position: 120% 0; } 70%, 100% { background-position: -120% 0; } }

.bf-plans { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }
.bf-plan { position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding: 14px 22px;
  border-radius: 16px; text-decoration: none; color: #fff; background: #ffffff0d;
  border: 1px solid #ffffff22; backdrop-filter: blur(6px);
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), border-color 260ms, background 260ms;
  animation: bf-in 800ms cubic-bezier(.22, 1, .36, 1) 180ms both; }
.bf-plan.is-max { animation-delay: 300ms; border-color: #f5c45155; }
.bf-plan:hover, .bf-plan:focus-visible { transform: translateY(-3px); border-color: var(--bf-gold); background: #ffffff16; }
.bf-plan span { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #cfc6ff; }
.bf-plan b { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.03em; color: #fff;
  font-variant-numeric: tabular-nums; }
.bf-plan.is-max b { color: var(--bf-gold-2); }
.bf-plan small { font-size: 13px; color: #b9b2d6; }
.bf-offer { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--bf-gold-2); }
.bf-sub { display: flex; justify-content: center; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 20px;
  font-size: 14px; color: #c8c2e4; }
.bf-ex { color: var(--bf-gold-2); font-weight: 700; }
.bf-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 750; font-size: 15px; text-decoration: none;
  color: #07060d; background: linear-gradient(110deg, var(--bf-gold), var(--bf-gold-2));
  box-shadow: 0 16px 34px -14px #f5c451; transition: transform 220ms cubic-bezier(.22, 1, .36, 1); }
.bf-cta:hover { transform: translateY(-2px); }
.bf-cta::after { content: ""; position: absolute; top: -50%; bottom: -50%; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, #ffffffd0, transparent); transform: skewX(-20deg);
  animation: bf-sweep 3s ease-in-out infinite; }
@keyframes bf-sweep { 0%, 50% { left: -40%; } 90%, 100% { left: 130%; } }

/* ── the sale price on a card: the big struck price, its line drawn across,
   the saving popping in, then the price falling to what is charged ────── */
.price-card .pc-price { position: relative; }
.price-card .pc-price .pc-deal, .inst-price .pc-deal { flex-basis: 100%; display: flex; align-items: center; gap: 10px;
  margin: 2px 0 4px; }
/* the struck price is large but light, in the page's own type, so the price
   that is charged stays the strongest figure on the card */
.price-card .pc-price .pc-was, .inst-price .pc-was { position: relative; top: auto; right: auto; display: inline-block;
  font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.03em; color: #8a93a6;
  text-decoration: none; margin: 0; }
.inst-price .pc-was { font-size: 20px; }
.inst-price { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.price-grid:has(.pc-deal) .price-card:not(:has(.pc-deal)) .pc-price { padding-top: 32px; }   /* rows line up */
.price-card .pc-price .pc-strike, .inst-price .pc-strike { position: absolute; left: -5%; right: -5%; top: 50%; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, #ff2e63, #ff8a3d); transform-origin: left center;
  transform: rotate(-9deg) scaleX(1); box-shadow: 0 0 10px #ff2e6355;
  animation: pc-strike 560ms cubic-bezier(.65, 0, .35, 1) 250ms both; }
@keyframes pc-strike { from { transform: rotate(-9deg) scaleX(0); } to { transform: rotate(-9deg) scaleX(1); } }
.price-card .pc-price .pc-off, .inst-price .pc-off { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  font-size: 14px; line-height: 1; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(110deg, #e0245e, #ff6a3d); box-shadow: 0 10px 22px -10px #e0245e;
  animation: pc-pop 640ms cubic-bezier(.2, 1.4, .4, 1) 720ms both; }
@keyframes pc-pop { 0% { opacity: 0; transform: scale(.3) rotate(-14deg); }
                    70% { opacity: 1; transform: scale(1.14) rotate(3deg); } 100% { transform: none; } }
.pc-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.price-card .pc-offer.is-sale, .pc-offer.is-sale.inst-offer { color: #b3123f; font-weight: 600; letter-spacing: .02em; }
[data-theme="dark"] .price-card .pc-price .pc-was { color: #9aa3b5; }
[data-theme="dark"] .price-card .pc-offer.is-sale { color: #ff8fab; background: none; }
.price-card.pc-landed .pc-final { animation: pc-land 1100ms ease-out; }
@keyframes pc-land { 0% { text-shadow: 0 0 0 transparent; } 35% { text-shadow: 0 0 26px #ff6a3d88; }
                     100% { text-shadow: 0 0 0 transparent; } }
/* the count runs on a layer over the real price (commerce.js animatePrices);
   the settled price keeps the page's own figures, as the live site has them */
#priceGrid .pc-amt { position: relative; display: inline-block; }
#priceGrid .pc-amt.is-rolling .pc-final { opacity: 0; }       /* still in the text, only out of sight */
#priceGrid .pc-roll { position: absolute; left: 0; top: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the sale's stamp: lands on the tag once the price has (pc-landed) */
.pc-stamp { position: absolute; right: -4px; top: 50%; width: 88px; height: 88px; margin-top: -44px;
  border-radius: 50%; display: grid; place-items: center; color: #fff; text-align: center; z-index: 2;
  pointer-events: none; transform: rotate(-12deg);
  background: radial-gradient(circle at 30% 25%, #ff8a5c, #e0245e 55%, #9b1d3f);
  box-shadow: 0 14px 28px -14px #e0245e, inset 0 0 0 3px #ffffff38, 0 0 0 5px #e0245e18; }
.pc-stamp::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed #ffffffb0; }
.pc-stamp-in { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pc-stamp b { font-size: 8.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pc-stamp i { font-style: normal; font-size: 21px; font-weight: 900; letter-spacing: .05em; margin: 3px 0 3px; }
.pc-stamp em { font-style: normal; font-size: 11px; font-weight: 800; color: #c41f52; background: #fff;
  padding: 2px 7px; border-radius: 999px; }
.price-card.pc-motion .pc-stamp { opacity: 0; transform: rotate(-30deg) scale(2.2); }
.price-card.pc-motion.pc-landed .pc-stamp { animation: pc-stamp 680ms cubic-bezier(.2, 1.4, .4, 1) forwards; }
.inst-price .pc-stamp { position: relative; right: auto; top: auto; align-self: center; width: 72px; height: 72px;
  margin: -26px 0 -26px 14px;                     /* beside the price, without growing the row */
  animation: pc-stamp 680ms cubic-bezier(.2, 1.4, .4, 1) 1.4s both; }
.inst-price .pc-stamp i { font-size: 17px; }
/* the homepage cards are narrower: a smaller stamp, clear of the price */
.home-pricing .pc-stamp { width: 72px; height: 72px; margin-top: -36px; right: -14px; top: 38%; }
.home-pricing .pc-stamp i { font-size: 16px; }
.home-pricing .pc-stamp b { font-size: 7px; }
@keyframes pc-stamp { 0% { opacity: 0; transform: rotate(-32deg) scale(2.4); }
                      55% { opacity: 1; transform: rotate(-8deg) scale(.9); }
                      78% { transform: rotate(-14deg) scale(1.06); }
                      100% { opacity: 1; transform: rotate(-12deg) scale(1); } }
@media (max-width: 420px) {
  .pc-stamp { width: 70px; height: 70px; margin-top: -35px; right: -2px; }
  .pc-stamp i { font-size: 16px; }
}

/* the sale band's own figures */
.bf-mega { display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin: 2px 0 0;
  line-height: .9; font-weight: 900; letter-spacing: -.05em; }
.bf-mega span { font-size: clamp(76px, 12vw, 156px);
  background: linear-gradient(110deg, #ffdf8a, #f5c451 35%, #ff4fa3 65%, #ffdf8a); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 18px 40px #ff4fa355);
  animation: bf-gold 3.6s linear infinite, bf-mega-in 950ms cubic-bezier(.2, 1.3, .4, 1) 120ms both; }
.bf-mega small { margin-top: .55em; font-size: clamp(22px, 3vw, 38px); font-weight: 900; letter-spacing: .1em; color: #fff; }
@keyframes bf-mega-in { from { opacity: 0; transform: scale(.55) translateY(24px); } to { opacity: 1; transform: none; } }
.bf-plan .bf-name { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #cfc6ff; }
.bf-plan .bf-was { position: relative; text-decoration: none; color: #b9b2d6; font-size: 17px; font-weight: 650; }
.bf-plan .bf-was i { position: absolute; left: -6%; right: -6%; top: 50%; height: 2px; border-radius: 2px;
  background: #ff4f7a; transform-origin: left center; transform: rotate(-10deg) scaleX(1);
  animation: bf-cut 520ms cubic-bezier(.65, 0, .35, 1) 650ms both; }
@keyframes bf-cut { from { transform: rotate(-10deg) scaleX(0); } to { transform: rotate(-10deg) scaleX(1); } }
.bf-plan .bf-off { font-style: normal; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  color: #07060d; background: var(--bf-gold, #f5c451); animation: pc-pop 620ms cubic-bezier(.2, 1.4, .4, 1) 1s both; }

/* ── the price cards ────────────────────────────────────────────────────── */
.cp-pricing .price-card { transition: transform 320ms cubic-bezier(.22, 1, .36, 1), box-shadow 320ms; }
.cp-pricing .price-card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -38px #3a2a9e88; }
.cp-pricing .price-card.featured { position: relative; isolation: isolate; }
.cp-pricing .price-card.featured::before {   /* a turning light around the popular plan */
  content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--bf-angle, 0deg), #7c5cff, #f5c451, #ff4fa3, #7c5cff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: bf-spin 5s linear infinite;
}
#priceGrid .pc-swap .pc-amt { animation: pc-flip 520ms cubic-bezier(.22, 1, .36, 1); }
@keyframes pc-flip { 0% { opacity: 0; transform: translateY(-.45em) rotateX(70deg); }
                     100% { opacity: 1; transform: none; } }
.ccy-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted, #5b6478); max-width: 360px; }
.ccy-note a { color: inherit; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .bf-event { border-radius: 18px; }
  .bf-plan { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bf-event, .bf-event::before, .bf-sky i, .bf-kicker, .bf-dot, .bf-title span, .bf-plan, .bf-cta::after,
  .cp-pricing .price-card.featured::before, #priceGrid .pc-swap .pc-amt, .bf-mega span, .bf-plan .bf-was i,
  .bf-plan .bf-off, .price-card .pc-price .pc-strike, .price-card .pc-price .pc-off,
  .price-card.pc-landed .pc-final, .pc-stamp, .inst-price .pc-strike, .inst-price .pc-off,
  .price-card.pc-motion.pc-landed .pc-stamp { animation: none !important; }
  .price-card.pc-motion .pc-stamp { opacity: 1; transform: rotate(-12deg); }
  .bf-mega span { color: #f5c451; background: none; }
  .bf-sky { display: none; }
  .bf-title span { color: #fff; background: none; }
}

/* One purchase = one month, paid once (plans.term_months): said under the buttons. */
.price-card .pc-term {
  margin: 10px 0 0; font: 500 11.5px/1.45 var(--font, inherit); color: var(--soft, #6b6b78);
  text-align: center; letter-spacing: 0;
}
.cp .price-card .pc-term { color: var(--cp-soft, #6b6b78); }
[data-theme=dark] .price-card .pc-term { color: #a9a7bb; }
@media (max-width: 860px) { .home-pricing .price-card .pc-term { grid-column: 1; text-align: left; } }
