/* ═══════════════════════════════════════
   BEAM — Landing "Presto su Google Play"
   Stili della pagina. Animazioni della scena: landing_anim.js
═══════════════════════════════════════ */
:root {
  --beam-a: #149DF9;
  --beam-b: #779AFB;
  --beam-c: #D591FB;
  --beam-grad: linear-gradient(135deg, var(--beam-c) 0%, var(--beam-b) 50%, var(--beam-a) 100%);
  --space-1: #070A18;
  --space-2: #0E1430;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--space-1);
  color: #FFFFFF;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Spazio a tutto schermo ─── */
.lp {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 18% 22%, rgba(213,145,251,0.20) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 85% 78%, rgba(20,157,249,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 60% 35%, rgba(119,154,251,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 45%, var(--space-2) 0%, var(--space-1) 75%);
}

/* Nebulosa che respira piano */
.lp::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%; bottom: -10%; left: -10%;
  background:
    radial-gradient(ellipse 35% 30% at 30% 70%, rgba(213,145,251,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 30% 35% at 75% 25%, rgba(20,157,249,0.10) 0%, transparent 70%);
  pointer-events: none;
}

#lp-stars {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* ─── Scena SVG ─── */
.lp-scene {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.lp-scene-tall { display: none; }

.lp-orbits ellipse { fill: none; stroke: rgba(119,154,251,0.12); stroke-width: 1.5; stroke-dasharray: 2 10; }
.lp-sparkle { fill: rgba(255,255,255,0.75); }
.lp-route  { fill: none; stroke: url(#lpwGrad); stroke-width: 2.2; stroke-dasharray: 3 11; stroke-linecap: round; opacity: 0.5; }
.lp-scene-tall .lp-route { stroke: url(#lptGrad); }
.lp-rim    { fill: none; stroke: rgba(255,255,255,0.28); stroke-width: 1.5; }

.lp-fig {
  fill: none;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lp-fig .lp-fill   { fill: rgba(255,255,255,0.92); stroke: none; }
.lp-alien          { stroke: #CFE9FF; }
.lp-alien .lp-fill { fill: url(#lpwGradBox); }
.lp-eye            { fill: rgba(255,255,255,0.95); stroke: none; }
.lp-phone          { fill: url(#lpwGradBox); stroke: none; }

.lp-dot { fill: #FFFFFF; }

.lp-bubble-text {
  fill: #FFFFFF;
  font-family: 'Arial Black', 'Arial Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.lp-phrase {
  font-family: 'Arial Black', 'Arial Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.lp-trail      { fill: none; stroke-width: 5; stroke-linecap: round; }
.lp-trail-glow { fill: none; stroke-width: 22; stroke-linecap: round; filter: url(#lpwBlur); }
.lp-scene-tall .lp-trail-glow { filter: url(#lptBlur); }

/* ─── Personaggio che fluttua nello spazio ─── */
.lp-hero {
  position: absolute;
  z-index: 3;
  left: clamp(8px, 3vw, 64px);
  top: 50%;
  width: min(22vw, 44vh);
  aspect-ratio: 687 / 1158;
  transform: translateY(-50%);
  pointer-events: none;
}

.lp-hero-float {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 60%;
}



.lp-superhero {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: visible;
  filter: drop-shadow(0 0 26px rgba(119,154,251,0.35));
}

/* Alone sotto i piedi, come una spinta */
.lp-hero-glow {
  position: absolute;
  z-index: 0;
  left: 22%; right: 18%;
  bottom: -4%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(119,154,251,0.45) 0%, rgba(213,145,251,0.18) 45%, transparent 72%);
  filter: blur(6px);
}

@media (prefers-reduced-motion: no-preference) {
  .lp::before       { animation: lpNebula 18s ease-in-out infinite alternate; }
  .lp-hero-float    { animation: lpFly 7s ease-in-out infinite; }
  .lp-hero-glow     { animation: lpGlow 7s ease-in-out infinite; }
  .lp-float-a       { animation: lpBob 8s ease-in-out infinite; }
  .lp-float-b       { animation: lpBob 9s ease-in-out infinite reverse; }
  .lp-sparkle       { animation: lpTwinkle 3.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .lp-sparkle:nth-child(2n) { animation-delay: -1.7s; }
  .lp-flame         { animation: lpFlame 0.18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 100% 50%; }
}

@keyframes lpNebula  { from { transform: translate(0,0) scale(1); } to { transform: translate(2%, -2%) scale(1.06); } }
@keyframes lpFly {
  0%   { transform: translate(0, 0)        rotate(-2deg); }
  25%  { transform: translate(1.5%, -4%)   rotate(1deg); }
  50%  { transform: translate(0, -6%)      rotate(3deg); }
  75%  { transform: translate(-1.5%, -3%)  rotate(0deg); }
  100% { transform: translate(0, 0)        rotate(-2deg); }
}
@keyframes lpGlow    { 0%,100% { opacity: 1; transform: scaleX(1); } 50% { opacity: .55; transform: scaleX(.8); } }
@keyframes lpBob     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lpTwinkle { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes lpFlame   { from { transform: scaleX(.85); } to { transform: scaleX(1.15); } }

/* ─── Telefono / schermi verticali ─── */
@media (max-aspect-ratio: 1/1) {
  .lp-scene-wide { display: none; }
  .lp-scene-tall { display: block; }
  .lp-hero {
    left: 50%;
    top: 24%;
    width: min(38vw, 19vh);
    transform: translateX(-50%);
  }
}
  

/* ─── Link discreti: Privacy e Termini ─── */
.lp-legal {
  position: absolute;
  z-index: 6;
  right: clamp(16px, 3vw, 48px);
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.lp-legal a {
  white-space: nowrap;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.lp-legal a:hover,
.lp-legal a:focus-visible {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
  outline: none;
}

.lp-legal span { color: rgba(255,255,255,0.25); }

@media (max-aspect-ratio: 1/1) {
  .lp-legal {
    right: auto;
    left: clamp(8px, 3vw, 20px);
    bottom: auto;
    top: max(14px, env(safe-area-inset-top));
    font-size: 0.68rem;
  }
}


/* ─── Esplosione stellare ─── */
#lp-fx {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 4;
  pointer-events: none;
}

/* ─── Pulsante "Pre-registrati su Google Play" ─── */
.lp-cta {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  background: var(--beam-grad);
  color: #FFFFFF;
  font-family: 'Arial Black', 'Arial Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 10px 34px rgba(119,154,251,0.45), 0 0 60px rgba(213,145,251,0.28);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translate(-50%, -50%) scale(0.6);
          transform: translate(-50%, -50%) scale(0.6);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.7s;
          transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.7s;
  -webkit-tap-highlight-color: transparent;
}

.lp-cta.is-visible {
  opacity: 1;
  visibility: visible;
  -webkit-transform: translate(-50%, -50%) scale(1);
          transform: translate(-50%, -50%) scale(1);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s;
          transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s;
}

/* Riflesso che attraversa il pulsante */
.lp-cta::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  -webkit-transform: skewX(-20deg);
          transform: skewX(-20deg);
  pointer-events: none;
}

.lp-cta:hover,
.lp-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.55) inset, 0 14px 40px rgba(119,154,251,0.6), 0 0 80px rgba(213,145,251,0.4);
}

.lp-cta.is-visible:hover {
  -webkit-transform: translate(-50%, -50%) scale(1.04);
          transform: translate(-50%, -50%) scale(1.04);
}

@media (prefers-reduced-motion: no-preference) {
  .lp-cta.is-visible        { animation: lpCtaGlow 3.2s ease-in-out infinite; }
  .lp-cta.is-visible::after { animation: lpCtaShine 4.5s ease-in-out 1s infinite; }
}

@keyframes lpCtaGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 10px 34px rgba(119,154,251,0.45), 0 0 50px rgba(213,145,251,0.22); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,0.28) inset, 0 12px 40px rgba(119,154,251,0.65), 0 0 90px rgba(213,145,251,0.45); }
}

@keyframes lpCtaShine {
  0%, 70%  { left: -60%; }
  100%     { left: 130%; }
}

@media (max-aspect-ratio: 1/1) {
  .lp-cta { padding: 13px 24px; font-size: 0.86rem; }
}