/* ── Cinematic Nav Transition V2.9 ──────────────────────────────────
   Full-page translucent warp overlay between internal page loads.
   ─────────────────────────────────────────────────────────────────── */

/* ── Scene Header ──────────────────────────────────────────────────── */
.nx-scene {
  position: relative;
  padding: 1.6rem 1.4rem 1.2rem;
  margin-bottom: 1.2rem;
  background: rgba(10, 12, 20, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.nx-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(110, 90, 255, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}
.nx-scene__inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.nx-scene__text {
  flex: 1 1 auto;
  min-width: 0;
}
.nx-scene__title {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text, #e8e6f0);
  margin: 0;
  line-height: 1.25;
}
.nx-scene__subtitle {
  font-size: 0.82rem;
  color: var(--muted, #8a8a9a);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

/* Chips row */
.nx-scene__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nx-scene__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted, #8a8a9a);
}
.nx-scene__chip--accent {
  background: rgba(110, 90, 255, 0.15);
  border-color: rgba(110, 90, 255, 0.25);
  color: var(--accent, #6e5aff);
}
.nx-scene__chip-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nx-scene__chip-value {
  font-weight: 400;
}

/* Actions */
.nx-scene__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nx-scene__action {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text, #e8e6f0);
  transition: background 0.2s, border-color 0.2s;
}
.nx-scene__action:hover {
  background: rgba(110, 90, 255, 0.2);
  border-color: rgba(110, 90, 255, 0.35);
}
.nx-scene__action--primary {
  background: var(--accent, #6e5aff);
  border-color: var(--accent, #6e5aff);
  color: #fff;
}

/* ── Warp Overlay ──────────────────────────────────────────────────── */
.nx-warp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(110, 90, 255, 0.12) 0%,
    rgba(8, 8, 18, 0.7) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease-out;
}
.nx-warp-overlay.nx-warp--active {
  opacity: 1;
  pointer-events: all;
}

/* Streak lines */
.nx-warp-overlay::before,
.nx-warp-overlay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vmax;
  height: 2px;
  transform-origin: center center;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(110, 90, 255, 0.4),
    transparent
  );
  animation: nx-warp-streak 0.4s ease-out forwards;
}
.nx-warp-overlay::before {
  transform: translate(-50%, -50%) rotate(25deg);
}
.nx-warp-overlay::after {
  transform: translate(-50%, -50%) rotate(-15deg);
  animation-delay: 0.06s;
}

/* Central blur pulse */
.nx-warp__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(110, 90, 255, 0.3) 0%,
    transparent 70%
  );
  animation: nx-warp-pulse 0.35s ease-out forwards;
}

@keyframes nx-warp-streak {
  0% {
    opacity: 0;
    width: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    width: 200vmax;
    opacity: 0;
  }
}
@keyframes nx-warp-pulse {
  0% {
    width: 0;
    height: 0;
    opacity: 0.6;
  }
  100% {
    width: 60vmin;
    height: 60vmin;
    opacity: 0;
  }
}

/* ── Reduced Motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nx-warp-overlay,
  .nx-warp-overlay::before,
  .nx-warp-overlay::after,
  .nx-warp__pulse {
    animation: none !important;
    transition: none !important;
  }
  .nx-warp-overlay.nx-warp--active {
    /* instant fade, no warp */
    opacity: 0.35;
  }
}

/* ── Light Theme ───────────────────────────────────────────────────── */
[data-theme="light"] .nx-scene {
  background: rgba(248, 247, 255, 0.7);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .nx-scene::before {
  background: linear-gradient(
    135deg,
    rgba(110, 90, 255, 0.05) 0%,
    transparent 60%
  );
}
[data-theme="light"] .nx-scene__chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .nx-warp-overlay {
  background: radial-gradient(
    ellipse at center,
    rgba(110, 90, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.65) 100%
  );
}

/* ── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nx-scene { padding: 1.1rem 1rem 0.9rem; }
  .nx-scene__inner { flex-direction: column; align-items: flex-start; }
  .nx-scene__actions { width: 100%; }
}
