:root {
  --olive: #6f7457;
  --sage: #c7ccc3;
  --orange: #c46a33;
  --peach: #d19a82;
  --cream: #efe3d3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.preloader {
  width: 100%;
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg,
    var(--olive) 0px,
    var(--olive) 1px,
    transparent 1px,
    transparent 28px
  );
}

.border-frame {
  position: absolute;
  inset: 16px;
  border: 1.5px solid var(--peach);
  border-radius: 4px;
  opacity: 0.4;
  pointer-events: none;
}

.border-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 0.5px solid var(--orange);
  border-radius: 2px;
  opacity: 0.5;
}

.corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--orange);
  border-style: solid;
  opacity: 0.8;
}
.corner.tl {
  top: 24px;
  left: 24px;
  border-width: 2px 0 0 2px;
}
.corner.tr {
  top: 24px;
  right: 24px;
  border-width: 2px 2px 0 0;
}
.corner.bl {
  bottom: 24px;
  left: 24px;
  border-width: 0 0 2px 2px;
}
.corner.br {
  bottom: 24px;
  right: 24px;
  border-width: 0 2px 2px 0;
}

.temple-wrap {
  position: relative;
  margin-bottom: 2rem;
  animation: floatUp 3.5s ease-in-out infinite;
}

@keyframes floatUp {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.temple-svg {
  display: block;
}

.flame-group {
  transform-origin: center bottom;
}
.flame1 {
  animation: flicker1 0.6s ease-in-out infinite alternate;
  transform-origin: center bottom;
}
.flame2 {
  animation: flicker2 0.8s ease-in-out infinite alternate;
  transform-origin: center bottom;
}
.flame3 {
  animation: flicker3 0.5s ease-in-out infinite alternate;
  transform-origin: center bottom;
}

@keyframes flicker1 {
  from {
    transform: scaleX(1) scaleY(1) rotate(-3deg);
    opacity: 0.9;
  }
  to {
    transform: scaleX(0.85) scaleY(1.15) rotate(3deg);
    opacity: 1;
  }
}
@keyframes flicker2 {
  from {
    transform: scaleX(1) scaleY(1) rotate(2deg);
    opacity: 0.8;
  }
  to {
    transform: scaleX(0.9) scaleY(1.2) rotate(-2deg);
    opacity: 1;
  }
}
@keyframes flicker3 {
  from {
    transform: scaleX(1) scaleY(1) rotate(-2deg);
    opacity: 0.85;
  }
  to {
    transform: scaleX(0.88) scaleY(1.1) rotate(4deg);
    opacity: 0.95;
  }
}

.glow-ring {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 140px;
  height: 20px;
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(8px);
  animation: glowPulse 3.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.1;
    transform: translateX(-50%) scaleX(1);
  }
  50% {
    opacity: 0.2;
    transform: translateX(-50%) scaleX(1.15);
  }
}

.brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand-sub {
  font-family: "Georgia", serif;
  font-size: clamp(11px, 2vw, 13px);
  letter-spacing: 0.35em;
  color: var(--olive);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.brand-title {
  font-family: "Georgia", serif;
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 400;
  color: var(--olive);
  letter-spacing: 0.06em;
  line-height: 1.1;
  position: relative;
  display: inline-block;
}

.brand-title span {
  color: var(--orange);
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0.75rem auto 0;
  width: fit-content;
}

.divider-line {
  width: 48px;
  height: 1px;
  background: var(--peach);
}

.divider-dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.progress-area {
  width: min(340px, 80vw);
  text-align: center;
}

.progress-label {
  font-family: "Georgia", serif;
  font-size: clamp(11px, 1.8vw, 12px);
  letter-spacing: 0.25em;
  color: var(--olive);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: var(--sage);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: var(--orange);
  border-radius: 99px;
  width: 0%;
  animation: loadBar 3.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadBar {
  0% {
    width: 0%;
  }
  20% {
    width: 22%;
  }
  50% {
    width: 55%;
  }
  75% {
    width: 78%;
  }
  90% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}

.progress-pct {
  font-family: "Georgia", serif;
  font-size: 13px;
  color: var(--peach);
  letter-spacing: 0.1em;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 1.5rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: dotPop 1.4s ease-in-out infinite;
}
.dot:nth-child(1) {
  animation-delay: 0s;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPop {
  0%,
  80%,
  100% {
    transform: scale(1);
    background: var(--sage);
  }
  40% {
    transform: scale(1.5);
    background: var(--orange);
  }
}

.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 8px;
  height: 14px;
  background: var(--peach);
  border-radius: 50% 50% 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(0deg);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(360deg);
  }
}
