/**
 * ==========================================================================
 * TitikTemuDa - "The Nexus Convergence" (Titik Temu Engine)
 * Custom Creative Masterpiece Page Transition
 * 
 * Concept:
 * - Dynamic Click-Coordinate Radial Liquid Pulse (originates from user's click)
 * - Colliding Dual "Titik" (Electric Azure & Sunset Tangerine) with Sonic Shockwave Blast
 * - 3 Angled Kinetic Editorial Marquee Ribbons (High-Fashion / Luxury Cyberpunk Media)
 * - Architectural Rangefinder / Viewfinder HUD with dynamic coordinates
 * - 3D Camera Lens Pullback & Liquid Unfold
 * ==========================================================================
 */

:root {
  --nexus-bg: #05070d;
  --nexus-blue: #2563eb;
  --nexus-orange: #f97316;
  --nexus-purple: #8b5cf6;
  --nexus-cyan: #38bdf8;
  --nexus-border: rgba(255, 255, 255, 0.12);
}

/* 1. Master Transition Stage */
.uupm-transition-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  pointer-events: none;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1200px;
}

.uupm-transition-overlay.is-active {
  pointer-events: all;
  visibility: visible;
}

/* 2. Interactive Click-Origin Radial Liquid Canvas */
.uupm-nexus-liquid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0d1527 0%, #05070d 75%, #020306 100%);
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
  z-index: 1;
}

/* Subtle holographic scanline & noise mesh */
.uupm-nexus-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

/* 3. The 3 Angled Kinetic Editorial Marquee Ribbons */
.uupm-nexus-ribbons {
  position: absolute;
  inset: -20% -30%;
  width: 160%;
  height: 140%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.uupm-nexus-ribbon {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  opacity: 0;
  will-change: transform, opacity;
}

/* Ribbon 1: Upper Manifest Tape */
.uupm-ribbon-top {
  transform: rotate(-5deg) translateY(-20px);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(56, 189, 248, 0.3);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 10px 0;
}

.uupm-ribbon-top .uupm-ribbon-track {
  display: flex;
  gap: 28px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #94a3b8;
}

.uupm-ribbon-top .uupm-ribbon-track span.highlight {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Ribbon 2: Massive Center Hero Banner (Displays Destination Title!) */
.uupm-ribbon-mid {
  transform: rotate(3.5deg);
  background: linear-gradient(90deg, #1d4ed8 0%, #7c3aed 50%, #ea580c 100%);
  padding: 18px 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 99, 235, 0.4);
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

.uupm-ribbon-mid .uupm-ribbon-track {
  display: flex;
  gap: 40px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: clamp(20px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

/* Ribbon 3: Bottom Outlined Cyber-Editorial Tape */
.uupm-ribbon-bot {
  transform: rotate(-3deg) translateY(20px);
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(249, 115, 22, 0.3);
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
  padding: 10px 0;
}

.uupm-ribbon-bot .uupm-ribbon-track {
  display: flex;
  gap: 32px;
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.uupm-ribbon-bot .uupm-ribbon-track span.accent {
  color: #f97316;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

/* Infinite Marquee Track Movement */
.uupm-ribbon-track {
  display: flex;
  flex-shrink: 0;
  will-change: transform;
}

/* 4. Colliding Dual "Titik Temu" Orbs (The Meeting Point) */
.uupm-nexus-collision-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orb Alpha (Blue) */
.uupm-nexus-orb-alpha {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #93c5fd, #2563eb 60%, #1d4ed8 100%);
  box-shadow: 
    0 0 25px #2563eb,
    0 0 50px rgba(37, 99, 235, 0.8),
    inset 0 0 10px #ffffff;
  transform: translate(-300px, -200px) scale(0.4);
  opacity: 0;
  will-change: transform, opacity;
}

/* Orb Beta (Orange) */
.uupm-nexus-orb-beta {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fed7aa, #f97316 60%, #c2410c 100%);
  box-shadow: 
    0 0 25px #f97316,
    0 0 50px rgba(249, 115, 22, 0.8),
    inset 0 0 10px #ffffff;
  transform: translate(300px, 200px) scale(0.4);
  opacity: 0;
  will-change: transform, opacity;
}

/* Collision Supernova Blast Ring */
.uupm-nexus-blast {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 
    0 0 40px #ffffff,
    0 0 80px #60a5fa,
    0 0 120px #f97316;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* 5. Center Editorial Monogram & Nexus Focal Core */
.uupm-nexus-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.uupm-nexus-glyph-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.6);
  opacity: 0;
  will-change: transform, opacity;
}

.uupm-nexus-reticle {
  position: absolute;
  inset: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  animation: uupmReticleSpin 8s linear infinite;
}

@keyframes uupmReticleSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.uupm-nexus-badge {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 15px 35px -5px rgba(0, 0, 0, 0.8),
    0 0 35px rgba(245, 158, 11, 0.4);
}

.uupm-nexus-badge svg,
.uupm-nexus-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.45));
}

/* 6. Architectural Rangefinder / Viewfinder HUD Brackets */
.uupm-nexus-rangefinder {
  position: absolute;
  inset: 30px;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  will-change: opacity, transform;
}

.uupm-rf-bracket {
  position: absolute;
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.5);
  border-style: solid;
  border-width: 0;
}

.uupm-rf-tl { top: 0; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; }
.uupm-rf-tr { top: 0; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; }
.uupm-rf-bl { bottom: 0; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; }
.uupm-rf-br { bottom: 0; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; }

/* Viewfinder Telemetry Bar */
.uupm-nexus-telemetry {
  display: none !important;
  align-items: center;
  gap: 16px;
  background: rgba(8, 12, 22, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Inter', monospace;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10;
  opacity: 0;
  will-change: opacity, transform;
}

.uupm-tel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: uupmTelPulse 1s infinite alternate;
}

@keyframes uupmTelPulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.uupm-tel-status {
  color: #f8fafc;
  font-weight: 700;
}

.uupm-tel-sep {
  opacity: 0.3;
}

/* 7. Outgoing Content 3D Barrel Recede & Lens Distort */
.uupm-content-recede {
  transform: scale(0.93) rotateX(2.5deg) translateY(18px) !important;
  filter: blur(14px) brightness(0.4) saturate(140%) !important;
  opacity: 0.25 !important;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.55s ease, opacity 0.55s ease !important;
  pointer-events: none !important;
}

/* Incoming Content Liquid Bloom Entrance */
.uupm-content-bloom {
  animation: uupmContentBloom 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes uupmContentBloom {
  0% {
    transform: scale(1.05) translateY(-25px);
    filter: blur(12px) brightness(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    filter: blur(0px) brightness(1);
    opacity: 1;
  }
}

/* 8. Mobile & Ultra-Narrow Adjustments */
@media (max-width: 768px) {
  .uupm-nexus-ribbons {
    gap: 20px;
  }
  .uupm-ribbon-mid {
    padding: 12px 0;
  }
  .uupm-ribbon-mid .uupm-ribbon-track {
    font-size: 20px;
    gap: 24px;
  }
  .uupm-nexus-rangefinder {
    inset: 15px;
  }
  .uupm-rf-bracket {
    width: 24px;
    height: 24px;
  }
  .uupm-nexus-telemetry {
    bottom: 15px;
    padding: 6px 14px;
    font-size: 10px;
    gap: 10px;
    width: 90%;
    justify-content: center;
  }
  .uupm-nexus-orb-alpha,
  .uupm-nexus-orb-beta {
    width: 32px;
    height: 32px;
  }
}

/* 9. Accessibility Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  .uupm-nexus-liquid {
    clip-path: none !important;
    transition: opacity 0.3s ease !important;
  }
  .uupm-nexus-ribbon,
  .uupm-nexus-orb-alpha,
  .uupm-nexus-orb-beta,
  .uupm-nexus-blast,
  .uupm-nexus-glyph-wrap,
  .uupm-nexus-rangefinder,
  .uupm-nexus-telemetry {
    transform: none !important;
    animation: none !important;
    transition: opacity 0.3s ease !important;
  }
  .uupm-content-recede,
  .uupm-content-bloom {
    transform: none !important;
    filter: none !important;
    transition: opacity 0.25s ease !important;
  }
}
