/* ==========================================================================
   MARCO ZULIANI - Fotografo
   Schermata di Benvenuto (Welcome Slideshow a Tutto Schermo con Tasto "Entra")
   Estetica d'Autore: Sfumature Cinematografiche, Ken Burns Lento & Tipografia Fine Art
   ========================================================================== */

/* Contenitore Principale a Schermo Intero */
.welcome-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2500;
  background-color: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.85s ease,
              transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

/* Transizione di Uscita quando si preme "ENTRA" */
.welcome-screen.closing {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

.welcome-screen.hidden {
  display: none !important;
}

/* ==========================================================================
   SLIDESHOW DI SFONDO (Doppio Buffer per Dissolvenze a Incrocio Perfette)
   ========================================================================== */
.welcome-slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050506;
}

.welcome-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 7.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
  pointer-events: none;
}

/* Slide attiva: visibile al 100% con morbido e lento effetto Ken Burns */
.welcome-slide.active {
  opacity: 1;
  transform: scale(1.045);
  z-index: 1;
}

/* ==========================================================================
   SCRIM & VIGNETTE (Protezione del Contrasto Tipografico)
   ========================================================================== */
.welcome-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.welcome-scrim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.15) 30%,
    rgba(0, 0, 0, 0.2) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  pointer-events: none;
}

/* ==========================================================================
   CONTENUTO CENTRALE (Marchio, Sottotitolo & Tasto "ENTRA")
   ========================================================================== */
.welcome-content {
  position: relative;
  z-index: 5;
  text-align: center;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  padding: 0 1.5rem;
  user-select: none;
}

.welcome-badge {
  font-size: clamp(0.72rem, 1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.welcome-title {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.85rem;
  color: #FFFFFF;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.welcome-tagline {
  font-size: clamp(0.8rem, 1.3vw, 0.98rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.75rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

/* Tasto Principale "ENTRA" */
.welcome-enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 42px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}

.welcome-enter-btn:hover {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
}

.welcome-enter-btn:active {
  transform: translateY(0) scale(0.98);
}

.welcome-enter-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 4px;
}

.welcome-enter-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.welcome-enter-btn:hover .btn-arrow {
  transform: translateX(6px);
}

/* ==========================================================================
   BARRA INFERIORE (Didascalia Opera e Controlli Slideshow)
   ========================================================================== */
.welcome-caption {
  position: absolute;
  bottom: clamp(1.2rem, 3.5vw, 2.8rem);
  left: clamp(1.2rem, 4vw, 3.8rem);
  z-index: 5;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 55vw;
  transition: opacity 0.4s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.welcome-caption .caption-counter {
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.08em;
}

.welcome-caption .caption-divider {
  opacity: 0.4;
}

.welcome-caption .caption-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.welcome-caption .caption-meta {
  opacity: 0.75;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Controlli Slideshow (Frecce & Indicatori a Destra) */
.welcome-controls {
  position: absolute;
  bottom: clamp(1.2rem, 3.5vw, 2.8rem);
  right: clamp(1.2rem, 4vw, 3.8rem);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.welcome-arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.welcome-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.08);
}

.welcome-arrow-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.welcome-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.welcome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  padding: 0;
  outline: none;
}

.welcome-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.welcome-dot.active {
  width: 24px;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Barra di Progresso Lineare Sottile in Fondo */
.welcome-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.9));
  z-index: 10;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Smartphone & Tablet)
   ========================================================================== */
@media (max-width: 768px) {
  .welcome-title {
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: 0.12em;
  }

  .welcome-tagline {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    margin-bottom: 2.2rem;
  }

  .welcome-enter-btn {
    padding: 12px 32px;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
  }

  .welcome-caption {
    max-width: 85vw;
    bottom: 4.8rem;
    left: 1.5rem;
    font-size: 0.76rem;
    gap: 6px;
  }

  .welcome-caption .caption-meta {
    display: none;
  }

  .welcome-controls {
    bottom: 1.5rem;
    right: 50%;
    transform: translateX(50%);
  }

  .welcome-dots {
    gap: 6px;
  }

  .welcome-dot {
    width: 6px;
    height: 6px;
  }

  .welcome-dot.active {
    width: 18px;
  }
}
