/* Black Friday 2026 — course site. Every rule is scoped to elements that js/bf.js
   creates or to html.bf-on, so with phase 'off' nothing here applies (no layout shift). */

/* ---- Top bar: fixed above the fixed Webflow nav; nav + content pushed by its height ---- */
.bf-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #15161b;
  color: #fff;
  border-bottom: 1px solid rgba(113, 85, 255, 0.45);
  font-family: Geist, sans-serif;
  font-size: 14px;
  line-height: 20px;
}
.bf-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 9px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  text-align: center;
}
.bf-bar-text { color: #fff; }
.bf-bar-link {
  color: #b9a9ff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.bf-bar-link:hover,
.bf-bar-link:focus-visible { color: #fff; text-decoration: underline; }

html.bf-on body { padding-top: var(--bf-bar-h, 0px); }
html.bf-on #header .container { top: var(--bf-bar-h, 0px) !important; }
/* Webflow mobile menu (<=991px) is a full-screen fixed panel from top:0 whose padding
   clears the nav row only; start it below the bar so the first link is not covered. */
html.bf-on #header .w-nav-menu[data-nav-menu-open] {
  top: var(--bf-bar-h, 0px) !important;
  height: calc(100vh - var(--bf-bar-h, 0px)) !important;
}

/* ---- Phones: pinned bar/nav slide away on scroll (js/bf.js setupMobilePin) ----
   bf-pin-bar: nav row hidden, bar pinned. bf-pin-none: both hidden (past 5% while
   scrolling down; scroll up or the pricing section brings the bar back). Both are fixed
   elements, so only transform/opacity change and the page content never moves. */
@media screen and (max-width: 767px) {
  html.bf-on .bf-bar,
  html.bf-on #header .container {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s linear 0s;
  }
  html.bf-on.bf-pin-bar #header .container,
  html.bf-on.bf-pin-none #header .container {
    transform: translate3d(0, calc(-100% - var(--bf-bar-h, 0px)), 0) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s linear 0.3s;
  }
  html.bf-on.bf-pin-none .bf-bar {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s linear 0.3s;
  }
}
@media screen and (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html.bf-on .bf-bar,
  html.bf-on #header .container,
  html.bf-on.bf-pin-bar #header .container,
  html.bf-on.bf-pin-none #header .container,
  html.bf-on.bf-pin-none .bf-bar { transition: none; }
}

/* ---- Hero pill: the BF text is longer than the original (pill has max-width 260px) ---- */
html.bf-on [data-bf="pill"] { width: -webkit-fit-content; width: fit-content; max-width: 100%; }

/* ---- Countdown chip next to "Start learning" ---- */
.bf-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(113, 85, 255, 0.16);
  outline: 1px solid rgba(113, 85, 255, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #fff;
  font-family: Geist, sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bf-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7155ff;
  box-shadow: 0 0 0 3px rgba(113, 85, 255, 0.3);
  flex: none;
}

/* ---- Ticker strip directly under the hero ---- */
.bf-ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  background: #15161b;
  border-top: 1px solid rgba(113, 85, 255, 0.45);
  border-bottom: 1px solid rgba(113, 85, 255, 0.45);
  color: #fff;
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
}
.bf-ticker-track {
  display: flex;
  width: max-content;
  padding: 10px 0;
  animation: bf-ticker 40s linear infinite;
}
.bf-ticker-item {
  flex: none;
  white-space: nowrap;
}
.bf-ticker-item::after {
  content: "\00a0\00b7\00a0";
  white-space: pre;
}
@keyframes bf-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .bf-ticker-track {
    animation: none;
    width: auto;
    justify-content: center;
    padding: 10px 16px;
  }
  .bf-ticker-item { white-space: normal; text-align: center; }
  .bf-ticker-item::after { content: none; }
  .bf-ticker-item[aria-hidden="true"] { display: none; }
}

/* ---- Sale phase ---- */
/* Red bar like nfif.pro's sale bar: white on #DC2626 = 4.83:1. */
.bf-bar--sale {
  background: #dc2626;
  border-bottom-color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}
.bf-bar--sale .bf-bar-text { font-weight: 600; }
.bf-bar--sale .bf-bar-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bf-bar--sale .bf-bar-link:hover,
.bf-bar--sale .bf-bar-link:focus-visible { color: #fff; opacity: 0.85; text-decoration-thickness: 2px; }
.bf-bar--sale .bf-short { display: none; }
.bf-bar-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(21, 22, 27, 0.32);
}

/* Pricing cards: struck old price + sale price (+ red −N% chip) in one row.
   The per-day / per-month sub-label is removed by js/bf.js in sale. */
html.bf-sale .bf-price-row {
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
}
.bf-old-price {
  color: #fff;
  opacity: 0.6;
  font-family: Unbounded, sans-serif;
  font-size: 18px;
  line-height: 24px;
  /* Strike line is a scalable ::after (drawn left→right by the price animation). */
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.bf-old-price::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  border-radius: 1px;
  transform-origin: 0 50%;
  pointer-events: none;
}
.bf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.bf-off-chip {
  align-self: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-family: Unbounded, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Pro card: red/white sale card (js/bf.js adds .bf-pro + .bf-ribbon-wrap; removed on teardown). */
html.bf-sale .plans_card.pro_card.bf-pro {
  position: relative;
  background-color: #7f1d1d;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(160deg, #dc2626 0%, #b91c1c 50%, #7f1d1d 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 48px rgba(220, 38, 38, 0.35);
}
html.bf-sale .bf-pro .plan-name,
html.bf-sale .bf-pro .price,
html.bf-sale .bf-pro .feature { color: #fff; }
html.bf-sale .bf-pro .plan-name { font-weight: 600; }
html.bf-sale .bf-pro .plan-description { opacity: 0.95; }
html.bf-sale .bf-pro .feature-2 { opacity: 0.7; }
html.bf-sale .bf-pro .bf-old-price { opacity: 0.85; }
html.bf-sale .bf-pro .check-streamline-sharp-line---free { filter: brightness(0) invert(1); }
html.bf-sale .bf-pro .plans_button { background-color: #fff; }
html.bf-sale .bf-pro .plans_button,
html.bf-sale .bf-pro .plans_button p { color: #dc2626; font-weight: 600; }
html.bf-sale .bf-badge {
  background: #7155ff;
  padding: 0 8px;
}
html.bf-sale .bf-pro .bf-badge { background: #fff; }
/* Keep the badge clear of the corner ribbon. */
html.bf-sale .bf-pro .container-10 { padding-right: 88px; box-sizing: border-box; }
html.bf-sale .bf-pro .plan-description { padding-right: 40px; box-sizing: border-box; }
html.bf-sale .bf-pro .bf-badge .popular-tag-text { color: #dc2626; font-weight: 600; }

/* Diagonal corner ribbon (clipped by its own wrapper, so the card keeps overflow:visible). */
.bf-ribbon-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 124px;
  height: 124px;
  overflow: hidden;
  border-top-right-radius: 16px;
  pointer-events: none;
  z-index: 2;
}
.bf-ribbon {
  position: absolute;
  top: 32px;
  right: -33px;
  width: 150px;
  padding: 4px 0;
  transform: rotate(45deg);
  background: #fff;
  color: #dc2626;
  text-align: center;
  font-family: Unbounded, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 479px) {
  .bf-bar { font-size: 13px; line-height: 18px; }
  .bf-bar-inner { padding: 8px 16px; }
  /* Phones: sale bar = headline + countdown + short "Plans →" only (max 3 lines). */
  .bf-bar--sale .bf-bar-link--nfif { display: none; }
  .bf-bar--sale .bf-long { display: none; }
  .bf-bar--sale .bf-short { display: inline; }
  .bf-chip { height: 40px; font-size: 13px; }
  .bf-ticker { font-size: 11px; }
}

/* ---- Sale tariff animation (js/bf.js animatePlans + CSS loops on the Pro card) ----
   Transform/opacity only. Rest state = final state; one-shot classes (bf-rise,
   bf-strike, bf-pop) carry their own --bf-delay and remove themselves when done. */
html.bf-sale .price.bf-counting { font-variant-numeric: tabular-nums; }

.bf-rise { animation: bf-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--bf-delay, 0ms) backwards; }
@keyframes bf-rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}
.bf-strike::after { animation: bf-strike 0.8s cubic-bezier(0.33, 1, 0.68, 1) var(--bf-delay, 0ms) backwards; }
@keyframes bf-strike {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.bf-pop { animation: bf-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--bf-delay, 0ms) backwards; }
@keyframes bf-pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}

/* Pro card: soft red glow pulse behind it (box-shadow only paints outside the card). */
.bf-glow,
.bf-glow::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 16px;
  pointer-events: none;
}
.bf-glow {
  z-index: 0;
  box-shadow: 0 0 48px 4px rgba(239, 68, 68, 0.5);
  opacity: 0.35;
  animation: bf-glow 3.2s ease-in-out infinite alternate;
}
.bf-glow::after {
  content: "";
  box-shadow: 0 10px 64px 10px rgba(239, 68, 68, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
@keyframes bf-glow {
  from { opacity: 0.35; }
  to { opacity: 0.9; }
}

/* Pro card: slow diagonal light sweep every 4 s (clipped by its own layer). */
.bf-shine {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 16px;
  pointer-events: none;
}
.bf-shine::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translate3d(-110%, 0, 0) skewX(-18deg);
  animation: bf-shine 4s ease-in-out 1.6s infinite;
}
@keyframes bf-shine {
  0% { transform: translate3d(-110%, 0, 0) skewX(-18deg); }
  35%, 100% { transform: translate3d(280%, 0, 0) skewX(-18deg); }
}

/* Corner ribbon: subtle shimmer, offset from the card sweep. */
.bf-ribbon { overflow: hidden; }
.bf-ribbon::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0.7;
  transform: translate3d(-120%, 0, 0);
  animation: bf-ribbon 4s ease-in-out 3.6s infinite;
  pointer-events: none;
}
@keyframes bf-ribbon {
  0% { transform: translate3d(-120%, 0, 0); }
  25%, 100% { transform: translate3d(360%, 0, 0); }
}

/* Desktop wrapper clips overflow: leave room for the hover lift and the glow. */
html.bf-sale .plans_card_wrapper { padding-top: 12px; padding-bottom: 28px; }

/* Hover (mouse only): Pro card lifts with a stronger glow; Choose buttons ring once. */
html.bf-sale .plans_card .plans_button { position: relative; overflow: visible; }
html.bf-sale .plans_card .plans_button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75);
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  html.bf-sale .plans_card.bf-pro { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
  /* !important: Webflow's slide-in leaves an inline transform on .plans_card. */
  html.bf-sale .plans_card.bf-pro:hover { transform: translate3d(0, -4px, 0) !important; }
  html.bf-sale .bf-pro:hover .bf-glow::after { opacity: 1; }
  html.bf-sale .plans_card .plans_button:hover::after { animation: bf-ring 0.7s ease-out 1; }
}
@keyframes bf-ring {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.12, 1.35); }
}

@media (prefers-reduced-motion: reduce) {
  .bf-rise, .bf-strike::after, .bf-pop,
  .bf-glow, .bf-shine::before, .bf-ribbon::after,
  html.bf-sale .plans_card .plans_button:hover::after { animation: none !important; }
  .bf-shine, .bf-ribbon::after { display: none; }
  html.bf-sale .plans_card.bf-pro { transition: none; }
  html.bf-sale .plans_card.bf-pro:hover { transform: none !important; }
  .bf-glow::after { transition: none; }
}
