/* ==========================================================================
   InventHub — Design System (accent MENTA #34D399 su carbone #272727, da inventhub-icon.png)
   Self-contained: nessuna dipendenza da un styles.css globale.
   ========================================================================== */

/* --- Brand gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #34d399 45%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Hero radial glow --- */
.hero-gradient {
  background: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(52, 211, 153, 0.15),
    transparent
  );
}

/* --- Card glow on hover --- */
.card-glow {
  box-shadow: 0 0 40px rgba(52, 211, 153, 0.08);
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
.card-glow:hover {
  box-shadow: 0 0 60px rgba(52, 211, 153, 0.18);
  transform: translateY(-6px);
}

/* --- Animations --- */
.animate-float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-pulse-slow {
  animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

html { scroll-behavior: smooth; }

/* --- Custom scrollbar --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #1c1c1c; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f3f; }

/* --- Video facade (placeholder for YouTube embed) --- */
.video-facade {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.video-facade .play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulseRing 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  transition: transform 0.3s ease, background 0.3s ease;
}
.video-facade:hover .play-btn {
  transform: scale(1.08);
  background: rgba(52, 211, 153, 1);
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 24px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* --- FAQ accordion --- */
.faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  opacity: 0;
}
.faq-item.active .faq-answer {
  max-height: 400px;
  opacity: 1;
  margin-top: 1rem;
}
.faq-item .faq-chevron {
  transition: transform 0.3s ease;
}
.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}
.faq-item.active {
  border-color: rgba(52, 211, 153, 0.4);
}

/* --- Registration modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-container {
  width: 100%;
  max-width: 560px;
  height: 88vh;
  max-height: 760px;
  background: #272727;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.94);
  transition: transform 0.3s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal-overlay.active .modal-container {
  transform: scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.modal-body {
  flex: 1;
  min-height: 0;
}
.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}
@media (max-width: 640px) {
  .modal-overlay { padding: 0; }
  .modal-container {
    max-width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: none;
  }
}

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

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .animate-pulse-slow,
  .video-facade .play-btn {
    animation: none;
  }
  html { scroll-behavior: auto; }
}
