
#tmsScene{position:relative;height:240vh;background:#16304A;margin:0}
#tmsScene .tms-sticky{position:sticky;top:0;height:100vh;overflow:hidden;display:grid;grid-template-rows:1fr auto}
#tmsScene .tms-viz{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;min-height:0}
#tmsScene svg.tms-net{width:min(1180px,94vw);height:auto;overflow:visible}
#tmsScene .tms-g{transform-origin:0 0;will-change:transform}
#tmsScene .tms-node{transition:opacity .5s ease}
#tmsScene .tms-node.off{opacity:.2}
#tmsScene .tms-halo{opacity:0;transition:opacity .5s ease}
#tmsScene .tms-node.act .tms-halo{opacity:1}
#tmsScene .tms-fade{position:absolute;left:0;right:0;bottom:0;height:90px;pointer-events:none;background:linear-gradient(to bottom,rgba(22,48,74,0),#16304A)}
#tmsScene .tms-copy{position:relative;height:46vh;min-height:330px;max-height:420px;padding:0 28px 34px;display:flex;align-items:flex-start;justify-content:center}
#tmsScene .tms-panel{position:absolute;top:0;left:28px;right:28px;max-width:760px;margin:0 auto;opacity:0;transform:translateY(18px);visibility:hidden;transition:opacity .45s ease,transform .45s ease,visibility .45s}
#tmsScene .tms-panel.on{opacity:1;transform:none;visibility:visible}
#tmsScene .tms-kicker{display:flex;align-items:center;gap:12px;font-size:11px;letter-spacing:.3em;color:#E2732F;font-weight:800;margin:0 0 14px}
#tmsScene .tms-kicker s{display:block;width:30px;height:2px;background:#E2732F;text-decoration:none}
#tmsScene .tms-panel h2{font-size:clamp(28px,3.8vw,48px);line-height:1.04;letter-spacing:-.03em;font-weight:900;color:#fff;margin:0 0 12px;max-width:20ch}
#tmsScene .tms-panel p.tms-txt{font-size:clamp(15px,1.35vw,18px);line-height:1.55;color:#C7D2DD;margin:0;max-width:56ch}
#tmsScene ul.tms-items{list-style:none;margin:20px 0 0;padding:0;display:flex;gap:9px;flex-wrap:wrap}
#tmsScene ul.tms-items li{font-size:12.5px;font-weight:600;color:#DCE5EE;border:1px solid #33506D;border-radius:999px;padding:7px 13px;background:rgba(255,255,255,.03);opacity:0;transform:translateY(8px);transition:opacity .4s ease,transform .4s ease}
#tmsScene .tms-panel.on ul.tms-items li{opacity:1;transform:none}
#tmsScene .tms-panel.on ul.tms-items li:nth-child(1){transition-delay:.10s}
#tmsScene .tms-panel.on ul.tms-items li:nth-child(2){transition-delay:.17s}
#tmsScene .tms-panel.on ul.tms-items li:nth-child(3){transition-delay:.24s}
#tmsScene .tms-panel.on ul.tms-items li:nth-child(4){transition-delay:.31s}
#tmsScene .tms-rail{position:absolute;right:26px;top:34%;transform:translateY(-50%);z-index:4;display:flex;flex-direction:column;gap:16px}
#tmsScene .tms-rail a{display:flex;align-items:center;gap:10px;text-decoration:none;justify-content:flex-end}
#tmsScene .tms-rail b{font-size:9.5px;letter-spacing:.22em;font-weight:800;color:#8296A8;opacity:0;transform:translateX(6px);transition:.3s}
#tmsScene .tms-rail i{width:8px;height:8px;border-radius:50%;background:#2C4966;transition:.35s;display:block}
#tmsScene .tms-rail a.on i{background:#E2732F;transform:scale(1.45)}
#tmsScene .tms-rail a.on b{opacity:1;transform:none;color:#fff}
#tmsScene .tms-barwrap{position:absolute;left:0;right:0;bottom:0;height:6px;background:rgba(255,255,255,.22);z-index:5}
#tmsScene .tms-bar{height:100%;width:0;background:#E2732F;box-shadow:0 0 12px rgba(226,115,47,.55);transition:width .12s linear}
#tmsScene .tms-hint{position:absolute;right:28px;bottom:18px;z-index:5;font-size:10px;letter-spacing:.3em;color:#8296A8;transition:opacity .4s}

/* ===== MOBILE: linea verticale, nodi che compaiono ===== */
@media (max-width:860px){
#tmsScene{height:auto;padding:0 0 12px}
#tmsScene .tms-sticky{position:static;height:auto;display:block;padding:44px 0 0}
#tmsScene .tms-fade,#tmsScene .tms-rail,#tmsScene .tms-hint,#tmsScene .tms-barwrap{display:none}
#tmsScene .tms-viz{overflow:visible;padding:0 22px 6px}
#tmsScene svg.tms-net{width:100%;opacity:0;transform:translateY(10px);transition:opacity .7s ease,transform .7s ease}
#tmsScene .tms-viz.in svg.tms-net{opacity:1;transform:none}
#tmsScene .tms-copy{position:static;height:auto;max-height:none;min-height:0;display:block;padding:0}
#tmsScene .tms-panel{position:static;opacity:1;visibility:visible;transform:none;max-width:none;left:auto;right:auto;margin:0;padding:0 22px 0 78px}
#tmsScene .tms-panel h2{font-size:28px;max-width:none;margin-bottom:10px}
#tmsScene .tms-panel p.tms-txt{font-size:16px;max-width:none}
#tmsScene ul.tms-items{gap:8px;margin-top:16px}
#tmsScene ul.tms-items li{opacity:1;transform:none;font-size:12px;padding:6px 12px}

#tmsScene .tms-track{position:relative;margin-top:26px}
#tmsScene .tms-spine{position:absolute;left:38px;top:0;bottom:0;width:2px;background:rgba(255,255,255,.14)}
#tmsScene .tms-spinefill{position:absolute;left:0;top:0;width:100%;height:0;background:#E2732F}
#tmsScene .tms-step{position:relative;padding-bottom:54px}
#tmsScene .tms-step:last-child{padding-bottom:8px}
#tmsScene .tms-mnode{position:absolute;left:8px;top:0;width:60px;height:60px;
  background:#16304A;border-radius:50%;display:flex;align-items:center;justify-content:center;
  opacity:0;transform:scale(.55);transition:opacity .55s cubic-bezier(.22,.61,.36,1),transform .55s cubic-bezier(.22,.61,.36,1)}
#tmsScene .tms-step.in .tms-mnode{opacity:1;transform:scale(1)}
#tmsScene .tms-mnode svg{width:60px;height:60px;overflow:visible}
#tmsScene .tms-step .tms-panel{opacity:0;transform:translateY(16px);
  transition:opacity .6s ease .12s,transform .6s ease .12s}
#tmsScene .tms-step.in .tms-panel{opacity:1;transform:none}
#tmsScene .tms-step .tms-panel ul.tms-items li{opacity:0;transform:translateY(8px)}
#tmsScene .tms-step.in .tms-panel ul.tms-items li{opacity:1;transform:none}
#tmsScene .tms-intro{padding:0 22px;opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}
#tmsScene .tms-intro.in{opacity:1;transform:none}
#tmsScene .tms-outro{padding:44px 22px 8px;opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}
#tmsScene .tms-outro.in{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
#tmsScene .tms-panel,#tmsScene ul.tms-items li,#tmsScene .tms-node,
#tmsScene .tms-mnode,#tmsScene .tms-intro,#tmsScene .tms-outro{transition:none}
}
/* ===== barra di navigazione: sempre piena e leggibile ===== */
header#top{background:#FFFFFF !important;transition:box-shadow .25s ease;}
header#top .navbar{background:#FFFFFF !important;min-height:72px;}
header#top .navbar>.container,header#top .navbar>.container-fluid{min-height:72px;}
header#top.o_header_affixed{box-shadow:0 6px 22px rgba(22,48,74,.12);border-bottom:1px solid #E9E7E5;}
header#top .nav-link{font-weight:600;letter-spacing:.01em;}
header#top .nav-link:hover{color:#E2732F !important;}
header#top .nav-item.active>.nav-link,header#top .nav-link.active{color:#16304A !important;position:relative;}
header#top .nav-item.active>.nav-link::after,header#top .nav-link.active::after{
  content:"";position:absolute;left:.75rem;right:.75rem;bottom:14px;height:2px;background:#E2732F;border-radius:2px;}

/* ===== comparsa morbida delle sezioni allo scroll ===== */


.tms-ritratto{width:100%;max-width:330px;aspect-ratio:1/1;object-fit:cover;border-radius:50%;
  box-shadow:0 20px 50px rgba(22,48,74,.16);}
.tms-kicker{font-size:11px;letter-spacing:.28em;font-weight:800;color:#E2732F;margin-bottom:14px;}
.tms-h2{font-weight:800;letter-spacing:-.02em;color:#16304A;margin-bottom:18px;}
.tms-lead{font-size:17px;line-height:1.65;color:#4B5563;margin-bottom:12px;}

@media (prefers-reduced-motion:no-preference){
  html.tms-anim .tms-reveal{opacity:0;transform:translateY(20px);
    transition:opacity .6s ease,transform .6s cubic-bezier(.22,.61,.36,1);will-change:opacity,transform;}
  html.tms-anim .tms-reveal.tms-in{opacity:1;transform:none;}
}
