/* =====================================================================
   BoundryLive "bits" layer (4.65): Haikei-style backgrounds and React Bits style motion,
   rebuilt in plain CSS/JS. Palette only: the night base, the dark pitch greens and lime.
   Not loaded on the scorer screen. Everything is static under prefers-reduced-motion.
   ===================================================================== */

/* ---- palette for the shapes ---- */
:root{--hk-1:rgba(10,106,68,.07);--hk-2:rgba(216,255,62,.16);--hk-3:rgba(10,106,68,.12)}
:root[data-theme="dark"]{--hk-1:rgba(216,255,62,.055);--hk-2:rgba(23,58,43,.75);--hk-3:rgba(11,26,19,.92)}
.hk path.hk-1{fill:var(--hk-1)}.hk path.hk-2{fill:var(--hk-2)}.hk path.hk-3{fill:var(--hk-3)}
.hk-host{position:relative;isolation:isolate}
.hk{position:absolute;pointer-events:none;z-index:-1}

/* hero: layered waves rising from the bottom, behind the headline */
.hero.hk-host{z-index:0}
.hero .hk-waves{left:0;right:0;bottom:0;width:100%;height:78%}
:root[data-theme="dark"] .hero .hk-waves{--hk-1:rgba(216,255,62,.07);--hk-2:rgba(23,58,43,.7);--hk-3:rgba(4,11,8,.55)}
:root:not([data-theme="dark"]) .hero .hk-waves{--hk-1:rgba(216,255,62,.09);--hk-2:rgba(216,255,62,.06);--hk-3:rgba(4,11,8,.35)}

/* membership: soft blobs behind the Gold and Legend plans */
.hg .hk-blobs{right:-6%;top:-12%;width:66%;height:124%}
:root[data-theme="dark"] .hg .hk-blobs{--hk-1:rgba(216,255,62,.07);--hk-2:rgba(23,58,43,.55);--hk-3:rgba(216,255,62,.10)}
:root:not([data-theme="dark"]) .hg .hk-blobs{--hk-1:rgba(216,255,62,.14);--hk-2:rgba(255,255,255,.07);--hk-3:rgba(216,255,62,.2)}
.hg>*:not(.hk){position:relative}
@media (max-width:700px){.hg .hk-blobs{right:-30%;top:auto;bottom:-6%;width:130%;height:70%}}

/* layered-peak dividers between Tournaments, Upcoming, This week and Highlights */
.hk-div{position:relative;height:46px;margin:6px -16px 2px;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.hk-div .hk{position:absolute;inset:0;width:100%;height:100%;z-index:0}
.hk-div::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(216,255,62,.35),transparent)}
:root:not([data-theme="dark"]) .hk-div::after{background:linear-gradient(90deg,transparent,rgba(10,106,68,.35),transparent)}
@media (min-width:900px){.hk-div{height:56px;margin-left:0;margin-right:0}}

/* footer: stacked waves along the top edge */
.foot.hk-host{padding-top:52px;border-top:0!important}
.foot .hk-foot{left:0;right:0;top:0;width:100%;height:44px;z-index:0}
:root[data-theme="dark"] .foot .hk-foot{--hk-1:rgba(216,255,62,.06);--hk-2:rgba(23,58,43,.6)}
.foot>*:not(.hk){position:relative;z-index:1}

/* ---- Blur Text: hero headline words sharpen into place on load ---- */
.bt-w{display:inline-block;white-space:pre}
.bits-on .bt-w{opacity:0;filter:blur(10px);transform:translateY(-14px);transition:opacity .6s ease,filter .6s ease,transform .6s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i)*70ms)}
.bits-on .bt-in .bt-w{opacity:1;filter:none;transform:none}

/* ---- Spotlight Card: a soft lime glow follows the pointer or finger ---- */
.sp-host{position:relative;overflow:hidden}
.sp-glow{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .35s ease;border-radius:inherit;z-index:2;
  background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%),rgba(216,255,62,.16),transparent 70%)}
.sp-host.sp-on .sp-glow{opacity:1}
:root:not([data-theme="dark"]) .sp-glow{background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%),rgba(10,106,68,.12),transparent 70%)}
.qa-t.qa-main .sp-glow{background:radial-gradient(200px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.45),transparent 70%)}

/* ---- Shiny Text: a light sweep across Gold, Legend and Legends ---- */
.shiny{background-image:linear-gradient(120deg,currentColor 40%,rgba(255,255,255,.95) 50%,currentColor 60%);background-size:220% 100%;background-position:100% 0;
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:shiny 3.2s linear infinite}
:root:not([data-theme="dark"]) .shiny{background-image:linear-gradient(120deg,currentColor 40%,rgba(216,255,62,1) 50%,currentColor 60%)}
@keyframes shiny{to{background-position:-20% 0}}

/* ---- Fade Content / Animated Content: rows and cards rise in as they scroll into view ---- */
.bits-on .fc{opacity:0;transform:translateY(22px);transition:opacity .55s ease,transform .6s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i,0)*60ms)}
.bits-on .fc.fc-in{opacity:1;transform:none}

/* ---- Count Up: numbers keep their width while they count ---- */
.cu{font-variant-numeric:tabular-nums}

/* ---- Click Spark and Magnet on the two sign-up buttons ---- */
.mg{transition:transform .25s cubic-bezier(.2,.7,.2,1);will-change:transform}
.spark-host{position:relative;overflow:visible!important}
.spark{position:absolute;width:2px;height:12px;border-radius:2px;background:#d8ff3e;pointer-events:none;z-index:5;transform-origin:50% 100%;
  animation:spark .45s ease-out forwards}
:root:not([data-theme="dark"]) .spark{background:#0a6a44}
@keyframes spark{0%{transform:translate(-50%,-100%) rotate(var(--a)) translateY(0) scaleY(1);opacity:1}100%{transform:translate(-50%,-100%) rotate(var(--a)) translateY(-26px) scaleY(.2);opacity:0}}

/* ---- Star Border: two lights travel along the Legend card's edges ---- */
.sb-host{position:relative;overflow:hidden}
.sb-l{position:absolute;width:300%;height:50%;opacity:.8;border-radius:50%;pointer-events:none;z-index:0;
  background:radial-gradient(circle,#d8ff3e,transparent 10%)}
.sb-l.b{right:-250%;bottom:-11px;animation:sb-b 6s linear infinite alternate}
.sb-l.t{left:-250%;top:-10px;animation:sb-t 6s linear infinite alternate}
@keyframes sb-b{0%{transform:translateX(0);opacity:1}100%{transform:translateX(-100%);opacity:0}}
@keyframes sb-t{0%{transform:translateX(0);opacity:1}100%{transform:translateX(100%);opacity:0}}

/* ---- everything still for people who ask for less motion ---- */
@media (prefers-reduced-motion:reduce){
  .bits-on .bt-w,.bits-on .fc{opacity:1!important;filter:none!important;transform:none!important;transition:none!important}
  .shiny{animation:none;-webkit-text-fill-color:currentColor;background:none}
  .sb-l,.spark{display:none}
  .mg{transition:none;transform:none!important}
  .sp-glow{display:none}
}

/* the site's icon style (outline strokes) must not touch the background shapes */
svg.hk,svg.hk path{stroke:none!important;stroke-width:0!important}
.hg.hk-host{overflow:hidden}
/* membership blobs: stronger, so they read against the gold wash */
:root[data-theme="dark"] .hg .hk-blobs{--hk-1:rgba(216,255,62,.13);--hk-2:rgba(4,11,8,.38);--hk-3:rgba(216,255,62,.2)}
/* Star Border: brighter lights on the Legend card */
.sb-l{opacity:1;height:60%;background:radial-gradient(circle,#d8ff3e 0,rgba(216,255,62,.7) 4%,transparent 12%)}
/* Star Border: two lights travel round a 2px ring at the card's edge (masked), like React Bits */
.sb-host>.sb-ring{position:absolute;inset:0;border-radius:inherit;padding:2px;overflow:hidden;pointer-events:none;z-index:2;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
.sb-ring .sb-l{position:absolute;width:300%;height:50%;opacity:1;border-radius:50%;background:radial-gradient(circle,#d8ff3e,transparent 12%)}
.sb-ring .sb-l.b{right:-250%;bottom:-11px}.sb-ring .sb-l.t{left:-250%;top:-10px}
.sb-host>*:not(.sb-ring){position:relative;z-index:1}
:root[data-theme="dark"] .hg .hk-blobs{--hk-1:rgba(216,255,62,.17);--hk-2:rgba(4,11,8,.45);--hk-3:rgba(216,255,62,.3)}
