/* --- Titanium Micro-Interazioni Tattili & Ergonomia Mobile --- */

/* Feedback di pressione immediata senza ritardi touch */
.touch-press {
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.touch-press:active {
  transform: scale(0.96);
}

/* Barra discreta di avanzamento scroll a filo del bordo del browser */
.scroll-progress-sentinel {
  position: fixed;
  bottom: 0; /* A filo del bordo inferiore su desktop */
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(15, 23, 42, 0.2);
  z-index: 1050;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  /* Su smartphone aderente sopra la dock bar (64px) */
  .scroll-progress-sentinel {
    bottom: 64px;
  }
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #38bdf8);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
  transition: width 0.05s linear;
}

/* Skeleton Shimmer locale in puro CSS (Zero layout shift) */
.skeleton-shimmer {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: titaniumShimmer 1.4s infinite;
}
@keyframes titaniumShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Chip Tattili per il Preventivatore ad ALTO CONTRASTO */
.chip-option {
  cursor: pointer;
  border: 1px solid #334155;
  background-color: #111e33; /* Sfondo scuro profondo ma visibile */
  color: #f8fafc;
  border-radius: 0.85rem;
  padding: 1.1rem 1.25rem;
  transition: all 0.18s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.chip-option:hover,
.chip-option:focus-visible {
  border-color: #38bdf8;
  background-color: #172744;
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  transform: translateY(-2px);
}
.chip-option.active {
  border-color: #06b6d4;
  background-color: rgba(6, 182, 212, 0.18);
  color: #38bdf8;
  box-shadow: 0 0 0 1px #06b6d4, 0 8px 20px rgba(6, 182, 212, 0.2);
}
.chip-option .chip-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}
.chip-option.active .chip-title {
  color: #38bdf8;
}
.chip-option .chip-desc {
  color: #cbd5e1; /* Grigio chiaro luminoso ad alta leggibilità */
  font-size: 0.875rem;
  line-height: 1.4;
  display: block;
}

/* Card Grandi Sistemi (Formula 1 ➔ PMI) */
.card-mission-critical {
  border: 1px solid #293548;
  background: linear-gradient(145deg, #0e1726, #162238);
  border-radius: 1rem;
  padding: 1.6rem;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
.card-mission-critical:hover {
  transform: translateY(-4px);
  border-color: #06b6d4;
  box-shadow: 0 16px 32px -6px rgba(6, 182, 212, 0.2);
}
.card-mission-critical h3 {
  color: #ffffff;
  font-weight: 700;
}
.card-mission-critical p {
  color: #cbd5e1; /* Testo chiaro leggibile */
  line-height: 1.5;
}

/* Badge Origine Tecnologica */
.badge-tech-origin {
  background-color: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  display: inline-block;
}

/* Box Preventivatore Container */
.preventivatore-card {
  background: linear-gradient(160deg, #0d1527 0%, #131e36 100%);
  border: 1px solid #334155;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

/* Testo empatico e citazioni ad alto contrasto */
.quote-box-titanium {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 0.85rem;
  padding: 1.25rem;
}
.quote-box-titanium p {
  color: #67e8f9 !important;
  font-weight: 500;
  line-height: 1.5;
}

/* Honeypot nascosto in modo accessibile */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   Rispetto di prefers-reduced-motion
   Bootstrap 5.3 neutralizza il movimento ridotto solo sui propri componenti
   (btn, modal, carousel, accordion). Le animazioni del design system Titanium
   resterebbero attive: qui vengono fermate. Il contenuto resta identico,
   semplicemente smette di muoversi.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  /* Scheletro di caricamento: era un ciclo infinito da 1,4s */
  .skeleton-shimmer {
    animation: none !important;
    background-position: 50% 0;
  }

  /* Micro-interazioni: diventano istantanee invece che sparire, cosi'
     l'utente vede comunque il riscontro del tocco o dell'hover. */
  .touch-press,
  .chip-option,
  .card-mission-critical {
    transition-duration: 0.01ms !important;
  }

  /* La barra di avanzamento non deve scorrere da sola */
  .scroll-progress-fill {
    transition: none !important;
  }
}
