/* scenes/ganesha.css -- js/motion/scenes/ganesha.js. Armed (hidden-before-entrance)
   states live ONLY under html.motion and only on the nodes the module claimed, so
   reduced motion / no JS show the exact PSD frame. Overlays are created by the JS:
   small, pointer-events:none (bar the buttons), transform/opacity only. */

/* ---------------------------------------------------------------- armed */
html.motion .scene--ganesha:not(.is-entered) .ly[data-motion="custom"] { opacity: 0; }

/* ring + mark settle about the mandala centre (both layers are centred on it) */
.scene--ganesha [data-layer="ganesha-1"],
.scene--ganesha [data-layer="ganesha-2"] { transform-origin: 50% 50%; }

/* ---------------------------------------------------------------- overlays */
.gn-glow, .gn-halo, .gn-ripple, .gn-diya, .gn-spark {
  position: absolute;
  pointer-events: none;
}
.gn-glow, .gn-ripple, .gn-diya, .gn-spark { opacity: 0; }

/* warm bloom behind the mandala / at a bell's mouth */
.gn-glow {
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(255, 242, 214, 0.85) 0%, rgba(255, 226, 190, 0.5) 30%,
    rgba(250, 208, 170, 0.2) 58%, rgba(250, 208, 170, 0.06) 80%, rgba(250, 208, 170, 0) 100%);
}
.gn-glow--bell {
  background: radial-gradient(circle closest-side,
    rgba(255, 246, 214, 0.95) 0%, rgba(250, 214, 140, 0.55) 34%, rgba(240, 190, 110, 0.18) 64%, rgba(240, 190, 110, 0) 100%);
}
.gn-glow.is-still, .gn-halo.is-still { opacity: 0.9; }

/* golden halo behind the mark (rests faint, breathes) */
.gn-halo {
  opacity: 0.38;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(255, 240, 200, 0.95) 0%, rgba(250, 218, 150, 0.6) 34%,
    rgba(240, 200, 128, 0.2) 62%, rgba(240, 200, 128, 0) 100%);
}
.gn-ripple {
  border-radius: 50%;
  border: calc(2.5 * var(--u)) solid rgba(176, 132, 52, 0.8);
  box-shadow: 0 0 calc(10 * var(--u)) rgba(240, 200, 130, 0.55), inset 0 0 calc(8 * var(--u)) rgba(240, 200, 130, 0.45);
}
.gn-diya {
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(255, 252, 230, 1) 0%, rgba(255, 210, 120, 0.95) 30%,
    rgba(240, 150, 60, 0.4) 62%, rgba(240, 150, 60, 0) 100%);
}
/* four-point gold sparkle with a soft glow (sanjana-sayyam .ln-spark) */
.gn-spark::before {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(255, 250, 232, 0.95) 0%, rgba(250, 222, 160, 0.45) 40%, rgba(240, 205, 140, 0) 100%);
}
.gn-spark svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  fill: #f3cf7a;
  stroke: rgba(176, 124, 44, 0.55);
  stroke-width: 0.6;
}

/* ---------------------------------------------------------------- buttons */
.gn-ganesha-btn, .gn-bell-btn {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gn-ganesha-btn { z-index: 40; border-radius: 50%; }
.gn-ganesha-btn:focus-visible { outline: 3px solid #9c7729; outline-offset: -6px; }
.gn-bell-btn { z-index: 41; border-radius: 40% 40% 30% 30%; }

/* "Tap the bells": this template's pill (carnival .cv-cta) + a tap ripple (atishay hm-cta) */
.gn-cta {
  position: absolute;
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 30px;
  margin: 0;
  padding: 0.38em 1.05em 0.38em 0.7em;
  border: 1px solid rgba(176, 132, 52, 0.6);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.88);
  color: #8a6420;
  font-family: "Quattrocento", Georgia, serif;
  font-size: clamp(12px, calc(34 * var(--u)), 16px);
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(120, 80, 30, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 6px));
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.6s;
}
.gn-cta.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}
.gn-cta.is-gone { opacity: 0; pointer-events: none; }
.gn-cta::before { content: ""; position: absolute; inset: -8px -4px; }   /* >= 44 px tap target */
.gn-cta:focus-visible { outline: 2px solid #8a6420; outline-offset: 3px; }
.gn-cta__tap { position: relative; flex: none; width: 1.3em; height: 1.3em; }
.gn-cta__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  margin: -0.25em 0 0 -0.25em;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0 22%, #e2a93a 60%, #b07a26 100%);
  box-shadow: 0 0 7px rgba(230, 170, 60, 0.75);
}
.gn-cta__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.3em;
  height: 1.3em;
  margin: -0.65em 0 0 -0.65em;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 146, 56, 0.9);
  transform: scale(0.34);
  opacity: 0;
}
.gn-cta.is-on .gn-cta__ring { animation: gn-tap-ripple 2.6s ease-out 0.6s infinite; }
.gn-cta.is-on .gn-cta__ring:nth-child(2) { animation-delay: 1.9s; }
.gn-away .gn-cta__ring { animation-play-state: paused; }
@keyframes gn-tap-ripple {
  0% { transform: scale(0.34); opacity: 0; }
  18% { opacity: 0.9; }
  75% { opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gn-cta { display: none; }   /* never built under reduced motion; hide if it ever appears */
}
