/* HUVA Black Friday 2026 (handoff: HUVA-Black-Friday-2026, by Ani).
   Loaded by base.html only while a promo code marked "black_friday" in
   /admin -> Promo codes is live. Everything below also waits for the
   bf-on / bf-last classes on <html>, which the page script removes at the
   end time for a tab left open. */

/* course pages: the sale price replaces the normal one while the sale runs */
html:not(.bf-on) .bf-only{ display:none !important; }
html.bf-on .bf-off{ display:none !important; }
/* a small balloon tied to the sale price; a click opens the code card */
.bf-sale-price{ position:relative; }
.bf-price-balloon{ all:unset; position:absolute; right:-18px; top:-34px; width:70px; cursor:pointer; z-index:2;
  animation:bfb-bob 4.2s ease-in-out infinite; transform-origin:50% 100%;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.3)); }
.bf-price-balloon img{ display:block; width:100%; height:auto; }
.bf-price-balloon:hover{ animation-play-state:paused; }
.bf-price-balloon:focus-visible{ outline:2px solid #0A0A0A; outline-offset:3px; border-radius:50%; }
/* phones: on the left, clear of the small side balloon (right edge) */
@media (max-width:600px){ .bf-price-balloon{ width:54px; right:auto; left:-8px; top:-30px; } }
@media (prefers-reduced-motion:reduce){ .bf-price-balloon{ animation:none; } }

/* ── 1. Black header ─────────────────────────────────────────────────────
   The handoff targets .hm-header; on the site the white bar is .hm-nav. */
html.bf-on{ --bf-accent:#E9EF00; --bf-ink:#000; }
html.bf-on .hm-nav{ background:#0A0A0A; border-bottom-color:#0A0A0A; }
html.bf-on .hm-navlink,
html.bf-on .hm-lang,
html.bf-on .hm-lang .nav-lang-text{ color:#fff; }
html.bf-on .hm-burger span{ background:#fff; }
/* the logo, the caret and the chevron are black SVGs: flip them to white
   (the flags and the dropdown menus keep their colours) */
html.bf-on .hm-brand img,
html.bf-on .hm-navlink .caret,
html.bf-on .hm-lang .nav-lang-chevron{ filter:invert(1); }
/* join button: blue -> neon (stays neon on the last day: owner's call) */
html.bf-on .hm-nav-actions .hm-btn{ background:var(--bf-accent); border-color:var(--bf-accent); color:var(--bf-ink); }

/* tag + countdown before the join button */
.bf-head{ display:none; }
html.bf-on .bf-head{ display:flex; align-items:center; gap:10px; white-space:nowrap; }
.bf-head-tag{ font:800 11px "Archivo Expanded", sans-serif; letter-spacing:.06em; color:var(--bf-accent); }
.bf-head-pill{ background:var(--bf-accent); color:var(--bf-ink); padding:3px 7px; border-radius:999px;
  font:800 11px "Archivo Expanded", sans-serif; }
.bf-head-clock{ font:600 13px "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums; color:#fff;
  border:1px solid #333; border-radius:6px; padding:3px 8px; }
@media (max-width:600px){
  .bf-head-tag{ display:none; }
  html.bf-on .bf-head{ gap:6px; }
  .bf-head-clock{ font-size:12px; padding:2px 6px; }
}

/* ── 2. Balloon, homepage only (Ani's component CSS, unchanged) ────────────────────────── */
.bfb-layer{--bfb-accent:#E9EF00;--bfb-ink:#000;position:fixed;inset:0;pointer-events:none;z-index:9990;font-family:"Noto Sans Armenian","Archivo",system-ui,sans-serif}
.bfb-layer.bfb-last{--bfb-accent:#FF3B30;--bfb-ink:#fff}
.bfb-layer *{box-sizing:border-box}
.bfb-layer [hidden]{display:none!important}

/* the balloon */
.bfb-balloon{all:unset;touch-action:none;will-change:transform;position:absolute;left:calc(50% - 210px);top:calc(50% - 250px);width:420px;pointer-events:auto;cursor:pointer;
  transform:translateY(110vh);animation:bfb-rise 1.6s cubic-bezier(.2,.8,.25,1) forwards}
.bfb-balloon:focus-visible .bfb-img{outline:3px solid var(--bfb-accent);outline-offset:6px;border-radius:50%}
.bfb-float{display:grid;justify-items:center;animation:bfb-bob 4.2s ease-in-out 1.5s infinite;transform-origin:50% 100%}
.bfb-img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none;
  filter:drop-shadow(0 50px 60px rgba(0,0,0,.35));transition:transform .15s,opacity .15s}
.bfb-balloon:hover .bfb-img{transform:scale(1.03)}
.bfb-hint{position:absolute;left:50%;top:-70px;translate:-50% 0;background:#fff;color:#0a0a0a;border-radius:999px;padding:14px 26px;font-weight:800;font-size:20px;white-space:nowrap;
  box-shadow:0 8px 24px rgba(0,0,0,.18);opacity:0;animation:bfb-in .4s 1.6s forwards}
.bfb-hint::after{content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;background:#fff;transform:translateX(-50%) rotate(45deg)}
.bfb-balloon.bfb-pop .bfb-img{transform:scale(1.3);opacity:0}
.bfb-balloon.bfb-pop .bfb-hint{opacity:0}
.bfb-balloon.bfb-pop .bfb-float{animation:none}
.bfb-dismiss{all:unset;z-index:3;position:absolute;right:max(24px,env(safe-area-inset-right,0px));top:96px;width:48px;height:48px;box-shadow:0 6px 18px rgba(0,0,0,.25);border-radius:50%;background:rgba(10,10,10,.75);color:#fff;
  display:grid;place-items:center;font-size:18px;cursor:pointer;pointer-events:auto;opacity:0;animation:bfb-in .4s 1.8s forwards}
.bfb-dismiss:focus-visible{outline:2px solid var(--bfb-accent);outline-offset:3px}

.bfb-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

/* reveal card */
.bfb-modal{position:absolute;inset:0;display:grid;place-items:center;padding:16px;background:rgba(10,10,10,.55);pointer-events:auto;animation:bfb-in .25s}
.bfb-card{position:relative;width:min(440px,100%);background:#0a0a0a;color:#fff;border-radius:24px;padding:32px 28px 24px;display:grid;gap:14px;justify-items:center;text-align:center;
  box-shadow:0 0 0 1px #262626,0 40px 80px rgba(0,0,0,.5),0 0 90px color-mix(in srgb,var(--bfb-accent) 25%,transparent);animation:bfb-card .5s cubic-bezier(.2,1.4,.4,1)}
.bfb-x{all:unset;cursor:pointer;position:absolute;right:14px;top:12px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:#aaa;font-size:18px}
.bfb-x:hover{background:#1c1c1c;color:#fff}
.bfb-x:focus-visible,.bfb-later:focus-visible,.bfb-copy:focus-visible,.bfb-cta:focus-visible,.bfb-mini:focus-visible{outline:2px solid var(--bfb-accent);outline-offset:3px}
.bfb-eyebrow{font-family:"Archivo Expanded","Archivo",sans-serif;font-weight:800;font-size:11px;letter-spacing:.16em;color:var(--bfb-accent)}
.bfb-big{font-family:"Archivo Expanded","Archivo",sans-serif;font-weight:800;font-size:88px;line-height:.9;letter-spacing:-.05em;color:var(--bfb-accent)}
.bfb-card h3{margin:0;font-size:21px;font-weight:800;line-height:1.25;text-wrap:balance}
.bfb-card p{margin:0;color:#a9a9a2;font-size:14px}
.bfb-code{display:flex;align-items:center;gap:10px;border:1.5px dashed #444;border-radius:12px;padding:8px 8px 8px 16px;width:100%}
.bfb-code span{color:#a9a9a2;font-size:13px}
.bfb-code b{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:18px;letter-spacing:.08em;flex:1;text-align:left}
.bfb-copy{all:unset;cursor:pointer;background:#1d1d1d;border-radius:8px;padding:8px 12px;font-weight:700;font-size:13px}
.bfb-timer{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:13px;color:#d9d9d2;font-variant-numeric:tabular-nums}
.bfb-cta{display:flex;align-items:center;justify-content:center;width:100%;height:56px;border-radius:999px;background:var(--bfb-accent);color:var(--bfb-ink);
  font-family:"Archivo Expanded","Archivo",sans-serif;font-weight:700;font-size:14px;text-decoration:none}
.bfb-later{all:unset;cursor:pointer;color:#8d8d86;font-size:13px;padding:4px 8px}

/* small balloon that stays after closing */
.bfb-mini{all:unset;position:absolute;right:max(16px,env(safe-area-inset-right,0px));top:calc(50% - 60px);width:90px;pointer-events:auto;cursor:pointer;z-index:2;
  animation:bfb-fly .9s cubic-bezier(.3,1.3,.5,1) both}
.bfb-mini::before{content:"";position:absolute;inset:-14px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--bfb-accent) 55%,transparent),transparent 65%);
  animation:bfb-halo 2s ease-out .9s infinite;opacity:0}
.bfb-mini-in{display:block;position:relative;animation:bfb-attn 3.6s ease-in-out .9s infinite;transform-origin:50% 90%;filter:drop-shadow(0 12px 18px rgba(0,0,0,.3))}
.bfb-mini img{display:block;width:100%;height:auto}
.bfb-mini:hover .bfb-mini-in{animation-play-state:paused;transform:scale(1.08)}

@keyframes bfb-rise{to{transform:translateY(0)}}
@keyframes bfb-fly{from{transform:translate(var(--fx,-40vw),var(--fy,0)) scale(3) rotate(-10deg);opacity:.6}to{transform:none;opacity:1}}
@keyframes bfb-attn{0%,55%,100%{transform:translateY(0) rotate(0)}20%{transform:translateY(-10px) rotate(-3deg)}40%{transform:translateY(0) rotate(2deg)}
  62%{transform:rotate(-14deg) scale(1.12)}69%{transform:rotate(12deg) scale(1.12)}76%{transform:rotate(-8deg) scale(1.08)}83%{transform:rotate(5deg) scale(1.04)}90%{transform:rotate(0) scale(1)}}
@keyframes bfb-halo{0%{transform:scale(.6);opacity:.9}100%{transform:scale(1.5);opacity:0}}
@keyframes bfb-bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-12px) rotate(3deg)}}
@keyframes bfb-in{from{opacity:0}to{opacity:1}}
@keyframes bfb-card{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}

@media (max-width:600px){
  .bfb-balloon{width:280px;left:calc(50% - 140px);top:calc(50% - 170px)}
  .bfb-hint{font-size:16px;padding:11px 20px;top:-58px}
  .bfb-mini{width:70px;top:calc(50% - 47px);right:10px}
  .bfb-dismiss{right:16px;top:80px}
  .bfb-modal{place-items:end center}
  .bfb-card{border-radius:24px 24px 16px 16px;padding:28px 20px 20px}.bfb-big{font-size:68px}
}
@media (prefers-reduced-motion:reduce){
  .bfb-mini,.bfb-mini-in,.bfb-mini::before{animation:none}
  .bfb-balloon{animation:none;transform:none}.bfb-dismiss{animation:none;opacity:1}.bfb-float,.bfb-mini{animation:none}.bfb-hint{animation:none;opacity:1}.bfb-card{animation:none}
}
