/* =========================================================
   IL FILO LUMINOSO — un solo filo, tre trasformazioni.
   Stesso tratto ovunque: base tratteggiata tenue, luce lime sottile
   con un alone leggero, nodi spenti / attraversati / attivo.
   ========================================================= */
.filo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.filo path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.filo__base { stroke: rgba(244, 241, 234, .2); stroke-width: 1.2; stroke-dasharray: 2 7; }
.filo__glow, .filo__luce { stroke: var(--accent); stroke-dasharray: 1000 1000; stroke-dashoffset: 1000; }
.filo__luce { stroke-width: 2; }
.filo__glow { stroke-width: 7; stroke-opacity: .14; }

/* nodi: spenti → si accendono avvicinandosi (--near) → attraversati (tenui) → attivo */
.filo__punto { fill: #0b0b0f; stroke: color-mix(in srgb, var(--accent) calc(var(--near, 0) * 100%), rgba(244, 241, 234, .38)); stroke-width: 1.5; transition: fill .5s, stroke .5s; }
.filo__nodo.is-lit .filo__punto { fill: rgba(212, 255, 58, .45); stroke: rgba(212, 255, 58, .6); }
.filo__nodo.is-active .filo__punto { fill: var(--accent); stroke: var(--accent); }
.filo__alone { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .6s; }
.filo__alone.is-active, .is-active > .filo__alone { opacity: .22; animation: filo-respiro 2.8s ease-in-out infinite alternate; }
@keyframes filo-respiro { from { opacity: .14; transform: scale(.9); } to { opacity: .3; transform: scale(1.12); } }

/* ---------- I · Inferno: il filo corre a sinistra dei gironi ---------- */
.gironi__list.has-filo { position: relative; }

/* ---------- II · Purgatorio: il sentiero della montagna è il filo ---------- */
.mountain__trail-lit, .salita__line { stroke-width: 2.5; }
.mountain__cp:not(.is-lit) circle { stroke: color-mix(in srgb, var(--accent) calc(var(--near, 0) * 100%), rgba(244, 241, 234, .4)); }
.mountain__cp:not(.is-lit) text { fill: color-mix(in srgb, var(--accent) calc(var(--near, 0) * 70%), rgba(244, 241, 234, .45)); }
.mountain__cp.is-lit circle { fill: rgba(212, 255, 58, .45); stroke: rgba(212, 255, 58, .65); filter: none; }
.mountain__cp.is-lit text { fill: rgba(212, 255, 58, .62); }
.mountain__cp.is-active circle, .mountain__cp[data-cp="vetta"].is-lit circle { fill: var(--accent); stroke: var(--accent); filter: drop-shadow(0 0 10px rgba(212, 255, 58, .9)); }
.mountain__cp.is-active text { fill: #fff; }
.climb__node.is-lit:not(.is-active) { background: rgba(212, 255, 58, .5); border-color: rgba(212, 255, 58, .6); box-shadow: none; }
.climb__node.is-active { transform: scale(1.25); }

/* ---------- III · Paradiso: l'orbita che collega i pianeti ---------- */
.cieli__filo { transition: opacity .6s; }
.cieli__filo path { vector-effect: non-scaling-stroke; }
.cieli__filo .filo__luce { stroke-width: 1.6; }
.cieli__filo .filo__glow { stroke-width: 6; }
.filo__tratto { stroke: var(--accent); stroke-width: 2.2; opacity: 0; transition: opacity .45s; }
.filo__tratto.is-on, .filo__tratto.is-scelto { opacity: .85; }
.cieli.is-choosing .cieli__filo > :not(.filo__tratto) { opacity: .25; transition: opacity .6s; }
/* dove il filo passa sotto le didascalie dei pianeti, il testo resta pulito */
.cieli .sfera__desc { text-shadow: 0 0 4px var(--bg), 0 0 10px var(--bg), 0 0 18px var(--bg); }

/* ---------- telefono: spazio per il filo e luce più discreta ---------- */
@media (max-width: 767px) {
  .gironi__list.has-filo { padding-left: 26px; }
  .filo__glow { display: none; }
  .cieli__filo { opacity: .75; }
}

/* ---------- movimento ridotto: filo già acceso, niente respiro ---------- */
@media (prefers-reduced-motion: reduce) {
  .filo__alone.is-active, .is-active > .filo__alone { animation: none; opacity: .22; }
}
