/* Pagina di attivazione della prova gratuita */

[hidden] { display: none !important; }

.signup { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--white); overflow: hidden; }

.signup-bar { background: var(--navy); color: var(--white); flex-shrink: 0; }
.signup-bar header {
  max-width: var(--container); margin: 0 auto; padding: 16px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.signup-brand { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.signup-brand .product-logo { font-size: 24px; gap: 10px; }
.signup-brand .product-logo img { width: 34px; height: 34px; }
.signup-brand .divider { width: 1px; height: 24px; background: rgba(148, 163, 184, .5); }
.signup-brand .mono { font-size: 13px; color: var(--slate); }
.signup-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.signup-nav .login { display: flex; gap: 6px; flex-wrap: wrap; }
.signup-nav .login span { color: var(--slate); }
.signup-nav .login a { color: var(--white); font-weight: 600; }
.signup-nav .back-site { color: var(--white); border: 1.5px solid var(--slate); padding: 9.5px 18px; border-radius: var(--radius-pill); }

.signup-main {
  flex: 1; max-width: 820px; width: 100%; margin: 0 auto; padding: 16px var(--pad-x);
  display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 0;
}
.signup-head { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; padding: 0 4px 8px; }
.signup-head h1 { font-weight: 800; font-size: clamp(32px, 4vw, 48px); line-height: .95; letter-spacing: -.045em; text-wrap: balance; }

.signup-legal { flex-shrink: 0; margin: 0; padding: 0 4px; font-family: var(--font-mono); font-size: 12px; color: #64748b; }
.signup-legal a, .signup-legal button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.signup-legal a:hover, .signup-legal button:hover { color: var(--navy); }

.signup-card {
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(20px, 3vw, 32px);
  display: flex; flex-direction: column; gap: 14px; background: var(--white);
  flex: 0 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin;
}

.progress { display: flex; flex-direction: column; gap: 10px; }
.progress__label { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.progress__track { height: 6px; border-radius: var(--radius-pill); background: var(--wave); overflow: hidden; }
.progress__bar { height: 100%; border-radius: var(--radius-pill); background: var(--blue); transition: width .3s ease; }

.step { display: flex; flex-direction: column; gap: 16px; }
.step--plan { gap: 14px; }
.step--done { gap: 18px; }
.step h2 { font-weight: 800; font-size: 26px; letter-spacing: -.03em; line-height: 1; }
.step > p { font-size: 15px; line-height: 1.5; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.plan-option {
  text-align: left; cursor: pointer; background: var(--white); color: var(--navy);
  border: 1.5px solid rgba(148, 163, 184, .8); border-radius: var(--radius-tile); padding: 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.plan-option[aria-pressed="true"] { border: 2px solid var(--blue); }
.plan-option .name-row { display: flex; gap: 10px; align-items: center; }
.plan-option .name { font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.plan-option .pill { padding: 4px 10px; }
.plan-option .price { font-family: var(--font-mono); font-size: 14px; }
.plan-option .desc { font-size: 15px; line-height: 1.45; margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 12px; }
.field input {
  font-family: var(--font-display); font-size: 16px; padding: 13px 14px; min-width: 0;
  border: 1.5px solid rgba(148, 163, 184, .8); border-radius: var(--radius-field); color: var(--navy); outline: none;
}
.field input:focus { border-color: var(--blue); }
.field input.mono-input { font-family: var(--font-mono); font-size: 15px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.pwd { position: relative; display: flex; }
.pwd input { flex: 1; padding-right: 92px; }
.pwd button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 12px;
  color: var(--blue); padding: 8px 10px; border-radius: var(--radius-pill);
}

.step-actions { display: flex; gap: 10px; margin-top: 6px; }
.signup .btn { padding-inline: 24px; text-align: center; }
.step-actions .btn { flex: 1; }
.signup .btn--outline { background: var(--white); color: var(--navy); border: 1.5px solid var(--navy); padding: 14.5px 22px; flex: 0 0 auto; }
.btn--coral { background: var(--coral); color: var(--navy); }
.signup .btn:disabled { opacity: .45; cursor: not-allowed; }
.step--plan > .btn { margin-top: 2px; }

.summary { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(148, 163, 184, .45); }
.summary div:last-child { border-bottom: none; }

/* ---------- Arrivo dal sito: il contenuto sale in dissolvenza ---------- */
html.enter .signup-head,
html.enter .signup-card { animation: rise-in .6s cubic-bezier(.2, .8, .2, 1) both; }
html.enter .signup-head { animation-delay: .45s; }
html.enter .signup-card { animation-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  html.enter .signup-head, html.enter .signup-card { animation: none; }
}

.form-error {
  font-size: 14px; line-height: 1.45; color: #b42318;
  background: #fef3f2; border: 1px solid #fecdca; border-radius: var(--radius-field); padding: 12px 14px;
}
.field input:disabled { background: #f8fafc; }

/* Consensi obbligatori (termini e DPA) */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--blue); }
.consent a { text-decoration: underline; text-underline-offset: 2px; }
.consent-note { margin: 0; font-size: 13px; line-height: 1.45; color: #64748b; }
.consent-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Honeypot: fuori schermo, non display:none (alcuni bot lo saltano) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Ambiente di test (?ambiente=test): segnalato, perché gli account finiscono lì */
html[data-ambiente="test"] .signup-brand .mono::after {
  content: " · ambiente di test";
  color: var(--coral);
}

/* Telefono: la barra in alto stava su quattro righe. In riga restano il logo,
   "Accedi" e "Torna al sito". */
@media (max-width: 760px) {
  .signup-bar header { flex-wrap: nowrap; gap: 12px; padding-block: 14px; }
  .signup-brand .divider, .signup-brand .mono, .signup-nav .login > span:first-child { display: none; }
  .signup-brand img { height: 28px; }
  .signup-nav { gap: 14px; flex-wrap: nowrap; font-size: 14px; }
  .signup-nav .back-site { padding: 8px 14px; white-space: nowrap; }
}

/* Telefoni e schermi bassi (es. telefono in orizzontale): la pagina alta quanto
   lo schermo faceva scorrere il modulo dentro il riquadro e il pulsante restava
   nascosto. Qui la pagina scorre normalmente. */
@media (max-width: 560px), (max-height: 560px) {
  .signup { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
  .signup-main { justify-content: flex-start; padding-block: 28px 40px; }
  .signup-card { overflow: visible; }
}

/* Barra in alto sui telefoni stretti: selettore lingua compatto e, sotto i 360px,
   niente "Torna al sito" (il logo riporta comunque alla home). */
@media (max-width: 760px) { .signup-nav .lang-switch { padding: 5px 8px; font-size: 12px; } }
@media (max-width: 400px) {
  .signup-nav { gap: 10px; }
  .signup-nav .back-site { padding: 7px 10px; font-size: 13px; }
}
@media (max-width: 359px) { .signup-nav .back-site { display: none; } }
