/* stesso font dei testi della pagina Who */
@font-face {
    font-family: 'Michroma';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../../fonts/michroma-400-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.what2Title {
    margin: 0;
    padding: 4vh 4vw 0;
    background: #fff;
    color: #222;
    font-family: 'Michroma', 'Eurostile', 'Arial', sans-serif;
    font-weight: 400;
    font-size: clamp(.9rem, 2vw, 1.5rem);
    letter-spacing: .46em;
    text-align: center;
    animation: what2TitleSpread 22s ease-out both;
}

/* al caricamento: prima si allarga (fino al 7,6%: ~1,7s), poi continua molto più lentamente (come in SmartCV) */
@keyframes what2TitleSpread {
    0%   { letter-spacing: 0; opacity: 0; }
    7.6% { letter-spacing: .1em; opacity: 1; }
    100% { letter-spacing: .46em; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .what2Title { animation: none; }
}

/* ogni tanto, a caso, una delle due parole evidenziate diventa bold con gradualità (what_2.js aggiunge .is-pulse).
   Michroma ha un solo peso e uno spessore non si anima per gradi: sopra la parola normale c'è una copia già bold
   (contorno dello stesso colore) la cui opacità sale piano, quindi il passaggio normale -> bold ha tutte le scale intermedie.
   Non cambia la spaziatura, quindi non sposta il resto della frase */
.what2Hl { position: relative; }

.what2Hl::after {
    content: attr(data-t);
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    -webkit-text-stroke: .05em currentColor;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    pointer-events: none;
}

.what2Hl.is-pulse::after { opacity: 1; }

.what2Hl--ai  { color: #f98a47; } /* arancione del nodo centrale del pannello AI */
.what2Hl--ind { color: #2f55a0; } /* blu del poliedro del pannello Industrial */

.what2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4vw;
    min-height: 70vh;
    padding: 2vh 4vw 4vh;
    background: #fff;
    color: #222;
    position: relative;
}

/* linea di separazione al centro, che non tocca il bordo alto e basso */
.what2::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 12%;
    bottom: 12%;
    width: 1px;
    background: rgba(16, 38, 71, .35);
    pointer-events: none;
}

.what2Col {
    flex: 1 1 0;
    min-width: 0;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* altezza minima fissa (sopra la lista prodotti con il pulsante di chiusura, ~450px): aprire/chiudere un elenco non cambia l'altezza del blocco
   e quindi non sposta l'altra immagine */
@media (min-width: 721px) {
    .what2Col { min-height: 470px; }
}

.what2Hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* i button globali (tv-container.css) impongono sfondo/bordo/padding anche in hover/active: qui vanno azzerati */
.what2Trigger,
.what2Trigger:hover,
.what2Trigger:active {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    transform: none;
    cursor: pointer;
}

/* colonna aperta: l'hero lascia il posto all'elenco prodotti */
.what2List {
    display: none;
    flex-direction: column;
    gap: .6rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.what2Col.is-open .what2Hero { display: none; }

/* elenco aperto: parte sempre dall'alto, così il "close" sta alla stessa altezza in entrambe le colonne */
.what2Col.is-open { justify-content: flex-start; }

.what2Col.is-open .what2List {
    display: flex;
    animation: what2Fade .3s ease both;
}

@keyframes what2Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes what2Ghost { from { opacity: 0; } to { opacity: .4; } }

.what2Prod {
    display: block;
    padding: .5rem .9rem;
    border-left: 3px solid rgba(16, 38, 71, .55);
    color: #222;
    text-decoration: none;
    font-family: 'Michroma', 'Eurostile', 'Arial', sans-serif;
    transition: background .25s ease, border-color .25s ease;
}

@media (hover: hover) {
.what2Prod:hover {
    background: rgba(16, 38, 71, .06);
    border-color: #102647;
}
}

.what2ProdHead {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.what2ProdIcon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.what2ProdIcon--none {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(16, 38, 71, .55);
    color: #102647;
    font-weight: 400;
}

.what2ProdName {
    font-weight: 400;
    font-size: .95rem;
}

.what2ProdDesc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: .25rem;
    font-size: .7rem;
    line-height: 1.6;
    color: #555;
}

.what2Img {
    display: block;
    width: 65%;
    height: auto;
    cursor: pointer;
    transition: transform .3s ease, filter .3s ease;
}


/* PixiJS: il canvas si sovrappone all'img (che resta come dimensionamento e fallback) */
.what2Trigger { position: relative; }

.what2Trigger.is-pixi .what2Img {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    pointer-events: none;
}

.what2Canvas {
    display: block;
    position: relative;
    transition: transform .3s ease, filter .3s ease;
    cursor: pointer;
}

.what2Label {
    margin: 2rem 0 0;
    font-family: 'Michroma', 'Eurostile', 'Arial', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.7rem);
    letter-spacing: .02em;
    text-align: center;
    color: #222;
    text-shadow: 0 0 0 rgba(16, 38, 71, 0), 0 0 0 rgba(16, 38, 71, 0);
    transition: text-shadow .3s ease;
}

@media (hover: hover) {
.what2Col:hover .what2Label {
    text-shadow: 2px 2px 0 rgba(16, 38, 71, .55), 4px 4px 6px rgba(16, 38, 71, .35);
}
}

/* click: ogni div si allarga da 0 alla larghezza piena (rivelato, senza deformare il testo), partendo dal lato della linea centrale */
@keyframes what2ExpandLeftCol {
    from { clip-path: inset(0 0 0 100%); }
    to   { clip-path: inset(0 0 0 0); }
}

@keyframes what2ExpandRightCol {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.what2Col.is-open .what2Prod,
.what2Col.is-preview:not(.is-open) .what2Prod {
    animation: what2ExpandLeftCol .7s cubic-bezier(.3, .7, .2, 1) both;
}

.what2Col:not(:first-child).is-open .what2Prod,
.what2Col:not(:first-child).is-preview:not(.is-open) .what2Prod {
    animation-name: what2ExpandRightCol;
}

.what2Col.is-open .what2List li:nth-child(2) .what2Prod,
.what2Col.is-preview:not(.is-open) .what2List li:nth-child(2) .what2Prod { animation-delay: .05s; }
.what2Col.is-open .what2List li:nth-child(3) .what2Prod,
.what2Col.is-preview:not(.is-open) .what2List li:nth-child(3) .what2Prod { animation-delay: .15s; }
.what2Col.is-open .what2List li:nth-child(4) .what2Prod,
.what2Col.is-preview:not(.is-open) .what2List li:nth-child(4) .what2Prod { animation-delay: .25s; }
.what2Col.is-open .what2List li:nth-child(5) .what2Prod,
.what2Col.is-preview:not(.is-open) .what2List li:nth-child(5) .what2Prod { animation-delay: .35s; }
.what2Col.is-open .what2List li:nth-child(n+6) .what2Prod,
.what2Col.is-preview:not(.is-open) .what2List li:nth-child(n+6) .what2Prod { animation-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
    .what2Col.is-open .what2Prod,
    .what2Col.is-preview:not(.is-open) .what2Prod { animation: none; }
}

/* pulsante di chiusura in cima all'elenco (i button globali impongono stili: azzerati come per .what2Trigger) */
.what2CloseWrap { display: flex; justify-content: flex-start; }

.what2Col:first-child .what2CloseWrap { justify-content: flex-end; }

.what2Close,
.what2Close:hover,
.what2Close:active {
    margin: 0;
    padding: .3rem 0;
    border: 0;
    border-radius: 0;
    background: none;
    transform: none;
    color: #102647;
    /* stesso stile della scritta "light to your business" dell'header: largo, sottile, basso */
    font-family: CustomFont, Roboto, sans-serif;
    font-weight: 100;
    font-size: 17px;
    letter-spacing: .6em;
    text-transform: lowercase;
    cursor: pointer;
    opacity: .6;
    transition: opacity .25s ease, letter-spacing .25s ease;
}

@media (hover: hover) {
.what2Close:hover { opacity: 1; letter-spacing: .8em; }
}

/* in anteprima (hover sull'altra immagine) il pulsante non serve */
.what2Col.is-preview:not(.is-open) .what2CloseWrap { visibility: hidden; }

/* colonna sinistra: l'elenco prodotti si allinea a destra, verso la linea di separazione */
.what2Col:first-child .what2Prod {
    text-align: right;
    border-left: 0;
    border-right: 3px solid rgba(16, 38, 71, .55);
}

@media (hover: hover) {
.what2Col:first-child .what2Prod:hover { border-right-color: #102647; }
}

.what2Col:first-child .what2ProdHead { flex-direction: row-reverse; }

/* anteprima: passando sull'immagine di una colonna, nella colonna opposta l'elenco prodotti appare in trasparenza sopra la sua immagine (il click lo rende definitivo) */
.what2Col { position: relative; }

.what2Hero { transition: opacity .3s ease; }

@media (hover: hover) and (min-width: 721px) {
    .what2Col.is-preview:not(.is-open) .what2Hero { opacity: .12; }

    .what2Col.is-preview:not(.is-open) .what2List {
        display: flex;
        position: absolute;
        top: 0; /* stessa posizione dell'elenco aperto (parte dall'alto della colonna) */
        left: 0;
        opacity: .4;
        pointer-events: none;
        animation: what2Ghost .5s ease-out both;
    }
}

@media (max-width: 720px) {
    .what2::after { display: none; }

    .what2 {
        flex-direction: column;
        gap: 6vh;
    }
}
