/* Glass square: ONE component, used by the Black Friday hero (the reference), the Black Friday closing banner and every range tile.
   Markup (vsa_sh_square() in promotions.php):  <span class="vsa-sq" data-motion="drift|orbit" [data-ratio] [data-phase]>
                                                  <i class="vsa-sq__frame"></i> [<span class="vsa-sq__t">offer</span>] </span>
   Size: squares.js sets --s = ratio x the container's smaller side (default .54, the hero's), so every square is the same object scaled.
   Motion (squares.js, one rAF loop for all): drift = travels and bounces off the container's edges; orbit = rides an ellipse along the
   container's border. Both spin; the text stays upright. Paused off screen, while the tab is hidden, and inside a closed /promotions/ hero.
   Layering: the glass sits ABOVE its container's content (the hero's lettering, a banner's words, a tile's label), so there is always
   something behind it to frost; it takes no pointer events. Reduced motion or no JS: still (drift centred, orbit parked at the right
   edge). Slow device: squares.js measures frames and tints the largest moving square first (.is-lowfx, per square; ?vsa_sq_debug=1
   shows each decision). No backdrop-filter support: the same tint. */
.vsa-sq{ --s:clamp(120px, min(33vw, 47svh), 450px); position:absolute; z-index:3; left:calc(50% - var(--s) / 2); top:calc(50% - var(--s) / 2); width:var(--s); height:var(--s);
  display:flex; align-items:center; justify-content:center; pointer-events:none; }
.vsa-sq.is-live{ left:0; top:0; will-change:transform; }
.vsa-sq.is-live .vsa-sq__frame{ will-change:transform; }
.vsa-sq[data-motion="orbit"]:not(.is-live){ left:auto; right:calc(var(--s) * -.3); }
.vsa-sq__frame{ position:absolute; inset:0; overflow:hidden; border:max(2px, calc(var(--s) * .01)) solid #fff;
  background:linear-gradient(140deg, rgba(255,255,255,.22), rgba(255,255,255,.07) 55%, rgba(255,255,255,.14));   /* milky, lighter at the top-left like light on glass */
  -webkit-backdrop-filter:blur(14px) saturate(140%); backdrop-filter:blur(14px) saturate(140%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 calc(var(--s) * .08) rgba(255,255,255,.16),   /* inner highlight */
             0 0 calc(var(--s) * .05) rgba(255,255,255,.18),                                                  /* soft edge glow */
             0 calc(var(--s) * .03) calc(var(--s) * .08) rgba(0,0,0,.4); }                                    /* lift off what is behind */
/* fine grain: frosted glass is never perfectly smooth (tiny SVG noise, tiled, no request) */
.vsa-sq__frame::before{ content:""; position:absolute; inset:0; opacity:.16; mix-blend-mode:overlay; pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/120px 120px; }
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){ .vsa-sq__frame{ background:rgba(8,12,12,.62); } }
.vsa-sq.is-lowfx .vsa-sq__frame{ -webkit-backdrop-filter:none; backdrop-filter:none; background:rgba(8,12,12,.62); }   /* set per square by the squares.js guard */
.vsa-sq__t{ position:relative; width:64%; text-align:center; color:#fff; font:400 calc(var(--s) * .27)/.88 "Bebas Neue","Arial Narrow",sans-serif; letter-spacing:.02em; text-wrap:balance;
  text-shadow:0 1px 2px rgba(0,0,0,.45), 0 2px 16px rgba(0,0,0,.35); }
.vsa-sq__ast{ position:relative; top:-.9em; margin-left:.04em; font-size:.42em; line-height:0; vertical-align:baseline; }
.vsa-g .vsa-sq{ z-index:5; }   /* above a banner's words and a tile's label, like the hero's square over its lettering */
.vsa-sq ~ .vsa-sq:not(.is-live){ left:calc(18% - var(--s) / 2); top:calc(62% - var(--s) / 2); }   /* a second still square never sits on the first */
