/* ============================================================
   Duling Investment Group: intro load animation
   ============================================================ */

#intro-overlay {
  --intro-bg: #f6f1e7;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--intro-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 477ms ease;
}

#intro-overlay.intro-exit {
  opacity: 0;
  pointer-events: none;
}

.intro-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 4vw, 42px);
  width: min(88vw, 760px);
}

.intro-svg {
  width: clamp(124px, 18vw, 184px);
  height: auto;
  display: block;
}

.intro-d-fill {
  opacity: 0;
  transition: opacity 293ms ease;
}

#intro-overlay.intro-d-ready .intro-d-fill {
  opacity: 1;
}

.intro-d-stroke {
  stroke: #122a4e;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--d-path-len, 700px);
  stroke-dashoffset: var(--d-path-len, 700px);
  opacity: 0.95;
  transition: opacity 203ms ease;
}

#intro-overlay.intro-drawing .intro-d-stroke {
  animation: introDrawD 680ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#intro-overlay.intro-d-ready .intro-d-stroke {
  opacity: 0;
}

.intro-bar {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: scaleY(0);
  will-change: opacity, transform;
}

.intro-inner-space {
  fill: var(--intro-bg);
  pointer-events: none;
}

.intro-bar.bar-grow {
  animation: introBarGrow 315ms cubic-bezier(0.05, 0.64, 0.18, 1) forwards;
}

.intro-bar-crescent {
  transform-origin: center center;
}

.intro-bar-crescent.bar-grow {
  animation: introCrescentReveal 347ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

/* Wordmark */
.intro-wordmark {
  opacity: 0;
  transform: translateY(12px);
  width: min(88vw, 620px);
}
.intro-wordmark.wm-reveal {
  animation: introWordmark 477ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.intro-wordmark-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Keyframes ------------------------------------------- */

@keyframes introDrawD {
  to { stroke-dashoffset: 0; }
}

@keyframes introBarGrow {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes introCrescentReveal {
  from {
    opacity: 0;
    transform: translateX(-8px) scaleX(0.2);
  }
  to {
    opacity: 1;
    transform: translateX(0) scaleX(1);
  }
}

@keyframes introWordmark {
  to { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion: skip overlay entirely */
@media (prefers-reduced-motion: reduce) {
  #intro-overlay { display: none !important; }
}
