/* ===========================================================================
   AiDesk — landing pubblica (pre-login) + player demo.
   Costruita sui token di /assets/app.css (var(--brand), --gradient, --surface…).
   Prefisso .lp- per non collidere con le classi dell'app, che qui riusiamo
   verbatim nella console operatore (.card, .kb-*, .badge, bolle conversazione).
   =========================================================================== */

.lp-body { background: var(--bg); color: var(--text); }

.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav pubblica ---- */
.lp-nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(140%) blur(10px);
  background: var(--surface); /* fallback */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.lp-nav-in { max-width: 1160px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-nav .brand { text-decoration: none; }
.lp-nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---- Hero ---- */
.lp-hero { position: relative; overflow: hidden; }
.lp-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--gradient); opacity: .10;
}
.lp-hero-in { position: relative; z-index: 1; padding: 72px 0 56px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.lp-h1 { font-size: 46px; line-height: 1.07; letter-spacing: -.02em; font-weight: 800; margin: 0 0 18px; }
.lp-h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-lede { font-size: 18px; line-height: 1.6; color: var(--text-mid); margin: 0 0 28px; max-width: 560px; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lp-note { font-size: 13px; color: var(--text-soft); margin-top: 16px; }
.lp-note b { color: var(--text-mid); }

/* Mock "telefono + console" nell'hero */
.lp-hero-visual { position: relative; }
.lp-herocard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-brand);
  overflow: hidden;
}
.lp-herocard-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-herocard-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* ---- Sezioni ---- */
.lp-section { padding: 64px 0; }
.lp-section.alt { background: var(--bg-soft); }
.lp-kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--brand); margin: 0 0 10px; }
.lp-h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.015em; font-weight: 800; margin: 0 0 14px; }
.lp-sub { font-size: 17px; color: var(--text-mid); line-height: 1.6; max-width: 680px; margin: 0; }
.lp-section-head { margin-bottom: 36px; }
.lp-section-head.center { text-align: center; }
.lp-section-head.center .lp-sub { margin: 0 auto; }

/* Value props */
.lp-props { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lp-prop { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.lp-prop-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.lp-prop-ico.a2 { background: var(--accent-soft); color: var(--accent); }
.lp-prop-ico.a3 { background: var(--success-soft); color: var(--success); }
.lp-prop-ico.a4 { background: var(--warning-soft); color: var(--warning); }
.lp-prop h3 { font-size: 17px; margin: 0 0 7px; font-weight: 700; }
.lp-prop p { margin: 0; color: var(--text-mid); font-size: 14.5px; line-height: 1.55; }

/* "In pochi secondi" */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: lp; }
.lp-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; }
.lp-step::before { counter-increment: lp; content: counter(lp); position: absolute; top: -14px; left: 18px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 14px; box-shadow: var(--shadow-brand); }
.lp-step h4 { margin: 8px 0 6px; font-size: 15.5px; }
.lp-step p { margin: 0; color: var(--text-mid); font-size: 14px; line-height: 1.5; }

/* ===========================  DEMO PLAYER  =========================== */
.lp-demo-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; justify-content: center; }
.lp-tab {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--text-mid);
  transition: all .18s ease;
}
.lp-tab:hover { border-color: var(--border-strong); }
.lp-tab.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.lp-tab .lp-ch { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); }
.lp-tab.is-active .lp-ch { background: #fff; }

.lp-stage {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; align-items: stretch;
}

/* Pannello canale cliente (sinistra) */
.lp-channel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; min-height: 460px; }
.lp-ch-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.lp-ch-head .lp-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: 0 0 auto; }
.lp-ch-title { font-weight: 700; font-size: 15px; }
.lp-ch-meta { font-size: 12.5px; color: var(--text-soft); }
.lp-ch-badge { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px; }
.lp-ch-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }

/* Canale: colori per tipo */
.lp-channel.voce .lp-avatar { background: linear-gradient(135deg,#6366F1,#8B5CF6); }
.lp-channel.voce .lp-ch-badge { background: var(--brand-soft); color: var(--brand); }
.lp-channel.whatsapp .lp-avatar { background: #25D366; }
.lp-channel.whatsapp .lp-ch-badge { background: #e7f9ee; color: #128C4B; }
.lp-channel.email .lp-avatar { background: #0097dd; border-radius: 10px; }
.lp-channel.email .lp-ch-badge { background: var(--accent-soft); color: var(--accent); }

/* onda vocale */
.lp-wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; margin-left: 2px; }
.lp-wave i { width: 3px; height: 5px; border-radius: 2px; background: currentColor; animation: lpwave 1s infinite ease-in-out; }
.lp-wave i:nth-child(2){ animation-delay:.12s } .lp-wave i:nth-child(3){ animation-delay:.24s }
.lp-wave i:nth-child(4){ animation-delay:.36s } .lp-wave i:nth-child(5){ animation-delay:.48s }
@keyframes lpwave { 0%,100%{ height:5px } 50%{ height:15px } }

/* messaggi canale */
.lp-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  animation: lpin .32s ease both; }
@keyframes lpin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lp-msg.cust { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.lp-msg.ai   { align-self: flex-end;   color: #fff; border-bottom-right-radius: 4px; }
.lp-channel.voce .lp-msg.ai { background: linear-gradient(135deg,#6366F1,#7c6cf0); }
.lp-channel.whatsapp .lp-msg.cust { background: #fff; color: #111b21; border: 1px solid #c7ccd1; }
.lp-channel.whatsapp .lp-msg.ai { background: #d9fdd3; color: #111b21; border: 1px solid #c5f0bd; }
.lp-channel.email .lp-msg { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.lp-channel.email .lp-msg .lp-em-head { font-size: 12.5px; color: var(--text-soft); margin-bottom: 7px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.lp-channel.email .lp-msg.ai { border-left: 3px solid var(--brand); }
.lp-msg .lp-who { display: block; font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }

.lp-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 14px; background: var(--surface-2); border-radius: 14px; }
.lp-typing.ai { align-self: flex-end; }
.lp-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: lpdot 1.2s infinite; }
.lp-typing i:nth-child(2){ animation-delay:.2s } .lp-typing i:nth-child(3){ animation-delay:.4s }
@keyframes lpdot { 0%,60%,100%{ opacity:.25; transform: translateY(0) } 30%{ opacity:1; transform: translateY(-4px) } }

/* ---- Console operatore (destra) = chrome aidesk reale ---- */
.lp-console { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; min-height: 460px; }
.lp-console-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lp-console-top .brand-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; }
.lp-console-top .brand-logo { height: 24px; }
.lp-console-title { font-weight: 700; font-size: 13.5px; }
.lp-console-tag { margin-left: auto; font-size: 11px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; }
.lp-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: lplive 1.6s infinite; }
@keyframes lplive { 0%{ box-shadow:0 0 0 0 rgba(16,185,129,.5) } 70%{ box-shadow:0 0 0 7px rgba(16,185,129,0) } 100%{ box-shadow:0 0 0 0 rgba(16,185,129,0) } }
.lp-console-body { flex: 1; position: relative; overflow: hidden; }
.lp-view { position: absolute; inset: 0; padding: 16px; overflow-y: auto; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.lp-view.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* chips di stato nella console */
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  animation: lpin .3s ease both; }
.lp-chip.ok { background: var(--success-soft); color: var(--success); }
.lp-chip.warn { background: var(--warning-soft); color: var(--warning); }
.lp-chip.odoo { background: #efe9ff; color: #6d28d9; }

/* bolle conversazione nella console = convenzione aidesk (barra laterale) */
.lp-cbubble { border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; animation: lpin .3s ease both; }
.lp-cbubble .lp-cmeta { font-size: 12px; color: var(--text-soft); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.lp-cbubble .lp-ctext { font-size: 13.5px; line-height: 1.5; color: var(--text-mid); }
.lp-cbubble.cust { background: var(--surface-2); border-left: 3px solid var(--text-soft); }
.lp-cbubble.ai { background: rgba(99,102,241,.06); border-left: 3px solid var(--brand); }
.lp-cbubble.sys { background: var(--warning-soft); border-left: 3px solid var(--warning); }

/* Analisi AI (riuso look ticket.php) */
.lp-ai-card { border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 12px; padding: 16px; background: var(--surface); }
.lp-ai-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lp-ai-top h3 { margin: 0; font-size: 16px; }
.lp-confbar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; }
.lp-confbar > i { display: block; height: 100%; width: 0; background: var(--success); border-radius: 999px; transition: width 1s ease; }
.lp-ai-draft { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; margin: 12px 0; color: var(--text-mid); }
.lp-tool { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; animation: lpin .3s ease both; }
.lp-tool .lp-tool-n { font-size: 13px; } .lp-tool .lp-tool-n code { font-family: ui-monospace,monospace; font-size: 12px; color: var(--text-soft); }

/* Kanban mini (riuso classi .kb-*) */
.lp-kb { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; height: 100%; }
.lp-kbcol { flex: 0 0 180px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.lp-kbcol-head { font-size: 12.5px; font-weight: 700; color: var(--text-mid); margin-bottom: 10px; display: flex; justify-content: space-between; }
.lp-kbcol-head .n { color: var(--text-muted); font-weight: 600; }
.lp-kbcol-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.lp-kbcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--text-muted); border-radius: 10px; padding: 10px; animation: lpin .35s ease both; }
.lp-kbcard.band-high { border-left-color: var(--success); } .lp-kbcard.band-med { border-left-color: var(--warning); } .lp-kbcard.band-low { border-left-color: var(--danger); }
.lp-kbcard.moving { box-shadow: var(--shadow-brand); transform: scale(1.03); transition: all .35s ease; }
.lp-kbcard .lp-kbt { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; } .lp-kbcard .lp-kbt code { font-size: 11px; }
.lp-kbcard .lp-kbm { display: flex; flex-wrap: wrap; gap: 5px; }
.lp-handcursor { position: absolute; font-size: 22px; pointer-events: none; z-index: 5; transition: all .5s cubic-bezier(.4,0,.2,1); opacity: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }

/* caption / voce narrante */
.lp-caption { margin-top: 14px; min-height: 22px; text-align: center; font-size: 14px; color: var(--text-soft); font-style: italic; transition: opacity .3s; }

/* controlli player */
.lp-controls { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.lp-progress { flex: 1; height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lp-progress > i { display: block; height: 100%; width: 0; background: var(--gradient); transition: width .4s ease; }
.lp-playbtn { flex: 0 0 auto; }
.lp-replay { font-size: 13px; color: var(--text-soft); cursor: pointer; background: none; border: none; display: inline-flex; align-items: center; gap: 6px; }
.lp-replay:hover { color: var(--brand); }
.lp-replay.is-off { color: var(--text-muted); }

/* recap funzionalità */
.lp-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.lp-feat .lp-fi { font-size: 22px; margin-bottom: 8px; }
.lp-feat h4 { margin: 0 0 6px; font-size: 15px; }
.lp-feat p { margin: 0; color: var(--text-mid); font-size: 13.5px; line-height: 1.5; }

/* CTA finale */
.lp-final { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 56px 40px; text-align: center; color: #fff; background: var(--gradient); }
.lp-final h2 { font-size: 32px; margin: 0 0 12px; letter-spacing: -.01em; }
.lp-final p { font-size: 17px; opacity: .92; margin: 0 0 26px; }
.lp-final .btn { background: #fff; color: var(--brand); border: none; }
.lp-final .btn:hover { background: #f3f4ff; }

/* footer pubblico */
.lp-foot { text-align: center; padding: 34px 0 48px; color: var(--text-soft); font-size: 13px; }
.lp-foot a { color: var(--text-mid); }

/* chip diagnostica Radius4ISP */
.lp-chip.r4isp { background: #e6f4ff; color: #0b5cab; }

/* ===== Integrazione Radius4ISP ===== */
.lp-integra { display: grid; grid-template-columns: 1fr 1.05fr; gap: 36px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow-brand); }
.lp-integra .lp-eyebrow { margin-bottom: 14px; }
.lp-integra .lp-h2 { margin-bottom: 12px; }
.lp-integra .lp-sub { font-size: 16px; }
.lp-integra-flow { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 18px; }
.lp-iflow { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-mid); line-height: 1.45; }
.lp-iflow .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--gradient); color: #fff;
  font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.lp-iflow b { color: var(--text); }
.lp-carriers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.lp-carriers span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--text-soft); margin-right: 4px; }
.lp-carriers i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--text-mid);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; }
/* cornice screenshot */
.lp-shot { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-brand); }
.lp-shot-bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.lp-shot-url { margin-left: 8px; font-size: 12px; color: var(--text-soft); }
.lp-shot img { display: block; width: 100%; height: auto; background: #fff; }
.lp-shot-cap { font-size: 12.5px; color: var(--text-soft); margin: 10px 2px 0; line-height: 1.45; }

/* co-branding footer */
.lp-cobrand { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 4px 0 18px; flex-wrap: wrap; }
.lp-cobrand-item { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text-mid); }
.lp-cobrand-item .brand-mark { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.lp-cobrand-sep { color: var(--text-muted); }
.lp-logo-vayu { height: 30px; width: auto; display: block; }
.lp-logo-ff { height: 28px; width: auto; display: block; }
.lp-cobrand .brand-logo { height: 26px; }

/* responsive */
@media (max-width: 920px) {
  .lp-hero-in { grid-template-columns: 1fr; gap: 32px; }
  .lp-h1 { font-size: 36px; }
  .lp-stage { grid-template-columns: 1fr; }
  .lp-props, .lp-steps, .lp-feats { grid-template-columns: 1fr; }
  .lp-integra { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
}
@media (max-width: 520px) {
  .lp-h1 { font-size: 30px; } .lp-h2 { font-size: 26px; }
  .lp-wrap, .lp-nav-in { padding-left: 16px; padding-right: 16px; }
  .lp-final { padding: 40px 20px; }
}
