/* ═══════════════════════════════════════════════════════════════════
   justGifts — Cinematic Gift Unwrap Loading Experience
   ═══════════════════════════════════════════════════════════════════ */

/* Prevent scrolling of body while intro is active */
body.intro-active {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Hide main content until reveal */
body.intro-active .page-wrapper,
body.intro-active .header-menu-wrap {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

/* ── Overlay ── */
#gift-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: opacity, transform;
}

/* Film grain texture */
#gift-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
}

/* Radial vignette (subtle warm shadow on edges) */
#gift-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 65% at center, transparent 30%, rgba(255, 77, 0, 0.04) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ── Ambient warm glow behind box ── */
.intro-ambient {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 0, 0.09) 0%, rgba(255, 77, 0, 0.03) 55%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-pulse 5s ease-in-out infinite;
}

@keyframes ambient-pulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -52%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.08);
  }
}

/* ── Scene container ── */
.intro-scene {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(14px);
  will-change: transform, opacity;
}

/* ── justGifts monogram wrapped in a gift ribbon (the loader hero) ──
   Inline SVG: the orange "jG" mark, a charcoal ribbon that wraps around it
   as the page loads, and a bow that ties once the wrap completes. */
.intro-logo {
  position: relative;
  width: clamp(130px, 22vw, 190px);
  filter: drop-shadow(0 10px 22px rgba(255, 77, 0, 0.16));
  will-change: transform, opacity;
}

#logo-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ── Brand identity ── */
.intro-brand {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 0;
  opacity: 0;
  transform: translateY(8px);
  will-change: transform, opacity;
}

.intro-brand-just {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 3.2vw, 22px);
  color: rgba(30, 24, 18, 0.65);
  letter-spacing: 0.07em;
}

.intro-brand-gifts {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 3.2vw, 22px);
  color: #ff4d00;
  letter-spacing: 0.07em;
}

/* ── Progress area ── */
.intro-progress-area {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: clamp(180px, 32vw, 250px);
  opacity: 0;
  transform: translateY(8px);
  will-change: transform, opacity;
}

/* Slim progress bar */
.loader-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 100px;
  background: rgba(15, 15, 15, 0.08);
  overflow: hidden;
}

.loader-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, #cc3d00 0%, #ff4d00 50%, #ff7a33 100%);
  box-shadow: 0 0 10px 1px rgba(255, 77, 0, 0.5);
  transition: width 0.1s linear;
}

/* Progress label */
.progress-label {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(20, 14, 8, 0.45);
  letter-spacing: 0.22em;
}

#progress-number {
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: right;
  display: inline-block;
}

.progress-pct {
  font-size: 9px;
}

/* ── Tagline ── */
.intro-tagline {
  margin-top: 14px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(8px, 1.4vw, 10px);
  color: rgba(255, 255, 255, 0.17);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0;
  will-change: opacity;
}

/* ── Ambient particle dots ── */
.intro-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Confetti particles (appear at reveal) ── */
.confetti-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Reveal overlay ── */
#intro-reveal-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  .intro-logo {
    width: min(150px, 44vw);
  }

  .intro-progress-area {
    width: min(210px, 78vw);
  }

  .intro-brand-just,
  .intro-brand-gifts {
    font-size: 18px;
  }
}

@media (max-height: 600px) {
  .intro-scene {
    transform: scale(0.85) translateY(0);
  }
}