:root{--g:#b9c900;--green:#b2d700;--ease:cubic-bezier(.77,0,.18,1);--edge:28px}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:#000;color:#fff;overflow:hidden;overscroll-behavior:none}
body{font-family:"halyard-text","Halyard Text","Halyard","Hanken Grotesk",system-ui,sans-serif;font-weight:300}
strong {font-weight: 600;}

.inline-logo {height: 1em;width:auto;vertical-align:-0.1em;margin:0;}
/* ---------- Cookie banner ---------- */

.cky-btn-accept,
.cky-btn-reject,
.cky-btn-customize,
.cky-btn-preferences {
    background-color: #b2d700 !important;
    border-color: #b2d700 !important;
    color: #000000 !important; 
}

.cky-btn-accept:hover,
.cky-btn-reject:hover,
.cky-btn-customize:hover,
.cky-btn-preferences:hover {
    background-color: #9cbd00 !important; 
    border-color: #9cbd00 !important;
}

/* ---------- Slide verticale ---------- */
.viewport{height:100vh;height:100dvh;overflow:hidden}
.track{transition:transform 1s var(--ease);transform:translate3d(0,calc(var(--i,0)*-100vh),0)}
@supports(height:100dvh){.track{transform:translate3d(0,calc(var(--i,0)*-100dvh),0)}}
.panel{position:relative;height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:96px 6vw}

/* ---------- Frecce ---------- */
.arrow{position:absolute;left:50%;width:56px;height:60px;margin:0;padding:0;transform:translateX(-50%);background:none;border:0;cursor:pointer;z-index:5;color:var(--g)}
.arrow.down{bottom:max(3vh,24px)}.arrow.up{top:max(3vh,24px)}
.arrow:focus-visible{outline:1px solid var(--g);outline-offset:2px;border-radius:28px}

/* linea che sfuma verso la punta */
.arrow-track{position:absolute;left:50%;top:6px;bottom:6px;width:1px;transform:translateX(-50%);background:linear-gradient(to bottom,transparent,currentColor 75%)}
.arrow.up .arrow-track{background:linear-gradient(to top,transparent,currentColor 75%)}

/* chevron in punta */
.arrow-track::before{content:"";position:absolute;left:50%;bottom:3px;width:8px;height:8px;margin-left:-4px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);transition:transform .35s ease}
.arrow.up .arrow-track::before{bottom:auto;top:1px;border-width:1px 0 0 1px}
.arrow.down:hover .arrow-track::before{transform:rotate(45deg) translate(2px,2px)}
.arrow.up:hover .arrow-track::before{transform:rotate(45deg) translate(-2px,-2px)}

/* puntino che scorre nella direzione di navigazione */
.arrow-track::after{content:"";position:absolute;left:50%;top:0;width:5px;height:5px;margin-left:-2.5px;border-radius:50%;border:solid currentColor;border-width:1px;box-shadow:0 0 8px currentColor;opacity:0;animation:arrowFlowDown 2.4s cubic-bezier(.5,0,.3,1) infinite}
.arrow.up .arrow-track::after{top:auto;bottom:0;animation-name:arrowFlowUp}
.arrow:hover .arrow-track::after{animation-duration:1.5s}
@keyframes arrowFlowDown{0%{transform:translateY(0);opacity:0}20%{opacity:1}80%{opacity:1}100%{transform:translateY(36px);opacity:0}}
@keyframes arrowFlowUp{0%{transform:translateY(0);opacity:0}20%{opacity:1}80%{opacity:1}100%{transform:translateY(-36px);opacity:0}}
@media(prefers-reduced-motion:reduce){.arrow-track::after{animation:none}}

/* etichetta */
.arrow-label {position: absolute;left: 50%;top:59px;transform: translateX(-50%);width: 500px;text-align: center;font-size: .75rem;letter-spacing: .14em;line-height: 1.3;color: rgba(255, 255, 255, .7);pointer-events: none;}
.arrow.up .arrow-label {top: auto; bottom: 59px;}
/* ---------- Parte 1: hero ---------- */
#hero{padding:0}
.hero-art{position:absolute;inset:0;overflow:hidden;pointer-events:none}
#flow-canvas{position:absolute;z-index:1;inset:0;width:100%;height:100%}
#hero{--logo-h:120px}
.hero-c{position:absolute;z-index:2;left:50%;top:calc(50% - var(--logo-h)/2);transform:translateX(-50%);width:max-content;max-width:90vw;text-align:center}
.hero-c img{display:block;margin:0 auto 10px;height:var(--logo-h);width:auto;max-width:70vw;object-fit:contain}
.hero-c h1{font-weight:400;font-size:clamp(1.3rem,2.5vw,2.3rem);line-height:1.25;text-wrap:balance}

/* ---------- Contenitore scorrevole interno ai pannelli ----------
   Le frecce restano fisse; se il testo è più alto dello schermo scorre solo .scroller,
   con una sfumatura sui bordi che segnala che c'è altro contenuto. */
.scroller{--ft:0px;--fb:0px;position:relative;max-height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--ft),#000 calc(100% - var(--fb)),transparent 100%);
  mask-image:linear-gradient(to bottom,transparent 0,#000 var(--ft),#000 calc(100% - var(--fb)),transparent 100%)}
.scroller::-webkit-scrollbar{display:none}

/* ---------- Tipografia ----------
   .lead  = affermazioni: centrate e bilanciate (nessuna riga orfana)
   .body  = testo corrente: giustificato, con sillabazione italiana e ultima riga centrata
   La sillabazione automatica usa lang="it" dell'<html>. */
.green{color:var(--green)}
.copy{width:min(960px,100%)}
.copy.wide{width:min(1360px,100%)}
#p4,#p5{padding-left:4vw;padding-right:4vw}
.copy p{font-size:clamp(1rem,1.65vw,1.4rem);line-height:1.5;max-width:38em;margin-inline:auto}
.copy p+p{margin-top:clamp(24px,5vh,56px)}
.copy p.small-text{font-size:clamp(.82rem,1.2vw,1rem)}
.lead{text-align:center;text-wrap:balance;hyphens:manual}
.body{text-align:justify;text-align-last:var(--last,center);-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-chars:6 3 3;text-wrap:pretty;overflow-wrap:break-word}
.questions{text-align:center;text-wrap:balance}
.nohyph,.body.nohyph{-webkit-hyphens:none;hyphens:none}
.inline-logo.lg{display:block;height:3em;margin:0 auto .4em}

/* ---------- Animazione di ingresso ---------- */
.fade{opacity:0;transform:translateY(24px);transition:opacity .3s,transform .3s}
.is-active .fade{opacity:1;transform:none;transition:opacity 1s ease var(--d,.7s),transform 1s ease var(--d,.7s)}

/* ---------- Parti 4 e 5: box con solo outline bianco ---------- */
.cards{display:grid;gap:clamp(36px,4.5vh,48px) clamp(12px,1.4vw,22px);margin-top:clamp(40px,6vh,64px);grid-template-columns:minmax(0,1fr)}
.card{position:relative;container:card/inline-size;border:1px solid rgba(255,255,255,.9);padding:clamp(34px,4.4vh,44px) clamp(14px,1.3vw,22px) clamp(18px,2.6vh,26px);text-align:center}
.card-ico{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);padding:0 14px;background:#000;color:var(--green);line-height:0}
.card-ico svg{width:46px;height:46px;display:block;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.card h3{font-size:clamp(1.05rem,1.3vw,1.2rem);font-weight:700;line-height:1.25;color:var(--green);text-wrap:balance;hyphens:manual}
.card p{margin-top:.8em;font-size:clamp(.8rem,.95vw,.9rem);line-height:1.55;text-align:left;hyphens:auto;-webkit-hyphens:auto;hyphenate-limit-chars:6 3 3;text-wrap:pretty}
@container card (min-width:230px){.cards-4 .card p{text-align:justify;text-align-last:center}}
.cards-5 .card p{text-align:center;text-wrap:balance;color:rgba(255,255,255,.85)}
.head-group p+p{margin-top:.55em}
.standards{max-width:none!important;margin-top:clamp(28px,5vh,48px)!important;display:flex;flex-wrap:wrap;justify-content:center;gap:.4em 0;font-size:clamp(.78rem,1.05vw,.95rem)!important;letter-spacing:.04em;color:rgba(255,255,255,.75)}
.standards span{white-space:nowrap}
.standards span:not(:last-child)::after{content:"·";margin:0 .8em;color:var(--green)}

/* ≥1000px: 4 e 5 box affiancati */
@media(min-width:1000px){
  .cards-4{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cards-5{grid-template-columns:repeat(5,minmax(0,1fr))}
  .cards{grid-template-rows:auto 1fr}
}
@media(min-width:1000px){
  @supports(grid-template-rows:subgrid){
    .cards .card{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0}
  }
}
/* tablet verticale: 2×2 e 3+2 */
@media(min-width:768px) and (max-width:999px){
  .cards-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cards-5{grid-template-columns:repeat(6,minmax(0,1fr))}
  .cards-5 .card{grid-column:span 2}
  .cards-5 .card:nth-child(4){grid-column:2/4}
  .cards-5 .card:nth-child(5){grid-column:4/6}
}

/* ---------- Parte 6: testi e form ---------- */
#p6{padding:92px 5vw 100px}
.contact{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,6vw,96px);width:min(1180px,100%)}
.sub{min-width:0}
.contact .copy{width:100%}
.contact .copy p{margin-inline:0;max-width:none;font-size:clamp(.95rem,1.3vw,1.2rem)}
.contact .copy p+p{margin-top:clamp(12px,2.2vh,22px)}
.contact .copy p.small-text{font-size:clamp(.82rem,1.05vw,.95rem)}
.contact .body{--last:left}
.contact .questions{text-align:left}
.form{width:100%;min-height:300px}
.form-inner{width:100%}
.m-only{display:none}
.foot{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:space-between;align-items:flex-end;padding:0 4vw 3vh;font-size:0.8rem;z-index:3;}
.foot img{display:block;max-width:40vw;height:auto}
.foot a{color:#ffffff;}
.foot p{font-size:clamp(0.6rem,1vw,0.8rem)}

/* ---------- Indicatore "scorri" (creato da script.js, visibile solo su mobile) ---------- */
.scroll-hint{display:none}

/* ---------- Mobile (≤767px) ----------
   - testi grandi e leggibili (form e footer esclusi)
   - se il testo non entra nella schermata scorre dentro al proprio pannello, con sfumatura + pill "scorri"
   - box in colonna singola, uno sotto l'altro
   - nessuno swipe di navigazione (gestito in script.js): si cambia parte solo con le frecce */
@media(max-width:767px){
  .panel{padding:100px 5.5vw}
  #p4,#p5{padding-left:5.5vw;padding-right:5.5vw}
  .brk{display:none}
  .d-only{display:none}
  .m-only{display:block}

  /* frecce di navigazione: unico modo per cambiare parte, quindi più comode da toccare */
  .arrow{height:56px}
  .arrow.down{bottom:38px}
  .arrow.up{top:38px}
  .sub-form .arrow.up{top:max(3vh,22px)}
  .arrow-label{top:55px;width:min(90vw,360px);font-size:.9375rem;line-height:1.2;letter-spacing:.03em;color:rgba(255,255,255,.85);pointer-events:auto}
  .arrow.up .arrow-label{top:auto;bottom:55px}
  /* il puntino che scorre sulla freccia percorre la nuova lunghezza ridotta */
  .arrow-track::after{animation-name:arrowFlowDownM}
  .arrow.up .arrow-track::after{animation-name:arrowFlowUpM}
  @keyframes arrowFlowDownM{0%{transform:translateY(0);opacity:0}20%{opacity:1}80%{opacity:1}100%{transform:translateY(33px);opacity:0}}
  @keyframes arrowFlowUpM{0%{transform:translateY(0);opacity:0}20%{opacity:1}80%{opacity:1}100%{transform:translateY(-33px);opacity:0}}

  /* hero */
  .hero-c h1{font-size:1.7rem;line-height:1.25}

  /* testi correnti */
  .panel .copy p{font-size:1.1875rem;line-height:1.55 !important;max-width:none}
  .panel .copy .lead{font-size:1.375rem;line-height:1.4 !important}
  .panel .copy p.small-text{font-size:1.125rem}
  .panel .copy p+p{margin-top:26px}
  .panel .head-group p+p{margin-top:.6em}
  #p5 .standards{font-size:1rem !important;margin-top:30px !important;letter-spacing:.02em}
  .inline-logo.lg{height:3.2em}

  /* contenitore scorrevole: sfumatura più ampia dove c'è altro testo + un po' d'aria in fondo */
  .copy.scroller{--edge:56px;padding-bottom:10px}

  /* pill "scorri": appare solo se sotto c'è altro testo, sparisce a fine scorrimento */
  .scroll-hint{display:flex;align-items:center;gap:8px;position:absolute;left:50%;bottom:106px;z-index:4;
    padding:9px 16px 9px 18px;border:1px solid var(--green);border-radius:999px;background:rgba(0,0,0,.88);
    box-shadow:0 0 16px rgba(178,215,0,.28);color:var(--green);font-size:1rem;font-weight:500;line-height:1;letter-spacing:.08em;
    pointer-events:none;opacity:0;transform:translate(-50%,8px);transition:opacity .3s ease,transform .3s ease}
  .scroll-hint.is-on{opacity:1;transform:translate(-50%,0)}
  .scroll-hint svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;animation:hintBounce 1.4s ease-in-out infinite}
  @keyframes hintBounce{0%,100%{transform:translateY(-2px)}50%{transform:translateY(3px)}}
  @media(prefers-reduced-motion:reduce){.scroll-hint svg{animation:none}}

  /* la parte 6 diventa due schermate impilate: testi, poi form */
  #p6{display:block;height:200vh;height:200dvh;padding:0}
  .contact{display:block;width:100%;max-height:none;overflow:visible;-webkit-mask-image:none;mask-image:none}
  .sub{position:relative;height:100vh;height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:100px 5.5vw}
  .sub-form{padding:96px 5vw 92px}
  .contact .copy{width:min(960px,100%)}
  .contact .copy p{margin-inline:auto;max-width:none}
  .contact .body{--last:center}
  .contact .lead,.contact .questions{text-align:center}
  .contact .inline-logo.lg{margin-left:auto}
  .form{min-height:0;max-width:520px}
  .foot{gap:16px}

  /* box: una colonna, uno sotto l'altro */
  .cards{grid-template-columns:minmax(0,1fr);gap:46px;margin-top:46px}
  .card{padding:40px 18px 24px}
  .card-ico svg{width:44px;height:44px}
  .panel .copy .card h3{font-size:1.3125rem;line-height:1.25}
  .panel .copy .card p{font-size:1.125rem;line-height:1.5 !important}
  #p4 .cards-4 .card p{text-align:left;text-align-last:left}
}

/* smartphone in orizzontale: lo spazio verticale è poco, frecce compatte e senza didascalia */
@media(max-width:767px) and (max-height:520px){
  .panel{padding-top:68px;padding-bottom:68px}
  .sub{padding-top:68px;padding-bottom:68px}
  .sub-form{padding:96px 5vw 92px}
  .arrow.down{bottom:4px}
  .arrow.up,.sub-form .arrow.up{top:4px}
  .arrow-label{display:none}
  .scroll-hint{bottom:74px}
}

#p4 .cards-4 .card h3,
#p4 .cards-4 .card p,
#p4 .cards-4 .card h3 *,
#p4 .cards-4 .card p * {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

/* FORM DI CONTATTO */

/* =========================================================
   1. FONT, PESO E COLORI BASE
   ========================================================= */
.hs-form,
.hs-form input,
.hs-form textarea,
.hs-form select,
.hs-form label,
.hs-form button,
.hs-form p,
.hs-form span {
  font-family: "halyard-text", "Halyard Text", "Halyard", "Hanken Grotesk", system-ui, sans-serif !important;
  font-weight: 300 !important;
  box-sizing: border-box;
}

/* =========================================================
   2. GRIGLIA E ALLINEAMENTO LARGHEZZE (RISOLVE IL MARGINE A DESTRA)
   ========================================================= */
/* Azzera i margini/padding interni che HS mette su .input e fieldset */
.hs-form fieldset {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.hs-form .hs-form-field .input {
  margin-right: 0 !important;
  width: 100% !important;
}

/* Righe con 1 solo campo 100% esatto */
.hs-form fieldset.form-columns-1 .hs-form-field {
  width: 100% !important;
  float: none !important;
}

/* Righe con 2 campi affiancati */
.hs-form fieldset.form-columns-2 {
  display: flex !important;
  justify-content: space-between;
  align-items: stretch; /* Allinea in basso anche le due tendine privacy */
  gap: 12px; /* Spazio esatto tra colonna sinistra e destra */
}

.hs-form fieldset.form-columns-2 .hs-form-field {
  width: calc(50% - 6px) !important; /* 50% meno metà del gap */
  float: none !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; 
}

/* Su smartphone impila i campi a 2 colonne */
@media (max-width: 600px) {
  .hs-form fieldset.form-columns-2 {
    flex-direction: column;
    gap: 0;
  }
  .hs-form fieldset.form-columns-2 .hs-form-field {
    width: 100% !important;
  }
}

/* =========================================================
   3. STILE DEI CAMPI E TESTI PICCOLI
   ========================================================= */
.hs-form-field {
  position: relative;
  margin-bottom: 5px !important;
}

.hs-form-field > label,
.hs-form .hs-richtext {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 5px;
  color: #ffffff; 
}

.hs-form-field input[type="text"],
.hs-form-field input[type="email"],
.hs-form-field input[type="tel"],
.hs-form-field textarea,
.hs-form-field select {
  width: 100% !important;
  padding: 10px 14px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 13px;
  background-color: #ffffff;
  color: #222222;
}

.hs-form-field input::placeholder,
.hs-form-field textarea::placeholder {
  font-size: 13px;
  color: #888888;
}

/* Radio / Checkbox Privacy */
.hs-form-booleancheckbox-display,
.hs-form-radio-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ffffff;
}


/* Link Informativa Privacy dello stesso verde */
.hs-form a,
.hs-form .hs-richtext a,
.hs-form label a {
  color: #b2d700 !important;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.hs-form a:hover,
.hs-form .hs-richtext a:hover,
.hs-form label a:hover {
  opacity: 0.8;
}

/* =========================================================
   4. MESSAGGI DI ERRORE DENTRO I CAMPI
   ========================================================= */
.hs-form-field input.error::placeholder,
.hs-form-field textarea.error::placeholder {
  color: transparent;
}

.hs-form-field input.error,
.hs-form-field textarea.error,
.hs-form-field select.error {
  border-color: #d93025;
  background-color: #fff8f8;
}

.hs-error-msgs {
  position: absolute;
  bottom: 10px; /* Ancorato al fondo dell'input: funziona sia con che senza label sopra! */
  left: 14px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  pointer-events: none;
  z-index: 2;
}

.hs-fieldtype-textarea .hs-error-msgs {
  top: 11px;
  bottom: auto;
}

.hs-error-msgs li label {
  color: #d93025 !important;
  font-size: 12px !important;
  font-style: italic;
  margin: 0 !important;
}

/* =========================================================
   5. PULSANTE DI INVIO 
   ========================================================= */
.hs-form .hs-submit {
  width: 100% !important;
  margin: 10px 0 0 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.hs-form .hs-submit .actions {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  text-align: center !important;
}

.hs-form input[type="submit"],
.hs-button.primary {
  display: inline-block;
  margin: 0 auto !important;
  background-color: #b2d700; 
  color: #ffffff;
  border: none;
  padding: 11px 28px;
  font-size: 14px;
  letter-spacing: 0.3px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-transform: uppercase!important;
  font-weight: 500!important;
}

.hs-form input[type="submit"]:hover,
.hs-button.primary:hover {
  opacity: 0.9;
}

/* Mobile: maggiore spazio sotto il form di contatto */
/* Margine inferiore al form e compattazione su mobile */
.hs-form {
  padding-bottom: 40px !important;
  margin-bottom: 20px !important;
}

@media (max-width: 600px) {

  .hs-form {
    padding-bottom: 60px !important;
    font-size: 1.1875rem !important;
  }

  .hs-form-field {
    margin-bottom: 10px !important;
  }

  .hs-form-field > label,
  .hs-form .hs-richtext,
  .hs-form .hs-richtext p,
  .hs-form-booleancheckbox-display,
  .hs-form-radio-display {
    font-size: 1.1875rem !important;
    line-height: 1.4 !important;
    margin-bottom: 5px !important;
  }

  .hs-form-field input[type="text"],
  .hs-form-field input[type="email"],
  .hs-form-field input[type="tel"],
  .hs-form-field input[type="number"],
  .hs-form-field select,
  .hs-form-field textarea {
    font-size: 16px !important;
    line-height: 1.4 !important;
    padding: 10px 12px !important;
  }

  .hs-form-field input::placeholder,
  .hs-form-field textarea::placeholder {
    font-size: 16px !important;
  }

  .hs-form-field textarea {
    height: 90px !important;
    min-height: 90px !important;
  }

  .hs-error-msgs li label {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .hs-form .hs-submit {
    margin-top: 14px !important;
  }

  .hs-form input[type="submit"],
  .hs-button.primary {
    font-size: 1.1875rem !important;
    padding: 11px 28px !important;
  }
}

/* ---------- Navigazione laterale elegante ---------- */

.side-navigation {
  position: fixed;
  z-index: 20;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 23px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease, visibility .5s ease;
}

/* Visibile dalla parte 2 in poi */
.side-navigation.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.side-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

/* Indicatori */
.side-nav-dot {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 1px solid rgba(185, 201, 0, .65);
  border-radius: 50%;
  background: transparent;
  transition: all .35s ease;
}

/* Linea verticale sottile */
.side-nav-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 17px;
  height: 23px;
  width: 1px;
  background: rgba(185, 201, 0, .2);
}

/* Etichette: nascoste di default */
.side-nav-label {
  position: absolute;
  right: 22px;
  z-index: 2;
  padding: 6px 10px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 0;
  white-space: nowrap;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
  pointer-events: none;
}

/* Hover: mostra esclusivamente la voce selezionata */
.side-nav-item:hover .side-nav-label,
.side-nav-item:focus-visible .side-nav-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Stato della sezione attiva */
.side-nav-item.is-active .side-nav-dot {
  width: 9px;
  height: 9px;
  flex-basis: 9px;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(178, 215, 0, .5);
}

/* Hover */
.side-nav-item:hover .side-nav-dot {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.3);
}

.side-nav-item:focus-visible {
  outline: 1px solid var(--green);
  outline-offset: 5px;
}

/* Transizione colore di linea e pallini */
.side-nav-item:not(:last-child)::after {
  transition: background .5s ease;
}

/* Pallini delle sezioni già superate */
.side-nav-item.is-passed .side-nav-dot {
  background: var(--green);
  border-color: var(--green);
}

/* Linea verso la voce successiva: si colora quando la si raggiunge */
.side-nav-item.is-passed:not(:last-child)::after {
  background: var(--green);
}

/* Mai visibile su mobile */
@media (max-width: 767px) {
  .side-navigation {
    display: none !important;
  }
}

/* =========================================================
   ILLUSTRAZIONI ANIMATE — Parti 2 e 3
   Le animazioni partono solo quando il pannello è .is-active
   (si fermano fuori schermo) e non partono con "riduci movimento":
   in quel caso si vede lo stato finale statico.
   ========================================================= */

/* ---------- Layout ---------- */
.illu{width:min(100%,520px);margin:0 auto 28px}
.illu svg{display:block;width:100%;height:auto;max-height:240px;margin:0 auto}

/* desktop: illustrazione e testo affiancati (parte 2: testo a sinistra, parte 3: illustrazione a sinistra) */
@media(min-width:1000px){
  .copy.has-illu{width:min(1180px,100%);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,5vw,88px);align-items:center}
  .has-illu .illu{margin:0;width:100%}
  .has-illu .illu svg{max-height:min(60vh,470px)}
  .has-illu .copy-text p{font-size:clamp(1rem,1.3vw,1.25rem)}
  #p2 .copy-text{order:1}
  #p2 .illu{order:2}
}
/* mobile: illustrazione sopra il testo, dentro il contenitore che scorre */
@media(max-width:767px){
  .illu svg{max-height:190px}
  .illu-a svg{max-height:340px}
  .illu-b svg{max-height:340px}
  /* il grafico va sotto il primo paragrafo: i paragrafi diventano elementi diretti del contenitore e si riordinano */
  .copy.has-illu{display:flex;flex-direction:column}
  .has-illu .copy-text{display:contents}
  .has-illu .copy-text > p{order:2;flex:none;width:100%}
  .has-illu .copy-text > p:first-child{order:0}
  .has-illu .illu{order:1;flex:none;margin:26px auto 0}
}

/* ---------- Parte 2: dalla conoscenza dispersa al significato ---------- */
.a-link{fill:none;stroke:var(--green);stroke-width:1.2;stroke-opacity:.85;stroke-dasharray:1 1;stroke-dashoffset:0}
.a-frame{stroke:#fff;stroke-opacity:.35}
.a-dot{fill:#fff;opacity:0}
.a-dot.green-dot{fill:var(--green)}
.a-ico{color:var(--green);transform:translate(var(--ex),var(--ey))}
.a-bg{fill:#000;stroke:rgba(255,255,255,.28);stroke-width:1}
.a-ico .gl{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.a-core{transform-box:fill-box;transform-origin:center}
.a-ring{fill:#000;stroke:var(--green);stroke-width:1.6}
.a-pt{fill:var(--green)}
.a-halo{fill:none;stroke:var(--green);stroke-width:1.2;opacity:0;transform-box:fill-box;transform-origin:center}

/* ---------- Parte 3: il sistema (logo) genera domini di conoscenza e li mette in relazione ---------- */
.b-domain{fill:none;stroke:#fff;stroke-opacity:.3;stroke-width:1.2;stroke-dasharray:5 9}
.b-e{fill:none;stroke:#fff;stroke-opacity:.42;stroke-width:1.2;stroke-dasharray:1 1;stroke-dashoffset:0}
.b-gl{fill:none;stroke:var(--green);stroke-opacity:.85;stroke-width:1.5;stroke-dasharray:1 1;stroke-dashoffset:0}
.b-ex{fill:none;stroke:var(--green);stroke-width:1.3;stroke-dasharray:4 5}
.b-diamond{fill:#000;stroke:var(--green);stroke-width:1.5}
.b-nd{transform-box:fill-box;transform-origin:center}
.b-c{fill:#000;stroke:#fff;stroke-opacity:.85;stroke-width:1.4}
.b-c.gw{stroke:var(--green);stroke-opacity:1;stroke-width:1.8}
.b-rule{fill:none;stroke:var(--green);stroke-width:1.2;opacity:0;transform-box:fill-box;transform-origin:center}
.b-logo-box{fill:#000;stroke:#fff;stroke-opacity:.35;stroke-width:1.2}
.b-lgring{fill:none;stroke:var(--green);stroke-width:1.5;opacity:0;transform-box:fill-box;transform-origin:center}
.b-trail{fill:none;stroke:var(--green);stroke-width:2.4;stroke-dasharray:1 1;stroke-dashoffset:0}
.b-lit{fill:rgba(178,215,0,.22);stroke:var(--green);stroke-width:1.8}
.b-concl{fill:none;stroke:var(--green);stroke-width:1.4;opacity:0;transform-box:fill-box;transform-origin:center}
.b-agent{transform:translate(440px,96px)}
.b-agent-glow{fill:var(--green);opacity:.25}
.b-agent-dot{fill:var(--green)}

/* ---------- Animazioni ---------- */
@media(prefers-reduced-motion:no-preference){

  /* A — ciclo di 12 s: sparsi → collegati e ordinati → di nuovo sparsi */
  .is-active .a-ico{animation:aMove 12s cubic-bezier(.65,0,.35,1) infinite,aColor 12s linear infinite}
  .is-active .a-fl{animation:aFloat 4.5s ease-in-out infinite alternate;animation-delay:var(--fd,0s)}
  .is-active .a-link{animation:aLink 12s cubic-bezier(.65,0,.35,1) infinite}
  .is-active .a-core{animation:aCore 12s ease-out infinite}
  .is-active .a-halo{animation:aHalo 2.4s ease-out infinite}
  .is-active .a-dot{animation:aDots 12s linear infinite,aDrift 6s ease-in-out infinite alternate}

  @keyframes aMove{
    0%,20%{transform:translate(var(--sx),var(--sy))}
    44%,84%{transform:translate(var(--ex),var(--ey))}
    100%{transform:translate(var(--sx),var(--sy))}}
  @keyframes aColor{
    0%,34%{color:rgba(255,255,255,.55)}
    48%,82%{color:#b2d700}
    94%,100%{color:rgba(255,255,255,.55)}}
  @keyframes aLink{
    0%,44%{stroke-dashoffset:1}
    58%,82%{stroke-dashoffset:0}
    92%,100%{stroke-dashoffset:1}}
  @keyframes aCore{
    0%,46%{opacity:0;transform:scale(.5)}
    58%,82%{opacity:1;transform:scale(1)}
    92%,100%{opacity:0;transform:scale(.5)}}
  @keyframes aHalo{0%{opacity:.6;transform:scale(1)}100%{opacity:0;transform:scale(1.9)}}
  @keyframes aDots{0%,22%{opacity:.8}38%,86%{opacity:0}100%{opacity:.8}}
  @keyframes aDrift{from{transform:translate(0,0)}to{transform:translate(var(--dx),var(--dy))}}
  @keyframes aFloat{from{transform:translate(0,-4px)}to{transform:translate(0,4px)}}

  /* B — ciclo di 16 s.
     0–8 s: i tre grafi si dissolvono e vengono rigenerati uno dopo l'altro (A, B, C), ogni volta con un'onda che parte dal logo.
     8–15 s: un ragionamento attraversa il dominio A, passa dal logo e arriva al dominio B.
     Ogni elemento ha lo stesso ciclo con un ritardo (--d) che ne decide il momento di nascita. */
  .is-active .b-domain{animation:bMarch 3s linear infinite,gnFrame 16s ease var(--d) infinite backwards}
  .is-active .b-gl,.is-active .b-e{animation:gnEdge 16s ease var(--d) infinite backwards}
  .is-active .b-ex,.is-active .b-diamond{animation:gnFrame 16s ease var(--d) infinite backwards}
  .is-active .b-nd{animation:gnNode 16s ease var(--d) infinite backwards}
  .is-active .b-rule{animation:bRule 3s ease-out infinite;animation-delay:1.6s}
  .is-active .b-logo-box{animation:lgGlow 3.2s ease-in-out infinite alternate}
  .is-active .b-lgring{animation:lgRipple 16s ease-out var(--d) infinite backwards}
  .is-active .b-reason{animation:bReason 16s linear infinite}
  .is-active .b-trail{animation:bTrail 16s cubic-bezier(.45,0,.55,1) var(--d) infinite backwards}
  .is-active .b-lit{animation:bLit 16s linear var(--d) infinite backwards}
  .is-active .b-concl{animation:bConcl 16s ease-out infinite}
  .is-active .b-agent{animation:bAgent 16s cubic-bezier(.45,0,.55,1) infinite}

  @keyframes bMarch{to{stroke-dashoffset:-28}}
  @keyframes bRule{0%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1.7)}}
  @keyframes lgGlow{from{stroke:#fff;stroke-opacity:.3}to{stroke:#b2d700;stroke-opacity:.9}}
  /* nascita → presenza → dissolvenza, ripetuta ogni 16 s */
  @keyframes gnFrame{0%{opacity:0}5%,94%{opacity:1}100%{opacity:0}}
  @keyframes gnEdge{0%{stroke-dashoffset:1}5%,94%{stroke-dashoffset:0}100%{stroke-dashoffset:1}}
  @keyframes gnNode{
    0%{opacity:0;transform:scale(.3);animation-timing-function:cubic-bezier(.3,1.4,.5,1)}
    4%,94%{opacity:1;transform:scale(1)}
    100%{opacity:0;transform:scale(.3)}}
  /* onda emessa dal logo quando "genera" un grafo (e quando il ragionamento lo attraversa) */
  @keyframes lgRipple{0%{opacity:.85;transform:scale(1)}8%{opacity:0;transform:scale(1.55)}100%{opacity:0;transform:scale(1.55)}}
  /* ragionamento: visibile da 8 s a ~15 s */
  @keyframes bReason{0%,49.688%{opacity:0}50%,92%{opacity:1}97%,100%{opacity:0}}
  @keyframes bTrail{0%{stroke-dashoffset:1}3.438%{stroke-dashoffset:0}50%{stroke-dashoffset:0}50.01%,100%{stroke-dashoffset:1}}
  @keyframes bLit{0%{opacity:0}1.5%,50%{opacity:1}51.5%,100%{opacity:0}}
  @keyframes bConcl{
    0%,82.75%{opacity:0;transform:scale(.7)}
    83.062%{opacity:.9;transform:scale(.7)}
    90.25%{opacity:0;transform:scale(2.6)}
    90.562%{opacity:.9;transform:scale(.7)}
    97.75%,100%{opacity:0;transform:scale(2.6)}}
  @keyframes bAgent{
    0%{transform:translate(66px,92px);opacity:0}
    48.75%{transform:translate(66px,92px);opacity:0}
    50%{transform:translate(66px,92px);opacity:1}
    53.438%{transform:translate(116px,44px)}
    54.188%{transform:translate(116px,44px)}
    57.625%{transform:translate(166px,92px)}
    58.375%{transform:translate(166px,92px)}
    61.812%{transform:translate(138px,142px)}
    62.562%{transform:translate(138px,142px)}
    66%{transform:translate(201px,184px)}
    66.75%{transform:translate(201px,184px)}
    70.188%{transform:translate(271px,184px)}
    70.938%{transform:translate(271px,184px)}
    74.375%{transform:translate(322px,142px)}
    75.125%{transform:translate(322px,142px)}
    78.562%{transform:translate(364px,88px)}
    79.313%{transform:translate(364px,88px)}
    82.75%{transform:translate(440px,96px)}
    100%{transform:translate(440px,96px);opacity:1}}
}

/* ---------- PANEL VIDEO: ---------- */

#p6-video {
  padding: 105px 7vw 115px;
  box-sizing: border-box;
}

#p6-video .video-container {
  width: min(100%, 760px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vh, 26px);
}

#p6-video .video-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 300;
  letter-spacing: .025em;
  line-height: 1.2;
  text-align: center;
}

#p6-video .video-frame {
  width: 100%;
  max-width: 760px;
  max-height: 52vh;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(178, 215, 0, .35);
  border-radius: 4px;
  box-shadow: 0 0 35px rgba(178, 215, 0, .06);
}

#p6-video .video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080808;
}

/* ---------- MOBILE ---------- */

@media (max-width: 767px) {

  #p6-video {
    padding: 95px 6vw 110px;
  }

  #p6-video .video-container {
    width: 100%;
    gap: 20px;
  }

  #p6-video .video-title {
    font-size: clamp(1.25rem, 5vw, 1.6rem);
  }

  #p6-video .video-frame {
    width: 100%;
    max-height: 38vh;
    aspect-ratio: 16 / 9;
  }
}

/* ---------- SCHERMI BASSI ---------- */

@media (max-height: 650px) and (min-width: 768px) {

  #p6-video {
    padding-top: 85px;
    padding-bottom: 95px;
  }

  #p6-video .video-container {
    gap: 12px;
  }

  #p6-video .video-title {
    font-size: 1.3rem;
  }

  #p6-video .video-frame {
    max-height: 45vh;
  }
}

/* ---------- LANGUAGE SWITCH ---------- */

.language-switch {
  position: fixed;
  z-index: 9999;
  top: 24px;
  right: clamp(18px, 3vw, 42px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(178, 215, 0, .35);
  border-radius: 30px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.language-switch button {
  min-width: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: rgba(255,255,255,.65);
  font-family: inherit;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .25s ease;
}

.language-switch button:hover {
  color: #fff;
}

.language-switch button[aria-pressed="true"] {
  background: #b2d700;
  color: #080808;
}

.language-switch > span {
  width: 1px;
  height: 15px;
  background: rgba(255,255,255,.2);
}

@media (max-width: 767px) {
  .language-switch {
    top: 14px;
    right: 14px;
    padding: 3px;
  }

  .language-switch button {
    min-width: 30px;
    padding: 6px 7px;
    font-size: .63rem;
  }
}


/* FIX PANEL 6 - SCROLL DESKTOP */
@media (min-width: 768px) {

  #p6 {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #p6 .contact.scroller {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;

    width: min(1180px, 100%);
    height: calc(100vh - 192px);
    height: calc(100dvh - 192px);
    max-height: none;
    min-height: 0;

    overflow-x: hidden;
    overflow-y: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  #p6 .sub {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  #p6 .copy.scroller,
  #p6 .form.scroller {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible !important;
    -webkit-mask-image: none;
    mask-image: none;
  }

}

/* ---------- VIDEO COVER ---------- */

#p6-video .video-frame {
  position: relative;
}

#aki-video {
  position: relative;
  z-index: 1;
}

#aki-video-cover {
  display: none;
}

#aki-video-cover.is-visible {
  display: flex;
}

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 5;

  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;

  align-items: center;
  justify-content: center;

  background: #080808;
}

.video-cover img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-cover-button {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  padding: 16px 24px;

  color: #fff;
  background: rgba(10, 15, 10, .85);
  border: 1px solid #b2d700;
  border-radius: 4px;

  font-family: inherit;
  font-size: 15px;
  font-weight: 500;

  transition: background .25s ease, transform .25s ease;
}

.video-cover:hover .video-cover-button {
  background: rgba(178, 215, 0, .95);
  color: #111;
  transform: scale(1.04);
}

.video-play-icon {
  font-size: 20px;
}

.video-cover:focus-visible {
  outline: 3px solid #b2d700;
  outline-offset: -5px;
}