/* ==========================================================================
   CodexaLabs Smooth Cinematic Page Transition System
   ========================================================================== */

/* Fullscreen Transition Backdrop */
#cxa-transition-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(249, 250, 251, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s ease;
}

#cxa-transition-curtain.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#cxa-transition-curtain.is-leaving {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease !important;
}


/* Top Glowing Loader Bar */
#cxa-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #6366f1, #06b6d4);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.9), 0 0 6px rgba(99, 102, 241, 0.7);
  z-index: 10000000;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: width 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease;
}

#cxa-page-loader.is-active {
  opacity: 1 !important;
}

#cxa-page-loader.is-done {
  width: 100% !important;
  opacity: 0 !important;
  transition: width 0.15s ease-out, opacity 0.25s 0.08s ease !important;
}

/* Main Page Container Smooth Entry Animation */
body.cxa-entry-animate {
  animation: cxaPageEnter 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cxaPageEnter {
  0% {
    opacity: 0.3;
    transform: translateY(12px) scale(0.995);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* Page Exit Animation on current page content */
body.cxa-page-exiting #main,
body.cxa-page-exiting #journal-wrapper,
body.cxa-page-exiting #codexa-projects,
body.cxa-page-exiting #codexa-project-detail {
  opacity: 0.4 !important;
  transform: translateY(-8px) scale(0.99) !important;
  filter: blur(3px) !important;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.25s ease !important;
}


