#contatto, .legale {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .2s;
}

#contatto.aperta, .legale.aperta {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

#contatto::before, .legale::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s ease;
}

#contatto.aperta::before, .legale.aperta::before {
  opacity: 1;
}

#contatto .colonna > *, .legale .colonna > * {
  opacity: 0;
  transition: opacity .2s ease, filter .18s ease, transform .18s ease;
}

#contatto.aperta .colonna > *, .legale.aperta .colonna > * {
  opacity: 1;
}

#contatto .colonna, .legale .colonna {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  transform: translateY(18px) scale(.98);
  transition: transform .3s var(--molla);
}

#contatto.aperta .colonna, .legale.aperta .colonna {
  transform: none;
}

#contatto .riquadro, .legale .riquadro {
  position: relative;
  width: 640px;
  max-width: 100%;
  padding: 30px;
  border: 1.5px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background-image: linear-gradient(135deg, rgba(84, 96, 98, .35) 0%, rgba(29, 38, 39, .35) 100%);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  text-align: left;
}

#contatto .riquadro::before, .legale .riquadro::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: url('/ui/brushed-texture.jpg') center / cover;
  mix-blend-mode: overlay;
  opacity: .28;
  pointer-events: none;
}

#contatto .riquadro > *, .legale .riquadro > * {
  position: relative;
  z-index: 1;
}

.grecaptcha-badge {
  visibility: hidden;
}

#contatto h2, .legale h2 {
  margin: 0;
  font-family: 'Marcellus SC', Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  color: var(--oro);
  text-align: center;
}

#contatto .sotto {
  margin: -12px 0 0;
  text-align: center;
  color: #A7B6B8;
  font-size: 15px;
}

#contatto label {
  display: block;
  font-size: 13px;
  color: #8FA1A3;
  margin: 0 0 8px 4px;
}

#contatto .riga-campo + .riga-campo {
  margin-top: 20px;
}

.campo {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .35);
  font-family: 'Rosarivo', Georgia, serif;
  font-size: 13px;
  color: #EDE0C6;
  outline: none;
  transition: border-color .16s ease, background .16s ease;
}

.campo::placeholder {
  color: #8FA1A3;
  opacity: 1;
}

.campo:focus {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .22);
}

.campo::selection {
  background: #4B585C;
  color: #EDE0C6;
}

textarea.campo {
  height: auto;
  min-height: 132px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.3;
}

#contatto .fondo-riga {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

#contatto .esito {
  min-height: 20px;
  text-align: center;
  font-size: 14px;
  margin: 16px 0 0;
}

#contatto .esito.ok {
  color: #9BD8A6;
}

#contatto .esito.no {
  color: #E29A98;
}

#contatto .google {
  margin: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: #7E8D8F;
}

#contatto .google a {
  color: #A7B6B8;
  text-decoration: underline;
}

.legale .riquadro {
  width: 780px;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  padding: 30px 14px 30px 30px;
}

.legale .scorre {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 16px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.legale .scorre::-webkit-scrollbar {
  width: 8px;
}

.legale .scorre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 4px;
}

.legale .scorre:focus {
  outline: none;
}

.legale .scorre h3 {
  margin: 26px 0 10px;
  font-family: 'Marcellus SC', Georgia, serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
  color: var(--oro);
}

.legale .scorre h4 {
  margin: 18px 0 6px;
  font-family: 'Marcellus SC', Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.2;
  color: #DDCAA1;
}

.legale .scorre p, .legale .scorre li {
  font-size: 15px;
  line-height: 1.45;
  color: #B0BCBE;
}

.legale .scorre p + p {
  margin-top: 10px;
}

.legale .scorre ul {
  margin: 8px 0 10px;
  padding-left: 22px;
}

.legale .scorre li + li {
  margin-top: 4px;
}

.legale .scorre strong {
  font-weight: 400;
  color: var(--oro);
}

.legale .scorre a {
  color: var(--oro-caldo);
  text-decoration: underline;
}

.legale .scorre > p:first-child {
  font-size: 13px;
  color: #8FA1A3;
}

@media (max-width: 980px) {
  .legale {
    padding: 16px;
  }

  .legale .riquadro {
    padding: 24px 8px 24px 20px;
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
  }

  .legale .scorre {
    padding-right: 12px;
  }

  .legale .scorre h3 {
    font-size: 19px;
  }

  .legale .scorre h4 {
    font-size: 16px;
  }

  .legale .scorre p, .legale .scorre li {
    font-size: 14px;
  }
}
