/*
 * Mahyar Molavi — Hero-only glass 3D accent.
 * One decorative object in the hero; no scroll-driven camera or section scenes.
 * Motion uses transform only and stays static on touch / reduced-motion devices.
 */
.hero-visual {
  perspective: 1000px;
}

.mm-hero-glass {
  position: absolute;
  z-index: 4;
  top: -12px;
  inset-inline-end: -5px;
  width: clamp(96px, 10vw, 132px);
  aspect-ratio: 1;
  pointer-events: none;
  user-select: none;
  perspective: 900px;
}

.mm-hero-glass::before {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 161, 90, .32), rgba(201, 161, 90, .08) 48%, transparent 76%);
  filter: blur(12px);
  opacity: .72;
}

.mm-hero-glass__float {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: mm-hero-glass-float 9.5s ease-in-out infinite;
}

.mm-hero-glass__body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--hero-glass-tilt-x, 0deg)) rotateY(var(--hero-glass-tilt-y, 0deg));
  transition: transform 420ms cubic-bezier(.2, .72, .2, 1);
  backface-visibility: hidden;
}

.mm-hero-glass__sphere {
  position: absolute;
  inset: 20%;
  display: block;
  border: 1px solid rgba(255, 248, 228, .58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 23%, rgba(255, 255, 255, .94) 0 2%, rgba(255, 255, 255, .36) 6%, transparent 25%),
    radial-gradient(circle at 70% 76%, rgba(201, 161, 90, .48), transparent 43%),
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .17), rgba(16, 32, 48, .2) 55%, rgba(3, 9, 16, .76) 100%);
  box-shadow:
    inset 0 2px 12px rgba(255, 255, 255, .42),
    inset -10px -14px 26px rgba(201, 161, 90, .16),
    0 18px 36px rgba(0, 0, 0, .28),
    0 0 28px rgba(201, 161, 90, .18);
  transform: translateZ(22px);
}

.mm-hero-glass__sphere::before,
.mm-hero-glass__sphere::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.mm-hero-glass__sphere::before {
  inset: 9% 17% 48% 12%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 76%);
  filter: blur(1px);
}

.mm-hero-glass__sphere::after {
  inset: 15%;
  border: 1px solid rgba(255, 255, 255, .17);
  transform: rotate(-24deg) scaleX(.78);
}

.mm-hero-glass__orbit {
  position: absolute;
  inset: 8% -3%;
  border: 1px solid rgba(213, 174, 102, .76);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(201, 161, 90, .2);
  transform: rotateZ(-28deg) rotateX(68deg) translateZ(12px);
}

.mm-hero-glass__orbit--silver {
  inset: 18% -8%;
  border-color: rgba(255, 255, 255, .34);
  opacity: .58;
  transform: rotateZ(39deg) rotateX(74deg) translateZ(-10px);
}

@keyframes mm-hero-glass-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-4deg); }
  50% { transform: translate3d(0, -7px, 0) rotateZ(3deg); }
}

html[data-theme="light"] .mm-hero-glass::before {
  opacity: .48;
}

html[data-theme="light"] .mm-hero-glass__sphere {
  border-color: rgba(168, 121, 47, .38);
  background:
    radial-gradient(circle at 28% 23%, rgba(255, 255, 255, .98) 0 3%, rgba(255, 255, 255, .46) 7%, transparent 27%),
    radial-gradient(circle at 70% 76%, rgba(168, 121, 47, .3), transparent 45%),
    radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .72), rgba(225, 218, 205, .32) 56%, rgba(168, 121, 47, .12) 100%);
  box-shadow:
    inset 0 2px 12px rgba(255, 255, 255, .78),
    inset -10px -14px 26px rgba(168, 121, 47, .1),
    0 16px 30px rgba(13, 27, 42, .12),
    0 0 24px rgba(168, 121, 47, .14);
}

html[data-theme="light"] .mm-hero-glass__orbit {
  border-color: rgba(168, 121, 47, .58);
}

html[data-theme="light"] .mm-hero-glass__orbit--silver {
  border-color: rgba(13, 27, 42, .2);
}

@media (max-width: 960px) {
  .mm-hero-glass {
    top: -8px;
    inset-inline-end: 2px;
    width: 108px;
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .mm-hero-glass {
    top: -4px;
    inset-inline-end: 10px;
    width: 86px;
    opacity: .88;
  }

  .mm-hero-glass__float {
    animation: none;
  }

  .mm-hero-glass__body {
    transform: none !important;
    transition: none;
  }
}

.hero-visual[data-hero-glass-static="true"] .mm-hero-glass__float {
  animation: none !important;
}

.hero-visual[data-hero-glass-static="true"] .mm-hero-glass__body {
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mm-hero-glass__float {
    animation: none !important;
  }

  .mm-hero-glass__body {
    transform: none !important;
    transition: none !important;
  }
}
