/* Stili custom di DISCom */

html {
  scroll-behavior: smooth;
}

/* Header trasparente in hero, solido allo scroll */
#header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Animazione fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger per elementi multipli */
.fade-in:nth-child(1) { transition-delay: 0.05s; }
.fade-in:nth-child(2) { transition-delay: 0.15s; }
.fade-in:nth-child(3) { transition-delay: 0.25s; }
.fade-in:nth-child(4) { transition-delay: 0.35s; }

/* Selezione testo brand */
::selection {
  background-color: #f97316;
  color: #fff;
}

/* Focus visibile accessibile */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* Transizione comune */
.transition-common {
  transition: all 0.3s ease;
}

/* Alert form */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.alert-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

/* Campo con errore */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
