/* =========================================================
   Next Adv — Home (redesign da Claude Design)
   Palette e tipografia del brand: viola #422d70, verde #5cf9bc,
   rosa #f78598, lavanda #f5f3fa, Raleway.
   ========================================================= */

.home, .nxh-cases {
    --nx-purple: #422d70;
    --nx-purple-deep: #2c1d4d;
    --nx-green: #5cf9bc;
    --nx-pink: #f78598;
    --nx-lav: #f5f3fa;
    --nx-ink: #5a4d78;
    --nx-line: #ebe6f5;
}

.home #main { overflow-x: clip; }
.nxh-hero, .nxh-about, .nxh-services, .nxh-clients, .nxh-cases, .nxh-farm, .nxh-band {
    font-family: Raleway, system-ui, sans-serif;
    color: var(--nx-purple);
    -webkit-font-smoothing: antialiased;
}
.nxh-hero *, .nxh-about *, .nxh-services *, .nxh-clients *, .nxh-cases *, .nxh-farm * { box-sizing: border-box; }
.nxh-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.nxh-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: center; }

/* ---------- Tipografia ---------- */
.home .nxh-eyebrow, .nxh-cases .nxh-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 0 0 14px; max-width: 540px;
    font-size: 14px !important; line-height: 1.5 !important; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; color: var(--nx-pink) !important;
}
.home .nxh-eyebrow::before, .nxh-cases .nxh-eyebrow::before { content: ""; flex: none; width: 24px; height: 3px; border-radius: 3px; background: var(--nx-green); }
.nxh-h2 { margin: 0 0 18px; font-size: clamp(32px, 3.6vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.015em; color: inherit; }
.nxh-lead { margin: 0; font-size: 18px; line-height: 1.7; font-weight: 500; color: var(--nx-ink); }
.nxh-lead strong, .nxh-prose strong { color: var(--nx-purple); }
.nxh-prose { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.75; color: var(--nx-ink); }
.nxh-prose p { margin: 0; }
.nxh-prose a { font-weight: 800; color: var(--nx-purple); text-decoration: underline; text-decoration-color: var(--nx-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nxh-center { text-align: center; margin: 56px 0 0; }

/* ---------- Bottoni e link ---------- */
.nxh-btn {
    display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 30px;
    border-radius: 999px; background: var(--nx-green); color: var(--nx-purple-deep) !important;
    font-weight: 800; font-size: 16px; text-decoration: none;
    box-shadow: 0 12px 30px -12px rgba(92, 249, 188, .9);
    transition: transform .2s, box-shadow .2s;
}
.nxh-btn::after { content: "→"; }
.nxh-btn[target="_blank"]::after { content: "↗"; }
.nxh-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(92, 249, 188, 1); }
.nxh-btn-ghost {
    display: inline-flex; align-items: center; height: 54px; padding: 0 26px; border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .35); color: #fff !important; font-weight: 700; text-decoration: none;
    transition: border-color .2s;
}
.nxh-btn-ghost:hover { border-color: #fff; }
.nxh-link { font-weight: 800; color: var(--nx-purple) !important; text-decoration: none; border-bottom: 2px solid var(--nx-green); padding-bottom: 3px; }
.nxh-link::after { content: " →"; }
.nxh-actions { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; }
.nxh-btn:focus-visible, .nxh-btn-ghost:focus-visible, .nxh-link:focus-visible, .nxh-tab:focus-visible, .nxh-arrow:focus-visible {
    outline: 3px solid var(--nx-green); outline-offset: 4px;
}

/* ---------- Motivo: blocco sfalsato (come le icone) ---------- */
.nxh-offset { position: relative; }
.nxh-offset::before { content: ""; position: absolute; inset: 0; transform: translate(22px, 22px); border-radius: 32px; background: var(--nx-pink); }
.nxh-offset--green::before { background: var(--nx-green); }
.nxh-offset > img { position: relative; z-index: 1; display: block; width: 100%; height: auto; border-radius: 32px; object-fit: cover; }

/* ---------- Texture e luci ---------- */
.nxh-dots { position: absolute; inset: 0; opacity: .6; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 26px 26px; pointer-events: none; }
.nxh-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.nxh-glow--pink { width: 520px; height: 520px; left: -140px; top: 180px; background: rgba(247, 133, 152, .45); }
.nxh-glow--green { width: 600px; height: 600px; right: -160px; top: -160px; background: rgba(92, 249, 188, .32); }

/* ================= HERO ================= */
.nxh-hero { position: relative; overflow: hidden; background: var(--nx-purple); color: #fff; padding: 48px 0 116px; }
.nxh-hero__inner { position: relative; }
.nxh-slides { display: grid; }
.nxh-slide {
    grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center;
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s;
}
.nxh-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease, transform .6s ease, visibility 0s; }
.nxh-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.nxh-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.home .nxh-slide__title { margin: 0 0 22px; font-size: clamp(38px, 4.8vw, 66px); line-height: 1.03; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.nxh-slide__text { margin: 0 0 34px; max-width: 560px; font-size: 19px; line-height: 1.65; color: rgba(255, 255, 255, .82); }
.nxh-slide__text strong { color: #fff; }
.nxh-slide__media { justify-self: end; width: 100%; max-width: 560px; }
.nxh-slide__media img { aspect-ratio: 5 / 4; }
.nxh-badge {
    position: absolute; z-index: 2; left: -28px; bottom: 36px; display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; border-radius: 18px; color: #fff; font-weight: 800;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nxh-badge::before { content: attr(data-label); font-size: 13px; line-height: 1.3; max-width: 130px; opacity: .9; }
.nxh-badge::after { content: attr(data-num); font-size: 30px; color: var(--nx-green); }

.nxh-tabs { display: flex; justify-content: flex-end; gap: 6px; margin-top: 44px; }
.nxh-tab { all: unset; cursor: pointer; display: flex; align-items: center; width: 34px; height: 24px; }
.nxh-tab__bar { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; transition: background .2s; }
.nxh-tab:hover .nxh-tab__bar { background: rgba(255, 255, 255, .45); }
.nxh-tab__bar i { display: block; height: 100%; width: 0; background: var(--nx-green); }
.nxh-tab.is-active .nxh-tab__bar i { animation: nxh-fill var(--nxh-dur, 4.5s) linear forwards; }
.nxh-hero.is-paused .nxh-tab.is-active .nxh-tab__bar i { animation-play-state: paused; }
@keyframes nxh-fill { to { width: 100%; } }

/* ================= CHI È ================= */
.nxh-about { position: relative; z-index: 2; margin-top: -56px; background: #fff; padding: 110px 0 120px; border-radius: 56px 56px 0 0; }
.nxh-about__media { position: relative; padding: 0 22px 22px 0; }
.nxh-about__media img { aspect-ratio: 4 / 5; }
.nxh-floatcard {
    position: absolute; z-index: 2; right: -12px; top: 40px; display: flex; flex-direction: column; gap: 4px;
    padding: 18px 22px; border-radius: 20px; background: var(--nx-purple); color: #fff; text-decoration: none;
    box-shadow: 0 24px 50px -20px rgba(44, 29, 77, .8); transition: transform .25s;
}
.nxh-floatcard:hover { transform: translateY(-4px); }
.nxh-floatcard::before { content: attr(data-k); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--nx-green); font-weight: 800; }
.nxh-floatcard::after { content: attr(data-v); font-size: 15px; font-weight: 700; }
.nxh-badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 32px 0 30px; }
.nxh-badges img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--nx-line); }

/* ================= SERVIZI ================= */
.nxh-services { background: var(--nx-lav); padding: 120px 0 140px; border-radius: 56px 56px 0 0; }
.nxh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 40px; flex-wrap: wrap; margin-bottom: 56px; }
.nxh-head__title { max-width: 640px; }
.nxh-services .nxh-head .nxh-h2 { margin: 0; }
.nxh-services .nxh-lead { max-width: 420px; }
.nxh-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.nxh-span2 { grid-column: span 2; }
.nxh-card {
    position: relative; display: flex; flex-direction: column; gap: 12px; padding: 34px 30px 30px;
    background: #fff; border: 1px solid var(--nx-line); border-radius: 26px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.nxh-card:hover { transform: translateY(-6px); border-color: #d9cff0; box-shadow: 0 30px 60px -30px rgba(66, 45, 112, .45); }
.nxh-ico { width: 64px; height: 64px; }
.nxh-card h3 { margin: 8px 0 0; font-size: 22px; font-weight: 800; color: var(--nx-purple); }
.nxh-card h3 a { color: inherit; text-decoration: none; }
.nxh-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 26px; }
.nxh-card h3 a::before { content: "→"; position: absolute; right: 28px; bottom: 26px; font-size: 20px; color: var(--nx-purple); transition: transform .25s; }
.nxh-card:hover h3 a::before { transform: translateX(4px); }
.nxh-card p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--nx-ink); }
.nxh-card p strong { color: var(--nx-purple); }
.nxh-card--feature { background: var(--nx-purple); border-color: var(--nx-purple); color: #fff; justify-content: flex-end; min-height: 300px; }
.nxh-card--feature h3 { color: #fff; font-size: 30px; }
.nxh-card--feature h3 a::before { color: var(--nx-green); }
.nxh-card--feature p { color: rgba(255, 255, 255, .78); max-width: 440px; }
.nxh-card--feature p strong { color: #fff; }
.nxh-card--feature .nxh-ico { margin-bottom: auto; }
.nxh-card--ai { border-color: var(--nx-green); box-shadow: 0 0 0 4px rgba(92, 249, 188, .18); }

/* ================= BANDA ================= */
/* Sotto la fascia inclinata resta il lilla delle sezioni vicine: niente spicchi bianchi ai lati */
.nxh-services { box-shadow: 0 140px 0 var(--nx-lav); }
.nxh-band { position: relative; z-index: 3; margin: -10px -20px 0; padding: 24px 0; overflow: hidden; background: var(--nx-green); transform: rotate(-1.6deg); }
.nxh-band__track { display: flex; gap: 48px; width: max-content; white-space: nowrap; animation: nxh-marq 34s linear infinite; }
.nxh-band__track span { display: inline-flex; align-items: center; gap: 48px; font-size: 44px; font-weight: 800; letter-spacing: -.01em; color: var(--nx-purple); }
.nxh-band__track span::before { content: attr(data-t); }
.nxh-band__track span::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--nx-purple); }
@keyframes nxh-marq { to { transform: translateX(-50%); } }

/* ================= CLIENTI ================= */
.nxh-clients { background: var(--nx-lav); }
.nxh-clients__panel { position: relative; overflow: hidden; margin-top: -30px; padding: 140px 0 120px; background: var(--nx-purple); color: #fff; border-radius: 0 0 56px 56px; }
.nxh-clients .nxh-wrap { position: relative; }
.nxh-clients .nxh-h2 { color: #fff; }
.nxh-clients .nxh-lead { color: rgba(255, 255, 255, .8); margin-bottom: 34px; }
.nxh-logos {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; height: 460px; overflow: hidden;
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}
.nxh-logos__col { display: flex; flex-direction: column; gap: 18px; animation: nxh-up 40s linear infinite; }
.nxh-logos__col:nth-child(2) { animation-duration: 52s; animation-direction: reverse; }
.nxh-logos__col:nth-child(3) { animation-duration: 46s; }
.nxh-logos__col img {
    display: block; width: 100%; height: 104px; padding: 18px 22px; object-fit: contain;
    background: #fff; border-radius: 20px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .5);
}
@keyframes nxh-up { to { transform: translateY(-50%); } }

/* ================= CASE STUDY ================= */
.nxh-cases { background: var(--nx-lav); padding: 110px 0 170px; }
.nxh-arrows { display: flex; gap: 12px; }
.nxh-arrow {
    width: 52px; height: 52px; border-radius: 50%; border: 2px solid #e2dbf0; background: #fff; color: var(--nx-purple);
    display: grid; place-items: center; cursor: pointer; font-size: 20px; transition: border-color .2s, background .2s;
}
.nxh-arrow::before { content: "←"; }
.nxh-arrow--next { background: var(--nx-purple); border-color: var(--nx-purple); color: #fff; }
.nxh-arrow--next::before { content: "→"; }
.nxh-arrow:hover { border-color: var(--nx-purple); }
.nxh-portfolio .box-image, .nxh-portfolio .image-cover { border-radius: 24px; overflow: hidden; }
.nxh-portfolio .box-image img { transition: transform .8s; }
.nxh-portfolio .col:hover .box-image img { transform: scale(1.05); }
.nxh-portfolio .flickity-prev-next-button { display: none; }
.nxh-portfolio .flickity-page-dots { display: none; }

/* ================= DOVE LAVORIAMO ================= */
.nxh-farm { position: relative; margin-top: -56px; padding: 130px 0 170px; background: #fff; border-radius: 56px 56px 0 0; }
.nxh-farm .nxh-prose { margin-bottom: 34px; }
.nxh-collage { position: relative; min-height: 560px; }
.nxh-collage img { position: absolute; display: block; object-fit: cover; }
.nxh-collage__a { left: 0; top: 0; width: 72%; height: 460px; border-radius: 32px; }
.nxh-collage__b { right: 0; bottom: 0; width: 52%; height: 280px; border-radius: 28px; border: 8px solid #fff; box-shadow: 0 30px 60px -30px rgba(44, 29, 77, .6); }
.nxh-stat {
    position: absolute; left: 40%; top: -30px; width: 150px; height: 150px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--nx-green); color: var(--nx-purple); font-weight: 800; box-shadow: 0 20px 40px -20px rgba(92, 249, 188, 1);
}
.nxh-stat::before { content: attr(data-num); font-size: 34px; line-height: 1; }
.nxh-stat::after { content: attr(data-label); font-size: 14px; }

/* ---------- Comparsa allo scroll ---------- */
.nxh-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.nxh-reveal.is-in { opacity: 1; transform: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .nxh-wrap { padding: 0 20px; }
    .nxh-g2, .nxh-slide { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .nxh-hero { padding: 24px 0 110px; }
    .nxh-slide__media { justify-self: start; max-width: 100%; }
    .nxh-badge { left: 12px; bottom: 16px; }
    .nxh-tabs { margin-top: 32px; }
    .nxh-about { padding: 80px 0 90px; margin-top: -40px; border-radius: 40px 40px 0 0; }
    .nxh-about__media { order: 2; }
    .nxh-floatcard { right: 6px; top: 20px; }
    .nxh-services, .nxh-cases { padding: 90px 0 110px; }
    .nxh-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nxh-band__track span { font-size: 30px; gap: 32px; }
    .nxh-clients__panel { padding: 110px 0 90px; }
    .nxh-logos { height: 360px; }
    .nxh-farm { padding: 100px 0 130px; }
    .nxh-collage { min-height: 440px; }
    .nxh-collage__a { height: 360px; }
    .nxh-collage__b { height: 220px; }
    .nxh-stat { left: auto; right: 10px; top: -20px; width: 120px; height: 120px; }
    .nxh-stat::before { font-size: 26px; }
}
@media (max-width: 560px) {
    .nxh-bento { grid-template-columns: minmax(0, 1fr); }
    .nxh-span2 { grid-column: span 1; }
    .nxh-card--feature { min-height: 0; }
    .nxh-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nxh-logos__col:nth-child(3) { display: none; }
    .nxh-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nxh-slide__text { font-size: 17px; }
    .nxh-actions .nxh-btn, .nxh-actions .nxh-btn-ghost { height: 50px; padding: 0 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .nxh-band__track, .nxh-logos__col { animation: none; }
    .nxh-tab.is-active .nxh-tab__bar i { animation: none; width: 100%; }
    .nxh-slide, .nxh-reveal { transition: none; transform: none; opacity: 1; }
    .nxh-slide:not(.is-active) { opacity: 0; }
}

/* spazio tra le card dei case study (slider Flatsome) */
.nxh-portfolio .col { padding: 0 13px !important; }
.nxh-portfolio { margin: 0 -13px; }

/* l'hero passa sotto la topbar in vetro */
.home #main { margin-top: -84px; }
.home .nxh-hero { padding-top: 132px; }
@media (max-width: 849px) {
    .home #main { margin-top: -70px; }
    .home .nxh-hero { padding-top: 94px; }
}

/* ombra sfalsata delle slide: alterna verde (secondario) e rosa */
.nxh-slide:nth-child(odd) .nxh-offset::before { background: var(--nx-green); }
.nxh-slide:nth-child(even) .nxh-offset::before { background: var(--nx-pink); }
.nxh-slide .nxh-offset::before { transition: background .4s; }

/* Chi è: colonna del testo più larga */
@media (min-width: 901px) {
    .nxh-about .nxh-g2 { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 64px; }
    .nxh-about .nxh-eyebrow { max-width: 620px; }
}

/* badge leggibile anche su immagini chiare */
.nxh-badge { background: rgba(44, 29, 77, .78); border-color: rgba(255, 255, 255, .22); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }

/* Chi è: colonna immagine + partner che accompagna lo scroll, H1 su una riga */
.nxh-about .nxh-badges { margin: 46px 0 0; }
@media (min-width: 901px) {
    .nxh-about .nxh-g2 { align-items: start; }
    .nxh-about__media { position: sticky; top: 112px; }
    .nxh-about .nxh-eyebrow { max-width: none; white-space: nowrap; font-size: 13px !important; letter-spacing: .1em; }
    .nxh-about__copy { padding-top: 8px; }
}
.nxh-about__media img { aspect-ratio: 1 / 1; }
.nxh-about .nxh-badges { gap: 10px; }
.nxh-about .nxh-badges img { height: 76px; object-fit: cover; }
.nxh-about__copy .nxh-link { display: inline-block; margin-top: 28px; }

/* ================= Animazioni d'ingresso: slider ================= */
@keyframes nxh-in-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes nxh-in-media { from { opacity: 0; transform: translateX(48px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nxh-in-offset { from { transform: translate(0, 0); opacity: 0; } to { transform: translate(var(--nx-ox, 22px), 22px); opacity: 1; } }
@keyframes nxh-in-badge { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
.nxh-slide.is-active .nxh-chips { animation: nxh-in-up .7s cubic-bezier(.2, .7, .2, 1) both; }
.nxh-slide.is-active .nxh-slide__title { animation: nxh-in-up .8s cubic-bezier(.2, .7, .2, 1) .08s both; }
.nxh-slide.is-active .nxh-slide__text { animation: nxh-in-up .8s cubic-bezier(.2, .7, .2, 1) .16s both; }
.nxh-slide.is-active .nxh-actions { animation: nxh-in-up .8s cubic-bezier(.2, .7, .2, 1) .24s both; }
.nxh-slide.is-active .nxh-slide__media { animation: nxh-in-media .9s cubic-bezier(.2, .7, .2, 1) .1s both; }
.nxh-slide.is-active .nxh-slide__media.nxh-offset::before { animation: nxh-in-offset .7s cubic-bezier(.2, .7, .2, 1) .45s both; }
.nxh-slide.is-active .nxh-badge { animation: nxh-in-badge .6s cubic-bezier(.2, .7, .2, 1) .6s both; }
.nxh-tabs { animation: nxh-in-up .8s cubic-bezier(.2, .7, .2, 1) .5s both; }

/* ================= Chi è: loghi partner larghi fino all'ombra ================= */
.nxh-about .nxh-badges { margin-right: -22px; }

/* ================= Servizi: icone animate ================= */
@keyframes nxh-pop { 0% { opacity: 0; transform: scale(.5) rotate(-12deg); } 60% { opacity: 1; transform: scale(1.12) rotate(4deg); } 100% { opacity: 1; transform: none; } }
@keyframes nxh-wiggle { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) rotate(-8deg); } 60% { transform: translateY(-2px) rotate(5deg); } }
@keyframes nxh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.nxh-card.nxh-reveal .nxh-ico { opacity: 0; }
.nxh-card.nxh-reveal.is-in .nxh-ico { animation: nxh-pop .8s cubic-bezier(.2, .7, .2, 1) .25s both, nxh-float 4s ease-in-out 1.2s infinite; }
.nxh-card:hover .nxh-ico { animation: nxh-wiggle .7s ease both !important; }

/* ================= Clienti: due file di loghi che scorrono ================= */
.nxh-clients__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 40px; flex-wrap: wrap; margin-bottom: 56px; }
.nxh-clients__head .nxh-lead { margin-bottom: 0; }
.nxh-marquee {
    position: relative; display: flex; flex-direction: column; gap: 18px; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.nxh-marquee__row { display: flex; gap: 18px; width: max-content; animation: nxh-left 60s linear infinite; }
.nxh-marquee__row--rev { animation-direction: reverse; animation-duration: 70s; }
@keyframes nxh-left { to { transform: translateX(-50%); } }
.nxh-logo {
    flex: none; display: grid; place-items: center; width: 210px; height: 104px; padding: 16px 24px; border-radius: 22px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    transition: background .3s, border-color .3s, transform .3s;
}
.nxh-logo img {
    max-width: 100%; max-height: 64px; object-fit: contain;
    filter: invert(1) hue-rotate(180deg) grayscale(1) brightness(1.6); mix-blend-mode: screen; opacity: .78;
    transition: filter .3s, opacity .3s, mix-blend-mode .3s;
}
.nxh-logo:hover { background: #fff; border-color: #fff; transform: translateY(-4px); }
.nxh-logo:hover img { filter: none; mix-blend-mode: normal; opacity: 1; }
@media (max-width: 900px) { .nxh-logo { width: 160px; height: 84px; } .nxh-clients__head { margin-bottom: 40px; } }

/* ================= Frecce case study centrate ================= */
.nxh-arrow::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--nxh-arrow) center / contain no-repeat; mask: var(--nxh-arrow) center / contain no-repeat; }
.nxh-arrow { --nxh-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.nxh-arrow--next { --nxh-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.nxh-arrow--next::before { content: ""; }

@media (prefers-reduced-motion: reduce) {
    .nxh-slide.is-active *, .nxh-slide.is-active .nxh-slide__media.nxh-offset::before, .nxh-tabs, .nxh-marquee__row, .nxh-card .nxh-ico { animation: none !important; opacity: 1 !important; }
}
/* dopo l'ingresso tornano gli effetti al passaggio del mouse */
.nxh-reveal.is-done { transition: transform .25s, box-shadow .25s, border-color .25s, opacity .25s; }
.nxh-card.nxh-reveal.is-in:hover { transform: translateY(-6px); }
.nxh-floatcard.nxh-reveal.is-in:hover { transform: translateY(-4px); }
.nxh-card.nxh-reveal.is-in .nxh-ico { opacity: 1; }
/* niente blur sui riquadri: lascia fondere lo sfondo dei PNG con il viola */
.nxh-logo { -webkit-backdrop-filter: none; backdrop-filter: none; }
/* logo wall: riquadri bianchi, loghi in grigio che si colorano al passaggio del mouse */
.nxh-logo { background: rgba(255, 255, 255, .94); border-color: rgba(255, 255, 255, .6); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .55); }
.nxh-logo img { filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; opacity: .72; }
.nxh-logo:hover { background: #fff; }
.nxh-logo:hover img { filter: none; mix-blend-mode: multiply; opacity: 1; }
.nxh-logo { background: #fff; border-color: #fff; }
.nxh-logo img { mix-blend-mode: normal; opacity: 1; filter: grayscale(1) brightness(1.35) contrast(.9); }
.nxh-logo:hover img { filter: none; }
.nxh-logo img { filter: grayscale(1) brightness(1.3); }

/* frecce: icona centrata (niente padding ereditato dai bottoni del tema) */
.nxh-arrow { padding: 0 !important; margin: 0 !important; min-height: 0; line-height: 0; display: inline-grid; place-items: center; }
.nxh-arrow::before { display: block; margin: 0; }

/* dopo la comparsa l'icona resta visibile: solo fluttuare, e il movimento al passaggio del mouse */
.nxh-card.nxh-reveal.is-done .nxh-ico { opacity: 1; animation: nxh-float 4s ease-in-out infinite; }
.nxh-card.nxh-reveal.is-done:hover .nxh-ico { animation: nxh-wiggle .7s ease both !important; }

/* case study: paragrafo introduttivo al massimo su due righe */
.nxh-cases .nxh-head { flex-wrap: nowrap; }
.nxh-cases .nxh-head__title { max-width: 980px; flex: 1 1 auto; }
@media (max-width: 900px) { .nxh-cases .nxh-head { flex-wrap: wrap; } }

/* loghi clienti: misura originale +10% */
.nxh-logo img { transform: scale(1.1); }

/* slider iniziale: stesso numero di righe in tutte le slide. Titolo su 2 righe senza ridurre il corpo:
   la riga più lunga ("Performance Marketing") è 11em, quindi la colonna del testo è larga 11.2 volte il corpo del titolo.
   L'hero arriva a 1250px di contenuto, allineato a logo e pulsante Contatti dell'header */
.home .nxh-slide__title { max-width: 11.2em; text-wrap: balance; }
@media (min-width: 901px) {
    .nxh-hero .nxh-wrap { max-width: 1314px; }
    .nxh-slide { grid-template-columns: calc(11.2 * clamp(38px, 4.8vw, 66px)) minmax(0, 1fr); gap: 48px; }
}
.nxh-slide__text { max-width: 26.5em; text-wrap: pretty; }

/* ombre dietro le immagini: righe diagonali ottenute con una maschera, così il colore resta quello di background.
   La tessera è quadrata e si ripete senza stacchi: scorrere di una tessera chiude il ciclo */
@keyframes nxh-offset-stripes { to { -webkit-mask-position: 14px 0; mask-position: 14px 0; } }
.nxh-offset::before {
    -webkit-mask: linear-gradient(135deg, #000 25%, transparent 25% 50%, #000 50% 75%, transparent 75%) 0 0 / 14px 14px;
    mask: linear-gradient(135deg, #000 25%, transparent 25% 50%, #000 50% 75%, transparent 75%) 0 0 / 14px 14px;
    animation: nxh-offset-stripes 2.4s linear infinite;
}
.nxh-slide.is-active .nxh-slide__media.nxh-offset::before {
    animation: nxh-in-offset .7s cubic-bezier(.2, .7, .2, 1) .45s both, nxh-offset-stripes 2.4s linear infinite;
}
/* immagine "Chi è": l'ombra esce da dietro la foto quando entra in vista */
.nxh-offset.nxh-reveal::before { transform: translate(0, 0); opacity: 0; transition: transform .7s cubic-bezier(.2, .7, .2, 1) .45s, opacity .4s .45s; }
.nxh-offset.nxh-reveal.is-in::before { transform: translate(var(--nx-ox, 22px), 22px); opacity: 1; }

/* hero: i due punti di luce si spostano sullo sfondo */
@keyframes nxh-glow-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    35% { transform: translate(24vw, -36%) scale(1.15); }
    70% { transform: translate(8vw, 16%) scale(.9); }
}
@keyframes nxh-glow-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-18vw, 44%) scale(1.12); }
    75% { transform: translate(-5vw, 72%) scale(.92); }
}
.nxh-hero .nxh-glow { will-change: transform; }
.nxh-hero .nxh-glow--pink { animation: nxh-glow-a 16s ease-in-out infinite; }
.nxh-hero .nxh-glow--green { animation: nxh-glow-b 20s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .nxh-offset::before, .nxh-hero .nxh-glow { animation: none !important; }
}

/* mobile: card case history allineate al testo della sezione */
@media (max-width: 549px) { .nxh-portfolio .col { padding: 0 !important; } }

/* slide: descrizioni larghe quanto la colonna, così anche il testo più lungo resta su poche righe */
@media (min-width: 901px) { .nxh-slide__text { max-width: none; } }

/* mobile: chip sempre su una riga, in proporzione alla larghezza dello schermo */
@media (max-width: 600px) {
    .nxh-chips { flex-wrap: nowrap; gap: 1vw; }
    .nxh-chip { flex: none; height: 28px; padding: 0 1.7vw; font-size: clamp(10px, 3.1vw, 13px); white-space: nowrap; }
}

/* mobile: i punti di luce stanno fuori dallo schermo, sotto i testi, e si muovono poco */
@keyframes nxh-glow-m { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(36px, -48px); } }
@media (max-width: 900px) {
    .nxh-hero .nxh-glow { opacity: .55; }
    .nxh-hero .nxh-glow--pink { width: 380px; height: 380px; left: -320px; top: auto; bottom: -220px; animation: nxh-glow-m 16s ease-in-out infinite; }
    .nxh-hero .nxh-glow--green { width: 380px; height: 380px; left: auto; right: -320px; top: auto; bottom: -60px; animation: nxh-glow-m 20s ease-in-out infinite reverse; }
}

/* telefono: titoli e descrizioni dell'hero a tutta larghezza */
@media (max-width: 600px) {
    .home .nxh-slide__title { max-width: none; text-wrap: wrap; }
    .nxh-slide__text { max-width: none; text-wrap: wrap; }
}
/* telefono: con testi di lunghezza diversa i chip restano alla stessa altezza in ogni slide */
@media (max-width: 600px) { .nxh-slide { align-content: start; align-items: start; } }

/* mobile: immagine a piena larghezza del contenuto, ombra solo sotto */
@media (max-width: 900px) {
    .nxh-offset { --nx-ox: 0px; }
    .nxh-offset::before { transform: translate(0, 22px); }
    .nxh-about .nxh-badges { margin-right: 0; }
    .nxh-about__media { padding-right: 0; }
}

/* mobile: niente controllo delle slide, lo scorrimento automatico resta */
@media (max-width: 900px) {
    .nxh-tabs { display: none; }
    .home .nxh-hero { padding-bottom: 108px; } /* la sezione dopo sale di 40px: restano almeno 46px sotto l'ombra della slide più lunga */
}

/* mobile: occhiello H1 più compatto, senza trattino, su due righe bilanciate */
@media (max-width: 900px) {
    .home .nxh-about .nxh-eyebrow { display: block; max-width: none; margin-left: 0; margin-right: 0; font-size: 12px !important; line-height: 1.5 !important; letter-spacing: .08em; text-wrap: balance; }
    .home .nxh-about .nxh-eyebrow::before { display: none; }
}

/* mobile: frecce delle case history sulla stessa riga di "Vedi tutti i progetti", a sinistra */
@media (max-width: 900px) {
    .nxh-cases .nxh-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
    .nxh-cases .nxh-head { display: contents; }
    .nxh-cases .nxh-head > * { grid-column: 1 / -1; order: 1; }
    .nxh-cases .portfolio-element-wrapper { grid-column: 1 / -1; order: 2; min-width: 0; margin: 32px 0 28px; }
    .nxh-cases .nxh-head > .nxh-arrows { grid-column: 1; order: 3; gap: 8px; }
    .nxh-cases .nxh-arrow { width: 46px; height: 46px; }
    .nxh-cases .nxh-center { grid-column: 2; order: 3; margin: 0; }
    .nxh-cases .nxh-center .nxh-btn { display: flex; justify-content: center; gap: 8px; width: 100%; height: 46px; padding: 0 8px; font-size: 14px; white-space: nowrap; }
}

/* desktop: più distanza tra testo e immagine dello slider, descrizioni più arretrate dall'immagine */
@media (min-width: 901px) {
    .nxh-slide { column-gap: clamp(64px, 6.5vw, 96px); }
    .nxh-slide__text { width: min(calc(100% - clamp(32px, 4vw, 64px)), 30em); max-width: none; }
}

/* desktop: chip in alto, pulsante in basso, titolo e descrizione centrati nello spazio tra i due */
@media (min-width: 901px) {
    .nxh-slide { align-items: stretch; }
    .nxh-slide__media { align-self: center; }
    .nxh-slide__copy { display: flex; flex-direction: column; }
    .nxh-slide__title { margin-top: auto !important; }
    .nxh-slide__text { margin-bottom: auto; }
    .nxh-actions { margin-top: 25px; }
    .nxh-slide .nxh-chips { margin-bottom: 30px; }
}

/* modulo case study nelle sottopagine: dopo non c'è il form sovrapposto, basta il padding normale */
body:not(.home) .nxh-cases { padding-bottom: 110px; }
@media (max-width: 900px) { body:not(.home) .nxh-cases { padding-bottom: 80px; } }

/* servizi: Design, Sviluppo web e App Mobile in evidenza; Marketing e Artificial Intelligence sotto, più compatte */
@media (min-width: 901px) {
    .nxh-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .nxh-bento .nxh-card { grid-column: span 2; }
    .nxh-bento .nxh-card--minor { grid-column: span 3; }
}
.nxh-card--feature h3 a, .nxh-card--feature h3 { color: #fff; }
.nxh-card--minor { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; align-content: center; }
.nxh-card--minor .nxh-ico { grid-row: span 2; width: 52px; height: 52px; margin: 0; }
.nxh-card--minor h3 { margin-top: 0; font-size: 20px; }
.nxh-card--minor p { grid-column: 2; font-size: 15px; }

/* card principali: fondo con luci e puntini, icona in un riquadro, freccia a pulsante, ombra a righe al passaggio del mouse */
.nxh-bento .nxh-card--feature { isolation: isolate; min-height: 340px; padding: 32px; background: none; border: 0; box-shadow: none; }
.nxh-bento .nxh-card--feature::before {
    content: ""; position: absolute; inset: 0; z-index: -2; background: var(--nx-green); opacity: 0; transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .25s;
    -webkit-mask: linear-gradient(135deg, #000 25%, transparent 25% 50%, #000 50% 75%, transparent 75%) 0 0 / 14px 14px;
    mask: linear-gradient(135deg, #000 25%, transparent 25% 50%, #000 50% 75%, transparent 75%) 0 0 / 14px 14px;
    animation: nxh-offset-stripes 2.4s linear infinite;
}
.nxh-bento .nxh-card--feature::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px) 0 0 / 22px 22px,
        radial-gradient(circle at 100% 0%, rgba(92, 249, 188, .26), transparent 48%),
        radial-gradient(circle at 0% 100%, rgba(247, 133, 152, .24), transparent 52%),
        var(--nx-purple);
}
.nxh-bento .nxh-card--feature:hover { box-shadow: none; }
.nxh-bento .nxh-card--feature:hover::before { opacity: 1; transform: translate(14px, 14px); }
.nxh-bento .nxh-card.nxh-card--feature .nxh-ico { box-sizing: border-box; width: 84px; height: 84px; padding: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); animation: none !important; transition: background .25s, border-color .25s; }
.nxh-bento .nxh-card--feature:hover .nxh-ico { background: rgba(92, 249, 188, .14); border-color: rgba(92, 249, 188, .5); }
.nxh-bento .nxh-card--feature h3 { margin-top: 24px; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.nxh-bento .nxh-card--feature p { padding-right: 52px; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .84); }
.nxh-bento .nxh-card--feature h3 a::before { right: 24px; bottom: 24px; display: grid; place-items: center; width: 44px; height: 44px; background: var(--nx-green); color: var(--nx-purple-deep); font-size: 20px; font-weight: 800; }
@media (max-width: 900px) {
    .nxh-bento .nxh-card--feature { min-height: 300px; padding: 26px; }
    .nxh-bento .nxh-card--feature h3 { font-size: 28px; }
}

/* Case study senza scheda: copertina con il nome, sostituibile con foto e logo bianco */
.nxh-statica__cover { position: relative; background: radial-gradient(circle at 90% 0%, rgba(92, 249, 188, .28), transparent 52%), radial-gradient(circle at 0% 100%, rgba(247, 133, 152, .26), transparent 48%), #422d70; }
.nxh-statica__cover span { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; font-family: Raleway, sans-serif; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-align: center; color: #fff; }
.nxh-portfolio .nxh-statica__cover img { position: absolute; top: 50%; right: auto; left: 50%; margin: 0; width: auto; height: auto; max-width: 58%; max-height: 46%; object-fit: contain; filter: brightness(0) invert(1); transform: translate(-50%, -50%); transition: none; }
.nxh-portfolio .col:hover .nxh-statica__cover img { transform: translate(-50%, -50%); }
.nxh-portfolio .nxh-statica__cover img[src$="campus-bianco.svg"], .nxh-portfolio .nxh-statica__cover img[src$="asroma.svg"], .nxh-portfolio .nxh-statica__cover img[src$="mcfit-bianco.svg"], .nxh-portfolio .nxh-statica__cover img[src$="aism-bianco.png"] { filter: none; }
.nxh-portfolio .nxh-statica__cover img.nxh-statica__foto { top: 0; left: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; transform: none; }
.nxh-portfolio .col:hover .nxh-statica__cover img.nxh-statica__foto { transform: none; }
.nxh-statica__cover:has(img + img)::after { content: ""; position: absolute; inset: 0; background: rgba(44, 29, 77, .7); }
.nxh-portfolio .nxh-statica__cover img:not(.nxh-statica__foto) { z-index: 1; }

/* Home: modulo Digital Farm prima del footer */
.nxh-farm { padding: 96px 0 104px; background: #fff; }
.nxh-farm__griglia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.nxh-farm .nxh-lead { margin: 0 0 28px; }
.nxh-farm__foto img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 900px) {
    .nxh-farm { padding: 64px 0 84px; }
    .nxh-farm__griglia { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
