/* MULTIVERSE SOULS: styles for js/engine-gl.js. Load after css/engine.css.
   Every rule here is scoped to a class the script adds (.gl, .fx-tilt, .fx-ring),
   so without the script nothing changes. */

/* ---------- 1. Field of light (Multiverse scene) ---------- */
.mv-gl {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;                 /* above haze/glow, below the copy */
  opacity: 0;
  animation: mvgl-in 1.2s ease-out .1s forwards;
}
@keyframes mvgl-in { to { opacity: 1; } }

/* while WebGL runs, the flat CSS strata step back; haze, glow and beam stay */
html.gl .mv-world { opacity: 0; visibility: hidden; }

/* ---------- 2. Card tilt ---------- */
html.fx-tilt .dim,
html.fx-tilt [data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
html.fx-tilt .dim:hover,
html.fx-tilt [data-tilt]:hover { transition-duration: .12s; }
html.fx-tilt .dim .media { position: relative; }
html.fx-tilt .dim .media::after {      /* soft light that follows the pointer */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 236, 190, .22), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
html.fx-tilt .dim:hover .media::after { opacity: 1; }

/* ---------- 3. 360° ring (decorative; the real list stays on the page) ----------
   Markup:  <div class="ring360" data-ring aria-hidden="true"><ul class="ring-spin">
              <li>Mind Mastery</li> … nine items … </ul></div>                        */
.ring360 { display: none; }
html.fx-ring .ring360 {
  display: block; position: relative;
  width: min(100%, 760px); height: 230px; margin: 2.5rem auto;
}
html.fx-ring .ring360::before {            /* the centre the dimensions turn around */
  content: "360\00B0"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 600 clamp(2.5rem, 6vw, 4rem)/1 "Hanken Grotesk", system-ui, sans-serif;
  color: rgba(247, 192, 52, .9); text-shadow: 0 0 40px rgba(247, 192, 52, .45);
  z-index: 50;
}
html.fx-ring .ring360::after {             /* the orbit itself */
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%; aspect-ratio: 84 / 17;
  transform: translateY(-50%); border: 1px solid rgba(247, 192, 52, .22); border-radius: 50%;
}
html.fx-ring .ring360 .ring-spin { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
html.fx-ring .ring360 li {
  position: absolute; left: 50%; top: 50%;
  padding: 0 1rem; white-space: nowrap;
  font: 600 .95rem/2.3rem "Hanken Grotesk", system-ui, sans-serif;
  color: #F7C034;
  border: 1px solid rgba(247, 192, 52, .4); border-radius: 999px;
  background: rgba(7, 30, 52, .85);
  will-change: transform, opacity;
}
@media (max-width: 760px) { html.fx-ring .ring360 { display: none; } }
