#splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #080808;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Griglia di sfondo */
#splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(141,69,213,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141,69,213,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: splashGridFade 2s ease forwards;
}

@keyframes splashGridFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Glow centrale */
#splash::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141,69,213,0.15) 0%, transparent 70%);
  animation: splashGlowPulse 2s ease-in-out infinite alternate;
}

@keyframes splashGlowPulse {
  from { transform: scale(0.8); opacity: 0.5; }
  to   { transform: scale(1.2); opacity: 1; }
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Logo */
.splash-logo {
  width: 10vw; height: 10vw;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 30px rgba(141,69,213,0.8));
  animation: splashLogoIn 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.2s forwards;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Linea orizzontale che si espande */
.splash-line {
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--mainColor), transparent);
  margin: 1.5rem 0 1.2rem;
  animation: splashLineExpand 0.6s ease 0.8s forwards;
}

@keyframes splashLineExpand {
  from { width: 0; opacity: 0; }
  to   { width: 200px; opacity: 1; }
}

/* Testo INDUSTRY */
.splash-title {
  font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: white;
  text-shadow: 0 0 40px rgba(141,69,213,0.5);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: splashTitleReveal 0.7s cubic-bezier(0.22,1,0.36,1) 1s forwards;
  text-align: center;
  line-height: 1;
}

@keyframes splashTitleReveal {
  from { opacity: 1; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0% 0 0); }
}

/* Subtitle */
.splash-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(141,69,213,0.7);
  opacity: 0;
  animation: splashSubIn 0.5s ease 1.5s forwards;
  text-align: center;
  text-shadow: none;
}

@keyframes splashSubIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Barra di caricamento */
.splash-loader {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}

.splash-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mainColor), #00ff88);
  box-shadow: 0 0 10px rgba(141,69,213,0.8);
  animation: splashLoad 1.8s cubic-bezier(0.4,0,0.2,1) 0.3s forwards;
}

@keyframes splashLoad {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* Quattro angoli decorativi */
.splash-corner {
  position: absolute;
  width: 20px; height: 20px;
  opacity: 0;
  animation: splashCornerIn 0.4s ease 0.5s forwards;
}

.splash-corner.tl { top: 2rem; left: 2rem; border-top: 1px solid var(--mainColor); border-left: 1px solid var(--mainColor); }
.splash-corner.tr { top: 2rem; right: 2rem; border-top: 1px solid var(--mainColor); border-right: 1px solid var(--mainColor); }
.splash-corner.bl { bottom: 2rem; left: 2rem; border-bottom: 1px solid var(--mainColor); border-left: 1px solid var(--mainColor); }
.splash-corner.br { bottom: 2rem; right: 2rem; border-bottom: 1px solid var(--mainColor); border-right: 1px solid var(--mainColor); }

@keyframes splashCornerIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Mentre la splash è visibile, congela tutte le animazioni della pagina */
body.splash-active *:not(#splash):not(#splash *) {
  animation-play-state: paused !important;
  animation-delay: 0s !important;
}

/* Quando splash-active viene rimossa, le animazioni ripartono da zero */
body:not(.splash-active) *:not(#splash) {
  animation-play-state: running !important;
}