/* Firmamento — Contatti (Spec §5.5) */

.contact-hero{
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
  background: var(--c-white);
}
.contact-hero::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(900px 520px at 70% 15%, rgba(95,127,255,.10), transparent 55%),
    radial-gradient(760px 520px at 15% 70%, rgba(240,203,122,.10), transparent 60%);
  pointer-events:none;
}
.contact-hero__inner{
  position: relative;
  text-align: center;
}
.contact-hero__sub{
  max-width: 72ch;
  margin: 10px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Main layout: 2 columns desktop, stack mobile; form first */
.contact-main{
  padding: 10px 0 80px;
  background: var(--c-white);
}
.contact-grid{
  display:grid;
  gap: 16px;
  align-items:start;
}
@media (min-width: 1024px){
  .contact-grid{
    grid-template-columns: 1.15fr .85fr;
    gap: 22px;
  }
}

/* Cards */
.contact-card{
  border-radius: var(--r-18);
  border: 1px solid var(--line, #E5E7EB);
  background: var(--c-white);
  box-shadow: var(--shadow);
  padding: 18px;
}
.contact-card h2{
  margin: 0 0 10px;
}
.contact-card p{
  margin: 0;
  color: rgba(74,74,74,.92);
  line-height: 1.65;
}

/* Form fields (light) */
.fm-form{
  display:grid;
  gap: 12px;
  margin-top: 12px;
}
.fm-field label{
  display:block;
  color: rgba(3,19,53,.92);
  font-weight: var(--fw-medium);
  margin-bottom: 6px;
}
.fm-field input,
.fm-field select,
.fm-field textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid var(--line, #E5E7EB);
  background: var(--c-white);
  color: rgba(3,19,53,.92);
  padding: 12px;
  min-height: 44px;
}
.fm-field textarea{
  min-height: 120px; /* Spec */
  resize: vertical;
}
.fm-help{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(74,74,74,.82);
}
.char-count{
  display:flex;
  justify-content:flex-end;
  gap: 4px;
  font-size: 12px;
  color: rgba(74,74,74,.82);
  margin-top: 6px;
}

.fm-consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.fm-consent input{
  width: 18px;
  height: 18px;
  margin-top: 3px;
}
.fm-consent span{
  color: rgba(74,74,74,.92);
  line-height: 1.5;
}
.fm-consent a{
  color: var(--c-blue-professional);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.fm-consent a:hover{
  color: var(--c-azure-bright);
}

.fm-error{
  display:none;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
  padding: 10px 12px;
  color: rgba(3,19,53,.92);
}
.fm-error.is-on{ display:block; }

.fm-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:center;
  margin-top: 6px;
}

/* Loading state (Spec) */
.is-loading{
  opacity: .85;
  pointer-events: none;
}
.btn__spinner{
  display:none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(3,19,53,.25);
  border-top-color: rgba(3,19,53,.75);
  animation: spin 900ms linear infinite;
}
.is-loading .btn__spinner{ display:inline-block; }
@keyframes spin{ to { transform: rotate(360deg); } }

/* Success message (Spec: green bg, white text, padding 24, radius 8) */
.form-success{
  border-radius: 8px;
  background: #10B981;
  color: #fff;
  padding: 24px;
}
.form-success p{
  color: #fff;
  margin: 0;
  line-height: 1.6;
  font-weight: var(--fw-medium);
}

/* Right column: legal info + contact lines */
.legal{
  font-size: 13px;
  color: rgba(3,19,53,.92);
  line-height: 1.65;
}
.contact-lines{
  margin-top: 12px;
  display:grid;
  gap: 10px;
}
.line{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  color: rgba(74,74,74,.92);
  line-height: 1.6;
}
.line .k{
  min-width: 110px;
  font-weight: var(--fw-medium);
  color: rgba(3,19,53,.92);
}
.line a{
  color: var(--c-blue-professional);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.line a:hover{ color: var(--c-azure-bright); }

/* Social */
.social{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  align-items:center;
}
.social a{
  width: 48px; /* Spec */
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line, #E5E7EB);
  background: var(--c-white);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(3,19,53,.92);
  transition: transform var(--speed-2) var(--ease), border-color var(--speed-2) var(--ease);
}
.social a:hover{
  transform: scale(1.03);
  border-color: rgba(95,127,255,.45);
}

/* Map */
.map-card{
  margin-top: 16px;
  overflow:hidden;
}
.map-frame{
  width:100%;
  height: 300px;
  border: 0;
  display:block;
}

/* Anchors used by other pages */
.anchor{
  scroll-margin-top: 92px;
}

/* Honeypot */
.hp{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}
