/*
 * Stand Dashboard IG-IBD - iPad in orizzontale, uso touch in autonomia da parte dei medici.
 * Colori e regole dal Brand Book Omvoh (GM-52833, gennaio 2025), su richiesta del cliente (2026-10-09),
 * SENZA nome commerciale ne' principio attivo (vincolo del deposito AIFA): niente logo, niente pattern
 * (contengono il logotipo), nessuna citazione del prodotto nel testo.
 *  - Palette: True Blue #0033A0 dominante, Green #97D801 solo come grafica (mai testo, p. 3.6), bianco;
 *    secondari Black #202621 e Light Gray #F1F1F2.
 *  - Font digitale: Roboto (p. 3.7). Titolo in maiuscolo, tracking -10 (p. 3.8).
 *  - Grafica: framing device in alto, True Blue pieno con un solo gradino, sotto il 20% dello schermo (p. 3.21).
 *  - Contrasti verificati AA (soglia Lilly 3.5:1 per testo grande e oggetti grafici, p. 3.4).
 */

:root {
    --true-blue: #0033A0;
    --green: #97D801;
    --white: #FFFFFF;
    --black: #202621;
    --light-gray: #F1F1F2;
    --dark-gray: #737682;

    /* margine Lilly: lato lungo / 25 */
    --gutter: clamp(32px, 4vw, 56px);
    /* altezza del framing device: con il gradino resta sotto il 20% dell'area */
    --frame-h: clamp(120px, 19vh, 190px);
    --radius: 18px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    box-sizing: border-box;
}

html,
body {
    position: fixed;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.3;
    color: var(--black);
    background: var(--white);
}

/* FRAMING DEVICE: banda True Blue a tutta larghezza in alto; il gradino e' la "linguetta" bianca del titolo */

.frame {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    height: calc(env(safe-area-inset-top, 0px) + var(--frame-h));
    background: var(--true-blue);
    pointer-events: none;
}

/* LAYOUT */

#boxHome {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding:
        calc(env(safe-area-inset-top, 0px) + var(--frame-h) - 1.1em - 14px)
        calc(env(safe-area-inset-right, 0px) + var(--gutter))
        calc(env(safe-area-inset-bottom, 0px) + clamp(18px, 3vh, 32px))
        0;
    /* stessa dimensione del titolo: 1.1em + 14px = altezza della linguetta che entra nella banda */
    font-size: clamp(34px, 4.4vw, 56px);
}

.stand-head {
    font-size: 16px;
}

/* il titolo sta su una linguetta bianca che entra nella banda blu: e' l'unico gradino del frame */
.stand-title {
    display: inline-block;
    margin: 0;
    padding:
        14px
        clamp(20px, 2.4vw, 32px)
        6px
        calc(env(safe-area-inset-left, 0px) + var(--gutter));
    background: var(--white);
    font-size: clamp(34px, 4.4vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--true-blue);
}

.stand-hint {
    margin: 10px 0 0;
    padding-left: calc(env(safe-area-inset-left, 0px) + var(--gutter));
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--true-blue);
}

.stand-groups {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(20px, 3.4vh, 44px);
    padding: clamp(14px, 2.4vh, 32px) 0 clamp(14px, 2.4vh, 32px) calc(env(safe-area-inset-left, 0px) + var(--gutter));
    font-size: 16px;
}

/* etichetta di gruppo: eyebrow maiuscolo (p. 3.8), barretta Green solo grafica, filetto grigio fino al margine */
.stand-group-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--black);
}

.stand-group-label::before {
    content: '';
    flex: none;
    width: 28px;
    height: 4px;
    background: var(--green);
}

.stand-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(32, 38, 33, 0.16);
}

.stand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 1.6vw, 22px);
}

.stand-grid--two {
    grid-template-columns: repeat(2, 1fr);
}

/* TILE: la classe btn-style-inappbrowser resta sui link perche' e' quella storica del progetto */

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    transition:
        transform 180ms var(--ease-out),
        background-color 180ms var(--ease-out),
        box-shadow 180ms var(--ease-out);
    animation: tileIn 700ms var(--ease-out) backwards;
}

.tile:active {
    transform: scale(0.97);
    transition-duration: 80ms;
}

.tile:focus-visible {
    outline: 3px solid var(--true-blue);
    outline-offset: 4px;
}

/* GRIGLIA INTERNA DELLA SCHEDA, uguale per tutte (numeri 01-08 tolti su richiesta cliente, 2026-10-09):
   1. fascia alta con la tipologia, allineata a sinistra come titolo e descrizione;
   2. respiro minimo garantito, cosi' il titolo non si avvicina mai alla tipologia anche quando c'e' la descrizione;
   3. titolo + descrizione allineati al fondo; la freccia in basso a destra non viene mai coperta dal testo. */
.tile-kind {
    align-self: flex-start;
    height: 23px;
    margin-bottom: clamp(14px, 2vh, 22px);
    font-size: 12px;
    font-weight: 700;
    line-height: 23px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tile-title {
    margin-top: auto;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.08;
    text-wrap: balance;
}

.tile-desc {
    margin-top: 6px;
    padding-right: 58px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
}

/* freccia nel cerchio, come l'iconografia del brand (p. 3.15) */
.tile-arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 50%;
    transition: transform 220ms var(--ease-out);
}

.tile:active .tile-arrow {
    transform: translate(3px, -3px);
}

/* Risorse: True Blue pieno, testo bianco, cerchio Green con freccia True Blue */

.tile--blue {
    min-height: clamp(112px, 15vh, 176px);
    background: var(--true-blue);
    color: var(--white);
    box-shadow: 0 16px 28px -18px rgba(0, 51, 160, 0.75);
}

.tile--blue:active {
    background: #002B88;
}

.tile--blue .tile-title {
    padding-right: 58px;
    font-size: clamp(21px, 2.2vw, 28px);
}

/* logo della campagna al posto del titolo testuale (Vohice): bianco e verde su True Blue */
.tile-logo {
    display: block;
    margin-top: auto;
    width: auto;
    height: clamp(30px, 3.4vw, 42px);
    max-width: calc(100% - 64px);
    object-fit: contain;
    object-position: left bottom;
}

.tile--blue .tile-arrow {
    background: var(--green);
    color: var(--true-blue);
}

/* Servizi Lilly: Light Gray, testo True Blue / Black, cerchio True Blue con freccia bianca */

.tile--gray {
    min-height: clamp(108px, 15vh, 132px);
    background: var(--light-gray);
    color: var(--true-blue);
}

.tile--gray:active {
    background: #E6E6E8;
}

.tile--gray .tile-title {
    padding-right: 58px;
    font-size: clamp(19px, 1.8vw, 23px);
}

.tile--gray .tile-desc {
    color: var(--black);
}

.tile--gray .tile-arrow {
    background: var(--true-blue);
    color: var(--white);
}

@media (hover: hover) {
    .tile--blue:hover {
        background: #002B88;
    }

    .tile--gray:hover {
        background: #E6E6E8;
    }

    .tile:hover .tile-arrow {
        transform: translate(3px, -3px);
    }
}

/* Unico momento di ingresso: le schede salgono in sequenza.
   Solo transform, niente opacity: se l'animazione non partisse le schede restano comunque visibili. */
@keyframes tileIn {
    from {
        transform: translateY(28px) scale(0.98);
    }

    to {
        transform: none;
    }
}

.stand-group--main .tile:nth-child(1) { animation-delay: 60ms; }
.stand-group--main .tile:nth-child(2) { animation-delay: 110ms; }
.stand-group--main .tile:nth-child(3) { animation-delay: 160ms; }
.stand-group--main .tile:nth-child(4) { animation-delay: 210ms; }
.stand-group--main .tile:nth-child(5) { animation-delay: 260ms; }
.stand-group--main .tile:nth-child(6) { animation-delay: 310ms; }
.stand-group--lilly .tile:nth-child(1) { animation-delay: 380ms; }
.stand-group--lilly .tile:nth-child(2) { animation-delay: 430ms; }

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

/* FOOTER: dicitura a sinistra, sign-off Lilly in basso a destra (p. 3.23) */

.stand-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-left: calc(env(safe-area-inset-left, 0px) + var(--gutter));
    font-size: 16px;
}

#pp-codice-aziendale {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--black);
}

#logoLilly {
    /* il png ha ~30% di margine trasparente: e' gia' il clear space */
    width: clamp(140px, 13vw, 190px);
    margin: -18px -14px -14px 0;
}

#logoLilly img {
    display: block;
    width: 100%;
    height: auto;
}
