/* Form candidatura a due passi. Stessa lingua visiva della landing:
   Inter, nero pieno, oro Go Fashion, bordi sottili. */

.gfr {
  --gfr-oro: #c89b1f;
  --gfr-oro-chiaro: #daa520;
  --gfr-oro-scuro: #b98d17;
  --gfr-nero: #101010;
  --gfr-testo: #2a2b2f;
  --gfr-muto: #55585f;
  --gfr-bordo: #e4e4e7;
  --gfr-campo: #fafafa;
  --gfr-rosso: #c62828;
  --gfr-verde: #2e7d32;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gfr-testo);
  scroll-margin-top: 90px;
}
.gfr *, .gfr *::before, .gfr *::after { box-sizing: border-box; }

/* passi in cima */
.gfr-passi { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; }
.gfr-passo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gfr-passo__n {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 14px/1 'Inter Tight', 'Inter', sans-serif;
  border: 1.5px solid var(--gfr-bordo); color: var(--gfr-muto); background: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.gfr-passo__t { font-size: 13px; font-weight: 600; color: var(--gfr-muto); white-space: nowrap; }
.gfr-passo.is-attivo .gfr-passo__n { background: var(--gfr-nero); border-color: var(--gfr-nero); color: #fff; }
.gfr-passo.is-attivo .gfr-passo__t { color: var(--gfr-nero); }
.gfr-passo.is-fatto .gfr-passo__n { background: var(--gfr-oro); border-color: var(--gfr-oro); color: var(--gfr-nero); }
.gfr-passi__linea { flex: 1 1 auto; height: 2px; background: var(--gfr-bordo); border-radius: 2px; position: relative; overflow: hidden; min-width: 24px; }
.gfr-passi__linea::after { content: ''; position: absolute; inset: 0; width: 0; background: var(--gfr-oro); transition: width .35s ease; }
.gfr-passi.is-2 .gfr-passi__linea::after { width: 100%; }

.gfr-titolo { margin: 0 0 6px; font: 700 clamp(20px, 2.4vw, 24px)/1.2 'Inter Tight', 'Inter', sans-serif; color: var(--gfr-nero); letter-spacing: -.01em; }
.gfr-sotto { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: var(--gfr-muto); }

/* griglia dei campi */
.gfr-griglia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.gfr-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gfr-campo--intero { grid-column: 1 / -1; }
@media (max-width: 560px) { .gfr-griglia { grid-template-columns: 1fr; } }

.gfr-label { font-size: 14px; font-weight: 600; color: var(--gfr-nero); }
.gfr-label em { font-style: normal; color: var(--gfr-oro-scuro); margin-left: 2px; }
.gfr-label small { font-weight: 400; color: var(--gfr-muto); margin-left: 6px; }
.gfr-aiuto { font-size: 12.5px; line-height: 1.45; color: var(--gfr-muto); margin: 0; }

.gfr input[type=text], .gfr input[type=email], .gfr input[type=tel], .gfr select, .gfr textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 16px/1.3 inherit; font-family: inherit; color: var(--gfr-nero);
  background: var(--gfr-campo); border: 1px solid var(--gfr-bordo); border-radius: 6px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.gfr textarea { min-height: 110px; resize: vertical; }
.gfr select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23101010' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.gfr input:focus, .gfr select:focus, .gfr textarea:focus {
  outline: none; background: #fff; border-color: var(--gfr-oro);
  box-shadow: 0 0 0 3px rgba(200, 155, 31, .2);
}
.gfr .is-errore input, .gfr .is-errore select, .gfr .is-errore textarea, .gfr .is-errore .gfr-loc__scelto { border-color: var(--gfr-rosso); background: #fff; }
.gfr-err { margin: 0; font-size: 13px; line-height: 1.4; color: var(--gfr-rosso); display: none; }
.gfr .is-errore .gfr-err { display: block; }

/* cellulare con prefisso */
.gfr-tel { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px; }
@media (max-width: 380px) { .gfr-tel { grid-template-columns: 100px minmax(0, 1fr); } }

/* contatore partita IVA */
.gfr-conta { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--gfr-muto); }
.gfr-conta.is-ok { color: var(--gfr-verde); font-weight: 600; }

/* comune o CAP con elenco */
.gfr-loc { position: relative; }
.gfr-loc__lista {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; max-height: 290px; overflow-y: auto;
  background: #fff; border: 1px solid var(--gfr-bordo); border-radius: 8px;
  box-shadow: 0 18px 40px rgba(16, 16, 16, .14);
}
.gfr-loc__voce { display: flex; align-items: baseline; gap: 10px; padding: 11px 12px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.gfr-loc__voce b { font-variant-numeric: tabular-nums; min-width: 48px; color: var(--gfr-nero); }
.gfr-loc__voce span { color: var(--gfr-muto); font-size: 13px; margin-left: auto; }
.gfr-loc__voce:hover, .gfr-loc__voce.is-su { background: #f6f1e2; }
.gfr-loc__vuoto { padding: 12px; font-size: 14px; color: var(--gfr-muto); }
.gfr-loc__scelto {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 12px 10px 14px;
  border: 1px solid var(--gfr-oro); background: #fffbf0; border-radius: 6px;
}
.gfr-loc__scelto svg { flex: 0 0 auto; color: var(--gfr-oro-scuro); }
.gfr-loc__scelto strong { font-size: 15px; color: var(--gfr-nero); }
.gfr-loc__scelto button {
  margin-left: auto; padding: 6px 10px; border: 0; background: transparent; cursor: pointer;
  font: 600 13px/1 inherit; font-family: inherit; color: var(--gfr-oro-scuro); text-decoration: underline;
}

/* scelta si / no */
.gfr-scelta { display: flex; gap: 8px; flex-wrap: wrap; }
.gfr-scelta label {
  flex: 1 1 120px; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--gfr-bordo); border-radius: 6px;
  background: var(--gfr-campo); cursor: pointer; font-weight: 600; font-size: 15px; color: var(--gfr-nero);
  transition: border-color .15s, background .15s;
}
.gfr-scelta input { position: absolute; opacity: 0; pointer-events: none; }
.gfr-scelta label:has(input:checked) { border-color: var(--gfr-nero); background: var(--gfr-nero); color: #fff; }
.gfr-scelta label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(200, 155, 31, .35); }

/* consensi */
.gfr-consenso { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--gfr-testo); cursor: pointer; }
.gfr-consenso input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gfr-nero); cursor: pointer; }
.gfr-consenso a { color: var(--gfr-nero); font-weight: 600; }

/* pulsanti */
.gfr-azioni { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.gfr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 56px; padding: 14px 22px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--gfr-oro); color: var(--gfr-nero);
  font: 700 16px/1 'Inter Tight', 'Inter', sans-serif; letter-spacing: .02em;
  transition: background .15s, transform .15s;
}
.gfr-btn:hover { background: var(--gfr-oro-chiaro); }
.gfr-btn:active { background: var(--gfr-oro-scuro); transform: translateY(1px); }
.gfr-btn:focus-visible { outline: 3px solid var(--gfr-nero); outline-offset: 3px; }
.gfr-btn[disabled] { opacity: .65; cursor: progress; }
.gfr-btn svg { transition: transform .15s; }
.gfr-btn:hover svg { transform: translateX(3px); }
.gfr-indietro {
  align-self: center; padding: 6px 10px; border: 0; background: none; cursor: pointer;
  font: 600 14px/1 inherit; font-family: inherit; color: var(--gfr-muto); text-decoration: underline;
}
.gfr-rassicura { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: 13px; color: var(--gfr-muto); text-align: center; }
.gfr-rassicura svg { color: var(--gfr-oro-scuro); flex: 0 0 auto; }

.gfr-avviso { margin: 0 0 18px; padding: 12px 14px; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.gfr-avviso--errore { background: #fdecea; color: #8e1c1c; }
.gfr-avviso--info { background: #fbf6e6; color: #5c4708; border: 1px solid #f0e2b5; }

.gfr-nascosto { display: none !important; }
.gfr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* conferma finale */
.gfr-fatto { text-align: center; padding: 10px 0 4px; }
.gfr-fatto__icona { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--gfr-nero); color: var(--gfr-oro-chiaro); }
.gfr-fatto .gfr-titolo { font-size: clamp(22px, 2.8vw, 28px); }
.gfr-fatto .gfr-sotto { max-width: 440px; margin: 0 auto 22px; }
.gfr-fatto__passi { list-style: none; margin: 0 auto; padding: 0; max-width: 420px; text-align: left; display: grid; gap: 10px; }
.gfr-fatto__passi li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.gfr-fatto__passi b { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gfr-oro); color: var(--gfr-nero); font-size: 12px; }

.gfr-entra { animation: gfr-entra .35s ease both; }
@keyframes gfr-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gfr-entra { animation: none; } .gfr * { transition: none !important; } }
