/* ===========================================================
   BHAGAVATA CODEX — theme.css
   Backgrounds, mandalas, ornaments, holographic foil keyframes.
   =========================================================== */

body {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(31,122,140,0.18), transparent 60%),
    radial-gradient(900px 700px at 10% 10%, rgba(255,140,26,0.12), transparent 60%),
    radial-gradient(1400px 900px at 50% 100%, rgba(212,160,23,0.10), transparent 60%),
    linear-gradient(180deg, #07091f 0%, var(--c-night) 30%, var(--c-night-2) 100%);
  background-attachment: fixed;
}

/* Subtle starfield / particle texture using SVG noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.85  0 0 0 0 0.5  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: screen;
  z-index: 0;
}

/* Faint mandala behind hero */
.mandala-bg {
  position: absolute;
  inset: auto 0 0 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  opacity: 0.18;
}
.mandala-bg svg {
  width: min(900px, 90vw);
  height: auto;
  color: var(--c-gold);
  animation: slow-spin 180s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .mandala-bg svg { animation: none; }
}
@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

/* Ornamental dividers ✦ ❀ ✦ */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin: var(--s-5) auto;
  color: var(--c-gold-soft);
  font-size: var(--fs-md);
  letter-spacing: 0.4em;
}
.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  width: clamp(40px, 12vw, 160px);
  background: linear-gradient(90deg, transparent, var(--c-gold-soft), transparent);
  opacity: 0.6;
}

/* Holographic foil shimmer */
@keyframes holo-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ember-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.05); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glow accents */
.glow-saffron { text-shadow: 0 0 24px rgba(255,140,26,0.5); }
.glow-gold    { text-shadow: 0 0 20px rgba(240,201,95,0.55); }

/* Page-content stacking above bg */
main { position: relative; z-index: 1; }
