/* ============================================
   LANDING ANNUNCI PMI — /assistente-telefonico-ai/
   Tema chiaro, rosso AI4CALL come unico accento.
   Elemento distintivo: la chiamata dal vivo nella hero.
   ============================================ */

.lp {
    --lp-ink: #15171C;
    --lp-paper: #FFFFFF;
    --lp-tint: #F5F6F8;
    --lp-line: #E3E5EA;
    --lp-muted: #5A6070;
    --lp-red: #E2241C;
    --lp-red-dark: #B81B15;
    --lp-red-soft: #FDEDEC;
    --lp-live: #12A150;
    --lp-radius: 16px;

    color: var(--lp-ink);
    background: var(--lp-paper);
    font-family: 'DM Sans', sans-serif;
}

.lp h1, .lp h2, .lp h3 {
    font-family: 'Sora', sans-serif;
    color: var(--lp-ink);
    letter-spacing: -0.02em;
}

/* I loghi clienti sono già sotto la hero: niente doppione nel footer */
body:has(.lp) .clients-section {
    display: none;
}

/* ---------- Bottoni ---------- */
.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.lp-btn:focus-visible,
.lp-call-btn:focus-visible,
.lp-line:focus-visible,
.lp-sectors a:focus-visible {
    outline: 3px solid var(--lp-ink);
    outline-offset: 3px;
}
.lp-btn-primary {
    background: var(--lp-red);
    color: #fff;
}
.lp-btn-primary:hover {
    background: var(--lp-red-dark);
    color: #fff;
}
.lp-btn-ghost {
    border: 1.5px solid var(--lp-line);
    color: var(--lp-ink);
    background: var(--lp-paper);
}
.lp-btn-ghost:hover {
    border-color: var(--lp-ink);
    color: var(--lp-ink);
}
.lp-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.lp-cta-center {
    justify-content: center;
}

/* ---------- Hero ---------- */
.lp-hero {
    padding: 136px 0 88px;
    background:
        radial-gradient(900px 420px at 85% 10%, var(--lp-red-soft), transparent 70%),
        var(--lp-paper);
}
.lp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
    align-items: center;
}
.lp-eyebrow {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lp-red);
    margin-bottom: 18px;
}
.lp-hero h1 {
    font-size: clamp(38px, 5.2vw, 62px);
    line-height: 1.05;
    font-weight: 700;
    margin: 0 0 22px;
    text-wrap: balance;
}
.lp-lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--lp-muted);
    max-width: 560px;
    margin: 0 0 32px;
}
.lp-proof {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    font-size: 14px;
    color: var(--lp-muted);
}
.lp-proof li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lp-proof li::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: var(--lp-live);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%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' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Chiamata dal vivo (elemento distintivo) ---------- */
.lp-call {
    background: var(--lp-paper);
    border: 1px solid var(--lp-line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 60px -24px rgba(21, 23, 28, .22);
}
.lp-call-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--lp-muted);
}
.lp-call-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lp-line);
    flex-shrink: 0;
}
.lp-call-timer {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-family: 'Sora', sans-serif;
    opacity: 0;
    transition: opacity .2s;
}
.lp-call-title {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    margin: 18px 0 0;
    letter-spacing: -0.01em;
}
.lp-call-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 96px;
    margin: 20px 0;
}
.lp-call-wave i {
    display: block;
    width: 5px;
    height: 12px;
    border-radius: 3px;
    background: var(--lp-line);
    animation: lp-idle 2.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.09s);
}
.lp-call-btn {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--lp-red);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.lp-call-btn:hover {
    background: var(--lp-red-dark);
}
.lp-call-note {
    font-size: 13px;
    color: var(--lp-muted);
    margin: 14px 0 0;
    text-align: center;
}

/* Stati guidati da data-state (assets/js/pages/landing.js) */
.lp-call[data-state="calling"] .lp-call-dot {
    background: #F5A524;
}
.lp-call[data-state="connected"] .lp-call-dot {
    background: var(--lp-live);
    box-shadow: 0 0 0 0 rgba(18, 161, 80, .5);
    animation: lp-pulse 1.6s ease-out infinite;
}
.lp-call[data-state="connected"] .lp-call-timer {
    opacity: 1;
    color: var(--lp-ink);
}
.lp-call[data-state="connected"] .lp-call-wave i,
.lp-call[data-state="calling"] .lp-call-wave i {
    background: var(--lp-red);
    animation: lp-talk .9s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.07s);
}
.lp-call[data-state="calling"] .lp-call-wave i {
    opacity: .45;
}
.lp-call[data-state="calling"] .lp-call-btn,
.lp-call[data-state="connected"] .lp-call-btn {
    background: var(--lp-ink);
}

@keyframes lp-idle {
    0%, 100% { height: 8px; }
    50% { height: 22px; }
}
@keyframes lp-talk {
    0%, 100% { height: 10px; }
    30% { height: 70px; }
    60% { height: 28px; }
}
@keyframes lp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(18, 161, 80, .5); }
    100% { box-shadow: 0 0 0 10px rgba(18, 161, 80, 0); }
}

/* ---------- Sezioni ---------- */
.lp-section {
    padding: 96px 0;
}
.lp-section-tint {
    background: var(--lp-tint);
}
.lp-head {
    max-width: 680px;
    margin-bottom: 44px;
}
.lp-head h2,
.lp-split h2,
.lp-final h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.12;
    font-weight: 700;
    margin: 0 0 12px;
    text-wrap: balance;
}
.lp-head p,
.lp-split-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--lp-muted);
    margin: 0;
}

/* Linee demo: come una rubrica da chiamare */
.lp-lines {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--lp-line);
}
.lp-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 24px;
    padding: 22px 4px;
    border-bottom: 1px solid var(--lp-line);
    text-decoration: none;
    color: var(--lp-ink);
    transition: background .2s;
}
.lp-line:hover {
    background: var(--lp-tint);
}
.lp-line-sector {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 18px;
}
.lp-line-what {
    color: var(--lp-muted);
    font-size: 16px;
}
.lp-line-num {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    color: var(--lp-red);
    white-space: nowrap;
}

/* Tre passi: sequenza reale, quindi numerata */
.lp-steps {
    list-style: none;
    counter-reset: lp-step;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.lp-steps li {
    counter-increment: lp-step;
    background: var(--lp-paper);
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    padding: 28px;
}
.lp-steps li::before {
    content: counter(lp-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lp-ink);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    margin-bottom: 18px;
}
.lp-steps h3,
.lp-ability h3,
.lp-why h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 8px;
}
.lp-steps p,
.lp-ability p,
.lp-why p {
    color: var(--lp-muted);
    line-height: 1.6;
    margin: 0;
}

/* Cosa fa */
.lp-abilities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
}
.lp-ability svg {
    color: var(--lp-red);
    margin-bottom: 14px;
}

/* Settori + integrazioni */
.lp-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
}
.lp-split-sub {
    margin-bottom: 28px;
}
.lp-sectors {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--lp-line);
}
.lp-sectors a {
    display: flex;
    justify-content: space-between;
    padding: 14px 2px;
    border-bottom: 1px solid var(--lp-line);
    color: var(--lp-ink);
    text-decoration: none;
    font-weight: 500;
}
.lp-sectors a:hover {
    color: var(--lp-red);
}
.lp-chips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lp-chips li {
    padding: 8px 14px;
    border: 1px solid var(--lp-line);
    border-radius: 999px;
    background: var(--lp-paper);
    font-size: 14px;
}

/* Perché */
.lp-why {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}
.lp-why > div {
    border-top: 3px solid var(--lp-ink);
    padding-top: 20px;
}

/* FAQ: riusa l'accordion del sito, con i colori della landing */
.lp-faq {
    background: var(--lp-tint);
}
.lp-faq .faq-icon {
    background: var(--lp-ink);
    color: #fff;
}

/* Fascia clienti sotto la hero */
.lp-clients {
    padding: 40px 0 56px;
    border-bottom: 1px solid var(--lp-line);
}
.lp-clients-label {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lp-muted);
    margin: 0 0 28px;
}
.lp-clients-logos {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 28px 48px;
}
.lp-clients-logos img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .7;
    transition: filter .2s, opacity .2s;
}
.lp-clients-logos img:hover {
    filter: none;
    opacity: 1;
}

/* CTA finale */
.lp-final {
    padding: 104px 0;
    text-align: center;
    background: var(--lp-ink);
}
.lp .lp-final h2 {
    color: #fff;
}
.lp-final p {
    color: rgba(255, 255, 255, .72);
    font-size: 18px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 32px;
}
.lp-final .lp-btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}
.lp-final .lp-btn-ghost:hover {
    border-color: #fff;
}

/* Barra "Prenota una demo": fissa in basso al centro, chiudibile */
.lp-demobar {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 990;
    width: min(1100px, calc(100% - 32px));
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0 16px 28px;
    background: var(--lp-red);
    color: #fff;
    border-radius: 20px;
    box-shadow: 0 18px 50px -12px rgba(21, 23, 28, .45);
    animation: lp-bar-in .4s ease-out both;
}
.lp-demobar[hidden] {
    display: none;
}
.lp-demobar-text {
    flex: 1;
    min-width: 0;
}
.lp-demobar-text strong {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.lp-demobar-text span {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    color: rgba(255, 255, 255, .78);
}
.lp-demobar-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 14px;
    background: #fff;
    color: var(--lp-ink);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s;
}
.lp-demobar-cta:hover {
    color: var(--lp-ink);
    transform: translateY(-1px);
}
.lp-demobar-close {
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .25);
    background: none;
    color: #fff;
    cursor: pointer;
}
.lp-demobar-cta:focus-visible,
.lp-demobar-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}
/* Spazio perché la barra non copra il fondo pagina e il "torna su" */
body:has(.lp-demobar:not([hidden])) {
    padding-bottom: 120px;
}
body:has(.lp-demobar:not([hidden])) #toTop {
    bottom: 128px;
    right: 16px;
}
@keyframes lp-bar-in {
    from { opacity: 0; transform: translate(-50%, 24px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .lp-hero-grid,
    .lp-split {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .lp-steps,
    .lp-why {
        grid-template-columns: 1fr;
    }
    .lp-abilities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lp-hero {
        padding: 112px 0 64px;
    }
    .lp-lead {
        font-size: 17px;
    }
    .lp-cta-row .lp-btn {
        flex: 1 1 100%;
    }
    .lp-section {
        padding: 72px 0;
    }
    .lp-abilities {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .lp-line {
        grid-template-columns: 1fr auto;
        gap: 4px 16px;
        padding: 18px 2px;
    }
    .lp-line-what {
        grid-column: 1;
        grid-row: 2;
        font-size: 14px;
    }
    .lp-line-num {
        grid-column: 2;
        grid-row: 1 / span 2;
        font-size: 16px;
    }
    .lp-call {
        padding: 22px;
    }
    .lp-clients-logos {
        gap: 20px 28px;
    }
    .lp-clients-logos img {
        height: 30px;
        max-width: 100px;
    }
}

/* Barra demo su schermi stretti: niente sottotitolo, bottone più compatto */
@media (max-width: 720px) {
    .lp-demobar {
        gap: 12px;
        padding: 12px 0 12px 18px;
        border-radius: 16px;
    }
    .lp-demobar-text strong {
        font-size: 15px;
    }
    .lp-demobar-text span {
        display: none;
    }
    .lp-demobar-cta {
        min-height: 44px;
        padding: 0 16px;
        font-size: 14px;
        border-radius: 12px;
    }
    .lp-demobar-close {
        padding: 0 14px;
    }
    body:has(.lp-demobar:not([hidden])) {
        padding-bottom: 96px;
    }
    body:has(.lp-demobar:not([hidden])) #toTop {
        bottom: 128px;
        width: 48px;
        height: 48px;
    }
}

/* Telefoni: solo il bottone, largo, e la X */
@media (max-width: 480px) {
    .lp-demobar {
        padding-left: 12px;
    }
    .lp-demobar-text {
        display: none;
    }
    .lp-demobar-cta {
        flex: 1;
        justify-content: center;
        font-size: 16px;
    }
    body:has(.lp-demobar:not([hidden])) #toTop {
        bottom: 104px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-demobar,
    .lp-call-wave i,
    .lp-call[data-state="connected"] .lp-call-dot {
        animation: none !important;
    }
    .lp-call[data-state="connected"] .lp-call-wave i {
        height: 36px;
    }
}
