/* =========================================================
   HOME PAGE — ANIMATED SATURN SHRINE
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05040d;
}

#backdrop {
  position: fixed;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.45) saturate(1.2);
  opacity: 0;
  transition: opacity 1.2s ease;
}

#frame {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

body.ready #stage,
body.ready #backdrop { opacity: 1; }

#scene {
  display: block;
  /* width/height set from script in image pixels */
}
#scene.boxed-x {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
#scene.boxed-y {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

/* "ஓம் ஸ்ரீகுருவே சரணம்" link — sits below the lingam between the lamps.
   Position and font-size are set in image pixels by home.js,
   so it scales together with the picture. */
#guruLink {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: 'Noto Serif Tamil', 'Latha', 'Nirmala UI', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #ffe9a8;
  padding: 0.28em 1.1em 0.36em;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(40, 14, 4, 0.78) 0%, rgba(25, 8, 2, 0.62) 70%, rgba(25, 8, 2, 0.45) 100%);
  border: 1px solid rgba(255, 205, 110, 0.55);
  text-shadow:
    0 0 0.25em rgba(255, 190, 80, 0.95),
    0 0 0.8em rgba(255, 140, 30, 0.7);
  box-shadow:
    0 0 0.6em rgba(255, 170, 60, 0.45),
    inset 0 0 0.6em rgba(255, 170, 60, 0.25);
  animation: linkGlow 3.2s ease-in-out infinite;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

#guruLink:hover,
#guruLink:focus-visible {
  color: #fffbe8;
  border-color: rgba(255, 230, 160, 0.95);
  outline: none;
  background: radial-gradient(ellipse at center, rgba(70, 26, 6, 0.85) 0%, rgba(35, 12, 3, 0.7) 100%);
}

@keyframes linkGlow {
  0%, 100% {
    box-shadow: 0 0 0.5em rgba(255, 170, 60, 0.35), inset 0 0 0.5em rgba(255, 170, 60, 0.2);
  }
  50% {
    box-shadow: 0 0 1.3em rgba(255, 185, 80, 0.75), inset 0 0 0.8em rgba(255, 190, 90, 0.35);
  }
}

/* white flash on the way to star.html (same feel as the star page) */
#flash {
  position: fixed;
  inset: 0;
  background: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
  z-index: 9999;
}
