/* Dot Preloader v4.2 */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500&display=swap');

* { box-sizing: border-box; }

body.dp-loading { overflow: hidden; }

/* ── OVERLAY ─────────────────────────────────────── */
#dp-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--dp-bg, #ebd1c3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.77,0,0.18,1),
              visibility 0.6s cubic-bezier(0.77,0,0.18,1);
}
#dp-preloader.dp-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ══ DESKTOP ════════════════════════════════════════ */
#dp-desktop {
  position: absolute;
  inset: 0;
  /* display is toggled by JS */
  align-items: center;
  justify-content: center;
}
#dp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: none;
}

/* Dots */
.dp-dot {
  position: absolute;
  top: 42%;
  width: 17vw;
  height: 17vw;
  max-width: 200px;
  max-height: 200px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  background: var(--dp-dot-color, #dda2ab);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: background 0.4s ease, transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
#dp-dot-a { left: 33%; }
#dp-dot-b { left: 64%; }

/* Spinning dashed inner ring */
.dp-dot::after {
  content: '';
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.45);
  animation: dp-spin 8s linear infinite;
}
@keyframes dp-spin { to { transform: rotate(360deg); } }

.dp-dot.dp-connected { transform: translate(-50%, -50%) scale(1.05); }
.dp-dot.dp-connected::after { opacity: 0; animation: none; }

/* Typewriter text — always single line */
#dp-typetext {
  position: absolute;
  bottom: 11%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 3.5vw, 52px);
  font-weight: 400;
  color: var(--dp-dot-color, #dda2ab);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  opacity: 0; /* revealed by JS when typing starts */
}

/* Custom cursor dot */
#dp-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dp-dot-color, #dda2ab);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999999;
  opacity: 0;
  transition: opacity 0.15s, transform 0.2s;
  mix-blend-mode: multiply;
}
#dp-cursor.dp-near {
  transform: translate(-50%, -50%) scale(3);
  opacity: 0.2 !important;
}

/* ══ MOBILE ══════════════════════════════════════════ */
#dp-mobile {
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

/* Hide the two dots and connecting line on mobile entirely */
.dp-mob-dots {
  display: none !important;
}

/* Mobile text — single line, JS handles opacity + typing */
.dp-mob-text {
  font-family: 'Caveat', cursive;
  font-size: clamp(28px, 8vw, 52px);
  font-weight: 400;
  color: var(--dp-dot-color, #dda2ab);
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0; /* hidden by default; JS reveals it */
}

/* ── REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .dp-dot::after { animation: none; }
  .dp-mob-text   { transition: none !important; }
  #dp-preloader  { transition-duration: 0.1s !important; }
}
