/* Landing pubblica (templates/landing.php). Usa le variabili e gli avatar di app.css; qui solo l'impaginazione. */

.lp {
  --lp-bg: #FFFFFF;
  --lp-card: #F7F6F4;
  --lp-ink: #111214;
  --lp-soft: #6B6F78;
  --lp-line: #ECEBE8;
  --lp-dark: #111214;
  --lp-dark-ink: #FFFFFF;
  background: var(--lp-bg);
  color: var(--lp-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lp { --lp-bg: #0D0E11; --lp-card: #17191E; --lp-ink: #EDEEF0; --lp-soft: #9BA1AC; --lp-line: #24272E; --lp-dark: #EDEEF0; --lp-dark-ink: #0D0E11; }
}
:root[data-theme="dark"] .lp { --lp-bg: #0D0E11; --lp-card: #17191E; --lp-ink: #EDEEF0; --lp-soft: #9BA1AC; --lp-line: #24272E; --lp-dark: #EDEEF0; --lp-dark-ink: #0D0E11; }

.lp main { overflow-x: clip; }
.lp :where(h1, h2, h3) { letter-spacing: -.02em; margin: 0; }
.lp :where(p) { margin: 0; }
.lp a { color: inherit; }

/* Barra */
.lp-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; max-width: 1120px; margin: 0 auto; padding: 14px 16px; background: color-mix(in srgb, var(--lp-bg) 88%, transparent); backdrop-filter: blur(10px); }
.lp-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; text-decoration: none; }
.lp-brand b { color: var(--accent); font-weight: 600; }
.lp-links { display: flex; gap: 20px; font-size: 14px; }
.lp-links a { text-decoration: none; color: var(--lp-soft); }
.lp-links a:hover { color: var(--lp-ink); }
.lp-actions { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 760px) { .lp-links { display: none; } }

/* Pulsanti */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.lp-btn-dark { background: var(--lp-dark); color: var(--lp-dark-ink) !important; }
.lp-btn-dark:hover { opacity: .88; }
.lp-btn-ghost { background: var(--lp-card); color: var(--lp-ink); border-color: var(--lp-line); }
.lp-btn-lg { padding: 12px 22px; font-size: 15px; }
.lp-btn-xs { padding: 3px 10px; font-size: 12px; }

/* Apertura */
.lp-hero { max-width: 1120px; margin: 0 auto; padding: 64px 16px 40px; text-align: center; }
.lp-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--lp-card); border: 1px solid var(--lp-line); font-size: 13px; color: var(--lp-soft); }
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--approval); }
.lp-hero h1 { margin-top: 22px; font-size: clamp(40px, 7vw, 72px); line-height: 1.05; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: .25em; flex-wrap: wrap; }
.lp-hero-av .av { width: .95em !important; }
.lp-sub { max-width: 620px; margin: 20px auto 0; font-size: 18px; line-height: 1.55; color: var(--lp-soft); }
.lp-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Anteprima dell'app */
.lp-app { display: grid; grid-template-columns: 260px 1fr; margin: 56px auto 0; max-width: 960px; text-align: left; background: var(--lp-bg); border: 1px solid var(--lp-line); border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .25); overflow: hidden; }
.lp-app-side { padding: 14px 10px; border-right: 1px solid var(--lp-line); background: var(--lp-card); display: flex; flex-direction: column; gap: 2px; }
.lp-app-dots { display: flex; gap: 6px; padding: 0 6px 10px; }
.lp-app-dots i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.lp-app-dots i:nth-child(2) { background: #FEBC2E; }
.lp-app-dots i:nth-child(3) { background: #28C840; }
.lp-app-search { margin: 0 4px 8px; padding: 6px 10px; border-radius: 8px; background: var(--lp-bg); border: 1px solid var(--lp-line); font-size: 12px; color: var(--lp-soft); }
.lp-app-bot { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.lp-app-bot.is-active { background: var(--lp-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.lp-app-bot span { display: flex; flex-direction: column; min-width: 0; }
.lp-app-bot strong { font-size: 13px; font-weight: 600; }
.lp-app-bot small { font-size: 12px; color: var(--lp-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-app-main { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; min-height: 420px; }
.lp-app-head { display: flex; align-items: center; gap: 8px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--lp-line); }
.lp-app-status { margin-left: auto; font-size: 12px; color: var(--success); }
.lp-msg { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.lp-msg > div { background: var(--lp-card); border-radius: 14px; padding: 10px 12px; max-width: 520px; }
.lp-msg ul { margin: 6px 0 0; padding-left: 18px; }
.lp-msg-me { align-self: flex-end; background: var(--lp-dark); color: var(--lp-dark-ink); border-radius: 14px; padding: 10px 12px; max-width: 420px; }
.lp-approval { border: 1px solid color-mix(in srgb, var(--approval) 45%, transparent); background: color-mix(in srgb, var(--approval) 8%, var(--lp-bg)) !important; }
.lp-approval-actions { display: flex; gap: 6px; margin-top: 8px; }
.lp-app-input { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--lp-line); border-radius: 12px; font-size: 13px; color: var(--lp-soft); }
.lp-mic { width: 22px; height: 22px; border-radius: 50%; background: var(--lp-dark); }
@media (max-width: 760px) {
  .lp-app { grid-template-columns: 1fr; }
  .lp-app-side { display: none; }
}

/* Sezioni */
.lp-section { max-width: 1120px; margin: 0 auto; padding: 72px 16px; }
.lp-section h2, .lp-feature h2, .lp-final h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
.lp-center { text-align: center; }
.lp-lead { max-width: 640px; margin: 14px auto 0; font-size: 17px; line-height: 1.55; color: var(--lp-soft); }

.lp-feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; max-width: 1088px; margin: 56px auto 0; padding: 48px 40px; background: var(--lp-card); border-radius: 24px; overflow: hidden; }
.lp-feature-text p { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--lp-soft); max-width: 440px; }
.lp-feature-av { display: flex; justify-content: center; }
.lp-feature-av .av { width: min(280px, 70vw) !important; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .18)); }
@media (max-width: 760px) { .lp-feature { grid-template-columns: 1fr; margin: 32px 16px 0; padding: 32px 24px; } }

.lp-team { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }

.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 0; }
.lp-card { background: var(--lp-card); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 280px; }
.lp-card h3 { font-size: 18px; font-weight: 600; }
.lp-card p { color: var(--lp-soft); line-height: 1.55; }
.lp-logos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.lp-logos img { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--lp-bg); border: 1px solid var(--lp-line); object-fit: contain; }
.lp-routines { display: flex; flex-direction: column; gap: 8px; margin-top: auto; font-size: 13px; }
.lp-routines span { padding: 8px 12px; border-radius: 10px; background: var(--lp-bg); border: 1px solid var(--lp-line); }
.lp-routines b { font-family: var(--mono); font-weight: 500; margin-right: 6px; }
.lp-note { margin-top: auto; padding: 12px 14px; border-radius: 12px; background: var(--lp-bg); border: 1px solid var(--lp-line); font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.lp-note-head { display: block; color: var(--lp-soft); margin-bottom: 4px; }
.lp-approve-demo { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--lp-bg); border: 1px solid color-mix(in srgb, var(--approval) 45%, transparent); font-size: 13px; }
.lp-approve-demo .lp-btn { margin-left: auto; }
@media (max-width: 760px) { .lp-grid { grid-template-columns: 1fr; } }

.lp-jobs { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: center; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--lp-line); background: var(--lp-bg); color: var(--lp-ink); font: inherit; font-size: 13px; cursor: pointer; }
.lp-chip[aria-selected="true"] { border-color: var(--lp-ink); background: var(--lp-card); }
.lp-job-desc { margin-top: 24px; font-size: 17px; line-height: 1.6; color: var(--lp-soft); max-width: 520px; }
.lp-job-desc b { color: var(--lp-ink); font-weight: 600; }
.lp-phone { position: relative; height: 560px; border: 10px solid var(--lp-ink); border-radius: 44px; padding: 44px 14px 14px; background: var(--lp-bg); }
.lp-phone-notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 12px; background: var(--lp-ink); }
.lp-phone-screen { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.lp-phone-screen[hidden] { display: none; }
.lp-phone-head { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--lp-line); }
.lp-phone-input { margin-top: auto; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--lp-line); font-size: 12px; color: var(--lp-soft); }
@media (max-width: 860px) { .lp-jobs { grid-template-columns: 1fr; } .lp-phone { max-width: 320px; margin: 0 auto; width: 100%; } }

.lp-sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.lp-sec-grid div { padding: 22px; border-radius: 18px; border: 1px solid var(--lp-line); }
.lp-sec-grid h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.lp-sec-grid p { font-size: 14px; line-height: 1.55; color: var(--lp-soft); }
@media (max-width: 860px) { .lp-sec-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lp-sec-grid { grid-template-columns: 1fr; } }

.lp-faq { max-width: 760px; }
.lp-faq h2 { margin-bottom: 20px; }
.lp-faq details { border-bottom: 1px solid var(--lp-line); padding: 16px 0; }
.lp-faq summary { cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: '+'; color: var(--lp-soft); font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq details p { margin-top: 10px; color: var(--lp-soft); line-height: 1.6; }

.lp-final { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 72px 16px 96px; }
.lp-small { font-size: 14px; color: var(--lp-soft); }

.lp-footer { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--lp-line); font-size: 13px; color: var(--lp-soft); }
.lp-footer b { color: var(--accent); font-weight: 600; }
.lp-footer nav { display: flex; gap: 16px; }
.lp-footer .lp-social { gap: 6px; flex-basis: 100%; justify-content: center; order: -1; padding-bottom: 4px; }
.lp-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--lp-soft); border: 1px solid var(--lp-line); transition: color .2s, border-color .2s, transform .2s; }
.lp-social a:hover, .lp-social a:focus-visible { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.lp-social svg { width: 18px; height: 18px; fill: currentColor; }

/* La mascotte nera sparirebbe sul fondo scuro: nel tema scuro diventa blu come il logo. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp [data-eyes] .av { --c: #3B7BF0 !important; } }
:root[data-theme="dark"] .lp [data-eyes] .av { --c: #3B7BF0 !important; }

/* Movimento (proposte approvate il 1/11/2026, docs/decisioni.md). Regole: parte una volta sola quando la sezione è visibile,
   solo transform e opacity, lo stesso scatto morbido degli avatar (av-hop), tutto visibile da fermo senza JavaScript. */
.lp { --pop: cubic-bezier(.3, 1.4, .5, 1); }
.lp [hidden] { display: none !important; }
button.lp-btn { font: inherit; cursor: pointer; }

/* 01 Apertura: la classe is-play la mette landing.js, così senza script la pagina è già completa. */
.lp-w { display: inline-block; }
.lp-seq .lp-pill, .lp-seq .lp-w, .lp-seq .lp-sub, .lp-seq .lp-cta, .lp-seq .lp-app { opacity: 0; transform: translateY(14px); }
.lp-seq.is-play .lp-pill { animation: lp-rise .5s var(--pop) forwards; }
.lp-seq.is-play .lp-w { animation: lp-rise .55s var(--pop) forwards; animation-delay: calc(.15s + var(--i) * .08s); }
.lp-seq.is-play .lp-hero-av .av { animation: lp-land .8s var(--pop) .45s both; }
.lp-seq.is-play .lp-sub { animation: lp-rise .5s var(--pop) .6s forwards; }
.lp-seq.is-play .lp-cta { animation: lp-rise .5s var(--pop) .75s forwards; }
.lp-seq.is-play .lp-app { animation: lp-rise .7s var(--pop) .95s forwards; }
@keyframes lp-rise { to { opacity: 1; transform: none; } }
@keyframes lp-land { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.lp-chat-play .lp-msg { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .4s var(--pop); }
.lp-chat-play .lp-msg.is-on { opacity: 1; transform: none; }
.lp-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.lp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--lp-soft); animation: lp-tb 1.2s infinite; }
.lp-dots i:nth-child(2) { animation-delay: .2s; }
.lp-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes lp-tb { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.lp-approval { position: relative; }
.lp-approval.is-pulse::before { content: ""; position: absolute; inset: -3px; border-radius: 16px; border: 2px solid var(--approval); pointer-events: none; animation: lp-ring 1.4s ease-out 2; }
@keyframes lp-ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }

/* 02 Occhi: il gruppo .look segue il puntatore (landing.js); da telefono segue lo scorrimento. */
.lp [data-eyes] .look { transition: transform .25s ease-out; }
.av.is-wink .eye-r { animation: lp-wink .7s ease-in-out 1; transform-origin: 39px 33px; }
@keyframes lp-wink { 25%, 60% { transform: scaleY(.08); } }
.av.is-hop svg { animation: av-hop .7s var(--pop) 1 both; }

/* 03 Squadra: entra a cascata una volta, i vicini guardano chi salta. */
.lp-team .av { transition: transform .35s var(--pop), opacity .4s ease; }
.lp-team.is-armed .av { opacity: 0; transform: translateY(20px) scale(.6); }
.lp-team.is-in .av { opacity: 1; transform: none; transition-delay: var(--i, 0s); }
.lp-team .av.is-hop { z-index: 1; }

/* 04 Carte */
.lp-card { transition: transform .3s var(--pop), box-shadow .3s ease; }
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35); }
.lp-logos.is-stagger img { opacity: 0; transform: scale(.6); animation: lp-pop .4s var(--pop) forwards; animation-delay: calc(var(--i) * .07s); }
@keyframes lp-pop { to { opacity: 1; transform: none; } }
.lp-routines.is-stagger span { opacity: 0; transform: translateX(-8px); animation: lp-slide .4s ease-out forwards; animation-delay: calc(.2s + var(--i) * .25s); }
@keyframes lp-slide { to { opacity: 1; transform: none; } }
[data-approve] .lp-ok { display: none; }
[data-approve].is-ok { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
[data-approve].is-ok .lp-ok { display: inline; }
[data-approve].is-ok .lp-lbl { display: none; }

/* 05 Un lavoro per ogni bot: la schermata scivola, il chip attivo mostra il tempo prima del prossimo. */
.lp-chip { position: relative; overflow: hidden; transition: transform .25s var(--pop), border-color .2s ease; }
.lp-chip[aria-selected="true"] { transform: scale(1.04); }
.lp-chip-bar { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--lp-ink); transform-origin: left; transform: scaleX(0); }
.lp-chip[aria-selected="true"] .lp-chip-bar.is-run { animation: lp-fill 6s linear forwards; }
@keyframes lp-fill { to { transform: scaleX(1); } }
.lp-phone { overflow: hidden; }
.lp-phone-screen { position: absolute; inset: 44px 14px 14px; height: auto; transition: transform .4s var(--pop), opacity .3s ease; }
.lp-phone-screen.is-out { transform: translateX(-30%); opacity: 0; }
.lp-phone-screen.is-in { transform: translateX(30%); opacity: 0; transition: none; }

/* 06 Barra: si compatta dopo il primo scorrimento. */
.lp-nav { transition: padding .3s ease; }
.lp-nav .lp-brand svg { transition: width .3s ease, height .3s ease; }
.lp-nav.is-compact { padding: 7px 16px; }
.lp-nav.is-compact .lp-brand { font-size: 15px; }
.lp-nav.is-compact .lp-brand svg { width: 24px; height: 24px; }

/* 07 Chiusura */
.lp-final .lp-btn-lg.is-nudge { animation: lp-nudge .9s var(--pop) 1; }
@keyframes lp-nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.04); } 60% { transform: translateY(0) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  .lp-seq .lp-pill, .lp-seq .lp-w, .lp-seq .lp-sub, .lp-seq .lp-cta, .lp-seq .lp-app, .lp-chat-play .lp-msg, .lp-team.is-armed .av,
  .lp-logos.is-stagger img, .lp-routines.is-stagger span, .lp-phone-screen.is-out, .lp-phone-screen.is-in { opacity: 1 !important; transform: none !important; animation: none !important; }
  .lp-dots i, .lp-approval.is-pulse::before, .lp-final .lp-btn-lg.is-nudge, .lp-chip-bar, .av.is-hop svg, .av.is-wink .eye-r { animation: none !important; }
  .lp-card, .lp-chip, .lp-nav { transition: none; }
}

/* Dicembre (body.lp-natale, LandingController::season): costumi sugli avatar, neve e luci solo nel hero.
   Il rosso e il verde stanno negli accessori; i colori del marchio non cambiano. */
.av .hat { transform-box: view-box; transform-origin: 32px 30px; }
.lp-natale .av:hover .hat, .lp-natale .av:focus-visible .hat { animation: lp-tip .7s ease-in-out 1; }
@keyframes lp-tip { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-14deg) translateY(-3px); } 70% { transform: rotate(6deg); } }
/* Il cappello del hero cade dopo che l'avatar è atterrato (lp-land finisce a 1,25 s). */
.lp-seq.is-play .lp-hero-av .hat { animation: lp-hat-drop 1.1s var(--pop) 1.3s both; }
@keyframes lp-hat-drop { 0% { transform: translateY(-70px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.lp-natale .lp-hero { position: relative; }
.lp-lights { position: absolute; left: 0; right: 0; top: 0; height: 18px; display: flex; justify-content: space-around; padding: 0 10px; pointer-events: none; }
.lp-lights::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--lp-line); }
.lp-lights i { width: 10px; height: 14px; margin-top: 2px; border-radius: 0 0 6px 6px / 0 0 10px 10px; background: var(--c); box-shadow: 0 0 8px var(--c); opacity: .9; animation: lp-glow 1.8s ease-in-out infinite; animation-delay: var(--d); }
@keyframes lp-glow { 0%, 100% { opacity: .95; filter: brightness(1.15); } 50% { opacity: .35; filter: brightness(.8); } }
.lp-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lp-snow i { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .85; box-shadow: 0 0 2px rgba(0, 0, 0, .08); animation: lp-fall var(--t) linear infinite; animation-delay: var(--d); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lp-snow i { opacity: .55; } }
:root[data-theme="dark"] .lp-snow i { opacity: .55; }
@keyframes lp-fall { 0% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(14px, 50vh, 0); } 100% { transform: translate3d(-8px, 110vh, 0); } }
@media (prefers-reduced-motion: reduce) {
  .lp-lights i, .lp-snow i, .lp-natale .av:hover .hat, .lp-seq.is-play .lp-hero-av .hat { animation: none !important; }
  .lp-snow { display: none; }
}

/* Selettore della lingua nella barra (IT/EN, App\Support\Lang). */
.lp-lang { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--lp-soft); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.lp-lang:hover { color: var(--lp-ink); background: var(--lp-card); }
