/* ==========================================================
   PAGE LOADER — 3D logo reveal for Yogantar Shala
   ========================================================== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 34%, #094d47 0%, #02332f 52%, #011612 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

#page-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  perspective: 900px;
  text-align: center;
  -webkit-perspective: 900px;
}

.logo-wrap {
  position: relative;
  width: 128px;
  margin: 0 auto 30px;
}

.logo-3d {
  width: 118px;
  height: 118px;
  display: block;
  margin: 0 auto;
  padding: 13px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  animation: logoFlip 1.05s cubic-bezier(0.2, 0.8, 0.25, 1) both,
    logoFloat 3.4s ease-in-out 1.1s infinite;
}

.loader-ring {
  position: absolute;
  inset: -14px;
  border-radius: 18px;
  background: conic-gradient(from 0deg, transparent 0 38%, #e09f3e 50%, transparent 62% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: ringSpin 1.35s linear infinite;
}

.loader-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(245, 239, 228, 0.16);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}

@keyframes logoFlip {
  0% {
    transform: rotateY(-118deg) rotateX(22deg) scale(0.72);
    opacity: 0;
  }
  60% {
    transform: rotateY(16deg) rotateX(-7deg) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateY(-11px) rotateX(5deg);
  }
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  color: #f5efe4;
  animation: fadeUp 0.9s ease 0.25s both;
}

.loader-sub {
  margin-top: 12px;
  color: rgba(245, 239, 228, 0.72);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  animation: fadeUp 0.9s ease 0.4s both;
}

.loader-bar {
  position: relative;
  margin: 26px auto 0;
  width: 128px;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(224, 159, 62, 0.18);
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #e09f3e, transparent);
  animation: barSlide 1.1s ease-in-out infinite;
}

@keyframes barSlide {
  from { left: -46%; }
  to { left: 100%; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}