/* ================================================================
   HOME "La giornata che non vedi" — caricato SOLO da index.html,
   dopo css/style.css. Tutte le classi hanno il prefisso hm- per non
   collidere con style.css e con i selettori agganciati da js/main.js.
   Colori: SOLO le variabili di style.css; le tinte derivate usano
   color-mix() sulle stesse variabili, nessun nuovo esadecimale.
   ================================================================ */
:root {
  --hm-serif: "Fraunces", Georgia, "Times New Roman", serif;
  /* Rosso per i messaggi di errore: il rosso già usato in style.css (#f0424a),
     scurito con il navy per arrivare a 4.8:1 su --off-white (soglia AA 4.5:1) */
  --hm-error: color-mix(in srgb, #f0424a 80%, var(--navy-dark));
  --hm-navy-soft: color-mix(in srgb, var(--navy-mid) 70%, var(--white));
  --hm-header-h: 72px;
}

/* Le ancore della home non finiscono sotto l'header sticky */
.hm-noise, .hm-day, .hm-console, .hm-proof, .hm-voices, .hm-res, .hm-switch {
  scroll-margin-top: var(--hm-header-h);
}

.hm-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hm-eyebrow {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  line-height: 1.4;
  color: var(--orange);
  margin-bottom: 18px;
}
.hm-eyebrow--ink { color: var(--orange); }

.hm-link {
  display: inline-flex;
  gap: 6px;
  font-weight: 600;
  color: var(--orange);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--transition);
}
.hm-link:hover { gap: 10px; }

/* Riga di etichette separate da un punto arancio */
.hm-dotlist {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.hm-dotlist li { display: inline-flex; align-items: center; }
.hm-dotlist li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  margin: 0 16px;
}
.hm-dotlist--ondark { color: rgba(255, 255, 255, 0.88); }
.hm-dotlist--onlight { color: var(--navy-dark); justify-content: flex-start; }

/* Frasi "rumore": condivise tra Sezione 1 e Sezione 7.
   Il galleggiamento usa la proprietà `translate` (non transform), così si
   somma alla convergenza da scroll che JS scrive in transform via --p. */
.hm-noise__phrase {
  position: absolute;
  left: var(--x);
  top: var(--y);
  white-space: nowrap;
  color: var(--hm-navy-soft);
  opacity: calc(var(--o, 0.55) * (1 - var(--p, 0)));
  transform:
    translate(-50%, -50%)
    translate(calc(var(--dx, 0px) * var(--p, 0)), calc(var(--dy, 0px) * var(--p, 0)))
    scale(calc(1 - var(--p, 0) * 0.45));
  animation: hm-float var(--fd, 10s) ease-in-out infinite alternate;
  will-change: transform, opacity;
}
.hm-noise__phrase--serif { font-family: var(--hm-serif); font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 400; }
.hm-noise__phrase--italic { font-family: var(--hm-serif); font-style: italic; font-size: clamp(1rem, 1.9vw, 1.4rem); font-weight: 300; }
.hm-noise__phrase--small { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.6px; --o: 0.7; color: color-mix(in srgb, var(--navy-mid) 85%, var(--white)); }
.hm-noise__phrase--lg { font-size: clamp(1.4rem, 3vw, 2.2rem); --o: 0.45; }

@keyframes hm-float {
  from { translate: 0 0; }
  to { translate: var(--fx, 10px) var(--fy, -10px); }
}

/* ================================================================
   1. IL RUMORE — continua la hero senza stacco
   ================================================================ */
.hm-noise {
  position: relative;
  /* Il bordo alto riprende esattamente il fondo della hero (il suo gradiente a
     160deg finisce con var(--navy-deep) a sinistra e #101c28, suo ultimo stop, a
     destra), poi scende verso var(--navy-dark): nessuna linea di stacco. */
  background:
    linear-gradient(180deg, transparent 0%, var(--navy-dark) 100%),
    linear-gradient(90deg, var(--navy-deep) 0%, #101c28 100%);
  color: var(--white);
  padding: 24px 0 120px;
  overflow: hidden;
}
.hm-noise__field {
  position: relative;
  height: clamp(360px, 64vh, 620px);
  max-width: 1180px;
  margin: 0 auto;
  pointer-events: none;
}
.hm-noise__body { text-align: center; max-width: 820px; position: relative; }
.hm-noise__title {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hm-noise__title em, .hm-day__end em, .hm-switch__contact-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--orange);
}
.hm-noise__text {
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0 auto 36px;
}

/* ================================================================
   2. LE 24 ORE
   ================================================================ */
.hm-day { background: var(--white); padding: 120px 0 130px; }
.hm-day__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: start;
}
.hm-day__aside {
  position: sticky;
  top: calc(var(--hm-header-h) + 48px);
}
.hm-day__aside .hm-eyebrow { color: var(--orange); }

/* Orologio a rulli: ogni cifra è una striscia 0–9 che scorre in verticale */
.hm-clock {
  display: flex;
  align-items: flex-start;
  font-family: var(--hm-serif);
  font-weight: 300;
  font-size: clamp(5rem, 10vw, 8.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  font-variant-numeric: tabular-nums lining-nums;
  margin: 4px 0 28px;
}
.hm-clock__digit {
  display: inline-block;
  height: 1em;
  width: 0.56em;
  overflow: hidden;
  text-align: center;
}
.hm-clock__strip {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--d, 0) * -1em));
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hm-clock__strip span { display: block; height: 1em; }
.hm-clock__colon { width: 0.3em; text-align: center; transform: translateY(-0.06em); }

.hm-day__bar {
  display: block;
  height: 2px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 28px;
}
.hm-day__bar-fill {
  display: block;
  height: 100%;
  background: var(--orange);
  transform-origin: left center;
  transform: scaleX(var(--progress, 0.1));
  transition: transform 0.6s ease;
}
.hm-day__note { color: var(--navy-mid); font-size: 1rem; line-height: 1.7; max-width: 380px; }

.hm-day__chip { display: none; }

.hm-day__list { list-style: none; border-top: 1px solid var(--border); }
.hm-day__list > li { border-bottom: 1px solid var(--border); }
.hm-event {
  display: grid;
  grid-template-columns: 92px 1fr;
  column-gap: 28px;
  padding: 40px 0;
  opacity: 0.32;
  transition: opacity 0.45s ease;
}
.hm-event > * { grid-column: 2; }
.hm-event__time {
  grid-column: 1;
  grid-row: 1 / span 4;
  font-family: var(--hm-serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.hm-event__pillar {
  font-weight: 700;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 1.6px;
  font-size: 0.9rem;
  color: var(--navy-mid);
  margin-bottom: 6px;
}
.hm-event__title {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.hm-event__text { color: var(--navy-mid); font-size: 0.98rem; line-height: 1.7; margin-bottom: 16px; max-width: 520px; }
.hm-event__link { justify-self: start; font-weight: 600; font-size: 0.92rem; color: var(--orange); }
.hm-event__link span { display: inline-block; transition: transform var(--transition); }
.hm-day__item.is-active .hm-event,
.hm-event:hover,
.hm-event:focus-visible { opacity: 1; }
.hm-event:hover .hm-event__link span,
.hm-event:focus-visible .hm-event__link span { transform: translateX(5px); }
.hm-event:hover .hm-event__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.hm-day__end {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  padding: 72px 0 0 120px;
  color: var(--navy-dark);
}
.hm-day__end em { color: var(--orange); }

/* ================================================================
   3. CONSOLE, PRIMA E DOPO — comparatore a tendina
   ================================================================ */
.hm-console {
  background: var(--navy-dark);
  color: var(--white);
  padding: 120px 0;
}
.hm-console__title {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin-bottom: 56px;
}

.hm-compare {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  container-type: inline-size;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}
.hm-compare__layer { position: absolute; inset: 0; }

/* ---------- Livello "senza Console": chiaro e disordinato ----------
   Grigi, beige e bianchi derivati dalle variabili di style.css. */
.hm-compare__before {
  background: color-mix(in srgb, var(--border) 55%, var(--off-white));
  color: var(--navy-dark);
  overflow: hidden;
}
.hm-compare__after {
  /* Colori del prodotto (dark UI), non del brand del sito: ammessi in --hmc-* */
  --hmc-bg: #12161F;
  --hmc-card: #181D27;
  --hmc-border: #262C38;
  --hmc-text: #FFFFFF;
  --hmc-muted: #A3ABB9;
  --hmc-violet: #6D5DF5;
  --hmc-orange: #F5893A;
  --hmc-green: #22C55E;
  --hmc-red: #EF4444;
  background: var(--hmc-bg);
  color: var(--hmc-text);
  clip-path: inset(0 0 0 var(--pos));
}

.hm-win {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  transform: rotate(var(--r));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: clamp(0.5rem, 1vw, 0.74rem);
  box-shadow: 0 8px 18px rgba(22, 33, 44, 0.14);
}
.hm-win__bar {
  padding: 0.55em 0.9em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--navy-dark);
  background: color-mix(in srgb, var(--navy-mid) 16%, var(--white));
}
.hm-win__body { padding: 0.9em; display: flex; flex-direction: column; gap: 0.55em; min-height: 6.4em; }
.hm-win__body i { display: block; height: 0.55em; width: var(--lw, 70%); border-radius: 3px; background: color-mix(in srgb, var(--navy-mid) 18%, var(--white)); }
.hm-win__input { width: 100% !important; height: 1.5em !important; border: 1px solid var(--border); background: var(--white) !important; }
.hm-win__btn { width: 42% !important; height: 1.6em !important; background: color-mix(in srgb, var(--navy-mid) 45%, var(--white)) !important; }
.hm-win__row { width: 100% !important; height: 1.4em !important; background: var(--white) !important; border-left: 3px solid color-mix(in srgb, var(--navy-mid) 40%, var(--white)); }
.hm-win__flag { width: 34% !important; height: 1.3em !important; border-radius: 999px !important; background: color-mix(in srgb, var(--orange) 22%, var(--white)) !important; }

/* Ogni finestra sembra un software diverso: fondo, barra, bordo e raggio cambiano */
.hm-win--1 { border-radius: 4px; }
.hm-win--1 .hm-win__bar { background: color-mix(in srgb, var(--navy-mid) 28%, var(--white)); }
.hm-win--2 { background: color-mix(in srgb, var(--orange) 6%, var(--white)); border-radius: 12px; border-color: color-mix(in srgb, var(--orange) 18%, var(--white)); }
.hm-win--2 .hm-win__bar { background: color-mix(in srgb, var(--orange) 14%, var(--white)); }
.hm-win--3 { background: var(--white); border-radius: 1px; }
.hm-win--3 .hm-win__bar { background: var(--white); color: var(--navy-mid); border-bottom: 1px solid var(--border); font-weight: 500; }
.hm-win--4 { background: var(--off-white); border-radius: 8px; border-width: 2px; }
.hm-win--4 .hm-win__bar { background: var(--border); }
.hm-win--5 { border-radius: 6px; }
.hm-win--5 .hm-win__bar { background: color-mix(in srgb, var(--navy-mid) 35%, var(--white)); }
.hm-win--6 { border-radius: 3px; }
.hm-win--6 .hm-win__bar { background: color-mix(in srgb, var(--orange) 10%, var(--off-white)); font-weight: 500; }
.hm-win__sheet {
  background:
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 22% 100%,
    linear-gradient(180deg, var(--border) 1px, transparent 1px) 0 0 / 100% 1.4em,
    var(--white);
  min-height: 7.4em;
}
.hm-win--7 { background: var(--off-white); border-radius: 10px; }
.hm-win--7 .hm-win__bar { background: color-mix(in srgb, var(--navy-mid) 22%, var(--off-white)); }
.hm-win--7 svg { width: 100%; height: 4.4em; }
.hm-win--7 polyline { fill: none; stroke: var(--navy-mid); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hm-win--8 { background: color-mix(in srgb, var(--orange) 5%, var(--off-white)); border-radius: 14px; border-style: dashed; }
.hm-win--8 .hm-win__bar { background: color-mix(in srgb, var(--orange) 9%, var(--white)); }

.hm-compare__caption {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 6%;
  font-family: var(--hm-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 2.3vw, 1.75rem);
  line-height: 1.2;
  color: var(--navy-dark);
}

.hm-compare__note {
  margin-top: 12px;
  text-align: right;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Livello "con Console": ricostruzione dell'interfaccia reale ----------
   Palette --hmc-* definita su .hm-compare__after. Le misure sono in em e la
   base scala con la larghezza del comparatore (cqw). */
.hmc {
  --hmc-arc: 251.33; /* circonferenza del cerchio r=40 */
  position: absolute;
  inset: 0;
  font-family: "Montserrat", -apple-system, sans-serif;
  font-size: 1.25cqw;
  font-weight: 500;
  line-height: 1.35;
  color: var(--hmc-text);
  background: var(--hmc-bg);
  text-align: left;
}
.hmc p { margin: 0; }
.hmc__frame { display: flex; width: 100%; height: 100%; }
.hmc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hmc svg { display: block; }
.hmc-side svg, .hmc-mod__name svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Barra laterale */
.hmc-side {
  width: 13.5em;
  flex-shrink: 0;
  padding: 1.5em 0.9em;
  background: var(--hmc-card);
  border-right: 1px solid var(--hmc-border);
}
.hmc-side__brand { display: flex; align-items: center; gap: 0.6em; font-weight: 700; font-size: 0.95em; margin: 0 0.4em 1.6em; }
.hmc-side__logo {
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--hmc-orange);
  color: var(--hmc-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95em;
  flex-shrink: 0;
}
.hmc-side__menu { list-style: none; display: flex; flex-direction: column; gap: 0.25em; }
.hmc-side__menu li {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.6em 0.8em;
  border-radius: 0.6em;
  color: var(--hmc-muted);
  font-size: 0.92em;
}
.hmc-side__menu li.is-active { background: var(--hmc-violet); color: var(--hmc-text); font-weight: 700; }
.hmc-side__group { margin: 1.4em 0.8em 0.5em !important; font-size: 0.72em; font-weight: 700; letter-spacing: 0.12em; color: var(--hmc-muted); }

/* Area principale */
.hmc-main { flex: 1; min-width: 0; padding: 1.5em 1.8em; display: flex; flex-direction: column; gap: 1.1em; }
.hmc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; }
.hmc-head__title { font-size: 1.45em; font-weight: 700; }
.hmc-head__issues { display: flex; flex-direction: column; align-items: flex-end; }
.hmc-head__num { font-size: 2.2em; font-weight: 700; line-height: 1; color: var(--hmc-orange); }
.hmc-head__label { font-size: 0.8em; color: var(--hmc-muted); }

.hmc-row { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 1em; }
.hmc-card {
  background: var(--hmc-card);
  border: 1px solid var(--hmc-border);
  border-radius: 0.9em;
  padding: 1em 1.1em;
}
.hmc-card__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6em;
  font-size: 0.85em;
  font-weight: 700;
  margin-bottom: 0.8em !important;
}
.hmc-pill { flex-shrink: 0; font-size: 0.8em; font-weight: 700; padding: 0.25em 0.75em; border-radius: 999px; }
.hmc-pill--warn { color: var(--hmc-orange); background: color-mix(in srgb, var(--hmc-orange) 16%, transparent); }
.hmc-pill--good { color: var(--hmc-green); background: color-mix(in srgb, var(--hmc-green) 16%, transparent); }
.hmc-good { color: var(--hmc-green); font-weight: 700; }
.hmc-warn { color: var(--hmc-orange); font-weight: 700; }

/* Anelli: arco = frazione var(--v) della circonferenza */
.hmc-ring { position: relative; width: var(--size, 5em); aspect-ratio: 1; flex-shrink: 0; }
.hmc-ring svg { width: 100%; height: 100%; }
.hmc-ring__track { fill: none; stroke: var(--hmc-border); stroke-width: 9; }
.hmc-ring__arc {
  fill: none;
  stroke: var(--hmc-orange);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: var(--hmc-arc);
  stroke-dashoffset: calc(var(--hmc-arc) * (1 - var(--v, 0)));
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.hmc-ring__val { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; }
.hmc-ring--sm { --size: 4.8em; }
.hmc-ring--sm .hmc-ring__val { font-size: 0.95em; }
.hmc-ring--lg { --size: 6.6em; }
.hmc-ring--lg .hmc-ring__val { font-size: 1.35em; }

.hmc-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; }
.hmc-mini { display: flex; flex-direction: column; align-items: center; gap: 0.5em; text-align: center; }
.hmc-mini__label { font-size: 0.75em; color: var(--hmc-muted); line-height: 1.25; }

.hmc-trs { display: flex; flex-direction: column; }
.hmc-trs__body { display: flex; flex-direction: column; align-items: center; gap: 0.5em; text-align: center; }
.hmc-trs__level { display: flex; flex-direction: column; }
.hmc-trs__big { font-size: 1.5em; font-weight: 700; line-height: 1.1; }
.hmc-trs__label { font-size: 0.78em; color: var(--hmc-muted); }
.hmc-trs__trend { width: 100%; height: 2em; margin-top: auto; padding-top: 0.6em; overflow: visible; }
.hmc-trs__trend polyline { fill: none; stroke: var(--hmc-orange); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

.hmc-duo { display: grid; grid-template-rows: 1fr 1fr; gap: 1em; }
.hmc-stat { padding: 0.8em 1em; }
.hmc-stat .hmc-card__title { margin-bottom: 0.4em !important; }
.hmc-stat__num { font-size: 1.9em; font-weight: 700; line-height: 1.05; }
.hmc-stat__label { font-size: 0.75em; color: var(--hmc-muted); }

/* Servizi + radar */
.hmc-lower { display: grid; grid-template-columns: 1fr 12em; gap: 1em; align-items: end; }
.hmc-services__title { font-size: 1.05em; font-weight: 700; }
.hmc-services__sub { font-size: 0.78em; color: var(--hmc-muted); margin-bottom: 0.8em !important; }
.hmc-mods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8em; }
.hmc-mod { position: relative; padding: 1.5em 0.9em 0.9em; display: flex; flex-direction: column; gap: 0.55em; }
.hmc-dot { position: absolute; top: 0.7em; left: 0.8em; width: 0.6em; height: 0.6em; border-radius: 50%; }
.hmc-dot--good { background: var(--hmc-green); }
.hmc-dot--warn { background: var(--hmc-orange); }
.hmc-mod__name { display: flex; align-items: center; gap: 0.45em; font-weight: 700; font-size: 0.92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmc-mod__name svg { color: var(--hmc-violet); }
.hmc-mod__health { display: flex; justify-content: space-between; font-size: 0.78em; color: var(--hmc-muted); }
.hmc-mod__btn {
  display: block;
  text-align: center;
  padding: 0.5em;
  border-radius: 0.5em;
  background: var(--hmc-bg);
  border: 1px solid var(--hmc-border);
  font-size: 0.75em;
  font-weight: 700;
  pointer-events: none;
}

.hmc-radar { padding: 0.9em 1em; }
.hmc-radar .hmc-card__title { margin-bottom: 0.3em !important; }
.hmc-radar__chart { width: 100%; height: auto; max-height: 9em; }
.hmc-radar__grid { fill: none; stroke: var(--hmc-border); stroke-width: 0.6; }
.hmc-radar__target { fill: none; stroke: var(--hmc-green); stroke-width: 1; stroke-dasharray: 2.5 2; }
.hmc-radar__conf {
  fill: color-mix(in srgb, var(--hmc-violet) 40%, transparent);
  stroke: var(--hmc-violet);
  stroke-width: 1;
  transform-box: view-box;
  transform-origin: 50% 50%;
}
.hmc-radar__legend { display: flex; align-items: center; gap: 0.4em; font-size: 0.72em; color: var(--hmc-muted); }
.hmc-radar__key { width: 0.9em; height: 0.9em; border-radius: 2px; }
.hmc-radar__key--conf { background: color-mix(in srgb, var(--hmc-violet) 60%, transparent); }
.hmc-radar__key--target { margin-left: 0.6em; border: 1px dashed var(--hmc-green); }

/* Animazione al primo ingresso (home.js aggiunge .is-armed e poi .is-live) */
.hmc.is-armed .hmc-ring__arc { stroke-dashoffset: var(--hmc-arc); }
.hmc.is-armed .hmc-radar__conf { transform: scale(0); }
.hmc.is-armed.is-live .hmc-ring__arc {
  stroke-dashoffset: calc(var(--hmc-arc) * (1 - var(--v, 0)));
  transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s;
}
.hmc.is-armed.is-live .hmc-radar__conf { transform: scale(1); transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s; }
.hmc.is-armed.is-live .hmc-dot--good { animation: hmc-dot-pulse 0.9s ease-in-out 0.6s 1; }
@keyframes hmc-dot-pulse {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.7); }
}

/* Linea e maniglia */
.hm-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--orange);
  pointer-events: none;
}
.hm-compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy-dark);
  display: grid;
  place-items: center;
}
.hm-compare__handle svg { width: 22px; height: 22px; }
.hm-compare.is-dragging .hm-compare__handle { transform: scale(1.08); }
.hm-compare:focus-within .hm-compare__handle { outline: 3px solid var(--white); outline-offset: 3px; }
.hm-compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.hm-console__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px 48px;
  margin-top: 48px;
}
.hm-console__foot p { max-width: 600px; color: rgba(255, 255, 255, 0.8); font-weight: 300; font-size: 1.05rem; line-height: 1.7; }
.hm-console__foot .btn { flex-shrink: 0; }

/* ================================================================
   4. LE PROVE — impaginazione da giornale
   ================================================================ */
.hm-proof { background: var(--white); padding: 120px 0; }
.hm-proof__row { display: grid; gap: 48px; align-items: end; }
.hm-proof__row--top { grid-template-columns: 7fr 4fr; margin-top: 12px; }
.hm-proof__row--mid { grid-template-columns: 5fr 6fr; align-items: center; }
.hm-proof__stat--side { padding-bottom: 18px; }
.hm-proof__num {
  font-family: var(--hm-serif);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums;
  font-size: clamp(3.6rem, 9vw, 7rem);
  color: var(--navy-dark);
}
.hm-proof__num--xl { font-size: clamp(6rem, 19vw, 15rem); }
.hm-proof__num--accent { color: var(--orange); font-weight: 400; }
.hm-proof__num--italic { font-style: italic; font-size: clamp(4.4rem, 12vw, 9.5rem); }
.hm-proof__label { margin-top: 14px; color: var(--navy-mid); font-size: 1rem; max-width: 320px; }
.hm-proof__rule { border: 0; border-top: 1px solid var(--border); margin: 56px 0; }
.hm-proof__rule--navy { border-top: 2px solid var(--navy-dark); }
.hm-proof__story h3 {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.hm-proof__story p { color: var(--navy-mid); line-height: 1.7; margin-bottom: 22px; max-width: 520px; }

/* Rivelazione a maschera dal basso: i numeri sono già quelli finali */
.hm-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.06em 0.04em; }
.hm-mask > span { display: inline-block; }
.hm-proof.is-armed .hm-mask > span { transform: translateY(105%); }
.hm-proof.is-armed.is-revealed .hm-mask > span {
  transform: none;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hm-proof.is-revealed .hm-proof__row--top .hm-proof__stat--side .hm-mask > span { transition-delay: 0.15s; }
.hm-proof.is-revealed .hm-proof__row--mid .hm-mask > span { transition-delay: 0.3s; }

/* ================================================================
   5. DICONO DI NOI
   ================================================================ */
.hm-voices { background: var(--off-white); padding: 110px 0 120px; }
.hm-voices__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 64px;
}
.hm-voices__head .hm-eyebrow { margin-bottom: 0; }
.hm-quote { margin: 0 0 80px; max-width: 860px; cursor: default; }
.hm-quote:last-child { margin-bottom: 0; }
.hm-quote blockquote p {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy-dark);
}
.hm-quote--2 { margin-left: auto; text-align: right; }
.hm-quote--2 blockquote p { font-style: italic; font-weight: 300; }
.hm-quote--3 { max-width: 640px; }
.hm-quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--navy-mid);
}
.hm-quote--2 figcaption { align-items: flex-end; }
.hm-quote figcaption strong { color: var(--navy-dark); }

.hm-redact {
  display: block;
  width: 190px;
  height: 18px;
  background: var(--navy-dark);
  transform-origin: left center;
}
.hm-quote--2 .hm-redact { transform-origin: right center; }
.hm-quote.is-peek .hm-redact { animation: hm-redact-peek 0.9s ease; }
@media (hover: hover) {
  .hm-quote:hover .hm-redact { animation: hm-redact-peek 0.9s ease; }
}
@keyframes hm-redact-peek {
  0%, 100% { transform: scaleX(1); }
  40% { transform: scaleX(0.9); }
}

/* ================================================================
   6. RISORSE — fascia sottile
   ================================================================ */
.hm-res { background: var(--white); border-top: 1px solid var(--border); padding: 40px 0; }
.hm-res__inner { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px 56px; }
.hm-res__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--navy-mid);
}
.hm-res__links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 48px; }
.hm-res__links a {
  font-family: var(--hm-serif);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 400;
  color: var(--navy-dark);
  transition: color var(--transition);
}
.hm-res__links a span { display: inline-block; color: var(--orange); transition: transform var(--transition); }
.hm-res__links a:hover { color: var(--orange); }
.hm-res__links a:hover span { transform: translateX(5px); }

/* ================================================================
   7. L'INTERRUTTORE
   Stato base (senza JS, con reduced motion, arrivo da #contatti):
   OFF, fondo chiaro, modulo visibile. Lo stato ON lo aggiunge home.js
   con .is-on, quindi senza JS il modulo resta sempre raggiungibile.
   ================================================================ */
.hm-switch {
  position: relative;
  overflow: hidden;
  background: var(--off-white);
  color: var(--navy-dark);
  padding: 120px 0;
  transition: background-color 1s ease 0.3s, color 1s ease 0.3s;
}
.hm-switch.is-on { background: var(--navy-dark); color: var(--white); }

.hm-switch__float { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.6s ease; }
.hm-switch__float .hm-noise__phrase { --o: 0.4; }
.hm-switch.is-on .hm-switch__float { opacity: 1; }

.hm-switch__stage { display: grid; position: relative; }
.hm-switch__intro, .hm-switch__contact { grid-area: 1 / 1; align-self: center; }

.hm-switch__intro {
  display: none;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease 0.35s, visibility 0s linear 0.85s;
}
.hm-js .hm-switch__intro { display: block; }
.hm-switch.is-on .hm-switch__intro { opacity: 1; visibility: visible; transition: none; }

.hm-switch__contact {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  transition: opacity 0.7s ease 0.9s, transform 0.7s ease 0.9s, visibility 0s linear 0.9s;
}
.hm-switch.is-on .hm-switch__contact { opacity: 0; transform: translateY(16px); visibility: hidden; transition: none; }

.hm-switch.is-instant,
.hm-switch.is-instant * { transition: none !important; }

.hm-switch__title {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.hm-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: none;
  border: 0;
  padding: 12px;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
.hm-toggle__label { font-size: 0.82rem; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; }
.hm-toggle__track {
  position: relative;
  display: block;
  width: 168px;
  height: 80px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: var(--navy-deep);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.hm-toggle__knob {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1), background-color 0.3s ease;
}
.hm-toggle[aria-pressed="true"] .hm-toggle__knob { transform: translateX(84px); background: var(--orange); }
.hm-toggle__state {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  transition: opacity 0.3s ease;
}
.hm-toggle__state--on { left: 24px; color: var(--white); }
.hm-toggle__state--off { right: 22px; color: rgba(255, 255, 255, 0.7); opacity: 0; }
.hm-toggle[aria-pressed="false"] .hm-toggle__state--on { opacity: 0; }
.hm-toggle[aria-pressed="false"] .hm-toggle__state--off { opacity: 1; }
.hm-toggle:hover .hm-toggle__track { border-color: var(--orange); }
.hm-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 12px; }

.hm-switch__hint { margin-top: 10px; font-family: var(--hm-serif); font-style: italic; font-size: 1.05rem; color: rgba(255, 255, 255, 0.72); }

.hm-switch__contact-title {
  font-family: var(--hm-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  outline: none;
}
.hm-switch__contact-title em { color: var(--orange); }
.hm-switch__contact-text { color: var(--navy-mid); font-size: 1.05rem; line-height: 1.7; margin-bottom: 40px; }

.hm-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  text-align: left;
}
.hm-form__field { display: flex; flex-direction: column; gap: 8px; }
.hm-form label { font-size: 0.85rem; font-weight: 600; color: var(--navy-dark); }
.hm-form input:not([type="checkbox"]),
.hm-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--navy-mid);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy-dark);
}
.hm-form textarea { resize: vertical; min-height: calc(4 * 1.6em + 28px); line-height: 1.6; }
.hm-form input:not([type="checkbox"]):focus,
.hm-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.hm-form__field--full { grid-column: 1 / -1; }

/* Consenso privacy: casella da 22px dentro un'area cliccabile/toccabile di 44px */
.hm-form__consent {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 6px;
  align-items: start;
}
.hm-form__hit {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hm-form__hit input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.hm-form__hit input:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.hm-form label.hm-form__consent-text {
  padding-top: 11px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--navy-mid);
  cursor: pointer;
}
.hm-form__consent-text a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hm-form__error {
  grid-column: 2;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hm-error);
}
.hm-form__error:empty { display: none; }
.hm-form__hit input[aria-invalid="true"] { outline: 2px solid var(--hm-error); outline-offset: 3px; }
.hm-form .btn { grid-column: 1 / -1; justify-self: center; margin-top: 10px; }
.hm-form .form-sent-msg { grid-column: 1 / -1; text-align: center; color: var(--orange); }
.hm-form.sent .form-sent-msg { display: block; }
/* Errore di invio a HubSpot (25/11/2026): sotto il pulsante, centrato */
.hm-form__send-error { grid-column: 1 / -1; text-align: center; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 960px) {
  .hm-day { padding: 90px 0 100px; }
  .hm-day__grid { grid-template-columns: 1fr; gap: 0; }
  .hm-day__aside { position: static; margin-bottom: 8px; }
  .hm-day__aside .hm-clock, .hm-day__aside .hm-day__bar { display: none; }
  .hm-day__note { margin-bottom: 32px; }

  /* Su mobile l'orologio diventa un'etichetta che resta in alto mentre si scorre la sezione */
  .hm-day__chip {
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: calc(var(--hm-header-h) + 10px);
    z-index: 5;
    justify-self: start;
    align-self: start;
    padding: 8px 16px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: var(--navy-dark);
    color: var(--white);
  }
  .hm-day__chip-time { font-family: var(--hm-serif); font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1; }
  .hm-day__bar--chip { width: 64px; margin: 0; background: rgba(255, 255, 255, 0.25); }

  .hm-event { grid-template-columns: 1fr; padding: 32px 0; }
  .hm-event__time { grid-row: auto; grid-column: 1; font-size: 1.3rem; margin-bottom: 8px; }
  .hm-event > * { grid-column: 1; }
  .hm-day__end { padding: 56px 0 0; }

  .hm-console { padding: 90px 0; }
  .hm-console__foot { flex-direction: column; align-items: flex-start; }

  .hm-proof { padding: 90px 0; }
  .hm-proof__row--top, .hm-proof__row--mid { grid-template-columns: 1fr; gap: 32px; }

  .hm-quote--2, .hm-quote--3 { max-width: none; }
}

/* Tablet: ricostruzione senza barra laterale né radar, base più grande */
@media (min-width: 768px) and (max-width: 1100px) {
  .hm-compare { aspect-ratio: 16 / 9; }
  .hmc { font-size: 1.5cqw; }
  .hmc-side, .hmc-radar { display: none; }
  .hmc-lower { grid-template-columns: 1fr; }
}

/* Mobile: maniglia di partenza al 18% (vedi home.js). La ricostruzione mostra
   intestazione, True Risk Score e due moduli, con il contenuto spostato oltre
   la maniglia: a riposo l'anello del True Risk Score è interamente visibile. */
@media (max-width: 767px) {
  .hm-compare { aspect-ratio: 2 / 3; }
  .hm-win { width: calc(var(--w) * 1.5); font-size: 0.55rem; }
  .hm-win--2 { --l: 46% !important; --t: 2% !important; }
  .hm-win--3 { --l: 8% !important; --t: 22% !important; }
  .hm-win--4 { --l: 52% !important; --t: 20% !important; }
  .hm-win--5 { --l: 4% !important; --t: 40% !important; }
  .hm-win--6 { --l: 44% !important; --t: 38% !important; }
  .hm-win--7 { --l: 10% !important; --t: 58% !important; }
  .hm-win--8 { --l: 54% !important; --t: 58% !important; }

  .hmc { font-size: 13px; }
  .hmc-side, .hmc-desk { display: none !important; }
  .hmc-main { padding: 18px 16px 16px 24%; gap: 10px; }
  .hmc-head__title { font-size: 1.15em; }
  .hmc-row, .hmc-lower, .hmc-mods { grid-template-columns: 1fr; gap: 10px; }
  .hmc-card { padding: 12px 14px; }
  .hmc-card__title { font-size: 0.92em; margin-bottom: 8px !important; }
  .hmc-ring--lg { --size: 6.2em; }
  .hmc-trs__label { font-size: 0.85em; }
  .hmc-trs__trend { height: 1.6em; padding-top: 4px; }
  .hmc-mod { padding: 24px 14px 12px; gap: 6px; }
  .hmc-mod__health { font-size: 0.85em; }
  .hmc-mod__btn { font-size: 0.82em; }
}

@media (max-width: 640px) {
  .hm-noise { padding-bottom: 90px; }
  .hm-noise__phrase--serif { font-size: 1rem; }
  .hm-noise__phrase--italic { font-size: 0.95rem; }
  .hm-noise__phrase--lg { font-size: 1.25rem; }
  .hm-noise__phrase--small { font-size: 0.68rem; }
  /* Su schermi stretti le frasi si avvicinano al centro per non uscire dai bordi */
  .hm-noise__phrase { left: calc(50% + (var(--x) - 50%) * 0.55); }
  .hm-dotlist { flex-direction: column; gap: 10px; }
  .hm-dotlist li + li::before { display: none; }
  .hm-dotlist--onlight { align-items: flex-start; }
  .hm-quote { margin-bottom: 56px; }
  .hm-redact { width: 150px; }
  .hm-form { grid-template-columns: 1fr; }
  .hm-switch { padding: 90px 0; }
  .hm-toggle__track { width: 140px; height: 68px; }
  .hm-toggle__knob { width: 50px; height: 50px; }
  .hm-toggle[aria-pressed="true"] .hm-toggle__knob { transform: translateX(70px); }
}

/* ================================================================
   prefers-reduced-motion: tutto statico, stato finale visibile
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .hm-noise__phrase { animation: none; transform: translate(-50%, -50%); opacity: var(--o, 0.55); }
  .hm-clock__strip, .hm-day__bar-fill, .hm-event, .hm-event__link span { transition: none; }
  .hm-proof.is-armed .hm-mask > span { transform: none; }
  .hm-quote .hm-redact, .hm-quote:hover .hm-redact, .hm-quote.is-peek .hm-redact { animation: none; }
  .hm-switch, .hm-switch * { transition: none !important; }
  .hmc .hmc-ring__arc { stroke-dashoffset: calc(var(--hmc-arc) * (1 - var(--v, 0))) !important; transition: none !important; }
  .hmc .hmc-radar__conf { transform: none !important; transition: none !important; }
  .hmc .hmc-dot { animation: none !important; }
  .hm-toggle__knob { transition: none; }
}

/* ================================================================
   HERO 3D, ciclo giorno/notte (js/hero3d.js)
   Porting di _riferimenti/hero-3d-prototipo.html. La hero non è più
   un carosello: giorno = messaggio "Better ICT", notte = messaggio
   "Blocca gli attacchi". I due stati stanno sovrapposti nella stessa
   cella di griglia (h3d-stack), quello non attivo ha aria-hidden e
   opacity 0, così il blocco testi ha sempre l'altezza del più alto.
   Le tinte di fondo giorno/notte (#DCE4EE, #060E1C) e quelle delle
   etichette vengono dal prototipo: devono coincidere con lo sfondo
   della scena 3D, per questo sono le uniche esadecimali nuove.
   Senza WebGL o senza Three.js (classe h3d-nogl): fondo navy della
   hero di sempre, testi del giorno in bianco, niente interfaccia.
   ================================================================ */
.h3d-hero {
  --h-bg: #DCE4EE;
  --h-fg: var(--navy-dark);
  --h-muted: #33465F;
  --h-chip: rgba(11, 31, 58, 0.08);
  --h-chip-line: rgba(11, 31, 58, 0.18);
  --tag-bg: rgba(255, 255, 255, 0.78);
  --ok: #16A34A;
  --h3d-fade: 64px;
  --h3d-band: 0px;
  /* Margine sinistro del blocco testi (allineato al contenitore del sito) e sua
     larghezza: servono anche alle velature, che coprono sempre tutto il testo */
  --h3d-pad-left: max(clamp(20px, 5vw, 72px), calc((100vw - 1180px) / 2 + 24px));
  --h3d-copy-w: 600px;
  --h3d-copy-end: calc(var(--h3d-pad-left) + var(--h3d-copy-w));
  min-height: max(560px, min(88svh, 820px));
  display: flex;
  align-items: center;
  background: var(--h-bg);
  color: var(--h-fg);
  transition: background-color 2s ease, color 1.2s ease;
}
.h3d-hero.is-night {
  --h-bg: #060E1C;
  --h-fg: var(--white);
  --h-muted: #B9C6D8;
  --h-chip: rgba(255, 255, 255, 0.08);
  --h-chip-line: rgba(255, 255, 255, 0.22);
  --tag-bg: rgba(8, 18, 36, 0.72);
  --ok: #4ADE80;
}

/* Scena, velature, etichette */
.h3d-stage { position: absolute; inset: 0; z-index: 0; }
.h3d-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: pan-y; cursor: default; opacity: 0; transition: opacity 0.8s ease;
}
.h3d-hero.h3d-ready .h3d-canvas { opacity: 1; }
.h3d-hero.is-night .h3d-canvas { cursor: crosshair; }
.h3d-scrim { position: absolute; inset: 0; pointer-events: none; transition: opacity 2s ease; }
/* Velature del prototipo, con i punti di sfumatura agganciati alla fine del blocco testi */
.h3d-scrim--day { background: linear-gradient(90deg, rgba(220, 228, 238, 0.94) 0%, rgba(220, 228, 238, 0.86) calc(var(--h3d-copy-end) - 80px), rgba(220, 228, 238, 0) calc(var(--h3d-copy-end) + 260px)); }
.h3d-scrim--night { opacity: 0; background: linear-gradient(90deg, rgba(6, 14, 28, 0.9) 0%, rgba(6, 14, 28, 0.8) calc(var(--h3d-copy-end) - 80px), rgba(6, 14, 28, 0) calc(var(--h3d-copy-end) + 260px)); }
.h3d-hero.is-night .h3d-scrim--day { opacity: 0; }
.h3d-hero.is-night .h3d-scrim--night { opacity: 1; }

.h3d-tags { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.h3d-tag {
  position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--h-fg);
  padding: 6px 10px 6px 8px; border-radius: 999px; background: var(--tag-bg); border: 1px solid var(--h-chip-line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.5s ease, color 1.2s ease; will-change: transform;
}
.h3d-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.h3d-tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: var(--h-chip-line); }
.h3d-tag span { display: grid; }
.h3d-tag span b { grid-area: 1 / 1; font-weight: 600; transition: opacity 0.8s ease; }
.h3d-tag b.n { opacity: 0; }
.h3d-hero.is-night .h3d-tag b.n { opacity: 1; }
.h3d-hero.is-night .h3d-tag b.d { opacity: 0; }

/* Sfumatura finale verso "Il rumore": riprende esattamente il bordo alto
   di .hm-noise (navy-deep a sinistra, #101c28 a destra), nessuno stacco */
.h3d-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h3d-fade); z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--navy-deep) 0%, #101c28 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
}

/* Blocco testi a sinistra: il contenitore lascia passare puntatore e clic
   verso la scena, i singoli blocchi no */
.h3d-copy {
  position: relative; z-index: 2; width: 100%;
  padding: 56px max(16px, env(safe-area-inset-right, 0px)) calc(var(--h3d-fade) + 40px)
    max(var(--h3d-pad-left), env(safe-area-inset-left, 0px));
  pointer-events: none;
}
.h3d-copy__inner { max-width: var(--h3d-copy-w); }
.h3d-copy__inner > * { pointer-events: auto; }

.h3d-stack { display: grid; }
.h3d-stack > * {
  grid-area: 1 / 1;
  transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), color 1.2s ease, border-color 1.2s ease;
}
.h3d-stack > [aria-hidden="true"] { opacity: 0; transform: translateY(14px); pointer-events: none; }

.h3d-eyebrows { margin-bottom: 22px; }
.h3d-hero .hero-eyebrow { margin: 0; justify-self: start; }

.h3d-hero h1.h3d-title {
  margin: 0 0 20px;
  font-family: var(--hm-serif); font-weight: 350; font-variation-settings: "opsz" 144;
  font-size: clamp(34px, 3.9vw, 56px); line-height: 1.06; letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3d-title .accent { font-style: italic; font-weight: 400; }
/* I due titoli si allineano in basso: il sottotitolo resta sempre alla stessa distanza */
.h3d-title { align-items: end; }

.h3d-hero .hero-sub {
  max-width: none; margin: 0; text-align: left;
  font-size: 1.05rem; font-weight: 400; line-height: 1.6; color: var(--h-muted); transition: color 1.2s ease;
}

.h3d-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--h-chip-line);
}
.h3d-stats .stat-num { font-size: 1.55rem; line-height: 1.15; letter-spacing: -0.5px; }
.h3d-stats .stat-label { display: block; margin-top: 4px; font-size: 0.76rem; line-height: 1.35; color: var(--h-muted); transition: color 1.2s ease; }

.h3d-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.h3d-ctas .h3d-stack > * { justify-self: start; }
.h3d-hero .btn-ghost { color: var(--h-fg); border-color: var(--h-chip-line); transition: var(--transition), color 1.2s ease, border-color 1.2s ease; }
.h3d-hero .btn-ghost:hover { border-color: var(--h-fg); background: var(--h-chip); }

/* Interfaccia del prototipo: suggerimento in alto a destra, stato e controlli in basso a destra */
.h3d-hint {
  position: absolute; z-index: 3; top: 22px; right: max(16px, env(safe-area-inset-right, 0px));
  margin: 0; font-size: 12px; font-weight: 500; color: var(--h-muted); pointer-events: none;
}
.h3d-hud {
  position: absolute; z-index: 3; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--h3d-fade) + 10px);
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px;
}
.h3d-hud[hidden], .h3d-hint[hidden] { display: none; }
.h3d-controls { display: flex; align-items: center; gap: 10px; }
.h3d-status {
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; min-height: 38px; padding: 0 14px;
  font-size: 12px; font-weight: 500; color: var(--h-fg); font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--h-chip); border: 1px solid var(--h-chip-line); border-radius: 999px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.h3d-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); display: inline-block; box-shadow: 0 0 0 0 rgba(255, 130, 0, 0.6); animation: h3d-ping 1.8s infinite; }
@keyframes h3d-ping { 70% { box-shadow: 0 0 0 8px rgba(255, 130, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 130, 0, 0); } }
.h3d-seg { display: inline-flex; border: 1px solid var(--h-chip-line); border-radius: 999px; padding: 3px; background: var(--h-chip); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.h3d-seg button, .h3d-pause {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--h-fg); background: transparent; border: 0;
  min-height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
}
.h3d-seg button[aria-pressed="true"] { background: var(--orange); color: var(--navy-dark); }
.h3d-pause { border: 1px solid var(--h-chip-line); background: var(--h-chip); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Ripiego senza WebGL o senza Three.js: la hero navy di sempre */
.h3d-hero.h3d-nogl {
  --h-fg: var(--white);
  --h-muted: rgba(255, 255, 255, 0.82);
  --h-chip: rgba(255, 255, 255, 0.08);
  --h-chip-line: rgba(255, 255, 255, 0.5);
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-deep) 60%, #101c28 100%);
}
.h3d-hero.h3d-nogl .h3d-stage { display: none; }
.h3d-hero.h3d-nogl .stat-label { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 1100px) {
  .h3d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile: scena in una fascia in alto, testi sotto su velatura (il fondo della hero) */
@media (max-width: 760px) {
  .h3d-hero { --h3d-band: min(220px, 58vw); --h3d-fade: 48px; display: block; min-height: 0; }
  .h3d-hero.h3d-nogl { --h3d-band: 0px; }
  .h3d-stage { inset: 0 0 auto 0; height: var(--h3d-band); }
  .h3d-scrim--day { background: linear-gradient(0deg, rgba(220, 228, 238, 1) 0%, rgba(220, 228, 238, 0) 34%); }
  .h3d-scrim--night { background: linear-gradient(0deg, rgba(6, 14, 28, 1) 0%, rgba(6, 14, 28, 0) 34%); }
  .h3d-copy { padding: calc(var(--h3d-band) + 12px) 16px 24px; }
  .h3d-hero.h3d-nogl .h3d-copy { padding-top: 56px; padding-bottom: calc(var(--h3d-fade) + 32px); }
  .h3d-hero h1.h3d-title { font-size: clamp(32px, 8.6vw, 42px); }
  .h3d-eyebrows { margin-bottom: 16px; }
  .h3d-hero .hero-sub { font-size: 0.98rem; }
  .h3d-ctas { margin-top: 24px; }
  .h3d-hero .btn-lg { font-size: 14px; padding: 13px 20px; }
  .h3d-hint { display: none; }
  .h3d-hint[hidden] { display: none; }
  .h3d-hud {
    position: relative; right: auto; bottom: auto; z-index: 2;
    justify-content: space-between; padding: 0 16px calc(var(--h3d-fade) + 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .h3d-hero, .h3d-canvas, .h3d-scrim, .h3d-tag, .h3d-tag span b,
  .h3d-stack > *, .h3d-stats .stat-label, .h3d-hero .btn-ghost { transition: none; }
  .h3d-stack > [aria-hidden="true"] { transform: none; }
  .h3d-status i { animation: none; }
}

/* ================================================================
   Dal Resources Center: ultimi 3 articoli (revisione 17/11/2026)
   ================================================================ */
.hm-res--cards { padding: 72px 0; }
.hm-res__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.hm-res__all { font-weight: 600; font-size: 0.95rem; color: var(--navy-dark); transition: color var(--transition); }
.hm-res__all span { display: inline-block; color: var(--orange); transition: transform var(--transition); }
.hm-res__all:hover { color: var(--orange); }
.hm-res__all:hover span { transform: translateX(5px); }
.hm-res__grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hm-res__card {
  height: 100%; display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); position: relative; overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.hm-res__card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.hm-res__card:hover { transform: translateY(-4px); border-color: rgba(255,130,0,.35); box-shadow: 0 14px 34px rgba(22,33,44,.08); }
.hm-res__card:hover::before { transform: scaleX(1); }
.hm-res__cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--orange); }
.hm-res__title { font-family: var(--hm-serif); font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; color: var(--navy-dark); flex: 1; }
.hm-res__meta { font-size: 0.85rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
.hm-res__meta span { color: var(--orange); font-size: 1.1rem; transition: transform var(--transition); }
.hm-res__card:hover .hm-res__meta span { transform: translateX(5px); }
@media (max-width: 900px) { .hm-res__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hm-res__card, .hm-res__card::before { transition: none; } .hm-res__card:hover { transform: none; } }

/* ================================================================
   2. LE 24 ORE, versione 2 (revisione Coturri 17/11/2026)
   Cielo giorno/notte attorno all'orologio (--night 0..1, --ox/--oy
   posizione di sole e luna, scritti da home.js), legenda delle aree
   che si accende con l'evento attivo, coppia AI + persone per evento.
   ================================================================ */
.hm-day--v2 {
  --a-security: #FF8200;
  --a-it-cloud: #3b82c4;
  --a-networking: #17a398;
  --a-comunicazione: #8a63d2;
  --a-rischio: #d9485f;
  --night: 1; --ox: 12%; --oy: 70%;
  background: linear-gradient(180deg, #f6f8fa 0%, var(--white) 30%);
  padding: 110px 0 120px;
}
.hm-day--v2 .hm-day__grid { gap: 64px; }

/* ---- Cielo ---- */
.hm-sky {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 22px; padding: 26px 30px 26px;
  background: linear-gradient(170deg, #ffe8cf 0%, #fff6ec 55%, #ffffff 100%);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(22, 33, 44, 0.10);
  margin-bottom: 26px;
}
.hm-sky::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 80% 0%, #24384c 0%, #121c26 55%, #0b1219 100%);
  opacity: var(--night); transition: opacity 0.9s ease;
}
.hm-sky__stars {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 58% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 48%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 8%, #fff 50%, transparent 51%);
  opacity: calc(var(--night) * 0.8); transition: opacity 0.9s ease;
}
.hm-sky__orb {
  position: absolute; z-index: -1; left: var(--ox); top: var(--oy);
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff3d6 0%, #ffb547 55%, #FF8200 100%);
  box-shadow: 0 0 60px 18px rgba(255, 150, 40, calc(0.45 * (1 - var(--night))));
  transition: left 0.9s cubic-bezier(.2,.8,.2,1), top 0.9s cubic-bezier(.2,.8,.2,1), background 0.9s ease, box-shadow 0.9s ease;
}
.hm-day--v2[data-night="1"] .hm-sky__orb {
  background: radial-gradient(circle at 62% 38%, #fdfbf3 0%, #e7e3d4 60%, #cbc6b3 100%);
  box-shadow: 0 0 40px 6px rgba(240, 236, 220, 0.25);
}
.hm-sky__state {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: color-mix(in srgb, var(--orange) 100%, transparent);
  margin-bottom: 4px; transition: color 0.6s ease;
}
.hm-day--v2 .hm-clock {
  font-size: clamp(4.2rem, 7.4vw, 6.6rem); margin: 0 0 18px;
  color: color-mix(in srgb, var(--white) calc(var(--night) * 100%), var(--navy-dark));
  transition: color 0.9s ease;
}
.hm-day--v2 .hm-sky .hm-day__bar {
  margin-bottom: 0;
  background: color-mix(in srgb, rgba(255,255,255,0.22) calc(var(--night) * 100%), var(--border));
}

/* ---- Legenda aree ---- */
.hm-area-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ac, var(--orange)); flex-shrink: 0; }
[data-area="security"] { --ac: var(--a-security); }
[data-area="it-cloud"] { --ac: var(--a-it-cloud); }
[data-area="networking"] { --ac: var(--a-networking); }
[data-area="comunicazione"] { --ac: var(--a-comunicazione); }
[data-area="rischio"] { --ac: var(--a-rischio); }

.hm-areas { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hm-areas li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; color: var(--navy-mid);
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--white);
  transition: border-color 0.35s ease, color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}
.hm-areas li b { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.hm-areas li.is-on {
  color: var(--navy-dark); border-color: var(--ac);
  background: color-mix(in srgb, var(--ac) 10%, var(--white));
  transform: translateY(-1px);
}

/* ---- Coppia AI + persone ---- */
.hm-duo { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 0.86rem; line-height: 1.45; color: var(--navy-mid); }
.hm-duo svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.hm-duo b { font-weight: 700; color: var(--navy-dark); margin-right: 2px; }
.hm-duo--ai svg { color: var(--orange); }
.hm-duo--human svg { color: var(--navy-dark); }
.hm-day__duo-note { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 18px; }

/* ---- Eventi come schede ---- */
.hm-day--v2 .hm-day__list { border-top: 0; display: flex; flex-direction: column; gap: 18px; }
.hm-day--v2 .hm-day__list > li { border-bottom: 0; }
.hm-day--v2 .hm-event {
  position: relative; padding: 30px 32px 28px 30px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--white);
  opacity: 0.55; transform: scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
  overflow: hidden;
}
.hm-day--v2 .hm-event::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--ac, var(--orange)); opacity: 0.35; transition: opacity 0.45s ease;
}
.hm-day--v2 .hm-day__item.is-active .hm-event,
.hm-day--v2 .hm-event:hover,
.hm-day--v2 .hm-event:focus-visible {
  opacity: 1; transform: none; border-color: color-mix(in srgb, var(--ac, var(--orange)) 35%, var(--border));
  box-shadow: 0 18px 44px rgba(22, 33, 44, 0.09);
}
.hm-day--v2 .hm-day__item.is-active .hm-event::before { opacity: 1; }
.hm-day--v2 .hm-event__time { color: var(--ac, var(--orange)); }
.hm-day--v2 .hm-event__pillar {
  display: inline-flex; align-items: center; gap: 8px; font-variant: normal; text-transform: uppercase;
  letter-spacing: 1.6px; font-size: 0.72rem; color: var(--navy-mid); margin-bottom: 10px;
}
.hm-day--v2 .hm-event__title { font-size: clamp(1.3rem, 2.1vw, 1.65rem); margin-bottom: 10px; }
.hm-day--v2 .hm-event__text { margin-bottom: 18px; }
.hm-event__duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  padding: 14px 16px; border-radius: 12px; background: #f6f8fa; margin-bottom: 16px;
}

/* ---- Chiusura ---- */
.hm-day--v2 .hm-day__end { padding: 64px 0 0 122px; }
.hm-day--v2 .hm-day__end p { margin-bottom: 22px; }
.hm-day__end-cta {
  display: inline-flex; gap: 8px; font-family: "Montserrat", system-ui, sans-serif; font-size: 1rem; font-weight: 600;
  letter-spacing: 0; color: var(--orange); border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.hm-day__end-cta span { transition: transform var(--transition); }
.hm-day__end-cta:hover span { transform: translateX(5px); }

@media (max-width: 960px) {
  .hm-day--v2 .hm-sky { display: none; }
  .hm-day--v2 .hm-areas { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .hm-day--v2 .hm-areas li { flex-shrink: 0; }
  .hm-day--v2 .hm-event { padding: 24px 22px 22px 24px; }
  .hm-event__duo { grid-template-columns: 1fr; }
  .hm-day--v2 .hm-day__end { padding: 48px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-sky::before, .hm-sky__stars, .hm-sky__orb, .hm-day--v2 .hm-clock, .hm-areas li, .hm-day--v2 .hm-event { transition: none; }
  .hm-day--v2 .hm-event { transform: none; }
}

.hm-day--v2 .hm-day__aside, .hm-day--v2 .hm-day__col, .hm-day--v2 .hm-day__chip { min-width: 0; }

/* Giornata tipo: intro esplicita "questi sono i nostri servizi" (17/11/2026 sera) */
.hm-day__intro { max-width: 1180px; margin-bottom: 64px; }
.hm-day__kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; }
.hm-day__kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255,130,0,.5); animation: hm-kick 2.2s ease-in-out infinite; }
@keyframes hm-kick { 50% { box-shadow: 0 0 0 7px rgba(255,130,0,0); } }
.hm-day__headline { font-family: var(--hm-serif); font-weight: 400; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--navy-dark); max-width: 900px; margin-bottom: 20px; }
.hm-day__headline em { font-style: italic; font-weight: 300; color: var(--orange); }
.hm-day__lead { font-size: 1.12rem; line-height: 1.7; color: var(--navy-mid); max-width: 720px; margin-bottom: 28px; }
.hm-day__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.hm-day__facts li { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--border); font-size: 0.9rem; color: var(--navy-mid); }
.hm-day__facts b { font-family: var(--hm-serif); font-weight: 400; font-size: 1.25rem; color: var(--orange); }
.hm-event__link small { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-right: 6px; }
@media (prefers-reduced-motion: reduce) { .hm-day__kicker-dot { animation: none; } }
