:root {
  --hh-galaxy-cyan: #55e6ff;
  --hh-galaxy-violet: #9c72ff;
  --hh-galaxy-magenta: #ff58c8;
  --hh-galaxy-gold: #ffd76a;
  --hh-galaxy-ivory: #fff4c7;
  --hh-galaxy-deep: #080a18;
}

[data-hh-galaxy-logo] {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: visible !important;
}

[data-hh-galaxy-logo] > .hh-galaxy-logo-fallback {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

[data-hh-galaxy-logo].hh-galaxy-logo-host > .hh-galaxy-logo-fallback { display: none; }

.hh-galaxy-logo-host {
  position: relative;
  isolation: isolate;
}

.hh-galaxy-logo {
  --hh-galaxy-logo-size: 44px;
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: var(--hh-galaxy-logo-size);
  min-width: var(--hh-galaxy-logo-size);
  aspect-ratio: 1;
  overflow: visible;
  vertical-align: middle;
  contain: layout style;
  pointer-events: none;
  transform: translateZ(0);
  transition: filter .24s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
}

.hh-galaxy-logo[data-galaxy-logo-variant="compact"] { --hh-galaxy-logo-size: 36px; }
.hh-galaxy-logo[data-galaxy-logo-variant="card"] { --hh-galaxy-logo-size: 48px; }
.hh-galaxy-logo[data-galaxy-logo-variant="hero"] { --hh-galaxy-logo-size: clamp(88px, 10vw, 120px); }

.hh-galaxy-logo__aura,
.hh-galaxy-logo__nebula,
.hh-galaxy-logo__orbit,
.hh-galaxy-logo__sparks,
.hh-galaxy-logo__disc,
.hh-galaxy-logo__scan {
  position: absolute;
  pointer-events: none;
}

.hh-galaxy-logo__aura {
  z-index: 0;
  inset: -16%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 244, 199, .38) 0 11%, rgba(255, 215, 106, .2) 24%, transparent 62%),
    conic-gradient(from 35deg, rgba(85, 230, 255, .34), rgba(156, 114, 255, .3), rgba(255, 88, 200, .27), rgba(255, 215, 106, .34), rgba(85, 230, 255, .34));
  filter: blur(7px);
  opacity: .58;
  animation: hh-galaxy-aura-breathe 3.4s ease-in-out infinite;
}

.hh-galaxy-logo__nebula {
  z-index: 1;
  inset: -5%;
  border: 1px solid rgba(156, 114, 255, .28);
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, rgba(85, 230, 255, .14) 26%, transparent 38% 57%, rgba(255, 88, 200, .13) 68%, transparent 82%);
  opacity: .72;
  animation: hh-galaxy-nebula-spin 15s linear infinite;
}

.hh-galaxy-logo__disc {
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--hh-galaxy-deep);
  box-shadow: 0 0 12px rgba(156, 114, 255, .32), inset 0 0 9px rgba(85, 230, 255, .13);
}

.hh-galaxy-logo__core {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 5px rgba(255, 215, 106, .45));
  animation: hh-galaxy-core-breathe 3.4s ease-in-out infinite;
  user-select: none;
}

.hh-galaxy-logo__scan {
  z-index: 3;
  top: -12%;
  bottom: -12%;
  left: -40%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .86), transparent);
  filter: blur(1.5px);
  opacity: 0;
  transform: skewX(-16deg);
  animation: hh-galaxy-scan 6.2s ease-in-out infinite;
}

.hh-galaxy-logo__orbit {
  z-index: 4;
  inset: 8%;
  border: 1px solid rgba(85, 230, 255, .58);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(85, 230, 255, .36);
  transform: rotate(18deg) scaleY(.44);
  animation: hh-galaxy-orbit-primary 12s linear infinite;
}

.hh-galaxy-logo__orbit::after {
  position: absolute;
  top: 50%;
  left: -2px;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 50%;
  background: var(--hh-galaxy-cyan);
  box-shadow: 0 0 6px var(--hh-galaxy-cyan);
  content: "";
  transform: translateY(-50%) scaleY(2.27);
}

.hh-galaxy-logo__orbit--counter {
  inset: 15%;
  border-color: rgba(255, 88, 200, .45);
  box-shadow: 0 0 4px rgba(255, 88, 200, .3);
  transform: rotate(-34deg) scaleY(.62);
  animation: hh-galaxy-orbit-counter 17s linear infinite;
}

.hh-galaxy-logo__orbit--counter::after {
  width: 3px;
  height: 3px;
  background: var(--hh-galaxy-magenta);
  box-shadow: 0 0 5px var(--hh-galaxy-magenta);
  transform: translateY(-50%) scaleY(1.61);
}

.hh-galaxy-logo__sparks {
  z-index: 5;
  inset: -10%;
  animation: hh-galaxy-sparks-turn 20s linear infinite;
}

.hh-galaxy-logo__sparks > i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px currentColor;
  color: var(--hh-galaxy-cyan);
  opacity: .4;
  animation: hh-galaxy-spark-twinkle 3.1s ease-in-out infinite;
}

.hh-galaxy-logo__sparks > i:nth-child(1) { top: 5%; left: 62%; animation-delay: -.2s; }
.hh-galaxy-logo__sparks > i:nth-child(2) { top: 24%; right: 1%; color: var(--hh-galaxy-gold); animation-delay: -1.1s; }
.hh-galaxy-logo__sparks > i:nth-child(3) { right: 8%; bottom: 18%; color: var(--hh-galaxy-magenta); animation-delay: -2.4s; }
.hh-galaxy-logo__sparks > i:nth-child(4) { bottom: 3%; left: 39%; color: var(--hh-galaxy-violet); animation-delay: -.7s; }
.hh-galaxy-logo__sparks > i:nth-child(5) { bottom: 25%; left: 0; color: var(--hh-galaxy-cyan); animation-delay: -1.8s; }
.hh-galaxy-logo__sparks > i:nth-child(6) { top: 17%; left: 9%; color: var(--hh-galaxy-gold); animation-delay: -2.8s; }

.hh-galaxy-logo-host:hover .hh-galaxy-logo,
.hh-galaxy-logo-host:focus-visible .hh-galaxy-logo,
.hh-galaxy-logo-host:focus-within .hh-galaxy-logo {
  filter: brightness(1.12) saturate(1.08);
  transform: scale(1.025);
}

.hh-galaxy-logo-host:hover .hh-galaxy-logo__aura,
.hh-galaxy-logo-host:focus-visible .hh-galaxy-logo__aura,
.hh-galaxy-logo-host:focus-within .hh-galaxy-logo__aura { opacity: .78; }

.hh-galaxy-logo-host:active .hh-galaxy-logo { transform: scale(.97); }

.hh-galaxy-logo[data-galaxy-logo-pulse] { animation: hh-galaxy-logo-pulse .72s cubic-bezier(.2, .8, .2, 1) 1; }
.hh-galaxy-logo[data-galaxy-logo-pulse="success"] { animation-name: hh-galaxy-logo-gate; }
.hh-galaxy-logo[data-galaxy-logo-pulse="success"] .hh-galaxy-logo__aura {
  background-color: rgba(99, 242, 179, .22);
  animation: hh-galaxy-success-aura .76s ease-out 1;
}
.hh-galaxy-logo[data-galaxy-logo-pulse="error"] .hh-galaxy-logo__aura { background-color: rgba(255, 112, 94, .24); }

.hh-galaxy-logo[data-galaxy-logo-paused="true"],
.hh-galaxy-logo[data-galaxy-logo-paused="true"] *,
.hh-galaxy-logo[data-galaxy-logo-paused="true"]::before,
.hh-galaxy-logo[data-galaxy-logo-paused="true"]::after,
.hh-galaxy-logo[data-galaxy-logo-paused="true"] *::before,
.hh-galaxy-logo[data-galaxy-logo-paused="true"] *::after {
  animation-play-state: paused !important;
}

@keyframes hh-galaxy-aura-breathe {
  0%, 100% { opacity: .48; transform: scale(.96); }
  50% { opacity: .72; transform: scale(1.04); }
}

@keyframes hh-galaxy-nebula-spin { to { transform: rotate(360deg); } }

@keyframes hh-galaxy-core-breathe {
  0%, 100% { filter: brightness(.98) drop-shadow(0 0 4px rgba(255, 215, 106, .36)); }
  50% { filter: brightness(1.12) drop-shadow(0 0 7px rgba(255, 215, 106, .62)); }
}

@keyframes hh-galaxy-scan {
  0%, 66%, 100% { opacity: 0; transform: translateX(0) skewX(-16deg); }
  72% { opacity: .12; }
  82% { opacity: .72; }
  91% { opacity: 0; transform: translateX(590%) skewX(-16deg); }
}

@keyframes hh-galaxy-orbit-primary {
  to { transform: rotate(378deg) scaleY(.44); }
}

@keyframes hh-galaxy-orbit-counter {
  to { transform: rotate(-394deg) scaleY(.62); }
}

@keyframes hh-galaxy-sparks-turn { to { transform: rotate(360deg); } }

@keyframes hh-galaxy-spark-twinkle {
  0%, 100% { opacity: .25; transform: scale(.7); }
  48% { opacity: .92; transform: scale(1.3); }
}

@keyframes hh-galaxy-logo-pulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  46% { filter: brightness(1.3) saturate(1.16); transform: scale(1.075); }
}

@keyframes hh-galaxy-logo-gate {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  42% { filter: brightness(1.42) saturate(1.15); transform: scale(.9); }
  68% { filter: brightness(1.18); transform: scale(1.12); }
}

@keyframes hh-galaxy-success-aura {
  0% { opacity: .35; transform: scale(.74); }
  56% { opacity: 1; transform: scale(1.48); }
  100% { opacity: .55; transform: scale(1); }
}

/* Integration owners: the global star stays circular and its aura is never
   clipped by legacy square HH containers. */
#hhBootSurface .hh-boot-mark,
#authGate .auth-brand-lockup .brand-mark[data-hh-galaxy-logo],
#authGate .auth-card-heading > [data-hh-galaxy-logo],
.app-brand .app-brand-logo[data-hh-galaxy-logo],
.site-header .brand-mark[data-hh-galaxy-logo],
#appCosmicLoader .app-cosmic-loader__planet > [data-hh-galaxy-logo],
.hh-admin-core-mark[data-hh-galaxy-logo],
.hh-admin-core-star > [data-hh-galaxy-logo],
.hh-admin-infra-core > [data-hh-galaxy-logo] {
  border-color: transparent !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
}

#hhBootSurface .hh-boot-mark::after { display: none !important; }
#hhBootSurface .hh-boot-mark { width: 96px !important; height: 96px !important; transform: none !important; }
#appCosmicLoader .app-cosmic-loader__planet > [data-hh-galaxy-logo] { width: 64px; height: 64px; }
.app-brand .app-brand-logo[data-hh-galaxy-logo] { width: 34px; height: 34px; }
#authGate .auth-card-heading > [data-hh-galaxy-logo] { overflow: visible !important; }
.hh-admin-core-mark[data-hh-galaxy-logo] { font-size: 0 !important; }
.hh-admin-core-star > [data-hh-galaxy-logo] { width: 70px; height: 70px; }
.hh-admin-infra-core > [data-hh-galaxy-logo] { width: 38px; height: 38px; }

@media (prefers-reduced-motion: reduce) {
  .hh-galaxy-logo,
  .hh-galaxy-logo *,
  .hh-galaxy-logo::before,
  .hh-galaxy-logo::after,
  .hh-galaxy-logo *::before,
  .hh-galaxy-logo *::after {
    animation: none !important;
    transition: none !important;
  }

  .hh-galaxy-logo__aura { opacity: .48; transform: none; }
  .hh-galaxy-logo__scan { display: none; }
}

@media (forced-colors: active) {
  .hh-galaxy-logo { forced-color-adjust: none; }
  .hh-galaxy-logo__aura,
  .hh-galaxy-logo__nebula,
  .hh-galaxy-logo__orbit,
  .hh-galaxy-logo__sparks { display: none; }
}
