/* =========================================================
   GPA · STILE E
   Un solo foglio di stile per tutte le pagine.
   Ogni pagina apre con un hero scuro (foto della pagina ricolorata nel blu
   del brand) e prosegue chiara. Componenti:
     testata a vetro · hero · sezioni · testo + immagine · caratteristiche
     card prodotto · loghi · registro dei progetti · schede (tab) · contatti
     invito · piè di pagina · freccia di scorrimento · comparsa allo scroll
   ========================================================= */

:root {
    --night: #061a2c;
    --navy: #0b2c48;
    --blue: #0a4272;
    --ice: #d3ebff;
    --fog: #a9bfd2;
    --paper: #ffffff;
    --tint: #f3f7fb;
    --ink: #0d2236;
    --muted: #55606a;
    --line: #dde7f0;
    --sans: "Montserrat", system-ui, sans-serif;
    --gutter: clamp(20px, 4vw, 56px);
    --max: 1320px;
    --radius: 28px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --reveal-ease: cubic-bezier(.22, 1, .36, 1);
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: #fff; color: var(--blue); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- pulsanti ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 26px; border-radius: 12px; border: 0;
    font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), scale .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { scale: .97; }
.btn--light { background: #fff; color: var(--blue); }
.btn--light:hover { background: var(--ice); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(211, 235, 255, .55); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--ink); }
.btn--line { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn--line:hover { background: var(--blue); color: #fff; }

/* ---------- testata: trasparente sull'hero, vetro al primo scroll ---------- */
.top {
    position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
    color: #fff;
    background: rgba(255, 255, 255, 0);
    -webkit-backdrop-filter: blur(0) saturate(100%);
    backdrop-filter: blur(0) saturate(100%);
    box-shadow: 0 1px 0 rgba(13, 34, 54, 0);
    transition:
        background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease),
        -webkit-backdrop-filter .5s var(--ease), backdrop-filter .5s var(--ease);
}
.top.is-scrolled {
    background: rgba(255, 255, 255, .72);
    color: var(--ink);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 0 rgba(13, 34, 54, .08);
}
.top .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { position: relative; flex: none; width: 118px; height: 46px; }
.brand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left center; transition: opacity .5s var(--ease); }
.brand .on-light { opacity: 0; }
.top.is-scrolled .brand .on-dark { opacity: 0; }
.top.is-scrolled .brand .on-light { opacity: 1; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav a { position: relative; white-space: nowrap; text-decoration: none; padding: 6px 0; opacity: .82; transition: opacity .2s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
/* sottolineatura come nel sito principale: entra da sinistra al passaggio del mouse,
   esce verso destra; resta fissa sulla pagina corrente. Il colore segue il testo
   (bianco sulla foto, scuro con la testata a vetro). */
.nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: currentColor;
    transform: scaleX(0); transform-origin: right;
    transition: transform .25s ease;
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
/* stelline su "Contatti", variante "PS2": tre orbite ellittiche inclinate che si
   incrociano sulla parola, con un finto 3D (davanti le stelline sono più grandi e
   luminose, dietro più piccole e tenui), scia leggera e respiro con bagliore.
   Colore del testo. Schemi salvati: _archivio/stelline-orbita (capsula), _archivio/stelline-ps2 (3 orbite).
   Ogni .orb: --r inclinazione, --A/--B semiassi (--A negativo = verso invertito), --D mezzo giro.
   Ogni stellina (<b>): --o fase sull'orbita (0-1), --s lato in px.
   Il moto ellittico nasce da due oscillazioni sfasate di un quarto di giro:
   <b> va avanti e indietro in orizzontale, <i> in verticale. */
.twinkle {
    position: absolute; inset: 0; pointer-events: none;
    filter: drop-shadow(0 0 0 currentColor) drop-shadow(0 0 0 currentColor);
    transition: filter .5s var(--ease);
}
.twinkle .orb { position: absolute; inset: 0; rotate: var(--r); transition: scale .6s var(--ease); }
.twinkle b {
    position: absolute; left: 50%; top: 50%;
    /* posizione ferma (riduci movimento): il punto dell'ellisse che corrisponde alla fase */
    translate: calc(cos(var(--o) * 360deg) * var(--A)) 0;
}
.twinkle i {
    display: block; width: calc(var(--s) * 1px); height: calc(var(--s) * 1px);
    margin: calc(var(--s) * -.5px) 0 0 calc(var(--s) * -.5px);
    translate: 0 calc(sin(var(--o) * 360deg) * var(--B));
    opacity: .55;
}
/* la forma della stella sta nel ::before, così il bagliore dell'<i> non viene ritagliato */
.twinkle i::before {
    content: ""; display: block; width: 100%; height: 100%; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12.6 6.6 17.4 11.4 24 12 17.4 12.6 12.6 17.4 12 24 11.4 17.4 6.6 12.6 0 12 6.6 11.4 11.4 6.6 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12.6 6.6 17.4 11.4 24 12 17.4 12.6 12.6 17.4 12 24 11.4 17.4 6.6 12.6 0 12 6.6 11.4 11.4 6.6 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.twinkle .tr { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .twinkle b { animation: orb-x var(--D) ease-in-out calc(var(--o) * var(--D) * -2 + var(--lag, 0s)) infinite alternate; }
    .twinkle i {
        animation:
            orb-y var(--D) ease-in-out calc(var(--o) * var(--D) * -2 - var(--D) / 2 + var(--lag, 0s)) infinite alternate,
            breathe 2.6s ease-in-out calc(var(--o) * -2.6s) infinite alternate;
    }
    .twinkle .tr { display: block; }
    /* mentre orbitano, le stelline si ribaltano anche attorno al proprio asse orizzontale (X) */
    .twinkle i::before { animation: flip-x 2.4s linear infinite; }
    .twinkle .tr i { animation-name: orb-y, none; }
    .twinkle .tr1 { --lag: .11s; opacity: .36; scale: .78; }
    .twinkle .tr2 { --lag: .22s; opacity: .16; scale: .58; }
}
@keyframes orb-x {
    from { translate: calc(var(--A) * -1) 0; }
    to { translate: var(--A) 0; }
}
/* in alto = dietro (piccola, tenue), in basso = davanti (grande, piena) */
@keyframes orb-y {
    from { translate: 0 calc(var(--B) * -1); scale: .55; opacity: .35; }
    to { translate: 0 var(--B); scale: 1.1; opacity: 1; }
}
@keyframes flip-x {
    from { transform: perspective(40px) rotateX(0deg); }
    to { transform: perspective(40px) rotateX(360deg); }
}
/* respiro: solo l'alone cresce e cala piano */
@keyframes breathe {
    from { filter: drop-shadow(0 0 0 currentColor); }
    to { filter: drop-shadow(0 0 2.5px currentColor); }
}
/* hover/focus: le orbite scattano un po' più larghe con un piccolo rimbalzo
   e le stelline si accendono con un alone più pieno */
.nav a:hover .twinkle, .nav a:focus-visible .twinkle {
    filter: drop-shadow(0 0 1.5px currentColor) drop-shadow(0 0 5px currentColor);
    transition-duration: .3s;
}
.nav a:hover .orb, .nav a:focus-visible .orb { scale: 1.25; transition: scale .5s cubic-bezier(.34, 1.7, .5, 1); }
/* stelline su "Contatti" DISATTIVATE (codice e markup mantenuti): per riattivarle, togliere questa riga */
.twinkle { display: none; }
.top .btn { min-height: 42px; padding: 0 18px; font-size: 14px; background: #fff; color: var(--blue); transition-duration: .5s; }
.top.is-scrolled .btn { background: var(--blue); color: #fff; }
.top :focus-visible { outline-color: currentColor; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; transition: rotate .25s var(--ease), translate .25s var(--ease), opacity .2s; }

/* ---------- hero scuro con la foto della pagina ---------- */
.hero {
    position: relative; isolation: isolate; overflow: clip;
    min-height: min(100svh, 880px);
    /* --title-y: altezza a cui parte il titolo, uguale in tutte le pagine */
    --title-y: calc(var(--header-h) + max(20svh, 190px));
    display: grid; align-items: start;
    padding: var(--title-y) 0 80px;
    background: var(--night); color: #fff;
}
.hero--short { min-height: min(78svh, 720px); }
/* foto in bianco e nero, colorata col blu del brand (blend "luminosity"),
   sfumata verso il testo e verso il basso */
.hero-photo {
    position: absolute; inset: 0 0 0 auto; z-index: -1; width: min(1100px, 78%);
    background: var(--blue);
    -webkit-mask-image: radial-gradient(120% 95% at 78% 48%, #000 34%, transparent 72%);
    mask-image: radial-gradient(120% 95% at 78% 48%, #000 34%, transparent 72%);
}
.hero-photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-pos, 80% 50%);
    filter: grayscale(1) contrast(1.25) brightness(1.15);
    mix-blend-mode: luminosity;
    opacity: .9;
}
.hero-photo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--night) 0%, rgba(6, 26, 44, .92) 34%, rgba(6, 26, 44, .55) 50%, rgba(6, 26, 44, 0) 68%),
                linear-gradient(0deg, var(--night) 0%, rgba(6, 26, 44, 0) 30%),
                /* in alto più scuro: le voci bianche del menu non finiscono mai su zone chiare */
                linear-gradient(180deg, rgba(6, 26, 44, .85) 0%, rgba(6, 26, 44, 0) 22%);
}

/* Variante con logo del prodotto nell'hero */
.hero-photo--logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.hero-photo--logo img {
    width: min(680px, 62vw);
    height: auto;
    max-height: min(360px, 55vh);
    object-fit: contain;
    object-position: center;
    margin-right: clamp(2rem, 7vw, 6rem);
    filter: grayscale(1) contrast(1.25) brightness(1.15);
    mix-blend-mode: luminosity;
    opacity: .9;
}

/* ---------- testa poligonale in SVG (hero della home) ----------
   .hero-head__lines ha come maschera solo la sagoma SVG: il colore delle linee è
   --head-color. Le sfumature (verso il testo a sinistra, in alto e in basso, perché
   l'originale è tagliato dritto) stanno sul contenitore, così sfumano anche l'alone.
   Tenerle separate evita una riga sottile sul bordo che Chrome disegna quando
   sagoma e sfumature stanno nella stessa maschera. */
.hero-head {
    --head-color: rgba(211, 235, 255, .62);
    position: absolute; z-index: -1; top: 50%; right: max(0px, (100% - var(--max)) / 2 - 40px);
    height: min(88%, 820px); aspect-ratio: 977 / 936; translate: 0 -46%;
    background: radial-gradient(closest-side, rgba(10, 66, 114, .55), rgba(10, 66, 114, 0));
    -webkit-mask:
        linear-gradient(90deg, transparent 0%, transparent 12%, #000 55%),
        linear-gradient(180deg, transparent 0%, #000 12%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask:
        linear-gradient(90deg, transparent 0%, transparent 12%, #000 55%),
        linear-gradient(180deg, transparent 0%, #000 12%, #000 86%, transparent 100%);
    mask-composite: intersect;
}
.hero-head__lines {
    position: absolute; inset: 0;
    background: var(--head-color);
    -webkit-mask: url("../assets/img/commons/testa-poligonale.svg") center / contain no-repeat;
    mask: url("../assets/img/commons/testa-poligonale.svg") center / contain no-repeat;
}

.hero-copy { max-width: 720px; }
.hero .back { display: flex; width: fit-content; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--ice); font-size: 14px; font-weight: 600; text-decoration: none; }
.hero .back:hover { color: #fff; }
.hero .badge { display: inline-flex; align-items: center; height: 58px; padding: 10px 20px; margin-bottom: 28px; border-radius: 14px; background: #fff; }
.hero .badge img { max-height: 38px; width: auto; }
.hero .eyebrow { margin-bottom: 20px; font-size: 14px; font-weight: 600; color: var(--ice); }
.hero h1 { font: 300 clamp(40px, 5.6vw, 84px)/1.04 var(--sans); letter-spacing: -.035em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .05em; }
.hero h1 .line > span { display: block; }
.hero .lead { margin-top: 28px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ice); max-width: 52ch; }
.hero .lead + .lead { margin-top: 14px; }
.hero .note { margin-top: 10px; font-size: 13px; color: var(--fog); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero :focus-visible { outline-color: var(--ice); }

/* ---------- sezioni ---------- */
.sec { padding: clamp(80px, 10vw, 140px) 0; }
.sec--tint { background: var(--tint); }
.sec--tight-top { padding-top: 0; }
.h2 { font: 300 clamp(34px, 4vw, 58px)/1.06 var(--sans); letter-spacing: -.03em; }
.h3 { font: 500 clamp(19px, 1.6vw, 22px)/1.35 var(--sans); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head p { color: var(--muted); max-width: 46ch; }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.sec-head--center .h2 { max-width: 22ch; }
.sec-head--center p { max-width: 56ch; }
.prose { color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 62ch; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); font-weight: 600; }

/* ---------- testo + immagine ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--flip > :first-child { order: 2; }
.split .h2 { margin-bottom: 24px; }
.split figure { justify-self: center; width: min(100%, 480px); }
/* split senza immagine (pagine prodotto): solo testo, a una colonna */
.split--solo { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
/* logo grande della soluzione accanto a "Panoramica": senza sfondo né riquadro, nei colori originali */
.split .split-logo { width: min(100%, 440px); }
.split .split-logo img { width: 100%; height: auto; max-height: 300px; object-fit: contain; mix-blend-mode: normal; }
/* logo disponibile solo in bassa risoluzione (circa 200px): più piccolo, sennò si sgrana */
.split .split-logo--small { width: min(100%, 280px); }
.split figure img { mix-blend-mode: multiply; }
.split + .split { margin-top: clamp(64px, 8vw, 112px); }

/* ---------- caratteristiche (icona, titolo, testo) ---------- */
.features { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features li { padding: 32px 28px 34px; border-radius: 22px; background: #fff; }
.sec--tint .features li { background: #fff; }
.sec:not(.sec--tint) .features li { background: var(--tint); }
.features img { width: 52px; height: 52px; margin-bottom: 20px; mix-blend-mode: multiply; }
.features h3 { font: 600 18px/1.35 var(--sans); }
.features p { margin-top: 8px; color: var(--muted); font-size: 15px; }

.features--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.features--4 h3 { font-size: 20px; }

/* ---------- due blocchi affiancati (testo) ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.duo article { padding: clamp(32px, 4vw, 56px); border-radius: var(--radius); background: #fff; }
.duo .h2 { font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 20px; }
.duo p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.duo p + p { margin-top: 14px; }

/* ---------- righe alternate titolo / testo (Chi siamo: per chi lavoriamo, principi) ----------
   Stesso schema della pagina originale: titolo 35% e testo 55%, la seconda riga
   invertita, una linea sottile tra le due; qui su fondo chiaro con testo scuro. */
.pair { display: flex; align-items: center; justify-content: space-between; gap: clamp(32px, 6vw, 70px); padding: clamp(40px, 5vw, 56px) 0; }
.pair + .pair { border-top: 1px solid var(--line); }
.pair--flip { flex-direction: row-reverse; }
.pair .h2 { flex: 0 0 35%; font-size: clamp(42px, 5vw, 72px); line-height: 1; }
.pair p { flex: 0 0 55%; color: var(--muted); font-size: 17px; line-height: 1.8; }

/* ---------- elenco di vantaggi (Lab) ---------- */
.offers { list-style: none; display: grid; gap: 12px; margin-top: 28px; }
.offers li { padding: 20px 24px; border-radius: 18px; background: var(--tint); color: var(--muted); line-height: 1.6; }
.offers strong { color: var(--ink); font-weight: 600; }

/* ---------- vetrina di un'immagine (prodotti) ---------- */
.showcase { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius); background: var(--tint); }
.showcase img { margin: 0 auto; mix-blend-mode: multiply; }

/* ---------- elenco numerato (solo per sequenze vere) ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; background: #fff; font-weight: 500; }
.steps li::before { content: counter(step, decimal-leading-zero); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; }

/* ---------- card con immagine (aree, lab) ---------- */
.tiles { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tiles li { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; }
.sec:not(.sec--tint) .tiles li { background: var(--tint); }
.tiles img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tiles .body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tiles .kicker { font-size: 13px; font-weight: 600; color: var(--blue); }
.tiles h3 { font: 600 19px/1.3 var(--sans); }
.tiles p { color: var(--muted); font-size: 15px; }
.tiles .tags { margin-top: auto; padding-top: 12px; font-size: 13px; color: var(--muted); }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--2 img { aspect-ratio: 16 / 7; }
.tiles a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.tiles a:hover h3 { color: var(--blue); }

/* ---------- card prodotto (logo, testo, link) ---------- */
.products { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.products a {
    display: flex; flex-direction: column; gap: 18px; height: 100%; padding: 28px; border-radius: 22px;
    background: #fff; text-decoration: none; color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
    transition: box-shadow .25s var(--ease), translate .25s var(--ease);
}
.products a:hover { box-shadow: inset 0 0 0 1.5px var(--blue); translate: 0 -3px; }
.products .logo { height: 56px; display: flex; align-items: center; }
.products .logo img { max-height: 46px; max-width: 70%; width: auto; }
/* logo quasi quadrato (CobolSense): un po' più alto, altrimenti la scritta non si legge */
.products .logo img[src*="cobol"] { max-height: 58px; }
.products .kicker { font-size: 13px; font-weight: 600; color: var(--blue); }
.products p { color: var(--muted); font-size: 15px; }
.products .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--blue); }

/* ---------- soluzioni: tutte le card in vista, con le aree come tag ----------
   I tre stili dei tag restano nei blu del brand ma si distinguono a colpo d'occhio:
   Enterprise pieno chiaro, Process solo bordo, Innovation pieno scuro.
   Il filtro non nasconde nulla: attenua le card fuori dall'area scelta. */
.products--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.products li { transition: opacity .3s var(--ease), filter .3s var(--ease); }
.products li.is-dim { opacity: .32; filter: grayscale(1); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.tag--enterprise { background: var(--ice); color: var(--blue); }
.tag--process { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); }
.tag--innovation { background: var(--blue); color: #fff; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
    border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--line);
    transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.filter button:hover { box-shadow: inset 0 0 0 1.5px var(--blue); }
.filter button[aria-pressed="true"] { background: var(--blue); color: #fff; box-shadow: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--enterprise { background: var(--ice); box-shadow: inset 0 0 0 1px rgba(10, 66, 114, .25); }
.dot--process { box-shadow: inset 0 0 0 2px currentColor; }
.dot--innovation { background: currentColor; }

/* ---------- schede (tab) ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; margin-bottom: 32px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease); }
.tabs button[aria-selected="true"] { background: var(--blue); color: #fff; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-entering { animation: tab-in .35s var(--reveal-ease); }
@keyframes tab-in { from { opacity: 0; translate: 0 10px; } }

/* ---------- loghi (tecnologie, clienti) ---------- */
.logos {
    --chip: 132px; --gap: 14px;
    list-style: none; margin: 0 auto;
    max-width: calc(9 * var(--chip) + 8 * var(--gap));
    display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
}
.logos li { flex: 0 0 var(--chip); display: grid; place-items: center; height: 80px; padding: 0 18px; background: #fff; border-radius: 14px; }
.sec:not(.sec--tint) .logos li { box-shadow: inset 0 0 0 1px var(--line); }
.logos img { max-height: 32px; max-width: 100%; width: auto; }
.logos--clients { --chip: 170px; max-width: calc(5 * var(--chip) + 4 * var(--gap)); }
.logos--clients li { height: 96px; }
.logos--clients img { max-height: 54px; mix-blend-mode: multiply; }
.logos[hidden] { display: none; }
.logos--more { margin-top: var(--gap); }
.logos--more:not([hidden]) { animation: tab-in .45s var(--reveal-ease); }
.more-logos { display: flex; justify-content: center; margin-top: 28px; }
.more-logos[hidden] { display: none; }

/* ---------- registro dei progetti (anno grande fermo) ---------- */
.ledger-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.year-stick { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
/* ritaglio solo in alto e in basso (per l'animazione del cambio anno): con overflow hidden
   le cifre larghe venivano tagliate di qualche pixel a destra */
.year-big { position: relative; height: 1em; clip-path: inset(0 -.5em); white-space: nowrap; font: 700 clamp(88px, 14vw, 200px)/1 var(--sans); letter-spacing: -.05em; color: var(--blue); font-variant-numeric: tabular-nums; }
.year-big span { position: absolute; inset: 0; transition: translate .45s var(--ease), opacity .3s var(--ease); }
.year-big span.out-up { translate: 0 -55%; opacity: 0; }
.year-big span.in-down { translate: 0 55%; opacity: 0; transition: none; }
.rows { list-style: none; }
.row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); transition: opacity .3s var(--ease); }
.row:last-child { border-bottom: 1px solid var(--line); }
.rows.is-tracking .row:not(.is-current) { opacity: .45; }
.row time { font: 600 14px/1.9 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.row h3 { font: 500 clamp(18px, 1.7vw, 22px)/1.35 var(--sans); }
.row p { margin-top: 4px; color: var(--muted); }

/* ---------- finestra dei progetti che scorrono da soli (Innovazione su misura) ----------
   Si vedono circa 4 righe; scorrono in continuazione. La rotellina e il dito sopra la
   finestra muovono la pagina (la finestra non cattura lo scroll); per scorrere le date:
   trascinarle col mouse, i pulsanti su/giù o le frecce della tastiera. */
.ledger-body:has(.rows-box) { align-items: center; }
.ledger-body:has(.rows-box) .year-stick { position: static; align-self: center; }
.rows-box { position: relative; }
.rows-viewport {
    --rows-h: 440px;
    height: var(--rows-h); overflow: hidden; cursor: grab; border-radius: 4px;
    touch-action: pan-y;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.rows-viewport.is-dragging { cursor: grabbing; user-select: none; }
.rows-viewport .row { border-top: 1px solid var(--line); border-bottom: 0; }
.rows-viewport .row:not(.is-current) { opacity: .45; }
.rows-viewport .row.is-current { opacity: 1; }
.rows-ctrl { display: flex; justify-content: flex-start; gap: 8px; margin-top: 12px; }
.rows-ctrl button {
    width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--blue);
    display: grid; place-items: center; cursor: pointer;
    transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), scale .2s var(--ease);
}
.rows-ctrl button:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.rows-ctrl button:active { scale: .94; }

/* ---------- contatti ---------- */
.contact-grid { list-style: none; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.contact-grid li { padding: 32px 30px; border-radius: 22px; background: var(--tint); }
.contact-grid img { width: 28px; height: 28px; margin-bottom: 18px; }
.contact-grid h2 { font: 600 14px/1.4 var(--sans); color: var(--blue); margin-bottom: 10px; }
.contact-grid h2:not(:first-of-type) { margin-top: 22px; }
.contact-grid p, .contact-grid a { font-size: 17px; line-height: 1.6; }
.contact-grid a { color: var(--ink); font-weight: 600; text-decoration: none; }
.contact-grid a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- video ---------- */
.video { overflow: hidden; border-radius: var(--radius); }   /* niente sfondo: agli angoli arrotondati si vedevano archetti scuri */
.video video { width: 100%; }

/* ---------- frase in evidenza ---------- */
.statement { max-width: 30ch; margin: 0 auto; text-align: center; font: 300 clamp(26px, 3vw, 42px)/1.3 var(--sans); letter-spacing: -.02em; }

/* ---------- invito: "Scarica la presentazione" nel riquadro scuro ---------- */
.cta { padding: clamp(72px, 9vw, 120px) 0; }
.cta .box {
    position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); background: var(--navy); color: #fff;
    padding: clamp(56px, 8vw, 104px) clamp(24px, 6vw, 80px);
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.cta .box::before {
    content: ""; position: absolute; inset: 32% 0 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(211, 235, 255, .30) 0%, rgba(211, 235, 255, .12) 40%, rgba(211, 235, 255, 0) 75%),
        radial-gradient(circle, rgba(211, 235, 255, .22) 1px, transparent 1.25px);
    background-size: 130% 100%, 6px 6px;
    background-position: 50% 100%, 0 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}
.cta .eyebrow { font-size: 14px; font-weight: 600; color: var(--ice); }
.cta .h2 { margin-top: 18px; max-width: 18ch; }
.cta p { margin-top: 16px; color: var(--ice); max-width: 50ch; }
.cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.cta :focus-visible { outline-color: var(--ice); }

/* ---------- piè di pagina ---------- */
.foot { background: var(--night); color: var(--fog); padding: 64px 0 32px; font-size: 14px; }
.foot .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot .logo { width: 150px; margin-bottom: 20px; }
.foot h2 { font: 600 14px/1.4 var(--sans); color: #fff; margin-bottom: 12px; }
.foot ul { list-style: none; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
/* su desktop le due .foot-col non contano: i 4 blocchi sono colonne della griglia */
.foot .foot-col { display: contents; }
.foot .legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); }
.foot :focus-visible { outline-color: var(--ice); }

/* ---------- freccia di scorrimento ----------
   In basso a destra: scende con un piccolo rimbalzo e porta alla sezione
   successiva; a fondo pagina si gira e riporta in cima. Al passaggio del
   mouse (o con Tab) apre l'elenco delle sezioni della pagina. */
.scroll-cue { position: fixed; right: clamp(16px, 2.5vw, 32px); bottom: clamp(16px, 2.5vw, 32px); z-index: 40; }
.scroll-cue__btn {
    width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; color: var(--blue);
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
    box-shadow: 0 10px 30px -10px rgba(6, 26, 44, .45), inset 0 0 0 1px rgba(255, 255, 255, .6);
    transition: background-color .25s var(--ease), scale .2s var(--ease);
}
.scroll-cue__btn:hover { background: #fff; }
.scroll-cue__btn:active { scale: .94; }
.scroll-cue__btn svg { transition: rotate .5s var(--ease); }
.scroll-cue.is-up .scroll-cue__btn svg { rotate: 180deg; }
@media (prefers-reduced-motion: no-preference) {
    .scroll-cue:not(.is-up):not(:hover) .scroll-cue__btn svg { animation: cue-bounce 2.4s var(--ease) infinite; }
}
@keyframes cue-bounce {
    0%, 55%, 100% { translate: 0 0; }
    25% { translate: 0 4px; }
}

/* ---------- comparsa allo scroll (data-reveal) ----------
     data-reveal            sale di poco e compare
     data-reveal-stagger    i figli entrano in cascata
     data-reveal="zoom"     immagine che compare e si mette a fuoco
     data-reveal="mask"     titolo che sale da sotto una linea invisibile */
@media (prefers-reduced-motion: no-preference) {
    .reveal-ready [data-reveal]:not(.is-visible),
    .reveal-ready [data-reveal-stagger] > :not(.is-visible) { opacity: 0; }
    .reveal-ready [data-reveal].is-visible,
    .reveal-ready [data-reveal-stagger] > .is-visible {
        animation: reveal-up .8s var(--reveal-ease) backwards;
        animation-delay: calc(var(--reveal-order, 0) * 90ms);
    }
    .reveal-ready [data-reveal="zoom"].is-visible { animation-name: reveal-zoom; animation-duration: .6s; }
    .reveal-ready [data-reveal="mask"].is-visible { animation-name: reveal-mask; animation-duration: .7s; }
}
@keyframes reveal-up { from { opacity: 0; translate: 0 24px; } }
@keyframes reveal-zoom { from { opacity: 0; scale: 1.04; } }
@keyframes reveal-mask {
    from { translate: 0 100%; clip-path: inset(-.5em -.5em 100% -.5em); }
    to { translate: 0 0; clip-path: inset(-.5em -.5em -.5em -.5em); }
}

/* ---------- apertura dell'hero: foto a fuoco, titolo riga per riga ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .hero-photo, .js .hero-head { opacity: 0; scale: 1.08; }
    .js.is-loaded .hero-head { opacity: 1; scale: 1; transition: opacity 1.2s var(--ease), scale 1.6s var(--ease); }
    .js .hero h1 .line > span { translate: 0 105%; }
    .js .hero .hero-intro { opacity: 0; translate: 0 14px; }
    .js.is-loaded .hero-photo { opacity: 1; scale: 1; transition: opacity 1.2s var(--ease), scale 1.6s var(--ease); }
    .js.is-loaded .hero h1 .line > span { translate: 0 0; transition: translate .8s var(--ease) calc(.15s + var(--i, 0) * 70ms); }
    .js.is-loaded .hero .hero-intro { opacity: 1; translate: none; transition: opacity .6s var(--ease) .45s, translate .6s var(--ease) .45s; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- pagina in dissolvenza (prova su Innovazione su misura: <body class="fade-page">) ----------
   Lo sfondo parte dal blu notte dell'hero e, scorrendo, diventa chiaro passando per i blu del
   brand. js/stile.js calcola lo sfondo dalla posizione di scorrimento e sceglie ogni volta i
   colori di testo, testo secondario, accento e linee che si leggono meglio su quello sfondo;
   il passaggio tra chiaro e scuro avviene con una dissolvenza (le variabili sono registrate
   con @property, così si possono animare). Hero, testata e piè di pagina tengono i loro colori. */
@property --page-bg { syntax: "<color>"; inherits: true; initial-value: #061a2c; }
@property --page-fg { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --page-muted { syntax: "<color>"; inherits: true; initial-value: #a9bfd2; }
@property --page-accent { syntax: "<color>"; inherits: true; initial-value: #d3ebff; }
@property --page-line { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, .16); }
.fade-page {
    background: var(--page-bg);
    transition: --page-fg .5s ease, --page-muted .5s ease, --page-accent .5s ease, --page-line .5s ease;
}
.fade-page main > .sec {
    background: transparent;
    color: var(--page-fg);
    --ink: var(--page-fg); --muted: var(--page-muted); --line: var(--page-line); --blue: var(--page-accent);
}
/* le card bianche restano bianche: dentro tengono i colori normali, qualunque sia lo sfondo della pagina */
.fade-page main > .sec :is(.features li, .duo article, .steps li, .tiles li, .products a, .filter button, .tabs, .logos li) {
    --ink: #0d2236; --muted: #55606a; --line: #dde7f0; --blue: #0a4272;
    color: var(--ink);
}
.fade-page .rows-ctrl button { background: transparent; color: var(--page-fg); border-color: var(--page-line); }
.fade-page .rows-ctrl button:hover { background: var(--page-fg); color: var(--page-bg); border-color: var(--page-fg); }
.fade-page .top.is-scrolled {
    background: color-mix(in srgb, var(--page-bg) 78%, transparent);
    color: var(--page-fg);
    box-shadow: 0 1px 0 var(--page-line);
}
.is-page-dark .fade-page .top.is-scrolled .brand .on-dark { opacity: 1; }
.is-page-dark .fade-page .top.is-scrolled .brand .on-light { opacity: 0; }
.is-page-dark .fade-page .top.is-scrolled .btn { background: #fff; color: #0a4272; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .nav, .top .btn { display: none; }
    .menu-btn { display: block; }
    .top.is-open { background: #fff; color: var(--ink); }
    .top.is-open .brand .on-dark { opacity: 0; }
    .top.is-open .brand .on-light { opacity: 1; }
    .top.is-open .nav {
        display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
        position: absolute; top: var(--header-h); left: 0; right: 0;
        padding: 16px var(--gutter) 24px; background: #fff; border-bottom: 1px solid var(--line); font-size: 17px;
    }
    .top.is-open .nav a { padding: 10px 0; }
    .top.is-open .menu-btn span:nth-child(1) { translate: 0 7px; rotate: 45deg; }
    .top.is-open .menu-btn span:nth-child(2) { opacity: 0; }
    .top.is-open .menu-btn span:nth-child(3) { translate: 0 -7px; rotate: -45deg; }
    /* la foto sta nella metà alta, sopra il testo, e non gli passa mai dietro */
    /* titolo alla stessa altezza di soluzioni.html */
    .hero { --title-y: calc(var(--header-h) + max(26svh, 200px)); }
    
    .hero-photo--logo { justify-content: center; }
    .hero-photo--logo img { margin-right: 0; width: min(380px, 75vw); max-height: 140px; }
    .hero-photo { inset: 0 0 auto 0; width: 100%; height: calc(var(--title-y) - 50px); -webkit-mask-image: radial-gradient(90% 85% at 62% 45%, #000 35%, transparent 78%); mask-image: radial-gradient(90% 85% at 62% 45%, #000 35%, transparent 78%); }
    .hero-head {
        top: calc(var(--header-h) + 4px); right: 50%; height: min(34%, 380px); translate: 50% 0;
        -webkit-mask: linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 100%);
        mask: linear-gradient(180deg, transparent 0%, #000 12%, #000 62%, transparent 100%);
    }
    .hero-photo::after { background: linear-gradient(0deg, var(--night) 0%, rgba(6, 26, 44, 0) 40%); }
    .features, .features--4, .tiles, .products, .products--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid li:first-child { grid-column: 1 / -1; }
    /* tablet: due colonne indipendenti (logo + Sedi | Azienda + Compliance), senza buchi tra le righe */
    .foot .grid { grid-template-columns: 1fr 1fr; gap: 32px 48px; }
    .foot .foot-col { display: flex; flex-direction: column; gap: 36px; }
}
/* ---------- solo tablet (721–1100px) ---------- */
@media (min-width: 721px) and (max-width: 1100px) {
    /* titolo vicino alla barra in alto, in tutte le pagine (sopra resta lo spazio per link "indietro" e badge) */
    .hero { --title-y: calc(var(--header-h) + 190px); }
    /* tutte le pagine tranne la home: blocco del banner un po' più in basso, in proporzione allo schermo */
    .hero:not(:has(.hero-swiper)) { --title-y: calc(var(--header-h) + 190px + 7svh); }
    /* home: testa poligonale a destra, accanto al titolo, subito sotto la barra (può passargli dietro) */
    .hero-head { top: calc(var(--header-h) + 8px); right: 3%; height: min(46svh, 500px); translate: 0 0; }
    /* bottoni subito sotto il testo (niente vuoto in mezzo); il blocco scende verso il basso
       sui tablet verticali, dove lo schermo è alto, e la foto sopra si allarga di conseguenza */
    /* lab: tre card a piramide rovesciata, due sopra e una centrata sotto */
    .features--pyramid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .features--pyramid > li { grid-column: span 2; }
    .features--pyramid > li:nth-child(3):last-child { grid-column: 2 / span 2; }
}
@media (max-width: 820px) {
    .split, .ledger-body, .duo { grid-template-columns: 1fr; }
    .split--flip > :first-child { order: 0; }
    .pair, .pair--flip { flex-direction: column; align-items: flex-start; gap: 18px; }
    .pair .h2, .pair p { flex: none; }
}
@media (max-width: 720px) {
    :root { --header-h: 64px; }
    .brand { width: 100px; }
    .features, .features--4, .tiles, .tiles--2, .products, .products--4, .contact-grid { grid-template-columns: 1fr; }
    .ledger-body { gap: 0; }
    .year-stick {
        top: var(--header-h); z-index: 5; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter);
        background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
    }
    .year-big { font-size: 40px; width: 2.8em; }
    .ledger-body:has(.rows-box) .year-stick { position: static; margin: 0 0 8px; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .ledger-body:has(.rows-box) .year-big { font-size: 64px; }
    .rows-viewport { --rows-h: 420px; }
    .row { grid-template-columns: 1fr; gap: 2px; }
    .logos { --chip: calc((100% - 2 * var(--gap)) / 3); }
    .logos--clients { --chip: calc((100% - var(--gap)) / 2); }
    .scroll-cue__btn { width: 48px; height: 48px; }
}
@media (max-width: 560px) {
    .foot .grid { grid-template-columns: 1fr; }
}

/* ---------- titolo degli hero sempre alla stessa altezza ----------
   link "indietro", badge ed eyebrow stanno sopra la linea del titolo senza spingerlo giù */
.hero-copy { position: relative; }
.hero-pre { position: absolute; left: 0; right: 0; bottom: 100%; }
/* l'hero riempie esattamente la prima schermata (svh: l'altezza con la barra del browser visibile,
   così su telefono non salta). Titolo sempre alla stessa altezza, bottoni sempre subito sotto il testo:
   lo spazio che avanza resta sotto i bottoni. Se il testo non ci sta, l'hero si allunga. */
.hero, .hero--short { min-height: 100svh; align-items: stretch; }
.hero > .wrap { display: flex; flex-direction: column; }
.hero-copy { flex: 1 0 auto; display: flex; flex-direction: column; }
.hero-intro { flex: 1 0 auto; display: flex; flex-direction: column; }
.hero .hero-copy > .hero-intro > .actions { margin-top: 0; }
.hero .hero-intro > :nth-last-child(2) { margin-bottom: 36px; }
/* telefono (come lab.html): l'hero riempie lo schermo e i bottoni chiudono la prima schermata,
   sempre alla stessa distanza dal fondo; il titolo parte sempre alla stessa altezza */
@media (max-width: 720px) {
    .hero .hero-copy > .hero-intro > .actions { margin-top: auto; }
}
/* home: le slide sono alte quanto la più lunga, i bottoni bloccati nello stesso punto */
.hero .hero-swiper { flex: 0 0 auto; display: flex; flex-direction: column; }
.hero .hero-swiper > .swiper-wrapper { flex: 1 0 auto; height: auto; }
.hero .hero-swiper .swiper-slide { height: auto; }
/* home: l'eyebrow della slide sta sopra la linea del titolo */
.hero:has(.hero-swiper) { padding-top: calc(var(--title-y) - 43px); }

/* bottoni sempre affiancati (innovation): sotto i 1100px si stringono e, se serve, vanno a capo dentro il bottone */
.hero .actions--row { flex-wrap: nowrap; }
@media (max-width: 1100px) {
    .hero .actions--row { gap: 10px; }
    .hero .actions--row .btn { flex: 0 1 auto; min-height: 50px; padding: 8px 18px; line-height: 1.25; text-align: center; }
}
@media (max-width: 600px) {
    .hero .actions--row .btn { min-height: 46px; padding: 8px 14px; font-size: 14px; }
}

/* ---------- carosello nell'hero della home (js/hero-carosello.js + Swiper) ---------- */
/* Swiper dentro una griglia: senza min-width:0 la slide si allarga oltre lo schermo */
.hero > .wrap, .hero-copy { min-width: 0; }
.hero-copy { max-width: 720px; }
/* margine interno: l'overflow nascosto non deve tagliare le animazioni d'entrata */
/* .hero davanti: swiper-bundle.css (caricato dopo) rimette padding 0 e margin auto su .swiper */
.hero .hero-swiper { overflow: hidden; padding: 24px; margin: -24px; }
/* fade: tutte le slide alte come la più alta, così i controlli non saltano */
.hero-swiper .swiper-wrapper { align-items: stretch; }
/* contenuto attaccato in alto: occhiello e titolo partono alla stessa altezza in ogni slide */
.hero-swiper .swiper-slide { height: auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.hero-swiper .swiper-slide > * { max-width: 100%; }

/* titolo delle slide prodotto: sempre 3 righe decise a mano (.line, mai a capo da sole).
   La dimensione segue la larghezza dello schermo, così la riga più lunga
   ("Gestione centralizzata", "scansione documentale") entra sempre e gli a capo restano identici */
.hero .hs-title { font: 300 min(58px, 6.4vw)/1.1 var(--sans); letter-spacing: -.03em; }
.hero .hs-title .line { display: block; white-space: nowrap; }
.hero .hs-title em { font-style: normal; color: var(--ice); }
/* slide delle competenze: occhiello (badge "Nuovo" su CobolSense), titolo, testo, keywords, pulsante */
.hero .hs-new {
    display: inline-block; margin-right: 8px; padding: 3px 10px; border-radius: 999px;
    background: var(--ice); color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    vertical-align: 1px;
}
.hero .hs-slide .lead { margin-top: 22px; }
.hero .hs-keys { margin-top: 14px; margin-bottom: 26px; font-size: 13px; line-height: 1.6; color: var(--fog); max-width: 60ch; }
.hero .hs-keys span { color: var(--ice); font-weight: 600; }
/* pulsante sempre nello stesso punto: le slide sono tutte alte come la più alta
   e il pulsante va in fondo (margin-top: auto); lo spazio minimo sopra lo danno keywords e lead */
.hero .hs-slide .actions { margin-top: auto; }
/* 1 0 auto e non 1: con base 0 la slide d'apertura verrebbe misurata più bassa del suo contenuto */
.hero-swiper .hero-intro { flex: 1 0 auto; display: flex; flex-direction: column; }
.hero-swiper .hero-intro .lead { margin-bottom: 26px; }

/* entrata della slide attiva: badge, occhiello, titolo, testo in cascata */
@media (prefers-reduced-motion: no-preference) {
    .hs-slide > * { opacity: 0; translate: 0 18px; }
    .swiper-slide-active.hs-slide > * {
        opacity: 1; translate: none;
        transition: opacity .7s var(--ease), translate .8s var(--ease);
        transition-delay: calc(.12s + var(--d, 0) * 80ms);
    }
}

/* controlli: numero, barre di avanzamento, frecce, pausa */
/* prima slide un po' più compatta: è la più alta e decide dove stanno i controlli */
.hero-swiper h1 { font-size: clamp(40px, 5vw, 72px); }
.hero-swiper .hero-intro .lead { margin-top: 20px; }
.hero-swiper .hero-intro .actions { margin-top: auto; }
/* position + z-index: il margine interno del carosello (alone/scala del logo) passa sopra ai controlli
   e senza questo si prenderebbe i clic su frecce e barre */
.hs-controls { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; margin-top: 24px; color: var(--ice); }
.hs-count { font-size: 13px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; min-width: 4.5ch; }
.hs-count b { color: #fff; font-weight: 600; }
.hs-bars { display: flex; gap: 6px; flex: 1; max-width: 300px; }
.hs-bar {
    position: relative; flex: 1; height: 24px; border: 0; background: none; cursor: pointer; padding: 0;
}
.hs-bar::before, .hs-bar::after {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px;
}
.hs-bar::before { background: rgba(211, 235, 255, .25); }
.hs-bar::after { background: #fff; transform: scaleX(0); transform-origin: left; }
.hs-bar.is-done::after { transform: scaleX(1); }
.hs-bar.is-active::after { transform: scaleX(var(--p, 0)); }
.hs-bar:hover::before { background: rgba(211, 235, 255, .5); }
.hs-btns { display: flex; gap: 8px; }
.hs-btn {
    display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%;
    background: transparent; color: #fff; cursor: pointer;
    box-shadow: inset 0 0 0 1.5px rgba(211, 235, 255, .4);
    transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.hs-btn:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255, 255, 255, .06); }
.hs-btn svg { width: 16px; height: 16px; }
.hs-btn .i-play { display: none; }
.is-paused .hs-btn .i-play { display: block; }
.is-paused .hs-btn .i-pause { display: none; }

/* entrata dei controlli insieme al resto dell'hero */
@media (prefers-reduced-motion: no-preference) {
    .js .hs-controls { opacity: 0; translate: 0 14px; }
    .js.is-loaded .hs-controls { opacity: 1; translate: none; transition: opacity .6s var(--ease) .7s, translate .6s var(--ease) .7s; }
}

@media (max-width: 600px) {
    .hs-controls { flex-wrap: wrap; gap: 14px; margin-top: 20px; }
    /* pulsanti più compatti: i due della slide d'apertura devono stare su una riga, così stanno alla stessa altezza degli altri */
    .hero-swiper .actions { flex-wrap: nowrap; gap: 10px; }
    .hero-swiper .btn { min-height: 46px; padding: 0 16px; font-size: 14px; }
    .hs-bars { order: 3; flex-basis: 100%; max-width: none; }
    .hs-btns { margin-left: auto; }
}
