/* Contactory · revisione v4 (patch di fedeltà) — caricato dopo styles.css.
   Adattato da contactory-fidelity-patch-v4/assets/fidelity-overrides.css:
   le posizioni sono generate (in fondo al file) sugli stessi numeri dei fondi.
   Testi delle scene in cqw (larghezza della scena) con minimo 11px. */

.ct-hero-scene,.ct-team-scene{position:relative;isolation:isolate;container-type:inline-size;width:100%}
.ct-hero-scene{aspect-ratio:920/560;perspective:1200px;transform-style:preserve-3d}
.ct-team-scene{aspect-ratio:820/500}
.ct-hero-scene::before,.ct-team-scene::before{content:"";position:absolute;inset:0;z-index:-1;background:center/100% 100% no-repeat}
.ct-hero-scene::before{background-image:url("hero-flow-backdrop.svg?v=20261019173004")}
.ct-team-scene::before{background-image:url("team-network-backdrop.svg?v=20261019173004")}

/* Vetro */
.ct-glass-card{color:#fff;border-radius:max(10px,2.1cqw);background:linear-gradient(145deg,rgba(25,77,138,.92),rgba(5,20,47,.86));border:1px solid rgba(112,188,255,.7);
  box-shadow:0 18px 42px rgba(0,10,28,.58),inset 0 1px rgba(255,255,255,.12),0 0 26px rgba(39,104,255,.2)}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .ct-glass-card{-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:linear-gradient(145deg,rgba(25,77,138,.82),rgba(5,20,47,.74))}
}
.ct-card-head{display:flex;align-items:center;gap:max(6px,1.3cqw);font-size:max(12px,2.5cqw);font-weight:800;line-height:1.1;letter-spacing:-.01em}
.ct-card-copy{margin-top:max(4px,.9cqw);color:#CFE3F8;font-size:max(11px,1.75cqw);line-height:1.3}
.ct-card-icon{flex:none;display:grid;place-items:center;width:max(20px,4.6cqw);height:max(20px,4.6cqw);border-radius:28%;color:#fff;background:linear-gradient(145deg,#2768FF,#00C7C2);box-shadow:0 0 18px rgba(0,199,194,.32)}
.ct-card-icon svg{width:58%;height:58%}
.ct-card-icon.ig{background:#fff;color:#E1306C;box-shadow:0 0 18px rgba(255,100,201,.3)}

/* Hero: tre livelli ingresso → sistema → risultato */
.ct-channel,.ct-output{position:absolute;padding:max(7px,1.7cqw) max(8px,1.8cqw);translate:0 -50%;transition:filter .4s ease}
.ct-channel{transform-origin:right center;transform:rotateY(16deg) rotateZ(1.6deg) translateZ(14px)}
.ct-output{transform-origin:left center;transform:rotateY(-14deg) rotateZ(-1.2deg) translateZ(14px)}
.ct-channel:hover,.ct-output:hover{filter:brightness(1.12)}
.ct-badge{margin-left:auto;font-size:max(10px,1.5cqw);font-weight:800;padding:.2em .55em;border-radius:999px;background:#00A9A5;color:#fff}
.ct-channel:nth-of-type(2) .ct-badge{background:#2768FF}
.ct-command{position:absolute;display:flex;flex-direction:column;gap:max(6px,1.4cqw);padding:max(10px,2.2cqw) max(8px,1.6cqw);border-radius:max(12px,2.6cqw);color:#fff;transform:rotateY(-2deg) translateZ(46px);
  background:linear-gradient(155deg,#123F77,#06152F 72%);border:2px solid rgba(114,200,255,.85);
  box-shadow:0 24px 58px rgba(0,11,30,.7),0 0 38px rgba(39,104,255,.38),inset 0 0 0 max(4px,.9cqw) rgba(86,164,255,.07)}
.ct-command::after{content:"";position:absolute;inset:max(5px,1cqw);border-radius:inherit;border:1px solid rgba(142,216,255,.3);pointer-events:none}
.ct-command img{width:88%;height:auto;margin:0 auto max(4px,.8cqw) 2%}
.ct-command ul{display:flex;flex-direction:column;gap:max(3px,.7cqw)}
.ct-command li{display:flex;align-items:center;gap:max(5px,1.1cqw);font-size:max(11px,1.8cqw);color:#DDEBFA;padding:max(5px,1.1cqw) max(5px,1cqw);border-radius:max(6px,1.2cqw)}
.ct-command li svg{width:max(13px,2.3cqw);height:max(13px,2.3cqw);flex:none;color:#BFE8FF}
.ct-command li.on{background:#174D82;color:#fff;font-weight:700}
.ct-command li b{margin-left:auto;min-width:1.8em;text-align:center;font-size:.85em;background:#2768FF;border-radius:999px;padding:.1em .4em}
.ct-list{margin-top:max(4px,.9cqw);display:grid;gap:max(2px,.5cqw)}
.ct-list li{display:flex;align-items:center;gap:max(5px,.9cqw);font-size:max(11px,1.6cqw);color:#D7E8F8}
.ct-list li::before{content:"";width:max(6px,1.1cqw);height:max(6px,1.1cqw);border-radius:50%;background:var(--dot,#72F2D1);flex:none}
.ct-list li:nth-child(2){--dot:#56A4FF}.ct-list li:nth-child(3){--dot:#2768FF}
.ct-pipe{display:grid;grid-template-columns:repeat(3,1fr);gap:max(4px,.9cqw);margin-top:max(5px,1cqw)}
.ct-pipe li{background:#0C315F;border-radius:max(5px,1cqw);padding:max(4px,.8cqw) 0 max(3px,.6cqw);text-align:center;font-weight:800;font-size:max(12px,2.2cqw)}
.ct-pipe li::before{content:"";display:block;height:max(3px,.5cqw);margin:0 18% max(3px,.6cqw);border-radius:2px;background:var(--bar,#00C7C2)}
.ct-pipe li:nth-child(2){--bar:#56A4FF}.ct-pipe li:nth-child(3){--bar:#72F2D1}
.ct-appt{display:flex;gap:max(6px,1.1cqw);align-items:flex-start;margin-top:max(5px,1cqw)}
.ct-appt .ct-card-icon{width:max(18px,3.6cqw);height:max(18px,3.6cqw)}
.ct-appt p{font-size:max(11px,1.6cqw);line-height:1.3;color:#fff}
.ct-appt span{display:block;color:#BFD8EE}

/* Team: nucleo e sei competenze */
.ct-team-core{position:absolute;aspect-ratio:1;border-radius:50%;translate:-50% -50%;display:grid;place-items:center;z-index:3;
  background:radial-gradient(circle at 42% 35%,#174D82,#06142E 70%);box-shadow:0 0 0 2px #00C7C2,0 0 30px rgba(86,164,255,.7),0 0 80px rgba(0,199,194,.35)}
.ct-team-core img{width:52%;height:auto}
.ct-team-core::after{content:"";position:absolute;inset:-14%;border-radius:50%;border:1px solid rgba(114,242,209,.3)}
.ct-role{position:absolute;z-index:2;padding:max(8px,1.9cqw) max(9px,2cqw);translate:0 -50%}
.ct-role:nth-of-type(odd){transform:rotateZ(1.4deg)}.ct-role:nth-of-type(even){transform:rotateZ(-1.4deg)}
.ct-role .ct-card-head{font-size:max(12px,2.55cqw)}
.ct-role .ct-card-copy{font-size:max(11px,1.85cqw);padding-left:calc(max(20px,4.6cqw) + max(6px,1.3cqw))}

/* CTA: scena completa come fondo, copy su area protetta */
.ct-final-cta{position:relative;overflow:hidden;background:#07152F url("cta-convergence-faithful.svg?v=20261019173004") right top/100% auto no-repeat;min-height:calc(100vw * 360 / 1440 + 40px)}
/* sinistra protetta per il copy; in basso le strade sfumano nel navy sotto il footer */
.ct-final-cta::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(7,21,47,.97) 0%,rgba(7,21,47,.9) 30%,rgba(7,21,47,.25) 52%,transparent 70%),
             linear-gradient(180deg,transparent 0,transparent calc(100vw * 360 / 1440 - 90px),#07152F calc(100vw * 360 / 1440 + 6px))}
.ct-final-cta>*{position:relative;z-index:1}
/* footer sempre in fondo, sotto la scena */
.ct-final-cta{display:flex;flex-direction:column}
.ct-final-cta>.cta{flex:1}

/* Movimento: deriva massima 4px, pulse sul nucleo */
@media (prefers-reduced-motion:no-preference){
  .ct-channel,.ct-output{animation:ct-drift 6s ease-in-out infinite}
  .ct-channel:nth-of-type(2),.ct-output:nth-of-type(5){animation-delay:-2s}
  .ct-channel:nth-of-type(3),.ct-output:nth-of-type(6){animation-delay:-4s}
  .ct-team-core::after{animation:ct-core-pulse 4.8s ease-in-out infinite}
  @keyframes ct-drift{50%{translate:0 calc(-50% - 4px)}}
  @keyframes ct-core-pulse{50%{transform:scale(1.07);opacity:.45}}
}

/* Mobile: niente prospettiva estrema, stessi tre livelli */
@media (max-width:767px){
  .ct-hero-scene{perspective:none}
  .ct-channel,.ct-output{transform:none}
  .ct-command{transform:none}
  .ct-role{transform:none!important}
  .ct-final-cta{min-height:580px;background-size:auto 300px;background-position:right -30px bottom 84px}
  .ct-final-cta::after{background:linear-gradient(180deg,#07152F 0%,rgba(7,21,47,.92) 32%,rgba(7,21,47,.1) 44%,transparent 50%,transparent calc(100% - 130px),#07152F calc(100% - 84px))}
}

/* Badge dei canali sul bordo destro, come nel mockup */
.ct-channel .ct-card-copy{padding-right:max(26px,5.2cqw)}
.ct-badge{position:absolute;right:max(6px,1.2cqw);bottom:max(7px,1.6cqw);margin:0}

/* Scene più alte quando si stringono: card e linee sono in % della scena,
   quindi i raccordi restano agganciati anche cambiando proporzione. */
@container (max-width:560px){
  .ct-card-icon{width:20px;height:20px}
  .ct-appt .ct-card-icon{display:none}
  .ct-command li{padding:4px 5px}
  .ct-role .ct-card-copy{padding-left:0}
}
@container (max-width:400px){
  .ct-badge{display:none}
  .ct-channel .ct-card-copy{padding-right:0}
}
@media (max-width:1100px){ .ct-team-scene{aspect-ratio:820/540} }
@media (max-width:960px){ .ct-hero-scene{aspect-ratio:920/600} .ct-team-scene{aspect-ratio:820/560} }
@media (max-width:860px){ .ct-hero-scene{aspect-ratio:920/740} .ct-team-scene{aspect-ratio:820/720} }
@media (max-width:767px){ .ct-hero-scene{aspect-ratio:920/860} .ct-team-scene{aspect-ratio:820/880} }

/* 860–960px: i due bottoni del hero restano su una riga come nel mockup */
@media (min-width:768px) and (max-width:960px){ .hero .actions{gap:10px} .hero .actions .btn{padding:11px 14px} }

/* --- generato da tools/build_v4.py: posizioni nello spazio dei fondi --- */
.ct-channel:nth-of-type(1){left:0.652%;width:24.783%;top:17.857%}
.ct-channel:nth-of-type(2){left:0.652%;width:24.783%;top:50.000%}
.ct-channel:nth-of-type(3){left:0.652%;width:24.783%;top:82.143%}
.ct-command{left:36.304%;top:4.286%;width:25.217%;height:91.429%}
.ct-output:nth-of-type(4){left:75.652%;width:23.696%;top:17.143%}
.ct-output:nth-of-type(5){left:75.652%;width:23.696%;top:50.000%}
.ct-output:nth-of-type(6){left:75.652%;width:23.696%;top:82.500%}
.ct-team-core{left:50.000%;top:50.000%;width:22.439%}
.ct-role:nth-of-type(1){left:7.073%;width:30.732%;top:16.800%}
.ct-role:nth-of-type(2){left:62.195%;width:30.732%;top:16.800%}
.ct-role:nth-of-type(3){left:0.000%;width:30.000%;top:50.000%}
.ct-role:nth-of-type(4){left:70.000%;width:30.000%;top:50.000%}
.ct-role:nth-of-type(5){left:7.073%;width:30.732%;top:83.200%}
.ct-role:nth-of-type(6){left:62.195%;width:30.732%;top:83.200%}
