*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* REGOLA FONT MINIMO 18PX (GOOGLE MOBILE COMPLIANCE) */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0; padding: 0;
  background: #050008;
  color: #f1f0f5;
  font-family: 'Inter', sans-serif;
  font-size: 18px !important;
  line-height: 1.6;
}

p, label, input, textarea, button {
  font-size: 18px;
}

/* SFONDO LUMINOSO IN PURO CSS CON BLUR RIDOTTO (ZERO CARICO GPU) */
@keyframes float-blob1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.1); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes float-blob2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, -30px) scale(1.12); }
  100% { transform: translate(15px, -10px) scale(0.98); }
}

.ambient-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(35px);
  pointer-events: none;
  opacity: 0.22;
  transform: translateZ(0);
  contain: strict;
}

.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #7c3aed 0%, #e040fb 100%);
  top: -100px; left: -100px;
  animation: float-blob1 16s ease-in-out infinite alternate;
}

.blob-2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, #a855f7 0%, #00e5f2 100%);
  bottom: 5%; right: -80px;
  animation: float-blob2 20s ease-in-out infinite alternate;
}

.blob-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #e040fb 0%, #6366f1 100%);
  top: 45%; left: 20%;
  animation: float-blob1 22s ease-in-out infinite reverse;
}

.ambient-grid-overlay {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  pointer-events: none;
}

/* GLASS PANELS SENZA BACKDROP-FILTER BLUR PER EVITARE SCATTI GRAFICI */
.glass {
  background: rgba(14, 8, 28, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
}

.site-header {
  background: rgba(10, 8, 20, 0.96);
  isolation: isolate;
}

.grad-text {
  background: linear-gradient(135deg, #c084fc 0%, #e040fb 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gpu-video {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* SMARTPHONE MOCKUPS CON FIX CLIP-PATH PER SOLLEVARE IL CARICO DALLA GPU IN CHROME */
.phone-container {
  position: relative;
  width: 100%;
  border: 8px solid #1c0e2b;
  border-radius: 32px;
  background: #000;
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.2);
  cursor: pointer;
  isolation: isolate;
  clip-path: inset(0 round 24px); /* FIX CHROMIUM BUG: Sostituisce overflow:hidden per accelerazione HW diretta */
  transform: translate3d(0, 0, 0);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.phone-container:hover {
  box-shadow: 0 20px 45px rgba(224, 64, 251, 0.35);
  border-color: #7c3aed;
}

.phone-notch {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 14px;
  background: #1c0e2b;
  border-radius: 10px;
  z-index: 30;
}

.phone-container video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  border-radius: 22px;
  clip-path: inset(0 round 22px);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.vid-label {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  background: rgba(5,0,8,0.85);
  border: 1px solid rgba(160,85,247,0.4);
  color: #c084fc;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  z-index: 25; white-space: nowrap;
}

.audio-btn-badge {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #7c3aed, #e040fb);
  color: white; font-size: 12px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 20px;
  z-index: 25; white-space: nowrap;
  box-shadow: 0 4px 15px rgba(124,58,237,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.2s;
}

.phone-container:hover .audio-btn-badge {
  transform: translateX(-50%) scale(1.05);
}

/* MARQUEE TICKER SCORREVOLE CONTINUO SENZA GAP */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 24px;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  gap: 24px;
  min-width: 100%;
  animation: scroll-left 25s linear infinite;
}

.marquee:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.review-card {
  background: rgba(15, 5, 30, 0.85);
  border: 1px solid rgba(124,58,237,0.25);
  padding: 20px 24px; border-radius: 20px;
  width: 340px; flex-shrink: 0; text-align: left;
}

/* CONTENITORE ISOLATO PER L'ORBITA ESTERNA */
#orbit-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

/* PULSANTI */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #e040fb);
  color: white; font-weight: 700; border-radius: 9999px;
  box-shadow: 0 8px 25px rgba(124,58,237,0.4);
  transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(224,64,251,0.5);
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8); font-weight: 600;
  border-radius: 9999px; transition: all 0.2s; text-decoration: none;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1); color: white;
}

.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px 18px;
  color: white; font-size: 18px !important; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: #a855f7; }

/* CHATBOT AI STILE FF-EDIZIONI (APERTO DI DEFAULT) */
#chatbot-window-wrapper { 
  position: fixed; bottom: 85px; right: 20px; 
  width: 350px; height: 480px; 
  background: #121218; border: 2px solid #7c3aed; 
  border-radius: 20px; z-index: 99999; 
  display: flex; flex-direction: column; overflow: hidden; 
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#chatbot-window-wrapper.collapsed { 
  height: 52px; 
  width: 280px; 
  border-radius: 26px;
  border-color: #e040fb;
  box-shadow: 0 0 20px rgba(224, 64, 251, 0.5);
}

.chatbot-header { 
  background: linear-gradient(135deg, #181824, #4a154b); 
  padding: 10px 16px; 
  display: flex; align-items: center; gap: 10px; cursor: pointer; 
  border-bottom: 1px solid rgba(255,255,255,0.1);
  height: 52px;
}

.chatbot-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #e040fb; object-fit: cover; flex-shrink: 0; }
.chatbot-header-text { flex-grow: 1; text-align: left; overflow: hidden; white-space: nowrap; }
.chatbot-header-name { font-weight: 700; font-size: 0.88em; color: #fff; text-overflow: ellipsis; overflow: hidden; }
.chatbot-status { font-size: 0.7em; color: #39ff14; display: flex; align-items: center; gap: 4px; }
.chatbot-messages { flex-grow: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: #0c0c10; text-align: left; }
.msg { padding: 10px 14px; border-radius: 14px; font-size: 15px; max-width: 88%; line-height: 1.4; }
.msg.bot { background: rgba(124,58,237,0.15); border: 1px solid rgba(168,85,247,0.3); color: #fff; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.user { background: linear-gradient(135deg, #7c3aed, #e040fb); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-chip {
  display: inline-block; background: rgba(124,58,237,0.2);
  border: 1px solid rgba(168,85,247,0.5); color: #c084fc;
  padding: 6px 12px; border-radius: 15px; font-size: 13px; cursor: pointer; transition: 0.2s;
}
.chat-chip:hover { background: #7c3aed; color: #fff; }

.chatbot-input-bar { padding: 10px; background: #181820; display: flex; gap: 8px; border-top: 1px solid rgba(255,255,255,0.1); }
.chatbot-input-bar input { flex: 1; background: #000; border: 1px solid #333; border-radius: 18px; padding: 8px 14px; color: #fff; font-size: 15px; outline: none; }
.chatbot-input-bar button { background: #7c3aed; color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-weight: bold; }
