/* ============================================================
   HK Builders & Developers — Premium Page Loader
   Include this CSS in every page's <head>
   ============================================================ */

/* LOADER STYLES — paste into each page's <style> block OR link this file */
.hk-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a1628;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
}
.hk-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Animated grid background */
.hk-loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: loaderGrid 3s linear infinite;
}
@keyframes loaderGrid {
  0% { transform: translateY(0); }
  100% { transform: translateY(80px); }
}

/* Radial glow */
.hk-loader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.08) 0%, transparent 70%);
  animation: loaderPulse 2s ease infinite;
}
@keyframes loaderPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* INNER CONTENT */
.hk-loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Rotating ring */
.hk-loader-ring-outer {
  width: 160px;
  height: 160px;
  position: relative;
  margin-bottom: 40px;
}
.hk-loader-ring-outer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ring-rotate {
  animation: ringRotate 3s linear infinite;
  transform-origin: 80px 80px;
}
.ring-rotate-reverse {
  animation: ringRotate 5s linear infinite reverse;
  transform-origin: 80px 80px;
}
@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* HK monogram inside ring */
.hk-loader-monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 700;
  background: linear-gradient(135deg, #c9a84c 0%, #f0dfa0 50%, #c9a84c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: monogramPulse 2s ease infinite;
  letter-spacing: -1px;
}
@keyframes monogramPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

/* Brand name */
.hk-loader-brand {
  text-align: center;
  margin-bottom: 50px;
}
.hk-loader-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #c9a84c 0%, #f0dfa0 50%, #c9a84c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.3s both;
}
.hk-loader-sub {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 6px;
  animation: fadeInUp 0.8s ease 0.5s both;
}

/* Progress bar */
.hk-loader-progress-wrap {
  width: 220px;
  height: 1px;
  background: rgba(201,168,76,0.15);
  position: relative;
  overflow: hidden;
}
.hk-loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #c9a84c, #f0dfa0, #c9a84c);
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}
.hk-loader-progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0dfa0;
  box-shadow: 0 0 8px rgba(240,223,160,0.8);
}

/* Percentage */
.hk-loader-percent {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: rgba(201,168,76,0.6);
  letter-spacing: 3px;
  margin-top: 14px;
  min-height: 20px;
}

/* Tagline */
.hk-loader-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
  margin-top: 16px;
  animation: fadeInUp 1s ease 0.8s both;
}

/* Corner decorations */
.hk-loader-corner {
  position: absolute;
  width: 60px;
  height: 60px;
}
.hk-loader-corner-tl { top: 30px; left: 30px; border-top: 1px solid rgba(201,168,76,0.3); border-left: 1px solid rgba(201,168,76,0.3); }
.hk-loader-corner-tr { top: 30px; right: 30px; border-top: 1px solid rgba(201,168,76,0.3); border-right: 1px solid rgba(201,168,76,0.3); }
.hk-loader-corner-bl { bottom: 30px; left: 30px; border-bottom: 1px solid rgba(201,168,76,0.3); border-left: 1px solid rgba(201,168,76,0.3); }
.hk-loader-corner-br { bottom: 30px; right: 30px; border-bottom: 1px solid rgba(201,168,76,0.3); border-right: 1px solid rgba(201,168,76,0.3); }

/* Floating particles inside loader */
.hk-loader-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(201,168,76,0.5);
  border-radius: 50%;
  animation: loaderFloat linear infinite;
  opacity: 0;
}
@keyframes loaderFloat {
  0% { opacity: 0; transform: translateY(100vh); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100px); }
}

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

/* Slide-up exit animation for page content */
.page-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.page-reveal.loaded {
  opacity: 1;
  transform: translateY(0);
}