.scroll-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px;
  margin-top: -20px;
}

.sub-schede-container {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 20px;
  width: 100%;
  height: 500px;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.sub-schede-container::-webkit-scrollbar {
  display: none;
}

.sub-scheda {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  aspect-ratio: 2/3;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.sub-scheda:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-astratta {
  background-color: var(--colore-sfondo-principale);
  color: var(--colore-testo);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex: 0 0 280px;
  width: 280px;
  height: 420px;
  border-radius: 15px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.card-tag {
  font-family: sans-serif;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.card-numero {
  font-family: inherit;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 0.8;
  opacity: 0.3;
}

.card-body {
  margin-top: auto;
  margin-bottom: 20px;
}

.card-titolo {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  line-height: 1.1;
  transition: transform 0.3s ease;
}

.card-astratta:hover .card-titolo {
  transform: scale(1.05);
  transform-origin: left;
}

.card-desc {
  font-family: sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.8;
}

.card-desc-spaced {
  margin-top: 8px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 15px;
}

.card-tech {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-tech span,
.card-tech a,
.card-tech button {
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid var(--colore-testo);
  padding: 4px 8px;
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

.card-tech button {
  background: transparent;
  cursor: pointer;
}

.card-tech a:focus-visible,
.card-tech button:focus-visible,
.contact-suggestion:focus-visible,
.contact-submit:focus-visible,
.privacy-back:focus-visible {
  outline: 3px solid var(--colore-testo);
  outline-offset: 3px;
}

.sub-scheda:hover .card-tech span,
.sub-scheda:hover .card-tech a,
.sub-scheda:hover .card-tech button {
  background-color: var(--colore-testo);
  color: var(--colore-sfondo-principale);
}

.dot-indicator {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 12px 0 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50px;
  background-color: var(--colore-testo);
  opacity: 0.25;
  transition: width 0.1s ease, opacity 0.1s ease, transform 0.1s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.dot.active {
  width: 24px;
  opacity: 1;
}

.contact-form-card {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 450px;
  aspect-ratio: auto;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease-out 0.12s,
    transform 0.5s ease-out 0.12s,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.reveal.active .contact-form-card {
  opacity: 1;
  transform: translateY(0);
}

.contact-form-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
  padding-top: 16px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 8px;
}

.contact-suggestion {
  font-family: sans-serif;
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid var(--colore-testo);
  padding: 4px 8px;
  border-radius: 20px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-suggestion:hover {
  background-color: var(--colore-testo);
  color: var(--colore-sfondo-principale);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  background-color: #ffffff;
  color: var(--colore-testo);
  font-family: sans-serif;
  font-size: 0.98rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-field.is-error input,
.contact-field.is-error textarea {
  border-color: rgba(138, 43, 43, 0.55);
  box-shadow: 0 0 0 3px rgba(138, 43, 43, 0.08);
}

.contact-field textarea {
  min-height: 145px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(0, 0, 0, 0.35);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.contact-form-footer {
  align-items: center;
  padding-top: 10px;
}

.contact-status {
  font-family: sans-serif;
  font-size: 0.9rem;
  min-height: 1.4rem;
  opacity: 0.75;
  transform: translateY(0);
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.25s ease;
}

.contact-status.is-success {
  color: rgba(0, 0, 0, 0.88);
  opacity: 1;
}

.contact-status.is-error {
  color: #8a2b2b;
  opacity: 1;
}

.contact-status.is-animated {
  animation: contact-status-lift 0.36s ease;
}

.contact-submit {
  border: 1px solid var(--colore-testo);
  border-radius: 999px;
  background-color: var(--colore-testo);
  color: var(--colore-sfondo-principale);
  font-family: sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.contact-submit:hover {
  transform: translateY(-2px);
}

.contact-submit.is-success {
  background-color: transparent;
  color: var(--colore-testo);
}

.contact-submit:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.contact-form-card.is-success {
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.contact-form-card.is-pulse {
  animation: contact-card-pulse 0.55s ease;
}

.contact-form-card.is-shake {
  animation: contact-card-shake 0.32s ease;
}

.privacy-page {
  padding: 20px;
}

.privacy-shell {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  background-color: var(--colore-sfondo-scheda);
  border-radius: 18px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 28px;
}

.privacy-card {
  background-color: var(--colore-sfondo-principale);
  border-radius: 18px;
  padding: 28px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: sans-serif;
  color: var(--colore-testo);
}

.privacy-card h1,
.privacy-card h2 {
  font-family: 'Playfair Display SC', serif;
  margin-bottom: 12px;
}

.privacy-card h1 {
  font-size: 2rem;
}

.privacy-card h2 {
  font-size: 1.2rem;
  margin-top: 22px;
}

.privacy-card p,
.privacy-card li {
  font-size: 0.98rem;
  line-height: 1.65;
}

.privacy-card ul {
  padding-left: 18px;
}

.privacy-back {
  display: inline-flex;
  margin-top: 24px;
  font-family: sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--colore-testo);
  padding: 8px 12px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.privacy-back:hover {
  background-color: var(--colore-testo);
  color: var(--colore-sfondo-principale);
}

@keyframes contact-status-lift {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes contact-card-pulse {
  0% {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08), 0 14px 26px rgba(0, 0, 0, 0.12);
  }

  100% {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  }
}

@keyframes contact-card-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-3px);
  }
}

.scheda.is-active .lettera {
  opacity: 0;
}

.scheda.is-active .parola {
  opacity: 1;
}

@media (hover: hover) {
  .scheda-link:hover {
    transform: scale(1.02);
  }

  .scheda:hover .lettera {
    opacity: 0;
  }

  .scheda:hover .parola {
    opacity: 1;
  }

  .sub-scheda:hover {
    transform: scale(1.02);
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background-color: transparent;
  border: 2px solid var(--colore-testo);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.2s ease, background-color 0.2s ease;
  mix-blend-mode: difference;
}

.custom-cursor.hover {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: var(--colore-testo);
}
