/* ═══ MoTeMagno landing v3 · form iscrizione + modale approfondimento ═══ */

/* ───────────── FORM DI REGISTRAZIONE E GOOGLE AUTH ───────────── */
.signup-section {
  padding: 10px 0 40px;
}

.signup-box {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 44px 32px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.signup-box h2 {
  font-size: 1.65rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.signup-box .sub-text {
  color: var(--muted);
  text-align: center;
  font-size: 1.02rem;
  max-width: 480px;
  margin: 0 auto 26px;
  line-height: 1.5;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.google-btn:hover {
  background-color: #f8fafc;
  border-color: #c3c7cb;
}

.google-btn:active {
  transform: scale(0.99);
}

.google-btn svg {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.divider::before { margin-right: 14px; }
.divider::after { margin-left: 14px; }

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--ink);
  background: #f8fafc;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: var(--green);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.form-error {
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
  min-height: 1em;
}

.submit-btn {
  width: 100%;
  height: 58px;            /* altezza fissa: non salta col testo che ruota */
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 0 14px;
  overflow: hidden;
  font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.submit-btn #submit-text { white-space: nowrap; }

.submit-btn:hover { background: var(--green-hover); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.7; cursor: default; }

/* Stato di successo dopo l'iscrizione */
.success-state {
  display: none;
  text-align: center;
  padding: 10px 0;
  animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.success-state .celebration { font-size: 3.5rem; margin-bottom: 18px; }
.success-state h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; }
.success-state p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

.success-state .setup-badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}

/* Spinner di caricamento */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ───────────── OVERLAY MODALE (SCHEDA APPROFONDITA) ───────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 28px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-container { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  z-index: 10;
}

.modal-close:hover { background: #e2e8f0; }
.modal-close:active { transform: scale(0.9); }

.modal-body {
  padding: 40px 32px;
  overflow-y: auto;
  flex-grow: 1;
  text-align: center;
}

.modal-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.modal-content-wrapper {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal-em {
  font-size: 4rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.modal-desc {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal-deep-dive {
  background: var(--bg);
  border-radius: 20px;
  padding: 24px;
  text-align: left;
  border: 1px solid var(--line);
}

.modal-deep-dive h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

.modal-deep-dive ul { list-style: none; }

.modal-deep-dive li {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.modal-deep-dive li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--green);
  font-weight: 900;
}

.modal-deep-dive li:last-child { margin-bottom: 0; }

.modal-footer {
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

.modal-nav-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-nav-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.modal-nav-btn:active { transform: scale(0.97); }

.modal-dots { display: flex; gap: 6px; }

.modal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-dot.on { background: var(--green); width: 18px; border-radius: 4px; }

@media (max-width: 480px) {
  .modal-body { padding: 32px 20px; }
  .modal-deep-dive { padding: 18px; }
}

/* --- Privacy policy modal --- */
.privacy-text { text-align: left; max-height: 70vh; overflow-y: auto; padding-right: 6px; }
.privacy-text h2 { margin: 0 0 4px; }
.privacy-text .upd { color: var(--muted, #6b7280); font-size: .85rem; margin: 0 0 14px; }
.privacy-text h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.privacy-text p, .privacy-text li { line-height: 1.55; font-size: .94rem; }
.privacy-text ul { margin: 6px 0 6px 20px; }
.privacy-text li { margin: 4px 0; }
