/* === PRELOADER OVERLAY === */
#preloader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  place-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* ✅ agar jalan di Safari */
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

/* === KARTU LOADER === */
#preloader .loader {
  display: grid;
  place-items: center;
  gap: 10px;
  width: 160px;
  aspect-ratio: 1 / 1;
  padding: 18px;
  border-radius: 20px;
  background: rgba(224, 216, 199, 0.35); /* warna lembut selaras brand */
  box-shadow:
    inset 0 10px 30px rgba(0, 0, 0, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.06);
}

/* === ANIMASI LOGO === */
#preloader .logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  transform-origin: 50% 55%;
  animation: breath 1.35s ease-in-out infinite,
             floaty 3.2s ease-in-out infinite;
}

/* === PROGRESS BAR === */
#preloader .bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

#preloader .bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #7b462b; /* warna brand */
  transition: width 0.25s ease;
}

#preloader .pct {
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #7b462b;
  opacity: 0.85;
  margin-top: 3px;
}

/* === HINT TEKS DI BAWAH LOGO === */
#preloader .hint {
  font-family: "Forum", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #7b462b;
  opacity: 0.8;
}

/* === STATUS BODY === */
body.loading {
  overflow: hidden;
}

body.loaded #preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* === ANIMASI === */
@keyframes breath {
  0%   { transform: scale(1) rotate(0); }
  50%  { transform: scale(1.07) rotate(1.2deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes floaty {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* === AKSESIBILITAS === */
@media (prefers-reduced-motion: reduce) {
  #preloader .logo { animation: none; }
  #preloader { transition: none; }
}
