.trex-motion-object {
  --trex-object-glow: #ff7a1a;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 18;
  width: clamp(220px, 25vw, 390px);
  aspect-ratio: 1;
  opacity: 0;
  pointer-events: none;
  transform-origin: center;
  will-change: transform, opacity;
  filter:
    drop-shadow(-32px 44px 28px #000b)
    drop-shadow(0 0 34px color-mix(in srgb, var(--trex-object-glow) 35%, transparent));
  transition: filter .55s ease;
}

.trex-motion-object.trex-object-football { --trex-object-glow: #9be64d; }
.trex-motion-object.trex-object-fighting { --trex-object-glow: #ff3d45; }
.trex-motion-object.trex-object-motorsport { --trex-object-glow: #4dd8ff; }

.trex-motion-object::before,
.trex-motion-object::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -2;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.trex-motion-object::before {
  width: 112%;
  height: 112%;
  border: 1px solid color-mix(in srgb, var(--trex-object-glow) 34%, transparent);
  box-shadow:
    0 0 55px color-mix(in srgb, var(--trex-object-glow) 18%, transparent),
    inset 0 0 40px #ffffff0c;
  transition: border-color .55s ease, box-shadow .55s ease;
}

.trex-motion-object::after {
  width: 92%;
  height: 38%;
  top: 75%;
  background: color-mix(in srgb, var(--trex-object-glow) 28%, transparent);
  filter: blur(35px);
  transition: background .55s ease;
}

.trex-motion-object canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.trex-motion-shadow {
  position: absolute;
  left: 19%;
  right: 7%;
  bottom: 5%;
  z-index: -1;
  height: 17%;
  border-radius: 50%;
  background: #000;
  filter: blur(18px);
  transform: rotate(-8deg);
  opacity: .78;
}

.trex-motion-glint {
  position: absolute;
  left: 24%;
  top: 17%;
  z-index: 3;
  width: 13%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff8df;
  filter: blur(10px);
  opacity: .2;
  mix-blend-mode: screen;
}

.trex-motion-object.trex-no-webgl {
  border-radius: 50%;
  background: radial-gradient(circle at 31% 27%, #ffb266, #e96511 46%, #501402 100%);
}

@media (max-width: 560px) {
  .trex-motion-object { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .trex-motion-object { transition-duration: .01ms; }
}


/* ---------------------------------------------------------------------------
 * Site adaptation for t-rextv.io — overlay presentation only.
 *
 * Everything above this line is the supplied trex-sport-motion.css, unchanged.
 * The rules below touch ONLY .trex-motion-object (this overlay's own element).
 * No existing site selector is redefined and no page content is restyled.
 *
 * 1. z-index: the site already ships a full-viewport ambient canvas
 *    (#trex-3d-bg) which is raised to z-index 9000 with mix-blend-mode:screen
 *    on the homepage. The supplied z-index:18 would place the sports object
 *    underneath it and let the screen blend wash it out, so the overlay is
 *    lifted just above that existing layer. It stays below the site header
 *    and any modal/menu layer.
 * 2. contain/overflow: guarantees the fixed overlay can never contribute to
 *    document scroll width on narrow viewports.
 * ------------------------------------------------------------------------- */
.trex-motion-object {
  z-index: 9001;
  contain: layout paint size style;
}

/* Belt-and-braces: never allow the overlay to widen the document. */
@media (max-width: 1024px) {
  .trex-motion-object { max-width: 60vw; max-height: 60vw; }
}

@media (max-width: 560px) {
  /* Path/scale only — content is never moved. Keeps the object clear of the
     centred mobile copy and CTAs while remaining fully visible. */
  .trex-motion-object { width: 170px; max-width: 46vw; max-height: 46vw; }
}

/* prefers-reduced-motion: the module already pins scroll progress to 0 and
   snaps interpolation. Drop the residual transition work too. */
@media (prefers-reduced-motion: reduce) {
  .trex-motion-object,
  .trex-motion-object::before,
  .trex-motion-object::after {
    transition: none;
  }
}
