/* Sfondo animato dell'accesso (design/login-sfondo.html). Motivi del sito DPS: griglia da 44 px,
   punti di luce, bagliore che respira, scie. Si muovono solo transform e opacity. */
.lb-defs { position: absolute; width: 0; height: 0; }
.login-bg {
  --grid: rgb(29 64 100 / 7%); --dot: rgb(29 78 216 / 22%);
  --blue: rgb(74 134 255 / 20%); --teal: rgb(47 181 156 / 12%); --warm: rgb(242 166 90 / 20%);
  --trail-a: #4a86ff; --trail-b: #2fb59c; --line-ico: rgb(29 64 100 / 24%);
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
:root[data-theme="dark"] .login { background: #070b17; }
:root[data-theme="dark"] .login-bg {
  --grid: rgb(120 160 255 / 8%); --dot: rgb(150 190 255 / 32%);
  --blue: rgb(74 134 255 / 26%); --teal: rgb(79 214 184 / 12%); --warm: rgb(224 98 90 / 16%);
  --trail-b: #4fd6b8; --line-ico: rgb(169 199 232 / 24%);
}
.lb-grid {
  position: absolute; inset: 0;
  background:
    radial-gradient(var(--dot) 1px, transparent 1.6px) calc(50% + 22px) calc(50% + 22px) / 44px 44px,
    linear-gradient(var(--grid) 1px, transparent 1px) 50% 50% / 44px 44px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 50% 50% / 44px 44px;
  -webkit-mask-image: radial-gradient(90% 75% at 50% 50%, #000 30%, transparent);
  mask-image: radial-gradient(90% 75% at 50% 50%, #000 30%, transparent);
}
.lb-glow { position: absolute; width: 640px; height: 640px; animation: lb-breath 12s ease-in-out infinite; }
.lb-glow.a { left: calc(50% - 460px); top: calc(50% - 520px); background: radial-gradient(closest-side, var(--blue), var(--teal) 55%, transparent); }
.lb-glow.b { left: calc(50% - 160px); top: calc(50% - 100px); background: radial-gradient(closest-side, var(--warm), transparent); animation-delay: -6s; }
@keyframes lb-breath {
  0%, 100% { opacity: .65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Scie di luce sulle righe della griglia: righe a 50% - 22px + n × 44px. */
.lb-trail { position: absolute; opacity: 0; }
.lb-trail.h { left: -160px; width: 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--trail-a)); animation: lb-run-x 18s linear infinite; }
.lb-trail.v { top: -160px; width: 1px; height: 160px; background: linear-gradient(transparent, var(--trail-b)); animation: lb-run-y 22s linear infinite; }
.lb-trail.t1 { top: calc(50% - 22px - 308px); }
.lb-trail.t2 { top: calc(50% - 22px + 308px); animation-delay: -9s; }
.lb-trail.t3 { left: calc(50% - 22px - 132px); animation-delay: -4s; }
.lb-trail.t4 { left: calc(50% - 22px + 176px); animation-delay: -15s; }
@keyframes lb-run-x {
  0% { transform: translateX(0); opacity: 0; }
  8%, 70% { opacity: .8; }
  80%, 100% { transform: translateX(calc(100vw + 160px)); opacity: 0; }
}
@keyframes lb-run-y {
  0% { transform: translateY(0); opacity: 0; }
  8%, 70% { opacity: .8; }
  80%, 100% { transform: translateY(calc(100dvh + 160px)); opacity: 0; }
}

/* Forchetta e coltello: due tondi caldi come nell'icona dell'app, gli altri solo accennati. */
.lb-ico { position: absolute; animation: lb-float 16s ease-in-out infinite alternate; }
.lb-ico svg { display: block; width: 100%; height: 100%; }
.lb-ico.lb-faint { color: var(--line-ico); }
.lb-ico.warm { border-radius: 50%; box-shadow: 0 10px 34px rgb(224 98 90 / 30%); }
.lb-ico.i1 { width: 58px; height: 58px; right: 12%; top: 7%; }
.lb-ico.i2 { width: 44px; height: 44px; left: 9%; bottom: 8%; animation-duration: 19s; animation-delay: -7s; }
.lb-ico.i3 { width: 52px; height: 52px; left: 8%; top: 9%; animation-duration: 21s; animation-delay: -3s; }
.lb-ico.i4 { width: 72px; height: 72px; right: 7%; bottom: 5%; animation-duration: 24s; animation-delay: -11s; }
.lb-ico.i5 { width: 40px; height: 40px; left: 46%; bottom: 3%; animation-duration: 18s; animation-delay: -5s; }
.lb-ico.i6, .lb-ico.i7 { display: none; }
@keyframes lb-float {
  from { transform: translateY(-12px) rotate(-8deg); }
  to { transform: translateY(12px) rotate(8deg); }
}
@media (min-width: 768px) {
  .lb-glow { width: 860px; height: 860px; }
  .lb-glow.a { left: calc(50% - 700px); top: calc(50% - 640px); }
  .lb-ico.i1 { width: 76px; height: 76px; right: 22%; top: 16%; }
  .lb-ico.i2 { width: 56px; height: 56px; left: 20%; bottom: 17%; }
  .lb-ico.i3 { width: 68px; height: 68px; left: 13%; top: 22%; }
  .lb-ico.i4 { width: 96px; height: 96px; right: 12%; bottom: 18%; }
  .lb-ico.i6 { display: block; width: 46px; height: 46px; left: 6%; top: 55%; animation-duration: 20s; animation-delay: -9s; }
  .lb-ico.i7 { display: block; width: 52px; height: 52px; right: 5%; top: 43%; animation-duration: 23s; animation-delay: -2s; }
}
/* Telefono basso (o tastiera aperta): le icone non devono finire dietro la scheda. */
@media (max-height: 640px) and (max-width: 767px) { .lb-ico { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .lb-glow, .lb-ico { animation: none; }
  .lb-trail { display: none; }
}
