/* ============================================================
   LEXIS Financial Intelligence — Design System v3
   Klein Blue #002FA7 · Fucsia Neon #FF00CC · dark / liquid glass
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #05060d;
  --surface:   #080a14;
  --surface-2: #0d1020;
  --surface-3: #121629;

  /* Brand */
  --klein:      #002FA7;   /* Blu Klein elettrico */
  --klein-lit:  #3D6BFF;   /* variante leggibile su fondo scuro */
  --klein-deep: #001C63;
  --fuchsia:    #FF00CC;   /* Fucsia neon */
  --fuchsia-lit:#FF57DC;

  /* Alias semantici */
  --accent:      var(--klein-lit);
  --accent-2:    var(--fuchsia);
  --accent-soft: rgba(61,107,255,.14);
  --accent-line: rgba(61,107,255,.34);
  --fuchsia-soft:rgba(255,0,204,.13);
  --grad:        linear-gradient(115deg, var(--klein-lit), var(--fuchsia));

  /* Text */
  --text:    #ffffff;
  --text-70: rgba(255,255,255,.70);
  --text-50: rgba(255,255,255,.50);
  --text-35: rgba(255,255,255,.35);

  /* Signals */
  --up:   #3ddc97;
  --down: #ff5d73;

  /* Lines */
  --line:     rgba(255,255,255,.10);
  --line-sub: rgba(255,255,255,.06);

  /* Metrics */
  --nav-h: 76px;
  --pad:   clamp(20px, 5vw, 48px);
  --ease:  cubic-bezier(.22,.61,.36,1);
  --t:     .3s var(--ease);

  /* Type */
  --f-sans:  'Inter', system-ui, sans-serif;
  --f-jak:   'Plus Jakarta Sans', 'Inter', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono:  ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  /* lo scroll ai link e' animato in main.js con easing e durata propri;
     smooth nativo resta come fallback senza JS */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 16px; line-height: 1.6;
  overflow-x: hidden;
  position: relative;              /* ancora il fondo all'intera altezza del documento */
  -webkit-font-smoothing: antialiased;
}

/* ===== FONDO CONTINUO =====
   Un solo livello per tutta la pagina, non uno per sezione: masse di colore
   larghe che si alternano fra Klein e fucsia e fra destra e sinistra, con raggi
   in percentuale sull'altezza del documento perche' si sovrappongano sempre.
   Nessun confine coincide con un bordo di sezione: il colore cambia scorrendo,
   non a scatti. */
body::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(64vw 8% at 10%  4%,  rgba(0,47,167,.56),  transparent 74%),
    radial-gradient(58vw 7% at 88%  12%, rgba(255,0,204,.26), transparent 74%),
    radial-gradient(66vw 8% at 84%  21%, rgba(0,47,167,.52),  transparent 74%),
    radial-gradient(60vw 7% at 12%  30%, rgba(255,0,204,.24), transparent 74%),
    radial-gradient(64vw 8% at 16%  39%, rgba(0,47,167,.50),  transparent 74%),
    radial-gradient(58vw 7% at 86%  48%, rgba(255,0,204,.27), transparent 74%),
    radial-gradient(66vw 8% at 82%  57%, rgba(0,47,167,.52),  transparent 74%),
    radial-gradient(60vw 7% at 14%  66%, rgba(255,0,204,.23), transparent 74%),
    radial-gradient(64vw 8% at 18%  75%, rgba(0,47,167,.48),  transparent 74%),
    radial-gradient(58vw 7% at 84%  84%, rgba(255,0,204,.26), transparent 74%),
    radial-gradient(68vw 9% at 50%  95%, rgba(0,47,167,.50),  transparent 74%);
}
img, svg, video { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--fuchsia); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1b2242; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--klein-lit); }
:focus-visible { outline: 2px solid var(--fuchsia); outline-offset: 3px; }

/* ===== FILO =====
   Una sola linea bianca che attraversa la pagina in diagonale: ogni spigolo
   cade al centro verticale di una sezione, quindi il percorso "indica" le
   sezioni una per una. Il tracciato e' calcolato in `main.js` sulle posizioni
   reali e rifatto a ogni cambio di dimensioni; qui restano solo tratto e
   posizionamento. Il filo salta la fascia del carosello. */
.thread {
  position: absolute; top: 0; left: 0; width: 100%;
  z-index: -1; pointer-events: none;
}
.thread path {
  fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1;
  stroke-linejoin: round; stroke-linecap: round;
}

/* ===== AMBIENTE IN MOVIMENTO =====
   Tre masse fisse al viewport che derivano lentamente sotto il fondo: danno
   respiro alla pagina senza costare un repaint dell'intero documento (sono
   grandi quanto lo schermo, non quanto il contenuto). */
.ambient { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden; }
.ambient i {
  position: absolute; border-radius: 50%;
  filter: blur(110px); will-change: transform;
  animation: ambient 34s ease-in-out infinite alternate;
}
.ambient i:nth-child(1) { width: 62vw; height: 46vw; left: -14%; top: -10%;  background: rgba(0,47,167,.55); }
.ambient i:nth-child(2) { width: 50vw; height: 38vw; right: -12%; top: 26%;  background: rgba(255,0,204,.22); animation-delay: -11s; animation-duration: 42s; }
.ambient i:nth-child(3) { width: 58vw; height: 42vw; left: 24%;  bottom: -22%; background: rgba(0,28,99,.6);  animation-delay: -21s; animation-duration: 38s; }
@keyframes ambient {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(6%, -5%, 0) scale(1.18); }
}

/* ===== BARRA DI AVANZAMENTO ===== */
.readbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; }
.readbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--klein-lit), var(--fuchsia));
  box-shadow: 0 0 12px -2px rgba(255,0,204,.8);
}

/* ===== GRAIN OVERLAY =====
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }
.container--narrow { max-width: 880px; }
/* nessun bordo fra le sezioni: la continuita' del fondo e il filo diagonale
   fanno da legame, una riga di separazione le rimetterebbe a scatti */
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }


/* ===== AURORA ===== */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 46vw; height: 32vw; left: -8%;  top: -12%; background: var(--klein); }
.aurora i:nth-child(2) { width: 38vw; height: 26vw; right: -6%; top: 18%;  background: var(--fuchsia); opacity: .26; animation-delay: -7s; }
.aurora i:nth-child(3) { width: 42vw; height: 28vw; left: 30%;  bottom: -18%; background: var(--klein-deep); animation-delay: -13s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4%, 5%, 0) scale(1.15); }
}

/* ===== LIQUID GLASS ===== */
.glass {
  position: relative;
  background: rgba(255,255,255,.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.1);
  border-radius: 18px; isolation: isolate;
}
.glass::before {
  content: ''; position: absolute; inset: 0;
  padding: 1.4px; border-radius: inherit;
  background: rgba(255,255,255,.42);   /* bordo bianco uniforme su tutto il perimetro */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.glass--solid { background: rgba(255,255,255,.022); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
/* bordo che si accende in blu→fucsia all'hover */
.glass--hot::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  padding: 1.4px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity var(--t); pointer-events: none;
}
.glass--hot:hover::after { opacity: 1; }

/* ===== TYPO ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-jak); font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--fuchsia);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--fuchsia); box-shadow: 0 0 0 0 rgba(255,0,204,.55);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(255,0,204,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(255,0,204,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,204,0); }
}
.eyebrow--plain::before { display: none; }

.h-display {
  font-weight: 800; text-transform: uppercase;
  letter-spacing: -.03em; line-height: 1.02;
  font-size: clamp(34px, 5.4vw, 68px);
}
.dot {
  color: var(--fuchsia);
  text-shadow: 0 0 18px rgba(255,0,204,.85), 0 0 46px rgba(255,0,204,.45);
  animation: dotpulse 2.6s ease-in-out infinite;
}
@keyframes dotpulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; }
/* parola in evidenza con sweep del gradiente */
.grad {
  background: linear-gradient(100deg, var(--klein-lit), var(--fuchsia) 45%, var(--klein-lit) 90%);
  background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { background-position: 240% 0; } }

.lead { font-size: 14px; color: var(--text-70); max-width: 512px; line-height: 1.75; }

.section__head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 80px); position: relative; z-index: 2; }
.section__head .eyebrow { margin-bottom: 22px; }
.section__title { font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: 1.06; font-size: clamp(28px, 3.9vw, 48px); }
.section__lead { margin-top: 22px; font-size: 14px; color: var(--text-70); max-width: 560px; line-height: 1.75; }

.label { font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--text-35); }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

.disclaimer {
  margin-top: 52px; padding: 20px 24px;
  border-left: 1px solid var(--accent-line);
  background: rgba(61,107,255,.05);
  font-size: 12.5px; line-height: 1.75; color: var(--text-50);
  max-width: 92ch; position: relative; z-index: 2;
}
.link { color: var(--accent); transition: color var(--t); }
.link:hover { color: var(--fuchsia); }

/* ===== BUTTONS ===== */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--f-jak); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid transparent; transition: all var(--t); white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; transition: transform var(--t); }
.btn--primary {
  background: linear-gradient(115deg, var(--klein) 0%, #1B4BD8 55%, var(--fuchsia) 180%);
  color: #fff;
  box-shadow: 0 6px 26px -10px rgba(0,47,167,.9), inset 0 1px 0 rgba(255,255,255,.25);
}
/* riempimento fucsia che entra da sinistra */
.btn--primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, var(--fuchsia), var(--klein-lit));
  transform: translateX(-101%); transition: transform .45s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(255,0,204,.65); }
.btn--primary:hover::before { transform: translateX(0); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--primary > * { position: relative; z-index: 1; }

.btn--glass { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--glass:hover { border-color: var(--fuchsia); color: var(--fuchsia); box-shadow: 0 0 26px -8px rgba(255,0,204,.6); }
.btn--ghost { color: var(--text-70); }
.btn--ghost:hover { color: var(--fuchsia); }
.btn--sm { padding: 10px 18px; font-size: 11px; }
.btn--full { width: 100%; }

/* ===== LOGO =====
   Marchio 2026 (WebP con alpha, sorgente in brand/). Proporzioni 1411×2522:
   molto più alto che largo, quindi si dimensiona sull'altezza e la larghezza
   segue. Più snello del marchio precedente: l'altezza sale per compensare. */
.logomark {
  height: 38px; width: auto; flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,47,167,.55));
}

/* mark grande nella hero */
.herologo {
  position: relative;
  flex-shrink: 0;          /* la colonna è flex: senza questo il marchio viene compresso */
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(0,47,167,.9)) drop-shadow(0 0 90px rgba(255,0,204,.28));
}
.herologo__img {
  height: clamp(320px, 48vh, 520px); width: auto;
  /* il marchio si scopre dal basso verso l'alto */
  animation: logoReveal 1.5s var(--ease) .2s both;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes logoReveal {
  from { clip-path: inset(100% 0 0 0); opacity: 0; }
  to   { clip-path: inset(0 0 0 0);    opacity: 1; }
}

/* riflesso metallico che attraversa il marchio, mascherato sul logo stesso */
.herologo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%);
  background-size: 260% 100%;
  -webkit-mask-image: url('../img/lexis-logo.webp');
  mask-image: url('../img/lexis-logo.webp');
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  mix-blend-mode: overlay;
  animation: logoShine 6.5s ease-in-out 1.6s infinite;
}
@keyframes logoShine {
  0%, 55%   { background-position: 200% 0; }
  85%, 100% { background-position: -60% 0; }
}

/* alone pulsante dietro al tridente */
.herologo::before {
  content: ''; position: absolute; z-index: -1;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 300%; height: 88%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,47,167,.78), rgba(255,0,204,.18) 44%, transparent 70%);
  filter: blur(34px);
  animation: halo 6s ease-in-out infinite;
}
@keyframes halo { 0%,100% { opacity: .75; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  z-index: 100; display: flex; align-items: center;
  transition: background var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(5,6,13,.74);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line-sub);
}
.nav__inner { display: flex; align-items: center; gap: 32px; position: relative; z-index: 1; }


.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo__word { font-size: 17px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.nav__links { display: flex; gap: 34px; margin-left: auto; }
.nav__links a { position: relative; font-size: 16px; letter-spacing: .09em; color: var(--text-70); transition: color var(--t); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -7px; height: 1.5px; width: 0;
  background: var(--grad); transition: width var(--t);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

/* ===== SELETTORE LINGUA ===== */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 5px 4px; border-radius: 999px;
  border: 1px solid var(--line-sub); background: rgba(255,255,255,.03);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.langbtn {
  font-family: var(--f-jak); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; color: var(--text-35);
  padding: 5px 10px; border-radius: 999px;
  transition: color var(--t), background var(--t);
}
.langbtn:hover { color: var(--text); }
.langbtn.is-on { color: #fff; background: rgba(255,255,255,.10); }
.lang__sep { width: 1px; height: 13px; background: var(--line-sub); }
.mobilemenu__foot .lang { align-self: flex-start; margin-top: 4px; }
.nav__burger { display: none; width: 40px; height: 40px; place-items: center; color: var(--text); z-index: 120; }
.nav__burger svg { width: 22px; height: 22px; }
.nav__burger .icon-x { display: none; }
.nav__burger.is-open .icon-x { display: block; }
.nav__burger.is-open .icon-menu { display: none; }

.mobilemenu {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(5,6,13,.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad); opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.mobilemenu.is-open { opacity: 1; pointer-events: auto; }
.mobilemenu a {
  font-size: clamp(28px, 9vw, 46px); font-weight: 800;
  text-transform: uppercase; letter-spacing: -.03em;
  padding: 12px 0; transition: color var(--t);
}
.mobilemenu a:hover { color: var(--fuchsia); }
.mobilemenu__foot { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
}
@media (max-width: 520px) { .nav__actions .btn--primary { display: none; } }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--nav-h) + 48px); padding-bottom: 64px;
  overflow: hidden; isolation: isolate;
}
.hero__video { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, #05060d 0%, rgba(5,6,13,.88) 34%, rgba(5,6,13,.25) 78%),
    linear-gradient(0deg,  #05060d 0%, rgba(5,6,13,.6) 26%, rgba(5,6,13,0) 62%);
}
.hero__glow { position: absolute; z-index: -1; pointer-events: none; top: -14%; left: 50%; transform: translateX(-50%); width: min(1500px,165vw); height: 620px; opacity: .9; }
.hero .aurora { z-index: -2; }

.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.06fr .94fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__copy { min-width: 0; }
.hero__side { min-width: 0; display: flex; flex-direction: column; align-items: center; }

.hero__eyebrow { margin-bottom: 22px; }
.hero__title { max-width: 15ch; }
/* l'inglese e' piu' lungo dell'italiano a parita' di senso: le misure di riga
   dei titoli si allargano, altrimenti le interruzioni scelte a mano saltano */
:lang(en) .hero__title { max-width: 19ch; }
:lang(en) .cta__title { max-width: 22ch; }
:lang(en) .section__lead, :lang(en) .lead { max-width: 600px; }
.hero__lead { margin-top: 24px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__note { margin-top: 20px; font-family: var(--f-jak); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-35); }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px,5vw,56px); margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line-sub); max-width: 620px; }
.hstat__num { display: block; font-size: clamp(24px,3.2vw,34px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hstat__lbl { display: block; margin-top: 7px; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-35); }

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__side { order: -1; align-items: center; justify-content: center; }
  .herologo { margin: 0; }
  .herologo__img { height: clamp(220px, 30vh, 300px); }
}
@media (max-width: 520px) {
  .herologo__img { height: 230px; }
}

/* ===== MARQUEE ===== */
.marquee {
  border-block: 1px solid var(--line-sub); background: rgba(255,255,255,.012);
  overflow: hidden; padding: 13px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
/* il nastro non si ferma mai: bastava passarci sopra col mouse per bloccarlo,
   e a quel punto sembrava statico */
.marquee__track { display: flex; gap: 46px; width: max-content; animation: scrollx 58s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-jak); font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--text-50); white-space: nowrap; }
.marquee__item::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--fuchsia); }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ===== PARTNERS ===== */
.partners { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; position: relative; z-index: 2; }
@media (max-width: 860px) { .partners { grid-template-columns: 1fr; } }
.partner { padding: 30px 28px; }
/* La lastra e' accesa DA DIETRO: la luce sta fuori dal rettangolo, il fondo
   della card resta scuro. Ombre esterne, non un riempimento: il browser non
   dipinge un'outer shadow sotto il border-box, quindi il colore non entra. */
.partner {
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.1),
    0 34px 112px -28px rgba(0,47,167,1),
    0 0 76px -14px rgba(0,47,167,.88),
    0 0 118px -26px rgba(255,0,204,.62);
  transition: transform var(--t), box-shadow var(--t);
}
.partner:hover { transform: translateY(-4px); }
.partner:hover {
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.1),
    0 38px 124px -24px rgba(0,47,167,1),
    0 0 84px -10px rgba(0,47,167,.95),
    0 0 128px -20px rgba(255,0,204,.78);
}
.partner .label { display: block; margin-bottom: 14px; color: var(--accent); }
.partner h3 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; }
.partner p { margin-top: 12px; font-size: 13px; color: var(--text-70); line-height: 1.7; }

/* ===== FEATURES =====
   Tessere minimal: icona grande + nome. La descrizione vive in un pannello che
   si apre al passaggio del mouse (e al focus da tastiera). Dieci tessere su
   cinque colonne: due righe piene. */
.features { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; position: relative; z-index: 2; }
.feature {
  padding: 30px 20px 26px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  cursor: default; outline: none;
  /* accesa da dietro: la luce sta fuori dal rettangolo, il fondo resta scuro */
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.1),
    0 26px 80px -34px rgba(0,47,167,1),
    0 0 58px -20px rgba(0,47,167,.7),
    0 0 92px -32px rgba(255,0,204,.42);
  transition: transform var(--t), box-shadow var(--t);
}
.feature:hover, .feature:focus-visible {
  transform: translateY(-5px); z-index: 5;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.1),
    0 30px 92px -28px rgba(0,47,167,1),
    0 0 68px -14px rgba(0,47,167,.9),
    0 0 104px -24px rgba(255,0,204,.62);
}
.feature__ico {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(0,47,167,.62), rgba(255,0,204,.2));
  color: #fff; margin-bottom: 18px; flex-shrink: 0;
  transition: box-shadow var(--t), transform var(--t);
}
.feature:hover .feature__ico, .feature:focus-visible .feature__ico {
  box-shadow: 0 0 28px -4px rgba(255,0,204,.7); transform: scale(1.05);
}
.feature__ico svg { width: 28px; height: 28px; }
.feature h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; }

/* il pannello di descrizione */
.feature__tip {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 6;
  width: max(100%, 384px); transform: translate(-50%, 6px);
  padding: 24px 26px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: 0 26px 60px -24px #000, 0 0 44px -26px rgba(0,47,167,.9);
  font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.88); text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
}
.feature__tip::before {
  content: ''; position: absolute; top: -5px; left: 50%; margin-left: -5px;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--surface-2); border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.feature:hover .feature__tip, .feature:focus-visible .feature__tip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

/* seconda riga: il pannello si apre verso l'alto, non fuori dalla sezione */
.feature:nth-child(n+6) .feature__tip { top: auto; bottom: calc(100% + 12px); transform: translate(-50%, -6px); }
.feature:nth-child(n+6) .feature__tip::before { top: auto; bottom: -5px; border: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature:nth-child(n+6):hover .feature__tip,
.feature:nth-child(n+6):focus-visible .feature__tip { transform: translate(-50%, 0); }

/* colonne estreme: il pannello e' piu' largo della tessera, quindi si ancora al
   bordo invece di centrarsi, o uscirebbe dal contenitore */
.feature:nth-child(5n+1) .feature__tip { left: 0; transform: translate(0, 6px); }
.feature:nth-child(5n+1) .feature__tip::before { left: 46px; }
.feature:nth-child(5n) .feature__tip { left: auto; right: 0; transform: translate(0, 6px); }
.feature:nth-child(5n) .feature__tip::before { left: auto; right: 42px; margin-left: 0; }
.feature:nth-child(5n+1):nth-child(n+6) .feature__tip,
.feature:nth-child(5n):nth-child(n+6) .feature__tip { transform: translate(0, -6px); }
.feature:nth-child(5n+1):hover .feature__tip, .feature:nth-child(5n+1):focus-visible .feature__tip,
.feature:nth-child(5n):hover .feature__tip,   .feature:nth-child(5n):focus-visible .feature__tip { transform: translate(0, 0); }

@media (max-width: 900px) { .features { grid-template-columns: repeat(2,1fr); } }

/* touch: senza hover la descrizione deve restare leggibile, quindi torna in linea */
@media (hover: none) {
  .feature { text-align: left; align-items: flex-start; padding: 28px 24px; }
  .feature__tip {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    margin-top: 12px; padding: 0; background: none; border: none; box-shadow: none;
    font-size: 15px; line-height: 1.65; color: var(--text-70);
  }
  .feature__tip::before { display: none; }
}

/* ===== AI CARDS ===== */
.aicards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; position: relative; z-index: 2; }
@media (max-width: 940px) { .aicards { grid-template-columns: 1fr; } }
.aicard { padding: 32px 28px; display: flex; flex-direction: column; transition: transform var(--t); }
.aicard:hover { transform: translateY(-6px); }
.aicard__name { font-size: 26px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.aicard__role { display: block; margin-top: 8px; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-35); }
.aicard h3 { margin-top: 22px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.aicard p { margin-top: 14px; font-size: 13px; color: var(--text-70); line-height: 1.75; }
.aicard__pill { margin-top: auto; padding-top: 24px; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fuchsia); }

/* ===== SPLIT ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,90px); align-items: center; position: relative; z-index: 2; }
.split__copy, .split__visual { min-width: 0; }
.split--rev .split__copy { order: 2; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } .split--rev .split__copy { order: 0; } }

.checklist { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.checklist li { padding-left: 28px; position: relative; font-size: 13px; color: var(--text-70); line-height: 1.7; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 6px; width: 12px; height: 12px;
  border-radius: 4px; background: var(--grad); box-shadow: 0 0 12px -2px rgba(255,0,204,.6);
}
.checklist b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em; margin-bottom: 5px; }

/* ===== PANEL ===== */
/* acceso da dietro come le card partner: luce fuori, fondo del pannello scuro */
.panel {
  overflow: hidden;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.1),
    0 34px 112px -28px rgba(0,47,167,1),
    0 0 76px -14px rgba(0,47,167,.88),
    0 0 118px -26px rgba(255,0,204,.62);
}
.panel__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-sub); }
.badge { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-jak); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.badge i { width: 5px; height: 5px; border-radius: 50%; animation: blink 1.7s infinite; }
.badge--live { color: var(--fuchsia); background: var(--fuchsia-soft); }
.badge--live i { background: var(--fuchsia); }
.badge--accent { color: var(--accent); background: var(--accent-soft); }
.badge--accent i { background: var(--accent); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ----- profilo di payoff -----
   Ricostruzione del pannello originale: la curva dell'iron condor, i due strike
   corti tratteggiati, lo spot al centro. Colori del sistema: la linea corre da
   Klein a fucsia, la campitura svanisce verso il basso. */
.payoff { position: relative; padding: 20px 20px 14px; }
.payoff svg { width: 100%; height: 230px; display: block; overflow: visible; }
.pf__grid line { stroke: rgba(255,255,255,.05); stroke-width: 1; }
.pf__base { stroke: rgba(255,255,255,.14); stroke-width: 1; }
.pf__strike { stroke: rgba(255,255,255,.22); stroke-width: 1; stroke-dasharray: 4 6; }
.pf__spot { stroke: rgba(255,255,255,.10); stroke-width: 1; }
.pf__line {
  stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(61,107,255,.55));
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
}
.is-visible .pf__line { animation: pfDraw 1.6s var(--ease) .2s forwards; }
@keyframes pfDraw { to { stroke-dashoffset: 0; } }
.pf__area { opacity: 0; }
.is-visible .pf__area { animation: pfFade .9s var(--ease) 1.1s forwards; }
@keyframes pfFade { to { opacity: 1; } }
.pf__dot { fill: var(--fuchsia); filter: drop-shadow(0 0 9px rgba(255,0,204,.95)); }

.payoff__tags { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.ptag {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .02em;
  padding: 5px 10px; border-radius: 7px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-sub); color: var(--text-50);
}
.ptag--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ----- fascia di celle sotto il grafico ----- */
.strip { display: grid; grid-template-columns: repeat(8,1fr); gap: 3px; padding: 0 20px 20px; }
.strip i {
  height: 26px; border-radius: 3px;
  background: color-mix(in srgb, var(--klein-lit) calc(var(--a,.1) * 100%), transparent);
}
.strip i.is-hot { background: color-mix(in srgb, var(--fuchsia) calc(var(--a,.1) * 100%), transparent); }

.panel__id { font-family: var(--f-mono); font-size: 12px; color: var(--text-70); }
.panel__pnl { font-family: var(--f-mono); font-size: 12px; font-weight: 600; }

.panel__foot { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line-sub); }
.panel__foot div { padding: 16px 10px; text-align: center; border-right: 1px solid var(--line-sub); }
.panel__foot div:last-child { border-right: none; }
.panel__foot span { display: block; margin-bottom: 6px; }
.panel__foot b { font-size: 14px; font-weight: 700; color: var(--accent); }

/* ===== CODE ===== */
.code { min-width: 0; overflow: hidden; }
.code__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-sub); }
.code__dots { display: flex; gap: 6px; }
.code__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.12); }
.code__body { padding: 22px; overflow-x: auto; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.8; color: var(--text-70); }
.c-k { color: #ff6ad9; } .c-t { color: #7ea2ff; } .c-f { color: #9d8bff; }
.c-s { color: #6fd4c4; } .c-n { color: #ffb36b; } .c-c { color: var(--text-35); font-style: italic; }
.code__foot { display: flex; flex-wrap: wrap; gap: 20px; padding: 15px 18px; border-top: 1px solid var(--line-sub); }

/* ===== NEWS ===== */
.newsfeed { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; position: relative; z-index: 2; }
@media (max-width: 940px) { .newsfeed { grid-template-columns: 1fr; } }
.news { padding: 24px; transition: transform var(--t); }
.news:hover { transform: translateY(-5px); }
.news__meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.news p { font-size: 13.5px; line-height: 1.65; }
.news footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-sub); font-size: 11.5px; color: var(--text-35); }
.news footer b { color: var(--accent); font-weight: 600; }
.news__notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 36px; position: relative; z-index: 2; }
@media (max-width: 940px) { .news__notes { grid-template-columns: 1fr; gap: 18px; } }
.news__notes p { font-size: 13px; color: var(--text-70); line-height: 1.7; }
.news__notes b { color: var(--text); font-weight: 600; }

/* ===== KPI + TABLE ===== */
.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; position: relative; z-index: 2; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2,1fr); } }
.kpi { padding: 26px 22px; text-align: center; transition: transform var(--t); }
.kpi:hover { transform: translateY(-4px); }
.kpi__val { display: block; font-size: clamp(22px,3vw,30px); font-weight: 800; letter-spacing: -.03em; }
.kpi__lbl { display: block; margin-top: 8px; }

.table-wrap { overflow-x: auto; border-radius: 18px; position: relative; z-index: 2; }
.table { width: 100%; border-collapse: collapse; min-width: 820px; }
.table th { text-align: left; padding: 16px 20px; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-35); border-bottom: 1px solid var(--line-sub); }
.table td { padding: 18px 20px; font-size: 13px; color: var(--text-70); border-bottom: 1px solid var(--line-sub); vertical-align: top; line-height: 1.65; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover { background: rgba(61,107,255,.07); }

.tag { display: inline-block; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-70); white-space: nowrap; }
.tag--good { background: var(--accent-soft); color: var(--accent); }
.tag--bad  { background: var(--fuchsia-soft); color: var(--fuchsia); }

/* ===== PROGRESS ===== */
.progress { height: 3px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.progress--lg { height: 6px; }
.progress__bar { height: 100%; width: 0; background: var(--grad); border-radius: 3px; box-shadow: 0 0 14px -2px rgba(255,0,204,.7); transition: width 1.5s var(--ease); }
.is-visible .progress__bar, .modal__box .progress__bar { width: var(--w); }

/* ===== COURSES ===== */
.courses { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; position: relative; z-index: 2; }
@media (max-width: 940px) { .courses { grid-template-columns: 1fr; } }
.course { padding: 32px 28px; transition: transform var(--t); }
.course:hover { transform: translateY(-6px); }
.course__lvl { color: var(--fuchsia); }
.course h3 { margin: 14px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.025em; text-transform: uppercase; }
.course > p { font-size: 13px; color: var(--text-70); line-height: 1.7; }
.course__prog { margin: 24px 0 20px; }
.course__progtop { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 11.5px; color: var(--text-35); }
.course__list { display: flex; flex-direction: column; gap: 10px; }
.course__list li { font-size: 12.5px; color: var(--text-70); padding-left: 18px; position: relative; }
.course__list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ===== PLANS ===== */
.plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items: start; position: relative; z-index: 2; }
@media (max-width: 940px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }
.plan { padding: 36px 30px; display: flex; flex-direction: column; transition: transform var(--t); }
.plan:hover { transform: translateY(-6px); }
.plan--featured { background: linear-gradient(180deg, rgba(0,47,167,.28), rgba(255,0,204,.05) 70%); }
.plan--featured::before { background: linear-gradient(180deg, var(--fuchsia), rgba(61,107,255,.15)); }
.plan__badge { align-self: flex-start; margin-bottom: 16px; font-family: var(--f-jak); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; background: var(--grad); color: #fff; padding: 5px 12px; border-radius: 999px; }
.plan__name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; }
.plan__price { margin: 20px 0 6px; }
.plan__hidden { display: inline-block; font-size: 44px; font-weight: 800; letter-spacing: -.04em; color: var(--fuchsia); filter: blur(7px); opacity: .75; user-select: none; transition: filter .6s var(--ease); }
.plan:hover .plan__hidden { filter: blur(4px); }
.plan__note { font-family: var(--f-jak); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-35); }
.plan__list { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 32px; flex: 1; }
.plan__list li { font-size: 13px; color: var(--text-70); padding-left: 24px; position: relative; }
.plan__list li::before { content: '✓'; position: absolute; left: 0; top: -1px; color: var(--fuchsia); font-size: 12px; }
.plan__list b { color: var(--text); font-weight: 600; }

/* ===== TEAM ===== */
.team { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; position: relative; z-index: 2; }
@media (max-width: 800px) { .team { grid-template-columns: 1fr; } }
.member { padding: 36px 32px; }
.member__avatar { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .08em; margin-bottom: 22px; box-shadow: 0 8px 26px -10px rgba(255,0,204,.65); }
.member h3 { font-size: 21px; font-weight: 800; letter-spacing: -.025em; text-transform: uppercase; }
.member__role { display: block; margin: 7px 0 18px; color: var(--accent); }
.member p { font-size: 13.5px; color: var(--text-70); line-height: 1.75; margin-bottom: 20px; }

/* la citazione torna in Inter: Instrument Serif regge una parola dentro un
   titolo, non un paragrafo intero */
.team__quote { margin-top: 36px; padding: 40px; font-family: var(--f-sans); font-weight: 500; font-size: clamp(18px,2.3vw,25px); line-height: 1.55; letter-spacing: -.02em; color: var(--text-70); position: relative; z-index: 2; }

/* ===== ACCORDION ===== */
.accordion { border-top: 1px solid var(--line-sub); position: relative; z-index: 2; }
.acc { border-bottom: 1px solid var(--line-sub); }
.acc summary { list-style: none; cursor: pointer; position: relative; padding: 26px 48px 26px 0; font-size: clamp(15px,1.9vw,18px); font-weight: 600; letter-spacing: -.015em; transition: color var(--t); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover, .acc[open] summary { color: var(--fuchsia); }
.acc summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px; margin-top: -7px; border-right: 1.5px solid var(--fuchsia); border-bottom: 1.5px solid var(--fuchsia); transform: rotate(45deg); transition: transform var(--t); }
.acc[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.acc p { padding: 0 48px 28px 0; font-size: 14px; color: var(--text-70); line-height: 1.75; animation: fadeup .35s var(--ease); }

/* ===== CTA ===== */
.cta { position: relative; padding: clamp(90px,12vw,170px) 0; text-align: center; overflow: hidden; isolation: isolate; }
.cta__glow { position: absolute; z-index: -1; bottom: -50%; left: 50%; transform: translateX(-50%); width: min(1400px,160vw); height: 700px; opacity: .85; pointer-events: none; }
.cta__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.cta__title { max-width: 18ch; margin-top: 22px; }
.cta__lead { margin: 24px auto 0; text-align: center; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.cta__ps { margin-top: 30px; font-family: var(--f-serif); font-style: italic; font-size: 15px; color: var(--text-50); max-width: 60ch; }
.cta__partners { margin-top: 16px; }

.beta-meter { margin: 38px auto 0; width: 100%; max-width: 440px; text-align: left; }
.beta-meter__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 11px; }
.beta-meter__top b { color: var(--fuchsia); font-size: 15px; font-weight: 800; }

/* ===== FOOTER ===== */
.footer { background: var(--surface); border-top: 1px solid var(--line-sub); padding: clamp(56px,7vw,88px) 0 36px; }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 44px; padding-bottom: 48px; border-bottom: 1px solid var(--line-sub); }
@media (max-width: 940px) { .footer__top { grid-template-columns: 1fr 1fr; gap: 34px; } }
@media (max-width: 580px) { .footer__top { grid-template-columns: 1fr; } }
.footer__brand p { font-size: 13px; color: var(--text-70); margin: 18px 0 14px; max-width: 38ch; line-height: 1.7; }
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.footer__social a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-sub); border-radius: 10px; color: var(--text-35); transition: all var(--t); }
.footer__social a:hover { color: #fff; border-color: transparent; background: var(--grad); }
.footer__col h4 { margin-bottom: 18px; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.footer__col a { display: block; font-size: 13px; color: var(--text-70); padding: 6px 0; transition: color var(--t); }
.footer__col a:hover { color: var(--fuchsia); }
.footer__addr { font-size: 12.5px; color: var(--text-35); line-height: 1.9; }
.footer__bottom { padding-top: 28px; }
.footer__bottom p { font-size: 11.5px; line-height: 1.8; color: var(--text-35); max-width: 105ch; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3,4,9,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadein .3s ease; }
.modal__box { position: relative; width: 100%; max-width: 540px; max-height: min(88vh, 780px); overflow-y: auto; overflow-x: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 22px; padding: clamp(28px,4vw,44px); box-shadow: 0 40px 100px -30px #000, 0 0 60px -30px rgba(0,47,167,.9); animation: modalin .4s var(--ease); }
.modal__box[hidden] { display: none; }
@keyframes modalin { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }
.modal__x { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--text-35); transition: all var(--t); }
.modal__x:hover { color: var(--fuchsia); background: var(--fuchsia-soft); }
.modal__x svg { width: 18px; height: 18px; }
.modal__title { margin-top: 18px; font-size: clamp(22px,3vw,30px); font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; line-height: 1.08; }
.modal__lead { margin-top: 16px; font-size: 13.5px; color: var(--text-70); line-height: 1.7; }
.modal__box .beta-meter { margin: 26px 0 0; max-width: none; }

/* ===== FORM ===== */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* senza min-width:0 la larghezza minima dell'input sfonda la colonna e taglia la modale */
.form__row > * { min-width: 0; }
@media (max-width: 460px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-35); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"] {
  background: rgba(255,255,255,.03); border: 1px solid var(--line-sub); border-radius: 12px;
  padding: 13px 15px; font-family: var(--f-sans); font-size: 15px;
  letter-spacing: 0; text-transform: none; color: var(--text);
  width: 100%; min-width: 0;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.form input:focus { outline: none; border-color: var(--fuchsia); background: rgba(255,0,204,.05); box-shadow: 0 0 0 3px rgba(255,0,204,.12); }
.form input.is-invalid { border-color: var(--down); }
.check { flex-direction: row !important; align-items: flex-start; gap: 12px !important; text-transform: none !important; letter-spacing: 0 !important; font-family: var(--f-sans) !important; font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.6; color: var(--text-70) !important; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--fuchsia); flex-shrink: 0; cursor: pointer; }
.check b { color: var(--text); font-weight: 600; }
.check.is-invalid span { color: var(--down); }

.form__ok { text-align: center; padding: 22px 0 4px; animation: fadeup .5s var(--ease); }
.form__okmark { width: 58px; height: 58px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(255,0,204,.8); }
.form__okmark svg { width: 26px; height: 26px; }
.form__ok h4 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; margin-bottom: 14px; }
.form__ok p { font-size: 13.5px; color: var(--text-70); line-height: 1.7; }
.form__ok b { color: var(--fuchsia); font-weight: 600; }

/* ============================================================
   PAGINE INTERNE
   ============================================================ */
.page { padding-top: calc(var(--nav-h) + clamp(48px,7vw,84px)); padding-bottom: clamp(64px,8vw,120px); position: relative; }
.page__head { max-width: 820px; margin-bottom: clamp(38px,5vw,60px); }
.page__title { margin-top: 20px; font-size: clamp(28px,4.2vw,46px); font-weight: 800; letter-spacing: -.035em; text-transform: uppercase; line-height: 1.06; }
.page__meta { margin-top: 20px; font-family: var(--f-jak); font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--text-35); line-height: 1.8; }

.notice { padding: 26px 28px; margin-bottom: 46px; }
.notice h3 { font-size: 15px; font-weight: 700; color: var(--fuchsia); margin-bottom: 12px; letter-spacing: -.01em; }
.notice p { font-size: 13.5px; color: var(--text-70); line-height: 1.75; }

.legal { max-width: 78ch; }
.legal-note {
  max-width: 78ch; margin-bottom: 30px; padding: 14px 18px;
  border-left: 1px solid var(--accent-line); background: rgba(61,107,255,.05);
  font-size: 12.5px; line-height: 1.7; color: var(--text-50);
}
.legal h2 { margin: 46px 0 16px; padding-top: 24px; border-top: 1px solid var(--line-sub); font-size: clamp(17px,2.1vw,21px); font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; }
.legal h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.legal h3 { margin: 26px 0 10px; font-size: 15px; font-weight: 600; color: var(--accent); }
.legal p { font-size: 14px; color: var(--text-70); margin-bottom: 15px; line-height: 1.8; }
.legal ul { margin: 0 0 18px; display: flex; flex-direction: column; gap: 10px; }
.legal ul li { font-size: 13.5px; color: var(--text-70); padding-left: 22px; position: relative; line-height: 1.75; }
.legal ul li::before { content: ''; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); }
.legal b, .legal strong { color: var(--text); font-weight: 600; }

.backlink { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 34px; font-family: var(--f-jak); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-35); transition: color var(--t); }
.backlink:hover { color: var(--fuchsia); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 18px; }
.contact-card { padding: 30px 28px; transition: transform var(--t); }
.contact-card:hover { transform: translateY(-4px); }
.contact-card .label { display: block; margin-bottom: 14px; color: var(--accent); }
.contact-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.contact-card p { font-size: 13px; color: var(--text-70); line-height: 1.9; }

/* ============================================================
   DOSSIER — la home come documento di valutazione.
   La numerazione (§01…§09) è l'indirizzo del documento, non
   decorazione: l'indice laterale la usa per la navigazione.
   ============================================================ */

/* ----- copertina: scheda del documento ----- */
.scheda { margin-top: 44px; padding-top: 8px; border-top: 1px solid var(--line-sub); max-width: 620px; }
.scheda__row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line-sub); }
.scheda__k { font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-35); flex-shrink: 0; }
.scheda__v { font-size: 13.5px; color: var(--text); text-align: right; line-height: 1.5; }
.scheda__v b { color: var(--accent); font-weight: 600; }

/* ----- riferimento di sezione: l'eyebrow che diventa indirizzo ----- */
.ref {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-jak); font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-35);
  margin-bottom: 20px;
}
.ref b { color: var(--fuchsia); font-weight: 700; }
.ref::after { content: ''; flex: 1; height: 1px; background: var(--line-sub); }

/* ----- impianto a due colonne: indice + corpo ----- */
.dossier { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.dossier__body { min-width: 0; }
.dossier__body > .dsection + .dsection { margin-top: clamp(72px, 9vw, 128px); }

.dsection { position: relative; scroll-margin-top: calc(var(--nav-h) + 32px); }
.dsection__lead { margin-top: 20px; font-size: 14px; color: var(--text-70); max-width: 62ch; line-height: 1.75; }
.dsection__title { font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: 1.08; font-size: clamp(26px, 3.3vw, 40px); }

/* ----- indice persistente ----- */
.dindex { position: sticky; top: calc(var(--nav-h) + 34px); }
.dindex__cap { display: block; margin-bottom: 16px; }
.dindex__list { border-left: 1px solid var(--line-sub); }
.dindex__list a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px;
  padding: 9px 0 9px 15px; margin-left: -1px;
  border-left: 1px solid transparent; transition: border-color var(--t), color var(--t);
}
.dindex__n { font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--text-35); transition: color var(--t); }
.dindex__q { font-size: 12.5px; line-height: 1.45; color: var(--text-50); transition: color var(--t); }
.dindex__list a:hover .dindex__q { color: var(--text); }
.dindex__list a.is-current { border-left-color: var(--fuchsia); }
.dindex__list a.is-current .dindex__n { color: var(--fuchsia); }
.dindex__list a.is-current .dindex__q { color: var(--text); }
.dindex__foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-sub); }
.dindex__foot .btn { width: 100%; }

@media (max-width: 1023px) {
  .dossier { grid-template-columns: 1fr; gap: 0; }
  .dindex {
    top: var(--nav-h); z-index: 40; margin: 0 calc(var(--pad) * -1) clamp(40px, 6vw, 64px);
    padding: 0 var(--pad); background: rgba(5,6,13,.9);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-sub);
  }
  .dindex__cap, .dindex__foot { display: none; }
  .dindex__list { display: flex; gap: 0; border-left: none; overflow-x: auto; scrollbar-width: none; }
  .dindex__list::-webkit-scrollbar { display: none; }
  .dindex__list a {
    grid-template-columns: auto; gap: 0; margin-left: 0; padding: 14px 16px 12px 0;
    border-left: none; border-bottom: 1.5px solid transparent; white-space: nowrap;
  }
  .dindex__q { display: none; }
  .dindex__n { font-size: 11px; }
  .dindex__list a.is-current { border-left-color: transparent; border-bottom-color: var(--fuchsia); }
}

/* ----- tabella di specifica (provenienza, integrazione) ----- */
.table--spec { min-width: 640px; }
.table--spec td:first-child { color: var(--text); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.table--spec td:nth-child(2) { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent); }

/* ----- fascia divisa: compliance, non card ----- */
.band { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.band > div { padding: 30px 26px 30px 0; border-right: 1px solid var(--line-sub); }
.band > div:last-child { border-right: none; }
.band > div:not(:first-child) { padding-left: 26px; }
.band h3 { font-size: 14px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.band p { font-size: 12.5px; line-height: 1.7; color: var(--text-70); }
.band .link { font-size: 12.5px; }
@media (max-width: 940px) {
  .band { grid-template-columns: repeat(2, 1fr); }
  .band > div:nth-child(2n) { border-right: none; }
  .band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-sub); }
}
@media (max-width: 560px) {
  .band { grid-template-columns: 1fr; }
  .band > div { border-right: none; padding-left: 0 !important; border-bottom: 1px solid var(--line-sub); }
  .band > div:last-child { border-bottom: none; }
}

/* ----- percorso di adozione ----- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); text-align: left; position: relative; z-index: 2; }
.step { padding-top: 20px; border-top: 1px solid var(--line); }
.step.is-now { border-top-color: var(--fuchsia); }
.step__n { display: block; font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-35); margin-bottom: 12px; }
.step.is-now .step__n { color: var(--fuchsia); }
.step h3 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 9px; }
.step p { font-size: 12.5px; line-height: 1.7; color: var(--text-70); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* ----- coppia di affermazioni dense (integrazione) ----- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-sub); border: 1px solid var(--line-sub); border-radius: 18px; overflow: hidden; margin-top: 34px; }
.pair > div { background: var(--bg); padding: 26px 24px; }
.pair h4 { font-family: var(--f-jak); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-35); margin-bottom: 16px; }
.pair li { font-size: 13px; color: var(--text-70); line-height: 1.7; padding-left: 20px; position: relative; }
.pair li + li { margin-top: 11px; }
.pair li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 1px; background: var(--accent); }
.pair > div:last-child li::before { background: var(--fuchsia); }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } }

/* ============================================================
   PAGINA DEMO
   ============================================================ */
.demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(36px, 5vw, 76px); align-items: start; }
.demo__aside { position: sticky; top: calc(var(--nav-h) + 34px); }
@media (max-width: 940px) {
  .demo { grid-template-columns: 1fr; }
  .demo__aside { position: static; order: -1; }
}

.form--page { margin-top: 0; gap: 18px; }
.form--page .form__row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 620px) { .form--page .form__row--3 { grid-template-columns: 1fr; } }
.form select, .form textarea {
  background: rgba(255,255,255,.03); border: 1px solid var(--line-sub); border-radius: 12px;
  padding: 13px 15px; font-family: var(--f-sans); font-size: 15px;
  letter-spacing: 0; text-transform: none; color: var(--text); width: 100%;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.form select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23FF00CC' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.form select option { background: var(--surface-2); color: var(--text); }
.form select:invalid { color: var(--text-35); }
.form textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.form select:focus, .form textarea:focus { outline: none; border-color: var(--fuchsia); background: rgba(255,0,204,.05); box-shadow: 0 0 0 3px rgba(255,0,204,.12); }
.form select.is-invalid, .form textarea.is-invalid { border-color: var(--down); }
.form__hint { font-family: var(--f-sans); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-35); line-height: 1.6; }

/* errore di invio: nomina il problema e il rimedio */
.form__err {
  display: flex; gap: 12px; padding: 16px 18px; border-left: 1px solid var(--down);
  background: rgba(255,93,115,.07); font-size: 12.5px; line-height: 1.65; color: var(--text-70);
  animation: fadeup .35s var(--ease);
}
.form__err b { display: block; color: var(--down); font-weight: 600; margin-bottom: 3px; }
.form__err svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--down); margin-top: 2px; }

/* stato di invio */
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn__spin { width: 15px; height: 15px; border-radius: 50%; border: 1.6px solid rgba(255,255,255,.28); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.aside__block + .aside__block { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line-sub); }
.aside__block h3 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 12px; }
.aside__block p { font-size: 13px; line-height: 1.75; color: var(--text-70); }
.aside__list li { font-size: 13px; color: var(--text-70); line-height: 1.7; padding-left: 22px; position: relative; }
.aside__list li + li { margin-top: 12px; }
.aside__list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); }

/* ============================================================
   STAMPA — il dossier viene girato internamente: deve reggere
   la carta e il PDF, non solo lo schermo.
   ============================================================ */
@media print {
  .grain, .aurora, .veil, .hero__video, .hero__scrim, .hero__glow,
  .cta__glow, .marquee, .nav, .mobilemenu, .dindex, .herologo::after,
  .footer__social, .btn { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  .glass, .glass--solid, .panel, .table-wrap { background: #fff !important; border: 1px solid #bbb !important; box-shadow: none !important; }
  .glass::before, .glass::after { display: none !important; }
  .dossier { display: block !important; }
  .section, .page, .hero { padding: 18pt 0 !important; min-height: 0 !important; }
  .dsection { break-inside: avoid; page-break-inside: avoid; }
  .dsection + .dsection { margin-top: 26pt !important; }
  h1, h2, h3, h4, .dsection__title, .section__title, .h-display { color: #000 !important; }
  p, li, td, .lead, .dsection__lead, .scheda__v { color: #222 !important; }
  .label, .ref, .scheda__k, th { color: #666 !important; }
  .dot, .ref b, .link, .band .link { color: #000 !important; text-shadow: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .link[href^="http"]::after, .link[href$=".html"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
}

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* varianti direzionali: le due colonne di una split entrano dai lati opposti */
.reveal--l { transform: translate3d(-34px, 10px, 0); }
.reveal--r { transform: translate3d( 34px, 10px, 0); }
.split--rev .reveal--l { transform: translate3d( 34px, 10px, 0); }
.split--rev .reveal--r { transform: translate3d(-34px, 10px, 0); }

/* i titoli si scoprono dal basso dentro il blocco che entra */
.reveal .section__title, .reveal .page__title, .reveal.cta__title {
  clip-path: inset(-40% -40% 100% -40%);
  transition: clip-path 1s var(--ease) .12s;
}
.reveal.is-visible .section__title, .reveal.is-visible .page__title, .reveal.is-visible.cta__title {
  clip-path: inset(-40% -40% -40% -40%);
}

/* card e tessere: leggero rimbalzo in ingresso */
.reveal .glass { transition: transform .7s var(--ease), box-shadow var(--t); }

/* voci del menu mobile: entrano a cascata */
.mobilemenu a { opacity: 0; transform: translateY(18px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.mobilemenu.is-open a { opacity: 1; transform: none; }
.mobilemenu.is-open a:nth-child(1) { transition-delay: .06s; }
.mobilemenu.is-open a:nth-child(2) { transition-delay: .10s; }
.mobilemenu.is-open a:nth-child(3) { transition-delay: .14s; }
.mobilemenu.is-open a:nth-child(4) { transition-delay: .18s; }
.mobilemenu.is-open a:nth-child(5) { transition-delay: .22s; }
.mobilemenu.is-open a:nth-child(6) { transition-delay: .26s; }
.mobilemenu.is-open a:nth-child(7) { transition-delay: .30s; }
.mobilemenu__foot { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease) .34s, transform .45s var(--ease) .34s; }
.mobilemenu.is-open .mobilemenu__foot { opacity: 1; transform: none; }


/* ============================================================
   MOVIMENTO CONTINUO
   Il fondo non e' piu' una lastra ferma: sopra il gradiente
   continuo (`body::before`) scorre un velo di due masse e una
   lama di luce diagonale. Tutto e' `transform`/`opacity`, quindi
   il browser compone e non ridipinge: nessun costo sullo scroll.
   ============================================================ */

.veil { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.veil i { position: absolute; border-radius: 50%; will-change: transform, opacity; }

.veil i:nth-child(1) {
  width: 58vw; height: 44vw; left: 4%; top: -12%;
  background: radial-gradient(circle, rgba(61,107,255,.22), transparent 68%);
  animation: veilA 34s ease-in-out infinite alternate;
}
.veil i:nth-child(2) {
  width: 48vw; height: 36vw; right: 0%; bottom: -14%;
  background: radial-gradient(circle, rgba(255,0,204,.15), transparent 68%);
  animation: veilB 43s ease-in-out infinite alternate;
}
@keyframes veilA {
  from { transform: translate3d(-9%,  5%, 0) scale(1);    opacity: .5; }
  to   { transform: translate3d(13%, -7%, 0) scale(1.24); opacity: 1;  }
}
@keyframes veilB {
  from { transform: translate3d(11%, -5%, 0) scale(1.18); opacity: 1;  }
  to   { transform: translate3d(-10%, 7%, 0) scale(1);    opacity: .45; }
}

/* la lama va e torna (`alternate`): un loop lineare rientrerebbe
   di scatto a fine ciclo e si vedrebbe il taglio */
.veil .sheen {
  width: 170%; height: 220%; left: -35%; top: -60%;
  border-radius: 0;
  background: linear-gradient(104deg,
    transparent 41%,
    rgba(61,107,255,.10) 47%,
    rgba(255,0,204,.07)  51%,
    transparent 57%);
  animation: sheen 30s ease-in-out infinite alternate;
}
@keyframes sheen {
  from { transform: translate3d(-40%, 0, 0); }
  to   { transform: translate3d( 40%, 0, 0); }
}

/* masse ambient: erano quasi ferme a 34-42s, ognuna ora ha
   una deriva propria cosi' non tornano mai in fase */
.ambient i:nth-child(1) { animation: ambientA 27s ease-in-out infinite alternate; }
.ambient i:nth-child(2) { animation: ambientB 33s ease-in-out infinite alternate -11s; }
.ambient i:nth-child(3) { animation: ambientC 30s ease-in-out infinite alternate -19s; }
@keyframes ambientA {
  from { transform: translate3d(-5%,  3%, 0) scale(1);    opacity: .75; }
  to   { transform: translate3d(11%, -9%, 0) scale(1.28); opacity: 1;   }
}
@keyframes ambientB {
  from { transform: translate3d( 7%, -5%, 0) scale(1.22); opacity: 1;   }
  to   { transform: translate3d(-9%,  8%, 0) scale(1);    opacity: .7;  }
}
@keyframes ambientC {
  from { transform: translate3d( 0,   7%, 0) scale(1.12); opacity: .8;  }
  to   { transform: translate3d(10%, -7%, 0) scale(1.32); opacity: 1;   }
}

/* ===== NAV: sezione corrente ===== */
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { width: 100%; box-shadow: 0 0 10px -1px rgba(255,0,204,.75); }

/* il marchio in barra respira piano */
.logomark { animation: markBreath 7s ease-in-out infinite; }
@keyframes markBreath {
  0%, 100% { transform: translateY(0)     scale(1);    filter: drop-shadow(0 0 0 transparent); }
  50%      { transform: translateY(-1.5px) scale(1.03); filter: drop-shadow(0 0 9px rgba(61,107,255,.55)); }
}

/* ===== ARRIVO SU UNA SEZIONE =====
   dopo lo scroll da nav la sezione si accende un istante:
   conferma che il salto e' finito li' */
.section.is-landed::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 46% at 50% 0%, rgba(61,107,255,.20), transparent 72%);
  animation: landed 1.15s var(--ease) forwards;
}
@keyframes landed { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }

/* ===== CARD: inclinazione sotto il puntatore =====
   scoped su `.is-visible` perche' prima dell'ingresso il
   transform appartiene a `.reveal`: sovrascriverlo qui
   annullerebbe l'animazione di entrata */
.partner.is-visible, .plan.is-visible {
  transform:
    perspective(1100px)
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
    translate3d(0, var(--ty, 0px), 0) scale(var(--sc, 1));
  transition: transform .4s var(--ease), box-shadow var(--t);
}
.partner.is-visible:hover, .plan.is-visible:hover {
  --ty: -6px; --sc: 1.012;
  transition-duration: .12s;
}

/* ===== BOTTONI: reazione magnetica ===== */
.btn { will-change: transform; }
.btn--primary { transition: transform .35s var(--ease), background var(--t), box-shadow var(--t), color var(--t); }
.btn--primary:hover { transition-duration: .1s; }

/* ===== HERO: parallasse allo scroll ===== */
.hero__copy, .hero__side { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal, .reveal--l, .reveal--r, .mobilemenu a, .mobilemenu__foot { opacity: 1; transform: none; }
  .reveal .section__title, .reveal .page__title, .reveal.cta__title { clip-path: none; }
  .ambient, .readbar, .veil { display: none; }
  .section.is-landed::after { display: none; }
  .logomark { animation: none; }
  .partner.is-visible, .plan.is-visible { transform: none; }
  .progress__bar { width: var(--w); }
  .hero__video { display: none; }
  /* niente animazioni sul marchio: resta visibile e fermo */
  .herologo, .herologo__img { animation: none; clip-path: none; opacity: 1; }
  .herologo::after { display: none; }
  .grain { display: none; }
}
