/* Project Jupiter Main Screen — owner-approved component-owned motion.
   The original artwork is never redrawn, modified, or replaced. All geometry
   is local to its HUD Editor component, not to the viewport or a screenshot. */

/* A1/A2: the two rotating ring designs are children of the background root. */
.scene-background { overflow: hidden; }
.scene-background-art {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.ring-anchor {
  position: absolute; left: 50%; top: 66%; width: 61%; aspect-ratio: 1;
  transform: translate(-50%, -50%); perspective: 800px; pointer-events: none;
}
.ring-plane {
  position: absolute; inset: 0;
  transform: rotateX(78deg); transform-style: preserve-3d;
}
.motion-ring {
  position: absolute; overflow: visible; transform-origin: center;
  filter: drop-shadow(0 0 4px #00bfff); mix-blend-mode: screen;
  animation-timing-function: linear; animation-iteration-count: infinite;
}
.outer-ring {
  inset: 0; width: 100%; height: 100%;
  opacity: .736; animation-name: jupiter-clockwise; animation-duration: 20s;
}
.inner-ring {
  left: 17.5%; top: 17.5%; width: 65%; height: 65%;
  opacity: .992; animation-name: jupiter-counterclockwise; animation-duration: 14.5s;
}
@keyframes jupiter-clockwise { to { transform: rotate(360deg); } }
@keyframes jupiter-counterclockwise { to { transform: rotate(-360deg); } }

/* E1: window-star points remain children of the 941×1672 background artwork.
   SVG slice fitting follows the image's centered object-fit: cover crop.
   Do not position these glints in viewport pixels or in the logo root. */
.scene-background > .window-star-layer {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  z-index: 1; overflow: hidden; pointer-events: none; user-select: none;
}
.window-star-light { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .window-star-light { opacity: 0 !important; }
}

/* C1: original cone WebP and its approved light-current share the cone root.
   The editor still binds .hologram-cone and its authored 42% opacity. */
.hologram-cone { overflow: hidden; }
.cone-art {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: fill;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.cone-fx {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  mix-blend-mode: screen; --cone-light: 1;
  -webkit-mask-image: url('./assets/hologram-cone.webp');
  mask-image: url('./assets/hologram-cone.webp');
  -webkit-mask-mode: alpha; mask-mode: alpha;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.cone-wash {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 36% 78% at 50% 100%,
    #9df8ffbf 0%, #44cfff8c 35%, #0a8eff4d 70%, transparent 100%);
  opacity: calc(var(--cone-light) * .5);
  animation: jupiter-cone-breathe 7.3s ease-in-out infinite;
}
/* Exact restored C1 gradient, bounds, pace, easing and upward travel. */
.cone-current {
  position: absolute; left: -8%; top: -90%; width: 116%; height: 170%;
  background: linear-gradient(to top, transparent 0%, transparent 28%,
    #69eeff00 37%, #68d9ff8c 48%, #b0faff8c 50%,
    #3dbdff55 54%, transparent 68%, transparent 100%);
  opacity: var(--cone-light); transform: translateY(104%);
  animation: jupiter-cone-flow 8.6s ease-in-out infinite;
}
.cone-guard {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, transparent 33%,
    #00132911 58%, #3abfff20 75%, #a8f7ff33 100%);
  opacity: var(--cone-light);
  animation: jupiter-cone-breathe 7.3s ease-in-out infinite alternate;
}
@keyframes jupiter-cone-breathe {
  0%, 100% { opacity: calc(var(--cone-light) * .34); }
  48% { opacity: calc(var(--cone-light) * .64); }
  75% { opacity: calc(var(--cone-light) * .44); }
}
@keyframes jupiter-cone-flow {
  0% { transform: translateY(104%); opacity: 0; }
  7%, 48% { opacity: var(--cone-light); }
  64% { transform: translateY(-60%); opacity: 0; }
  100% { transform: translateY(-60%); opacity: 0; }
}

/* B1/B2: each local hologram panel carries its own warped artwork, scan, and
   border flash. The exact source button image is reused inside the warp. */
.selection { isolation: isolate; }
.selection > .selection-art { position: relative; z-index: 0; }
.selection .holo-panel {
  position: absolute; left: 9.64%; top: 16.16%; width: 81.9%; height: 71.87%;
  z-index: 1; overflow: hidden; pointer-events: none;
  clip-path: polygon(8% 0,92% 0,100% 13%,100% 86%,92% 100%,8% 100%,0 86%,0 13%);
}
#jupiterArcade .holo-panel { left: 10.4%; width: 80%; }
.selection .warp-band {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; pointer-events: none;
}
.selection .warp-art {
  position: absolute; left: -11.77%; top: -22.49%;
  width: 122.1%; height: 139.16%; aspect-ratio: auto;
  max-width: none; object-fit: fill;
  filter: url('#jupiterButtonDisplace');
  transform: translateX(1px); pointer-events: none;
}
#jupiterArcade .warp-art {
  left: -13%; top: -22.49%; width: 125%; height: 139.16%;
}
.selection .scan-bar {
  position: absolute; top: 0; left: 1%; width: 98%; height: 13px;
  opacity: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, #099dff25 14%,
    #3dd3ff88 35%, #e6ffffed 48%, #b4f7ffee 55%,
    #159fffa8 72%, transparent 100%);
  box-shadow: 0 0 7px #44daff88;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent);
  filter: opacity(.2);
}
.selection .flicker-edge {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  filter: opacity(.5) drop-shadow(0 0 4px #80efff);
}
.flicker-edge svg { display: block; width: 100%; height: 100%; overflow: visible; }
.flicker-edge .edge-main { fill: none; stroke: #b8faff; stroke-width: 3.4; stroke-linejoin: bevel; }
.flicker-edge .edge-trace { fill: none; stroke: #21c7ff; stroke-width: 2; stroke-linejoin: bevel; }

/* B3: exact original transparent artwork flashes on touch/focus; no polygon. */
.selection > .tap-asset-flare {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  opacity: 0; pointer-events: none; user-select: none;
  mix-blend-mode: screen;
  filter: brightness(1.35) saturate(1.12) drop-shadow(0 0 8px #66e8ff);
}
.selection:focus-visible > .tap-asset-flare { opacity: .23; }
.selection > .tap-asset-flare.tap-active {
  animation: jupiter-tap-energize .24s ease-out 1 both;
}
@keyframes jupiter-tap-energize {
  0% { opacity: 0; } 18%, 46% { opacity: .65; } 100% { opacity: 0; }
}
.jupiter-motion-defs {
  position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none;
}

/* Decorative effects must never catch menu controls or keep running in a
   hidden tab; the JS owns timers and adds this class on visibility changes. */
.jupiter-motion-paused .motion-ring,
.jupiter-motion-paused .cone-fx > *,
.jupiter-motion-paused .tap-asset-flare { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .motion-ring, .cone-fx > *, .tap-asset-flare.tap-active { animation: none !important; }
  .cone-current { opacity: 0 !important; }
  .cone-wash { opacity: .1 !important; }
}
