/* Jornada de metas · tema Noite. Paisagem vetorial (jornada-cena.svg) + emblemas do N da Nexora. */
.nx-journey { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.nx-journey > *, .nx-journey-head > * { min-width: 0; }

.nx-journey-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 18px; align-items: stretch;
}
.nx-journey-head > div:first-child { padding: 6px 2px; align-self: center; }
.nx-journey-eyebrow {
  display: inline-block; font: 700 12px/1 'Archivo', system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: #c4b5fd; margin-bottom: 8px;
}
.nx-journey-head h2 { margin: 0 0 6px; font: 800 clamp(28px, 3.4vw, 40px)/1.05 'Archivo', system-ui, sans-serif; font-variation-settings: 'wdth' 112; color: #f2eefb; letter-spacing: -.02em; }
.nx-journey-head p { margin: 0; color: #c8c0dc; max-width: 52ch; }

.nx-journey-goal {
  display: grid; gap: 8px; padding: 18px; border-radius: 14px;
  background: rgba(20, 14, 34, .78); border: 1px solid rgba(196, 181, 253, .16);
}
.nx-journey-goal > span { font-size: 13px; color: #9890b0; }
.nx-journey-goal strong { font: 800 28px/1.1 'Archivo', system-ui, sans-serif; color: #f2eefb; font-variant-numeric: tabular-nums; }
.nx-journey-goal small { color: #c8c0dc; font-size: 13.5px; }
.nx-journey-goal small b { color: #f2eefb; }
.nx-journey-bar { height: 8px; border-radius: 99px; background: rgba(196, 181, 253, .14); overflow: hidden; }
.nx-journey-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #f0abfc); box-shadow: 0 0 12px rgba(167, 139, 250, .7); }

/* Mapa: a proporção é a mesma do viewBox (1200x560), então % dos nós e do SVG coincidem. */
.nx-journey-map {
  position: relative; aspect-ratio: 1200 / 560; border-radius: 20px; overflow: hidden; isolation: isolate;
  border: 1px solid rgba(196, 181, 253, .16);
  background: #0b0520 url('jornada-cena.svg') center / cover no-repeat;
  box-shadow: 0 24px 60px -30px rgba(124, 58, 237, .55);
}
.nx-journey-map::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 33% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 30%, #e9e1ff 50%, transparent 51%), radial-gradient(1px 1px at 63% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 8%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 40%, #d9d0ff 50%, transparent 51%);
  animation: nx-journey-twinkle 3.6s ease-in-out infinite alternate;
}
@keyframes nx-journey-twinkle { from { opacity: .15; } to { opacity: .85; } }

.nx-journey-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nx-journey-road { fill: none; stroke: rgba(8, 4, 20, .55); stroke-width: 26; stroke-linecap: round; }
.nx-journey-track { fill: none; stroke: rgba(196, 181, 253, .38); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 12; }
.nx-journey-done {
  fill: none; stroke: #e9d5ff; stroke-width: 7; stroke-linecap: round;
  filter: drop-shadow(0 0 4px #c084fc) drop-shadow(0 0 14px rgba(168, 85, 247, .9));
}

.nx-journey-nodes { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.nx-journey-node {
  position: absolute; left: var(--x); top: var(--y); width: 150px; margin-left: -75px;
  display: grid; justify-items: center; gap: 6px;
  transform: translateY(calc(-1 * var(--orb, 60px) / 2));
}
.nx-journey-node.is-current { --orb: 82px; z-index: 2; }

.nx-journey-orb { position: relative; display: grid; place-items: center; width: var(--orb, 60px); height: var(--orb, 60px); }
/* Pedestal de luz sob cada planeta */
.nx-journey-orb::before {
  content: ''; position: absolute; left: -22%; right: -22%; bottom: -16%; height: 34%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(216, 180, 254, .75), rgba(124, 58, 237, .35) 55%, transparent);
  border: 1px solid rgba(233, 213, 255, .45);
}
.nx-journey-tag {
  display: grid; justify-items: center; padding: 6px 12px 7px; border-radius: 10px; text-align: center; margin-top: 6px;
  background: rgba(10, 5, 24, .72); border: 1px solid rgba(196, 181, 253, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.nx-journey-tag b { font: 800 14px/1.2 'Archivo', system-ui, sans-serif; color: #f2eefb; letter-spacing: .01em; }
.nx-journey-tag small { font-size: 11.5px; color: #b9b0d4; white-space: nowrap; font-variant-numeric: tabular-nums; }

.nx-journey-badge {
  position: absolute; right: -4px; top: -2px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font: 800 12px/1 'Archivo', system-ui, sans-serif; font-style: normal; border: 2px solid #0b0520;
}
.nx-journey-badge.is-ok { background: #34d399; color: #04261a; box-shadow: 0 0 10px rgba(52, 211, 153, .7); }
.nx-journey-badge.is-lock { background: #2a2146; color: #b9b0d4; }
.nx-journey-badge svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; stroke-width: 1.4; }
.nx-journey-badge svg rect { stroke: none; }

.nx-journey-here {
  position: absolute; bottom: calc(100% + 8px); white-space: nowrap; padding: 5px 10px; border-radius: 99px;
  font: 800 10.5px/1 'Archivo', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: #1a0b33; background: linear-gradient(90deg, #e9d5ff, #f0abfc); box-shadow: 0 0 18px rgba(240, 171, 252, .7);
}
.nx-journey-here::after {
  content: ''; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #f5c6fd;
}

/* Emblemas: o ícone da Nexora com um tema animado dentro do "N" */
.nx-n-emblem {
  display: block; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 6px 14px rgba(76, 29, 149, .55)) drop-shadow(0 0 18px rgba(167, 139, 250, .45));
}
.nx-n-emblem--supernova { filter: drop-shadow(0 6px 14px rgba(76, 29, 149, .55)) drop-shadow(0 0 22px rgba(255, 150, 70, .55)); }
.nx-n-emblem--universo { filter: drop-shadow(0 6px 14px rgba(76, 29, 149, .55)) drop-shadow(0 0 26px rgba(196, 181, 253, .85)); }
.nx-n-emblem * { transform-box: fill-box; transform-origin: center; }

.nxj-spark { animation: nxj-rise 2.8s linear infinite; }
@keyframes nxj-rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-62px); opacity: 0; } }
.nxj-rocket { animation: nxj-launch 3.6s cubic-bezier(.5, 0, .7, 1) infinite; }
@keyframes nxj-launch { 0%, 12% { transform: translateY(16px); } 85% { transform: translateY(-58px); opacity: 1; } 86%, 100% { transform: translateY(-58px); opacity: 0; } }
.nxj-flame { animation: nxj-flicker .18s ease-in-out infinite alternate; transform-origin: top center; }
@keyframes nxj-flicker { from { transform: scaleY(.75); } to { transform: scaleY(1.2); } }

.nxj-orbit { transform-box: view-box; transform-origin: 50px 52px; animation: nxj-orbit 4s linear infinite; }
@keyframes nxj-orbit { to { transform: rotate(360deg); } }

.nxj-drift { animation: nxj-drift 7s ease-in-out infinite alternate; }
.nxj-drift-b { animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes nxj-drift { from { transform: translate(-6px, 3px) scale(.92); } to { transform: translate(7px, -4px) scale(1.1); } }

.nxj-twinkle { animation: nxj-twinkle 2.2s ease-in-out infinite alternate; }
@keyframes nxj-twinkle { from { opacity: .25; transform: scale(.6); } to { opacity: 1; transform: scale(1.25); } }
.nxj-draw { stroke-dasharray: 100; animation: nxj-draw 5s ease-in-out infinite; }
@keyframes nxj-draw { 0% { stroke-dashoffset: 100; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }

.nxj-shock { animation: nxj-shock 2.2s ease-out infinite; }
@keyframes nxj-shock { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.nxj-core { animation: nxj-core 1.1s ease-in-out infinite alternate; }
@keyframes nxj-core { from { transform: scale(.8); } to { transform: scale(1.25); } }

.nxj-spin { transform-box: view-box; transform-origin: 50px 50px; animation: nxj-spin 14s linear infinite; }
@keyframes nxj-spin { to { transform: rotate(360deg); } }

.nxj-pan { transform-box: view-box; animation: nxj-pan 26s ease-in-out infinite alternate; }
@keyframes nxj-pan { from { transform: translateX(0); } to { transform: translateX(-120px); } }

/* Estados */
.nx-journey-node.is-locked .nx-n-emblem { filter: grayscale(.45) brightness(.72) drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); }
.nx-journey-node.is-locked .nx-n-emblem * { animation-play-state: paused; }
.nx-journey-node.is-locked .nx-journey-orb::before { opacity: .35; }
.nx-journey-node.is-locked .nx-journey-tag b { color: #a69dbf; }
.nx-journey-node.is-current .nx-journey-orb::after {
  content: ''; position: absolute; inset: -10px; border-radius: 30%; border: 2px solid rgba(233, 213, 255, .85);
  animation: nx-journey-pulse 2.2s ease-out infinite;
}
.nx-journey-node.is-current .nx-journey-tag { border-color: rgba(233, 213, 255, .6); box-shadow: 0 0 22px rgba(168, 85, 247, .55); }
@keyframes nx-journey-pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

.nx-journey-note { margin: 0; font-size: 13px; }

/* Mapas estreitos: planetas e rótulos menores. */
@media (max-width: 1100px) {
  .nx-journey-node { --orb: 46px; width: 124px; margin-left: -62px; }
  .nx-journey-node.is-current { --orb: 64px; }
  .nx-journey-tag { padding: 4px 9px 5px; }
  .nx-journey-tag b { font-size: 12.5px; }
  .nx-journey-tag small { font-size: 10.5px; }
}

/* Celular: o mapa vira uma trilha vertical, do nível 1 ao 7, sobre a mesma paisagem. */
@media (max-width: 760px) {
  .nx-journey-head { grid-template-columns: minmax(0, 1fr); }
  .nx-journey-map {
    aspect-ratio: auto; padding: 22px 16px;
    background: linear-gradient(rgba(7, 3, 14, .55), rgba(7, 3, 14, .7)), #0b0520 url('jornada-cena.svg') 72% center / cover no-repeat;
  }
  .nx-journey-map > svg { display: none; }
  .nx-journey-nodes { position: relative; inset: auto; display: grid; gap: 18px; }
  .nx-journey-nodes::before { content: ''; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px; background: rgba(196, 181, 253, .22); }
  .nx-journey-node {
    --orb: 48px; position: relative; left: auto; top: auto; transform: none; width: auto; margin: 0;
    grid-template-columns: 64px minmax(0, 1fr); justify-items: start; align-items: center; gap: 12px;
  }
  .nx-journey-node.is-current { --orb: 60px; }
  .nx-journey-orb { justify-self: center; }
  .nx-journey-node.is-reached::before, .nx-journey-node.is-current::before {
    content: ''; position: absolute; left: 31px; top: -18px; height: 50%; width: 3px; border-radius: 3px;
    background: #e9d5ff; box-shadow: 0 0 10px #c084fc;
  }
  .nx-journey-node:first-child::before { display: none; }
  .nx-journey-tag { justify-items: start; text-align: left; margin-top: 0; }
  .nx-journey-here { position: static; grid-column: 2; grid-row: 2; justify-self: start; }
  .nx-journey-here::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-journey-map::after, .nx-journey-node.is-current .nx-journey-orb::after, .nx-n-emblem * { animation: none !important; }
}
