/* Black Friday 2026 -- banner, price switches and shop chips. Inert unless
 * /bf.js has added html.bf. Loaded on every page that carries the sale:
 * home, shop, /head-spa/, /weight-loss/, /find-your-drip/, /find-your-panel/,
 * /specials/ and /black-friday/. Fonts come from fonts.css, which all of them
 * load; the colours are the site's plum and gold, written out because the
 * quiz pages do not load styles.css. Delete after Dec 1 with bf.js. */

:root { --bf-h: 0px; }

/* ---- The banner ---- */
.bf-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: linear-gradient(90deg, #1A1130 0%, #33194F 50%, #1A1130 100%);
  color: #F2ECF2;
  border-bottom: 1px solid rgba(226, 169, 78, .45);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 6px 24px rgba(0, 0, 0, .25);
  font-family: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.bf-strip.bf-strip-flow { position: sticky; }
.bf-strip-in {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 14px; padding: 9px clamp(14px, 4vw, 40px);
  color: inherit; text-decoration: none; text-align: center; line-height: 1.3;
}
.bf-strip-in:hover .bf-cta, .bf-strip-in:focus-visible .bf-cta { color: #FFD48A; }
.bf-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #1A1130; background: #E2A94E; border-radius: 999px; padding: 3px 10px 2px;
}
.bf-msg { font-size: 14.5px; font-weight: 700; letter-spacing: .02em; }
html.bf-soon .bf-msg { font-weight: 600; }
.bf-cta { font-size: 13.5px; color: #E2A94E; font-weight: 600; white-space: nowrap; }
.bf-cta span { display: inline-block; transition: transform .25s ease; }
.bf-strip-in:hover .bf-cta span { transform: translateX(3px); }
@media (max-width: 560px) {
  .bf-strip-in { gap: 4px 10px; padding: 8px 14px; }
  .bf-msg { font-size: 13.5px; }
  .bf-cta { font-size: 12.5px; }
}

/* The site's fixed header moves down by the banner's height, and the pages
 * whose first block clears the header by a fixed amount clear the banner too.
 * The home page needs nothing: its hero is full-bleed under the header. */
html.bf-fixednav .nav { top: var(--bf-h); }
html.bf-fixednav .mobile-menu { padding-top: calc(var(--bf-h) + 90px); }
html.bf-fixednav .shop-page main { padding-top: calc(78px + var(--bf-h)); }
html.bf-fixednav .specials-page main { padding-top: calc(var(--navh, 84px) + 6px + var(--bf-h)); }
html.bf-fixednav .hs-hero-text { padding-top: calc(140px + var(--bf-h)); }
/* /head-spa/#reserve is where the sale page sends people; land below the header. */
html.bf-fixednav .hs-reserve { scroll-margin-top: calc(var(--bf-h) + 96px); }
html.bf-fixednav .wl-page main { padding-top: var(--bf-h); }

/* ---- Switches in the page copy ----
 * .bf-only      shown while the sale is on (live, last, final)
 * .bf-soon-only shown on the Sunday preview only
 * .bf-any       shown Sunday through Nov 30
 * .bf-hide      hidden while the sale is on (the regular price it replaces)
 * `revert` restores the element's own display (inline for a span, block for a
 * p, list-item for an li) instead of forcing one. */
.bf-only, .bf-soon-only, .bf-any { display: none; }
html.bf-on .bf-only { display: revert; }
html.bf-soon .bf-soon-only { display: revert; }
html.bf .bf-any { display: revert; }
html.bf-on .bf-hide { display: none; }

.bf-was { text-decoration: line-through; opacity: .62; font-weight: 400; margin-right: .35em; }
.bf-now { color: #E2A94E; }
.bf-chip {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font: 700 10.5px/1 'Karla', system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: #1A1130; background: #E2A94E; border-radius: 999px; padding: 5px 9px 4px;
  white-space: nowrap;
}
.bf-note {
  display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: #E2A94E;
}

/* ---- Shop cards and cart (shop.js writes these) ---- */
.sp-card[data-sale] .sp-price .bf-was { font-size: .78em; }
.sp-card[data-sale] .sp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.sp-card[data-sale] .sp-price .bf-chip { margin-left: 2px; }
.sp-card .bf-card-note { margin: -4px 0 8px; font-size: 13px; line-height: 1.45; color: #E2A94E; }
.sp-bf-row dt { color: #E2A94E; }
.sp-bf-row dd { color: #E2A94E; }
.ln-bf { display: block; font-size: 12.5px; color: #E2A94E; margin-top: 2px; }
.sp-bf-preview {
  margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(226, 169, 78, .55); border-radius: 10px;
  background: rgba(226, 169, 78, .10); color: #F2ECF2; font-size: 13.5px; line-height: 1.5;
}
.sp-bf-preview b { color: #E2A94E; }

/* ---- /weight-loss/ program cards: the price switch inside .glp-price, which
 * styles every span as the small "/month" suffix. ---- */
.glp-price .bf-amt, .glp-price .bf-amt s { font: inherit; color: inherit; margin: 0; letter-spacing: inherit; }
.glp-price .bf-amt .bf-was { font-size: .55em; opacity: .5; margin-right: 8px; }
.wl-bf {
  margin: 22px 0 0; padding: 12px 16px; border: 1px solid rgba(226, 169, 78, .55); border-radius: 12px;
  background: rgba(226, 169, 78, .10); font-size: 14.5px; line-height: 1.55;
}
.wl-bf b { color: #996B15; }
html.bf-on .glp-price .glp-bf { display: block; font: 500 13px/1.4 'Karla', system-ui, sans-serif; color: #996B15; margin-top: 6px; letter-spacing: 0; }

/* ======================= The festive layer (2026-11-22) =======================
 * Lights, sparkles, countdown, bursts, bows, ribbons and Thanksgiving Day. All
 * drawn by bf.js (ribbons by shop.js and the /black-friday/ markup), all
 * aria-hidden, none of it catches a click, and all of it holds still under
 * Reduced Motion. */

/* ---- Fairy lights: hang from the banner's bottom edge over the header. ---- */
.bf-lights { position: absolute; left: 0; right: 0; top: 100%; width: 100%; height: 28px; display: block;
  pointer-events: none; overflow: visible; }
.bf-glow { opacity: .3; animation: bf-twinkle 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.41s); }
.bf-lamp { animation: bf-lamp 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.41s); }
@keyframes bf-twinkle { 0%, 100% { opacity: .14; } 50% { opacity: .46; } }
@keyframes bf-lamp { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* ---- Countdown: a quiet chip in the banner, a line under the sale page's dates. ---- */
.bf-count { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: #F2ECF2; opacity: .85;
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .28); white-space: nowrap; }
.bf-count:empty { display: none; }
.bf-countline { margin: 14px 0 0; font: 600 12.5px/1.5 'Karla', system-ui, sans-serif; letter-spacing: .08em;
  text-transform: uppercase; color: #CFB2E6; }
.bf-countline:empty { display: none; }
@media (max-width: 560px) { .bf-count { border-left: 0; padding-left: 0; width: 100%; opacity: .75; } }

/* ---- Sparkles: gold stars and soft dots drifting down the leaf boxes. The
 * span falls; its ::before sways and winks, so no motion fights another. ---- */
html.bf .hv-leaves { display: block; }
html.bf .hv-page { position: fixed; z-index: -1; }
.bf-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bfh .wrap { position: relative; z-index: 1; }
.bf-sp { position: absolute; left: var(--x); top: -24px; width: var(--s); height: var(--s); opacity: 0;
  animation: bf-fall var(--d) linear var(--t) infinite; }
.bf-sp::before { content: ""; display: block; width: 100%; height: 100%;
  animation: bf-sway var(--sw) ease-in-out var(--t) infinite alternate, bf-wink var(--tw) ease-in-out var(--t) infinite alternate; }
.bf-sp.star::before { background: #F0C06A; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.bf-sp.dot::before { border-radius: 50%;
  background: radial-gradient(circle, #FFE3A6 0 28%, rgba(226, 169, 78, .55) 45%, rgba(226, 169, 78, 0) 70%); }
@keyframes bf-fall { 0% { transform: translateY(0); opacity: 0; } 8%, 88% { opacity: var(--o); }
  100% { transform: translateY(var(--fall, 100vh)); opacity: 0; } }
@keyframes bf-sway { from { transform: translateX(calc(var(--sway) * -1)) rotate(0deg); } to { transform: translateX(var(--sway)) rotate(90deg); } }
@keyframes bf-wink { from { opacity: .35; } to { opacity: 1; } }

/* The burst: the same shapes, flung by bf.js with Web Animations. */
.bf-burst { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.bf-burst .bf-sp { animation: none; opacity: 1; }
.bf-burst .bf-sp::before { animation: none; }

/* ---- Ribbons across the corner of every sale card. ---- */
/* The ribbon's centre sits 46px in from both edges of the corner, so the
   visible stretch of the diagonal (about 130px) is longer than the words.
   Closer to the corner and the card's overflow clipped "BLACK" off. */
.bf-ribbon { position: absolute; top: 35px; right: -44px; width: 180px; transform: rotate(45deg);
  background: linear-gradient(180deg, #F0C06A, #E2A94E); color: #1A1130;
  font: 700 10.5px/1 'Karla', system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; text-align: center;
  padding: 7px 0 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); pointer-events: none; z-index: 3; }
.sp-card[data-sale] { position: relative; overflow: hidden; }
.bf-card { overflow: hidden; }

/* ---- The bow on the gift card blocks. Shut until it scrolls into view. ---- */
.bf-bow { position: absolute; width: 64px; pointer-events: none; z-index: 3; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.bf-bow svg { display: block; width: 100%; height: auto; overflow: visible; }
.bf-loop, .bf-tail, .bf-knot { transform-box: view-box; transform-origin: 50px 41px;
  transition: transform .7s cubic-bezier(.3, 1.5, .5, 1); }
.bf-tail { transform-origin: 50px 47px; transition-delay: .25s; }
.bf-knot { transition-delay: .4s; }
.bf-bow.shut .bf-loop, .bf-bow.shut .bf-knot { transform: scale(0); transition: none; }
.bf-bow.shut .bf-tail { transform: scaleY(0); transition: none; }
.bf-gift { position: relative; }
.bf-bow-gift { top: -28px; left: 18px; }
html.bf .sp-gift { position: relative; }
.bf-bow-shop { right: 16px; top: -30px; width: 56px; }
html.bf-thanks .bf-bow-shop { right: auto; left: 16px; }

/* ---- Thanksgiving Day: only the turkey comes back (harvest.css draws it). ---- */
html.bf-thanks .hv-turkey { display: block; }
html.bf-thanks .book-form, html.bf-thanks .rxlabel { position: relative; }
@media (min-width: 980px) { html.bf-thanks .hv-t-label { display: none; } }
@media (max-width: 979px) { html.bf-thanks .hv-t-bag { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .bf-sp, .bf-sparkles, html.bf .hv-leaves { display: none; }
  .bf-glow, .bf-lamp { animation: none; }
  .bf-loop, .bf-tail, .bf-knot { transition: none; }
  .bf-cta span { transition: none; }
}
