/* ==========================================================================
   WorthUnion Contact Card — animated overlay module
   Self-contained. All classes/keyframes are prefixed wu-cc- to avoid
   collisions with home.css. Consumed by any page via:
     <link rel="stylesheet" href="/assets/contact-card/contact-card.css">
     <script src="/assets/contact-card/contact-card.js" defer></script>
   ========================================================================== */

/* ---- keyframes ---------------------------------------------------------- */
@keyframes wu-cc-emerge {
  0% {
    opacity: 0;
    transform: scale(0.05);
    filter: blur(12px);
  }
  52% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
@keyframes wu-cc-ring {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes wu-cc-dot {
  0%,
  100% {
    opacity: 0.1;
    transform: translate(-50%, -50%) scale(0.7);
  }
  50% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1.25);
  }
}
@keyframes wu-cc-shimmer {
  0% {
    transform: translateX(-160%) skewX(-16deg);
  }
  100% {
    transform: translateX(260%) skewX(-16deg);
  }
}
@keyframes wu-cc-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@keyframes wu-cc-orbit {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes wu-cc-orbit-r {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}
@keyframes wu-cc-glow {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.12);
  }
}
@keyframes wu-cc-hint {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-50%) translateY(5px);
    opacity: 0.5;
  }
}

/* ---- overlay shell ------------------------------------------------------ */
.wu-cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease;
  font-family: Poppins, sans-serif;
}
.wu-cc-overlay.wu-cc-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wu-cc-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, #241a12, #07060c 70%);
  cursor: pointer;
}

/* ---- dot field ---------------------------------------------------------- */
.wu-cc-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.wu-cc-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ee7b43;
  transform: translate(-50%, -50%);
  animation: wu-cc-dot 2.4s ease-in-out infinite;
}

/* ---- orbiting particles ------------------------------------------------- */
.wu-cc-orbits {
  position: absolute;
  left: 50%;
  top: 44%;
  pointer-events: none;
  z-index: 2;
}
.wu-cc-orbit {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
}
.wu-cc-orbit-1 {
  width: 760px;
  height: 760px;
  animation: wu-cc-orbit 14s linear infinite;
}
.wu-cc-orbit-2 {
  width: 560px;
  height: 560px;
  animation: wu-cc-orbit-r 10s linear infinite;
}
.wu-cc-orbit span {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.wu-cc-p1 {
  left: 50%;
  top: 0;
  width: 9px;
  height: 9px;
  background: #ee7b43;
  box-shadow: 0 0 14px 3px rgba(238, 123, 67, 0.8);
}
.wu-cc-p2 {
  left: 50%;
  top: 100%;
  width: 6px;
  height: 6px;
  background: #f6b04a;
  box-shadow: 0 0 12px 2px rgba(246, 176, 74, 0.7);
}
.wu-cc-p3 {
  left: 100%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: #fff;
  box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.6);
}
.wu-cc-p4 {
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #ee7b43;
  box-shadow: 0 0 10px 2px rgba(238, 123, 67, 0.7);
}

/* ---- core glow + ring burst --------------------------------------------- */
.wu-cc-glow {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(238, 123, 67, 0.5),
    rgba(238, 123, 67, 0) 60%
  );
  transform: translate(-50%, -50%);
  animation: wu-cc-glow 3.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.wu-cc-fx {
  position: absolute;
  left: 50%;
  top: 44%;
  pointer-events: none;
  z-index: 3;
}
.wu-cc-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%) scale(0.12);
}

/* ---- card stage --------------------------------------------------------- */
.wu-cc-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 44%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  perspective: 1600px;
  z-index: 5;
  cursor: grab;
  touch-action: none;
}
.wu-cc-stage.wu-cc-grabbing {
  cursor: grabbing;
}
.wu-cc-float {
  animation: wu-cc-float 5s ease-in-out infinite;
  transform-style: preserve-3d;
}
.wu-cc-emerge {
  transform-style: preserve-3d;
}
.wu-cc-card3d {
  position: relative;
  width: 540px;
  height: 309px;
  transform-style: preserve-3d;
  will-change: transform;
}
.wu-cc-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(238, 123, 67, 0.25),
    0 0 60px rgba(238, 123, 67, 0.35);
}
.wu-cc-face-back {
  transform: rotateY(180deg);
}
.wu-cc-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wu-cc-license {
  position: absolute;
  right: 5.5%;
  bottom: 7%;
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(24, 24, 24, 0.82);
}
/* back face: right-aligned with the phone/site text block, just above the phone */
.wu-cc-license-back {
  right: 50%;
  bottom: 47.5%;
  font-size: 13px;
}
.wu-cc-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0)
  );
  animation: wu-cc-shimmer 3.4s ease-in-out infinite;
}
.wu-cc-face-back .wu-cc-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0)
  );
}

/* ---- hint / close / get-in-touch ---------------------------------------- */
.wu-cc-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  letter-spacing: 0.04em;
  z-index: 7;
  pointer-events: none;
}
.wu-cc-hint-mobile {
  display: none;
}
.wu-cc-getintouch {
  display: none;
}
.wu-cc-close {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 8;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: Poppins, sans-serif;
  line-height: 1;
}

/* ==========================================================================
   Mobile — matches the Mobile prototype (site breakpoint: 700px)
   ========================================================================== */
@media (max-width: 700px) {
  .wu-cc-backdrop {
    background: radial-gradient(circle at 50% 42%, #241a12, #07060c 72%);
  }

  .wu-cc-orbits,
  .wu-cc-glow,
  .wu-cc-fx,
  .wu-cc-stage {
    top: 42%;
  }

  .wu-cc-orbit-1 {
    width: 460px;
    height: 460px;
    animation-duration: 16s;
  }
  .wu-cc-orbit-2 {
    width: 320px;
    height: 320px;
    animation-duration: 11s;
  }
  .wu-cc-p1 {
    width: 8px;
    height: 8px;
  }
  .wu-cc-p3 {
    width: 6px;
    height: 6px;
  }

  .wu-cc-glow {
    width: 340px;
    height: 340px;
  }

  .wu-cc-stage {
    perspective: 1200px;
  }
  .wu-cc-card3d {
    width: 322px;
    height: auto;
    aspect-ratio: 540 / 309;
  }
  .wu-cc-face {
    border-radius: 14px;
    box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(238, 123, 67, 0.25),
      0 0 50px rgba(238, 123, 67, 0.35);
  }

  .wu-cc-license {
    font-size: 9.5px;
  }
  .wu-cc-license-back {
    font-size: 8px;
  }

  .wu-cc-close {
    top: calc(env(safe-area-inset-top) + 16px);
    right: calc(env(safe-area-inset-right) + 16px);
  }

  /* swap hint copy + enable the bobbing animation */
  .wu-cc-hint-desktop {
    display: none;
  }
  .wu-cc-hint-mobile {
    display: block;
    left: 50%;
    right: auto;
    bottom: calc(env(safe-area-inset-bottom) + 34px);
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    letter-spacing: 0.03em;
    animation: wu-cc-hint 2.2s ease-in-out infinite;
  }

  /* orange "Get in touch" pill (mobile only) — sits between the card and the
     bottom hint, high enough to not feel glued to the screen edge */
  .wu-cc-getintouch {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 26%;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ee7b43;
    color: #101010;
    text-decoration: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(238, 123, 67, 0.4);
  }
  .wu-cc-getintouch span {
    width: 24px;
    height: 24px;
    border: 1.5px solid #101010;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 13px;
  }
}

/* ---- reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .wu-cc-overlay * {
    animation-duration: 0.01ms !important;
  }
}
