/*
 * AlexEmme contact form — 1.19.20
 * // by Alessandro Monfregola
 */

/*
 * Pagina Contatti: desktop-first e compatta.
 * Obiettivo: contenuto principale + footer visibili senza scroll nelle viewport desktop comuni.
 */

/*
 * Layout verticale dinamico: sulle viewport più alte il footer resta ancorato
 * al fondo dello spazio disponibile; quando il contenuto supera la viewport,
 * la pagina torna naturalmente a scorrere senza altezze rigide.
 */
body.alexemme-theme.ae-page-contact{
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}

body.alexemme-theme.ae-page-contact .contact-page{
  width:100%;
  flex:1 0 auto;
}

body.alexemme-theme.ae-page-contact .site-footer{
  width:100%;
  flex:0 0 auto;
  margin-top:auto;
}
.contact-page{
  padding-bottom:0;
}

.contact-page .contact-hero{
  padding-top:clamp(14px,1.6vw,22px)!important;
  padding-bottom:clamp(14px,1.5vw,20px)!important;
}

.contact-page .contact-hero-inner{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:clamp(40px,6vw,96px);
  align-items:end;
}

.contact-page .contact-hero .eyebrow{
  margin-bottom:6px;
}

.contact-page .contact-hero h1{
  max-width:none!important;
  margin:0!important;
  padding:.02em .02em .08em;
  overflow:visible;
  font:500 clamp(3.25rem,4.7vw,5.25rem)/1 var(--serif)!important;
  letter-spacing:-.055em!important;
}

.contact-page .contact-hero-copy{
  justify-self:end;
  width:auto;
  max-width:none!important;
  margin:0 0 8px!important;
  color:var(--muted)!important;
  font-size:clamp(.94rem,1.05vw,1.02rem)!important;
  line-height:1.45!important;
  white-space:nowrap;
}

/*
 * La nota “Diretto, semplice.” non è più una colonna laterale:
 * diventa una fascia editoriale orizzontale sopra il modulo.
 */
.contact-page .contact-form-shell{
  display:block;
  padding-top:clamp(13px,1.45vw,18px)!important;
  padding-bottom:clamp(14px,1.5vw,20px)!important;
  border-top:1px solid var(--line);
}

.contact-page .contact-form-intro{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  gap:22px;
  align-items:baseline;
  padding:0;
  margin:0 0 10px;
}

.contact-page .contact-form-kicker{
  margin:0!important;
  font:700 .67rem/1.2 var(--mono)!important;
  letter-spacing:.13em!important;
  text-transform:uppercase;
  color:var(--blue)!important;
}

.contact-page .contact-form-intro p:not(.contact-form-kicker){
  max-width:none;
  margin:0;
  color:#555552;
  font-size:.89rem;
  line-height:1.45;
}

.contact-page .contact-form-content{
  min-width:0;
  padding:clamp(16px,1.8vw,24px) clamp(20px,2.3vw,30px);
  border:1px solid rgba(29,29,27,.10);
  border-radius:17px;
  background:#fff;
  box-shadow:0 10px 28px rgba(29,29,27,.04);
}

.contact-page .contact-form-content .wpforms-container,
.contact-page .contact-form-content .wpforms-container-full,
.contact-page .contact-form-content .wpforms-container form,
.contact-page .contact-form-content .wpforms-container-full form{
  margin:0!important;
}

/* Nome + email affiancati su desktop; gli altri campi a tutta larghezza. */
.contact-page .contact-form-content .wpforms-field-container{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  column-gap:clamp(20px,2.2vw,32px)!important;
  align-items:start!important;
}

.contact-page .contact-form-content .wpforms-field-name,
.contact-page .contact-form-content .wpforms-field-email{
  grid-column:span 1!important;
}

.contact-page .contact-form-content .wpforms-field-textarea,
.contact-page .contact-form-content .wpforms-field-checkbox{
  grid-column:1 / -1!important;
}

.contact-page .contact-form-content .wpforms-field{
  padding:0 0 11px!important;
}

.contact-page .contact-form-content .wpforms-field-label{
  display:block!important;
  margin:0 0 4px!important;
  color:#626560!important;
  font:700 .63rem/1.15 var(--mono)!important;
  letter-spacing:.13em!important;
  text-transform:uppercase!important;
}

.contact-page .contact-form-content .wpforms-required-label{
  color:var(--terracotta)!important;
}

.contact-page .contact-form-content input[type=text],
.contact-page .contact-form-content input[type=email],
.contact-page .contact-form-content input[type=url],
.contact-page .contact-form-content input[type=tel],
.contact-page .contact-form-content input[type=number],
.contact-page .contact-form-content textarea,
.contact-page .contact-form-content select{
  width:100%!important;
  max-width:none!important;
  min-height:37px!important;
  margin:0!important;
  padding:5px 0!important;
  border:0!important;
  border-bottom:1px solid rgba(29,29,27,.22)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--ink)!important;
  font:500 .96rem/1.35 var(--sans)!important;
  transition:border-color .2s ease,box-shadow .2s ease!important;
}

.contact-page .contact-form-content textarea{
  min-height:78px!important;
  height:78px!important;
  resize:vertical!important;
}

.contact-page .contact-form-content input:focus,
.contact-page .contact-form-content textarea:focus,
.contact-page .contact-form-content select:focus{
  outline:none!important;
  border-bottom-color:var(--blue)!important;
  box-shadow:0 1px 0 var(--blue)!important;
}

.contact-page .contact-form-content .wpforms-error{
  margin-top:4px!important;
  color:var(--terracotta-dark)!important;
  font:.68rem/1.3 var(--mono)!important;
}

.contact-page .contact-form-content em.wpforms-error{
  font-style:normal!important;
}

/* Privacy: testo leggibile, senza label visuale duplicata. */
.contact-page .contact-form-content .wpforms-field-checkbox > .wpforms-field-label{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.contact-page .contact-form-content .wpforms-field-checkbox ul,
.contact-page .contact-form-content .wpforms-field-checkbox li,
.contact-page .contact-form-content ul.wpforms-field-required{
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}

.contact-page .contact-form-content .wpforms-field-checkbox li::marker{
  content:""!important;
  font-size:0!important;
}

.contact-page .contact-form-content .wpforms-field-checkbox li::before{
  content:none!important;
  display:none!important;
}

.contact-page .contact-form-content .wpforms-field-checkbox li{
  display:flex!important;
  align-items:flex-start!important;
  gap:8px!important;
}

.contact-page .contact-form-content input[type=checkbox]{
  flex:0 0 auto;
  width:16px!important;
  height:16px!important;
  margin:2px 0 0!important;
  accent-color:var(--blue);
}

.contact-page .contact-form-content .wpforms-field-checkbox label{
  display:block!important;
  margin:0!important;
  color:#50504d!important;
  font:500 .87rem/1.35 var(--sans)!important;
  letter-spacing:0!important;
  text-transform:none!important;
}

.contact-page .contact-form-content .wpforms-field-description{
  margin-top:4px!important;
  color:var(--muted)!important;
  font-size:.76rem!important;
  line-height:1.35!important;
}

/* Turnstile leggermente compattato senza alterarne la funzionalità. */
.contact-page .contact-form-content .wpforms-turnstile-container,
.contact-page .contact-form-content .wpforms-recaptcha-container,
.contact-page .contact-form-content [class*=turnstile]{
  margin:0 0 8px!important;
}

.contact-page .contact-form-content .cf-turnstile{
  transform:scale(.9);
  transform-origin:left top;
  margin-bottom:-6px!important;
}

.contact-page .contact-form-content .wpforms-submit-container{
  margin:0!important;
  padding:0!important;
}

.contact-page .contact-form-content button[type=submit],
.contact-page .contact-form-content .wpforms-submit{
  min-width:154px!important;
  min-height:42px!important;
  margin:0!important;
  padding:10px 20px!important;
  border:1px solid var(--ink)!important;
  border-radius:999px!important;
  background:var(--ink)!important;
  color:#fff!important;
  box-shadow:none!important;
  font:650 .89rem/1 var(--sans)!important;
  cursor:pointer!important;
  transition:background .2s ease,color .2s ease,transform .2s ease!important;
}

@media(hover:hover) and (pointer:fine){
  .contact-page .contact-form-content button[type=submit]:hover,
  .contact-page .contact-form-content .wpforms-submit:hover{
    background:#fff!important;
    color:var(--ink)!important;
    transform:translateY(-1px);
  }
}

.contact-page .contact-form-content button[type=submit]:focus-visible,
.contact-page .contact-form-content .wpforms-submit:focus-visible{
  outline:2px solid var(--blue)!important;
  outline-offset:3px!important;
}

.contact-page .contact-form-content .wpforms-confirmation-container-full{
  margin:0!important;
  padding:18px 20px!important;
  border:1px solid rgba(127,140,128,.34)!important;
  border-radius:14px!important;
  background:#f3f5f1!important;
  color:var(--ink)!important;
  box-shadow:none!important;
}

.contact-page .contact-form-content .wpforms-confirmation-container-full p{
  margin:0!important;
}

.contact-page .contact-form-content a{
  text-decoration:underline!important;
  text-underline-offset:3px!important;
}

.contact-page .form-placeholder{
  min-height:180px;
}

/*
 * Footer dedicato alla pagina Contatti.
 * Mantiene Privacy/Cookie/contatore, ma evita che il footer obblighi allo scroll.
 */
.contact-page + .site-footer .footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:10px 0 8px;
}

.contact-page + .site-footer .footer-brand{
  font-size:1.65rem;
  line-height:1;
}

.contact-page + .site-footer .footer-brand-wrap p{
  display:none;
}

.contact-page + .site-footer .footer-nav ul,
.contact-page + .site-footer .footer-nav .menu{
  gap:7px;
}

.contact-page + .site-footer .footer-nav a{
  min-height:34px;
  padding:7px 12px;
  font-size:.78rem;
}

.contact-page + .site-footer .footer-bottom{
  min-height:38px;
  padding:9px 0 10px;
  font-size:.62rem;
}

/* Desktop: la frase hero e la nota informativa restano su una sola riga. */
@media(min-width:1180px){
  .contact-page .contact-form-intro p:not(.contact-form-kicker){
    white-space:nowrap;
  }
}

/* Tablet: torna il wrapping naturale; lo scroll è consentito. */
@media(max-width:1100px){
  .contact-page .contact-hero-inner{
    grid-template-columns:1fr;
    gap:8px;
  }

  .contact-page .contact-hero-copy{
    justify-self:start;
    max-width:760px!important;
    white-space:normal;
  }

  .contact-page .contact-form-intro{
    grid-template-columns:1fr;
    gap:5px;
  }

  .contact-page + .site-footer .footer-inner{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
  }

  .contact-page + .site-footer .footer-nav ul,
  .contact-page + .site-footer .footer-nav .menu{
    justify-content:flex-start;
  }
}

@media(max-width:680px){
  .contact-page .contact-hero{
    padding-top:12px!important;
    padding-bottom:14px!important;
  }

  .contact-page .contact-hero h1{
    font-size:clamp(2.9rem,13vw,4.25rem)!important;
  }

  .contact-page .contact-form-shell{
    padding-top:14px!important;
  }

  .contact-page .contact-form-content{
    padding:18px 16px 20px;
    border-radius:14px;
  }

  .contact-page .contact-form-content .wpforms-field-container{
    grid-template-columns:1fr!important;
  }

  .contact-page .contact-form-content .wpforms-field-name,
  .contact-page .contact-form-content .wpforms-field-email,
  .contact-page .contact-form-content .wpforms-field-textarea,
  .contact-page .contact-form-content .wpforms-field-checkbox{
    grid-column:1!important;
  }

  .contact-page .contact-form-content .wpforms-field{
    padding-bottom:13px!important;
  }

  .contact-page .contact-form-content textarea{
    min-height:105px!important;
    height:auto!important;
  }

  .contact-page .contact-form-content .cf-turnstile{
    transform:none;
    margin-bottom:0!important;
  }

  .contact-page .contact-form-content button[type=submit],
  .contact-page .contact-form-content .wpforms-submit{
    width:100%!important;
  }

  .contact-page + .site-footer .footer-inner{
    padding:20px 0 16px;
  }

  .contact-page + .site-footer .footer-brand{
    font-size:2.25rem;
  }

  .contact-page + .site-footer .footer-bottom{
    grid-template-columns:1fr;
    gap:8px;
    padding:13px 0 16px;
  }

  .contact-page + .site-footer .footer-visit-counter,
  .contact-page + .site-footer .footer-bottom>span:last-child{
    justify-self:start;
  }
}

@media(prefers-reduced-motion:reduce){
  .contact-page .contact-form-content input,
  .contact-page .contact-form-content textarea,
  .contact-page .contact-form-content select,
  .contact-page .contact-form-content button[type=submit],
  .contact-page .contact-form-content .wpforms-submit{
    transition:none!important;
  }
}

/* Conferma AJAX: preserva la geometria del form per evitare salti del viewport. */
.contact-page .contact-form-content.is-contact-confirmed{
  overflow-anchor:none;
}

.contact-page .contact-form-content.is-contact-confirmed .wpforms-confirmation-container-full,
.contact-page .contact-form-content.is-contact-confirmed .wpforms-confirmation-container{
  margin:0!important;
}
