/**
 * Light page transition — logo over blurred backdrop.
 */

.hub-warp {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

.hub-warp.is-idle {
  opacity: 0;
  visibility: hidden;
}

.hub-warp.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hub-warp-veil {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 24, 0.72);
  /* Blur only the veil sample of what's behind — keep blur modest */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
}

.hub-warp-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.92);
}

.hub-warp-logo {
  width: min(96px, 22vw);
  height: auto;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px rgba(10, 18, 48, 0.9),
    0 0 0 6px rgba(177, 163, 248, 0.35),
    0 12px 36px rgba(0, 0, 0, 0.45);
}

.hub-warp.is-out .hub-warp-veil,
.hub-warp.is-hold .hub-warp-veil {
  opacity: 1;
  transition: opacity 0.28s ease;
}

.hub-warp.is-out .hub-warp-core,
.hub-warp.is-hold .hub-warp-core {
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-warp.is-in .hub-warp-veil {
  opacity: 0;
  transition: opacity 0.34s ease;
}

.hub-warp.is-in .hub-warp-core {
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.3s ease,
    transform 0.34s ease;
}

html.page-warping body {
  /* Avoid full-page filter blur (very expensive) — veil handles the soft look */
  opacity: 1;
}

html.page-ready body {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-warp {
    display: none !important;
  }

  html.page-warping body,
  html.page-ready body {
    filter: none;
    transition: none;
  }
}
