/* UBG HOME LOGO COLOR RING 20261110
   Approved by Ben Nov 10 2026 11:51 AM AZ (blue thin ring).
   Nov 10 12:01 PM AZ: full connected ring, RGB-style shifting blues (no comet gap).

   Target: the main unclebenny.me homepage hero crown logo
   (.ubg-hero img), which already has a static 2px cyan circle
   from style#ubg-home-logo-cyan-circle-20260918.

   Ring style (t2863u / t2864u / t2867u): a THIN bright circle,
   same 2px width as the live cyan circle (at most 2–3px), not
   a thick band. A soft glow blooms outward only, tight like
   the old 8px cyan shadow, so the stroke stays a thin line.

   Colors: shades of blue only — no RGB rainbow. A comet-style
   fading conic (bright segments fading to near-dark, no hard
   edges) flows through bright cyan #00FFFF, aqua #00D4FF,
   periwinkle/ice #9FD8FF, sky #3BA8FF, electric/royal
   #1E5BFF, and deep blue #0A2A9F. The comet rotates once
   every 7s so the blues travel around the ring.

   Overlay only: the logo / crown image, the page background,
   and everything inside the circle are left alone. No fill
   over the logo, no scaling. The ring and glow are drawn on
   .ubg-hero::before. The img keeps its 2px transparent border
   (so layout does not shift) and has no padding-box fill.

   Stars: three smaller 4-point glints (white-hot center, thin
   cross flare, blue glow) on the thin ring at the same angles
   as the Superagent Home Screen sparkles: 42.1° (upper-right),
   146.5° (left, ~10 o'clock), 286.7° (bottom, ~7 o'clock).

   A faint grey-white dashed inner circle sits about 7% inside
   the outer ring, low opacity, overlay only.

   On a static/grid hero the glow and stars share a grid cell
   with the logo. On the live homepage the logo is
   position:absolute (shared-header lock), so the glow and
   stars are pinned to the same left/top/transform as the img.
   prefers-reduced-motion: static thin ring, tight glow, dashes,
   and stars.
*/

@property --ub-ring-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

html body.ubg-home .ubg-hero,
html body.ubg-home[data-slug="home"] .ubg-hero {
  --ub-ring-angle: 0deg;
  --ub-logo: min(92vw, 520px);
  --ub-r: calc(var(--ub-logo) / 2);
  --ub-blue-flow: conic-gradient(
      from var(--ub-ring-angle),
      #00FFFF 0deg,
      #00D4FF 45deg,
      #3BA8FF 90deg,
      #1E5BFF 135deg,
      #4F6BFF 180deg,
      #1E5BFF 225deg,
      #3BA8FF 270deg,
      #9FD8FF 315deg,
      #00FFFF 360deg
    );
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  justify-items: center !important;
  animation: ub-logo-ring 7s linear infinite;
}

html body.ubg-home .ubg-hero > img {
  grid-area: 1 / 1;
  z-index: 6;
}

/* Thin 2px bright blue comet line + soft outward-only glow. No logo fill. */
html body.ubg-home .ubg-hero::before {
  content: "";
  grid-area: 1 / 1;
  width: calc(var(--ub-logo) + 28px);
  max-width: 548px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  background: var(--ub-blue-flow);
  -webkit-mask-image: radial-gradient(
      circle at center,
      transparent calc(var(--ub-r) - 2.25px),
      #000 calc(var(--ub-r) - 2px),
      #000 calc(var(--ub-r)),
      rgba(0, 0, 0, 0.5) calc(var(--ub-r) + 3px),
      rgba(0, 0, 0, 0.2) calc(var(--ub-r) + 6px),
      transparent calc(var(--ub-r) + 11px)
    );
  mask-image: radial-gradient(
      circle at center,
      transparent calc(var(--ub-r) - 2.25px),
      #000 calc(var(--ub-r) - 2px),
      #000 calc(var(--ub-r)),
      rgba(0, 0, 0, 0.5) calc(var(--ub-r) + 3px),
      rgba(0, 0, 0, 0.2) calc(var(--ub-r) + 6px),
      transparent calc(var(--ub-r) + 11px)
    );
}

/* Faint dashed inner circle + 3 white-hot sparkles with a blue glow */
html body.ubg-home .ubg-hero::after {
  content: "";
  grid-area: 1 / 1;
  width: calc(var(--ub-logo) * 1.12);
  max-width: 582px;
  aspect-ratio: 1 / 1;
  height: auto;
  pointer-events: none;
  z-index: 7;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%20%3Cdefs%3E%20%3Cfilter%20id%3D%22g%22%20x%3D%22-120%25%22%20y%3D%22-120%25%22%20width%3D%22340%25%22%20height%3D%22340%25%22%3E%20%3CfeGaussianBlur%20in%3D%22SourceAlpha%22%20stdDeviation%3D%220.7%22%20result%3D%22b%22%2F%3E%20%3CfeFlood%20flood-color%3D%22%2300D4FF%22%20flood-opacity%3D%220.95%22%20result%3D%22c%22%2F%3E%20%3CfeComposite%20in%3D%22c%22%20in2%3D%22b%22%20operator%3D%22in%22%20result%3D%22s%22%2F%3E%20%3CfeGaussianBlur%20in%3D%22SourceAlpha%22%20stdDeviation%3D%221.3%22%20result%3D%22b2%22%2F%3E%20%3CfeFlood%20flood-color%3D%22%233BA8FF%22%20flood-opacity%3D%220.55%22%20result%3D%22c2%22%2F%3E%20%3CfeComposite%20in%3D%22c2%22%20in2%3D%22b2%22%20operator%3D%22in%22%20result%3D%22s2%22%2F%3E%20%3CfeMerge%3E%20%3CfeMergeNode%20in%3D%22s2%22%2F%3E%20%3CfeMergeNode%20in%3D%22s%22%2F%3E%20%3CfeMergeNode%20in%3D%22SourceGraphic%22%2F%3E%20%3C%2FfeMerge%3E%20%3C%2Ffilter%3E%20%3C%2Fdefs%3E%20%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2241.518%22%20fill%3D%22none%22%20stroke%3D%22%23E8F4FF%22%20stroke-opacity%3D%220.3%22%20stroke-width%3D%220.26%22%20stroke-dasharray%3D%221.3%201.8%22%20stroke-linecap%3D%22round%22%2F%3E%20%3Cg%20filter%3D%22url%28%23g%29%22%20fill%3D%22%23fff%22%3E%20%3Cg%20transform%3D%22translate%2883.12%2020.07%29%20scale%280.48%29%22%3E%20%3Cpath%20d%3D%22M0-5.1L.28-.28%205.1%200%20.28.28%200%205.1-.28.28-5.1%200-.28-.28Z%22%2F%3E%20%3Ccircle%20r%3D%220.62%22%2F%3E%20%3C%2Fg%3E%20%3Cg%20transform%3D%22translate%2812.77%2025.36%29%20scale%280.55%29%22%3E%20%3Cpath%20d%3D%22M0-5.1L.28-.28%205.1%200%20.28.28%200%205.1-.28.28-5.1%200-.28-.28Z%22%2F%3E%20%3Ccircle%20r%3D%220.62%22%2F%3E%20%3C%2Fg%3E%20%3Cg%20transform%3D%22translate%2862.83%2092.76%29%20scale%280.45%29%22%3E%20%3Cpath%20d%3D%22M0-5.1L.28-.28%205.1%200%20.28.28%200%205.1-.28.28-5.1%200-.28-.28Z%22%2F%3E%20%3Ccircle%20r%3D%220.62%22%2F%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E") center / 100% 100% no-repeat;
}

/* Live homepage: shared-header locks the logo with position:absolute
   (left:50%; top:calc(50% + 50px); transform:translate(-50%,-50%)).
   Grid stacking cannot follow that img, so pin the glow and stars
   to the same box. */
html body.ubg-home.ubg-has-shared-header .ubg-hero::before,
html body.ubg-home.ubg-logo-final .ubg-hero::before,
html body.ubg-home.ubg-has-shared-header .ubg-hero::after,
html body.ubg-home.ubg-logo-final .ubg-hero::after {
  position: absolute !important;
  left: 50% !important;
  top: calc(50% + 50px) !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}

/* Keep the 2px border box so the logo does not shift. No fill. */
html body.ubg-home .ubg-hero img {
  border: 2px solid transparent !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  background: none !important;
  box-shadow: none !important;
  animation: none !important;
}

@keyframes ub-logo-ring {
  to {
    --ub-ring-angle: 360deg;
  }
}

/* Full connected ring: whole ring also shifts shade like RGB lighting, kept in the blue/cyan/indigo range */
@keyframes ub-ring-hue {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  25% { filter: hue-rotate(-28deg) brightness(1.12); }
  50% { filter: hue-rotate(22deg) brightness(1); }
  75% { filter: hue-rotate(-12deg) brightness(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  html body.ubg-home .ubg-hero::before { animation: none !important; }
  html body.ubg-home .ubg-hero {
    animation: none !important;
    --ub-ring-angle: 0deg;
  }
}

/* v3 Nov 10 12:08 PM AZ: draw the ring ON the logo image itself so it is
   always exactly centered at every screen size (phone fix). The logo is an
   opaque JPG, so the gradient only shows in the 2px border. Glow is a
   box-shadow that cycles through blues only. The old ::before ring is off. */
html body.ubg-home .ubg-hero::before { display: none !important; }
html body.ubg-home .ubg-hero img,
html body.ubg-home .ubg-hero > img {
  border: 2px solid transparent !important;
  background: var(--ub-blue-flow) border-box !important;
  animation: ub-ring-glow 6s ease-in-out infinite !important;
}
@keyframes ub-ring-glow {
  0%, 100% { box-shadow: 0 0 6px 1px rgba(0,255,255,.75), 0 0 16px 3px rgba(0,212,255,.35); }
  33% { box-shadow: 0 0 6px 1px rgba(59,168,255,.8), 0 0 16px 3px rgba(30,91,255,.4); }
  66% { box-shadow: 0 0 6px 1px rgba(159,216,255,.8), 0 0 16px 3px rgba(0,212,255,.35); }
}
/* Phone: logo is smaller and centered at 50%, so match the sparkles/dashes */
html body.ubg-home.mobile-view .ubg-hero::after {
  width: calc(min(80vw, 320px) * 1.12) !important;
  top: 50% !important;
}
@media (prefers-reduced-motion: reduce) {
  html body.ubg-home .ubg-hero img { animation: none !important; box-shadow: 0 0 6px 1px rgba(0,212,255,.7) !important; }
}
