/* Mahakal intro splash — overlays login on first visit
   ============================================================ */

#mhk-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255,153,51,0.12), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(180,83,9,0.35), transparent 60%),
    #050608;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#mhk-intro.fading { opacity: 0; pointer-events: none; }

/* sky stars */
#mhk-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #ffe28a, transparent 50%),
    radial-gradient(1.5px 1.5px at 28% 32%, #fbbf24, transparent 50%),
    radial-gradient(1px 1px at 70% 12%, #ffd27a, transparent 50%),
    radial-gradient(1.5px 1.5px at 82% 28%, #ffe28a, transparent 50%),
    radial-gradient(1px 1px at 60% 22%, #fbbf24, transparent 50%),
    radial-gradient(2px 2px at 92% 18%, #ffe28a, transparent 50%),
    radial-gradient(1px 1px at 8% 38%, #ffd27a, transparent 50%);
  opacity: 0;
  animation: mhk-stars 1.6s ease 0.4s forwards;
}
@keyframes mhk-stars {
  to { opacity: 0.85; }
}

/* expanding saffron glow ring */
.mhk-glow {
  position: absolute;
  left: 50%; top: 70%;
  width: 80px; height: 80px;
  margin-left: -40px; margin-top: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,178,74,0.85), rgba(255,122,24,0.3) 40%, transparent 70%);
  filter: blur(2px);
  transform: scale(0);
  animation: mhk-glow-pulse 2.4s ease-out 0.7s forwards;
}
@keyframes mhk-glow-pulse {
  0%   { transform: scale(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scale(14); opacity: 0; }
}

/* shikhara silhouette — slides up from bottom + scales in */
.mhk-shikhara {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 60vh;
  background: url("/static/images/shikhara.svg") center bottom / cover no-repeat;
  transform: translateY(40%) scale(1.05);
  opacity: 0;
  animation: mhk-shikhara-rise 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
  filter: drop-shadow(0 -10px 40px rgba(255,153,51,0.25));
}
@keyframes mhk-shikhara-rise {
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* trishul above — drops in, glows */
.mhk-trishul {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -30px) scale(0.6);
  font-size: clamp(64px, 9vw, 120px);
  opacity: 0;
  filter: drop-shadow(0 0 26px rgba(255,153,51,0.85));
  animation: mhk-trishul-drop 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.6s forwards;
}
@keyframes mhk-trishul-drop {
  60%  { transform: translate(-50%, 6px) scale(1.04); opacity: 1; }
  100% { transform: translate(-50%, 0)   scale(1);    opacity: 1; }
}

/* devanagari title — letters fade up sequentially */
.mhk-title {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  font-family: "Tiro Devanagari Hindi", "Noto Sans Devanagari", serif;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.05;
  text-align: center;
  background: linear-gradient(180deg, #ffe28a, #ff9933 55%, #c2410c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 30px rgba(255,153,51,0.35));
}
.mhk-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: mhk-letter 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes mhk-letter {
  to { opacity: 1; transform: translateY(0); }
}

/* sub-line + chant */
.mhk-sub {
  margin-top: 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.mhk-sub .place {
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #cbd5e1;
  opacity: 0;
  animation: mhk-fadein 0.9s ease 1.6s forwards;
}
.mhk-sub .chant {
  margin-top: 12px;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.18em;
  color: #ff9933;
  font-weight: 600;
  opacity: 0;
  animation: mhk-fadein 0.9s ease 2.0s forwards;
}
@keyframes mhk-fadein { to { opacity: 1; } }

/* enter button */
.mhk-enter {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,153,51,0.7);
  background: linear-gradient(180deg, rgba(255,153,51,0.25), rgba(180,83,9,0.45));
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  animation:
    mhk-enter-in 0.8s ease 2.6s forwards,
    mhk-enter-pulse 2.4s ease-in-out 3.6s infinite;
  backdrop-filter: blur(6px);
  text-shadow: 0 0 12px rgba(255,228,138,0.6);
  box-shadow: 0 0 0 0 rgba(255,153,51,0.6), 0 10px 30px -10px rgba(0,0,0,0.6);
}
.mhk-enter:hover { filter: brightness(1.15); }
@keyframes mhk-enter-in {
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes mhk-enter-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,153,51,0.45), 0 10px 30px -10px rgba(0,0,0,0.6); }
  50%      { box-shadow: 0 0 0 14px rgba(255,153,51,0), 0 10px 30px -10px rgba(0,0,0,0.6); }
}

/* skip link */
.mhk-skip {
  position: absolute;
  top: 18px; right: 22px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  cursor: pointer;
  z-index: 3;
  background: transparent;
  border: 0;
  padding: 6px 10px;
}
.mhk-skip:hover { color: #fff; }

/* om accent */
.mhk-om {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 38px;
  color: rgba(255,228,138,0.6);
  letter-spacing: 0.4em;
  opacity: 0;
  animation: mhk-fadein 1s ease 0.4s forwards;
  text-shadow: 0 0 20px rgba(255,153,51,0.6);
}

@media (max-width: 640px) {
  .mhk-shikhara { height: 45vh; }
  .mhk-trishul { top: 14%; }
  .mhk-title { margin-top: 0; }
}

/* respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  #mhk-intro * { animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}
