/* =====================================================================
   cm-logofx.css — liquid-metal sheen on the CryptoMath mark.

   Route A from the brief was "generate the liquid logo once and ship a
   static asset". I tried that in Blender against the real final-logo.svg
   and abandoned it: Blender's SVG importer hands back stroke centrelines
   rather than outlined strokes, so the padlock shackle and the sigma came
   out as blobs. Rather than keep fighting it, the effect is done as a
   masked sheen over the ACTUAL svg — which stays vector-crisp at every
   size, needs no new asset, and costs ~0.6KB instead of a 300KB PNG.

   liquid-logo's own source is NOT used anywhere: that repo has no licence
   file, so copying from it would have been a legal risk.
   ===================================================================== */
.cm-logo-fx{ position:relative; display:inline-flex; isolation:isolate; }

.cm-logo-fx::after{
  content:"";
  position:absolute; inset:0; z-index:2; pointer-events:none;
  /* the mark itself is the mask, so the sheen only ever paints on metal */
  -webkit-mask:url(final-logo.svg) center / contain no-repeat;
          mask:url(final-logo.svg) center / contain no-repeat;
  background:linear-gradient(
    var(--cm-logo-ang, 120deg),
    rgba(255,255,255,0)    34%,
    rgba(255,255,255,.62)  47%,
    rgba(255,246,222,.85)  51%,
    rgba(255,255,255,0)    66%);
  opacity:.85;
  transition:opacity .3s ease;
}
.cm-logo-fx:hover::after{ opacity:1; }

/* Under RTL the sweep mirrors, so the highlight still runs "with" the text. */
[dir="rtl"] .cm-logo-fx::after{
  background:linear-gradient(
    calc(360deg - var(--cm-logo-ang, 120deg)),
    rgba(255,255,255,0)    34%,
    rgba(255,255,255,.62)  47%,
    rgba(255,246,222,.85)  51%,
    rgba(255,255,255,0)    66%);
}

/* No cursor tracking, no movement — just a fixed, tasteful highlight. */
@media (prefers-reduced-motion: reduce){
  .cm-logo-fx::after{ transition:none; }
}
/* Older browsers without mask support simply show the untouched logo. */
@supports not ((-webkit-mask-image:url(#a)) or (mask-image:url(#a))){
  .cm-logo-fx::after{ display:none; }
}
