/* =================================================================
   landing.css — Convocami
   Estensioni "motion" per la landing pubblica e la sezione Tema/Loghi.
   Layer separato sopra sam-design-system.css: non tocca le variabili
   di base, aggiunge solo componenti nuovi (hero, step, picker tema).
   ================================================================= */

/* -----------------------------------------------------------------
   Tema scuro — stesse variabili di brand (--primary invariato),
   solo superfici/sfondo scuri. Attivato da data-theme="dark" sul <html>.
   ----------------------------------------------------------------- */
:root {
  --primary-text: #1d4ed8;
}

:root[data-theme="dark"] {
  --primary-text:  #93c5fd;
  --bg:            #0b1120;
  --surface:       #121a2e;
  --surface-hover: #1a2540;
  --border:        #24304d;
  --text:          #eef2ff;
  --text-muted:    #9aa8c7;
  --text-light:    #7280a3;
}

:root[data-theme="dark"] .sam-header,
:root[data-theme="dark"] .sam-footer {
  background: var(--surface);
  border-color: var(--border);
}

body.sam-body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* -----------------------------------------------------------------
   Nav link nuovi (non presenti nel design system base)
   ----------------------------------------------------------------- */
.sam-nav-links { display: flex; align-items: center; gap: 20px; }
.sam-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.sam-nav-links a:hover { color: var(--primary-text); }

.sam-cta-button {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
  display: inline-block;
}
.sam-cta-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.sam-cta-button--small { padding: 8px 18px; font-size: 13px; }

/* -----------------------------------------------------------------
   Hero
   ----------------------------------------------------------------- */
.sam-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 24px 80px;
  text-align: center;
  isolation: isolate;
}

.sam-hero__glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 60% at 50% 30%, var(--primary-light) 0%, transparent 70%);
  opacity: .55;
  z-index: -1;
  pointer-events: none;
}
:root[data-theme="dark"] .sam-hero__glow {
  background: radial-gradient(60% 60% at 50% 30%, color-mix(in srgb, var(--primary) 35%, transparent) 0%, transparent 70%);
  opacity: .9;
}

.sam-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin: 0 auto 20px;
  animation: sam-fade-up .6s ease both;
}
.sam-hero h1 strong { color: var(--primary-text); }

.sam-hero p.sam-hero__lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
  animation: sam-fade-up .6s ease .1s both;
}

.sam-hero__actions { animation: sam-fade-up .6s ease .2s both; }

@keyframes sam-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------
   Sezioni "come funziona" — step numerati
   ----------------------------------------------------------------- */
.sam-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sam-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: sam-fade-up .5s ease both;
}
.sam-step-card:nth-child(1) { animation-delay: .05s; }
.sam-step-card:nth-child(2) { animation-delay: .15s; }
.sam-step-card:nth-child(3) { animation-delay: .25s; }
.sam-step-card:nth-child(4) { animation-delay: .35s; }

.sam-step-card__num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
:root[data-theme="dark"] .sam-step-card__num {
  background: color-mix(in srgb, var(--primary) 25%, transparent);
  color: #cfe2ff;
}

.sam-step-card h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.sam-step-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* -----------------------------------------------------------------
   Sezione con titolo centrato
   ----------------------------------------------------------------- */
.sam-section { padding: 64px 24px; }
.sam-section__title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}
.sam-section__subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

/* -----------------------------------------------------------------
   Statistiche animate (contatori semplici, no JS necessario per il
   valore statico — solo fade-in)
   ----------------------------------------------------------------- */
.sam-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.sam-stat-row .sam-stat {
  text-align: center;
  animation: sam-fade-up .5s ease both;
}
.sam-stat__value { font-size: 36px; font-weight: 800; color: var(--primary-text); }
.sam-stat__label { font-size: 13px; color: var(--text-muted); }

/* -----------------------------------------------------------------
   Tema/Loghi — picker a card con radio nascosto
   ----------------------------------------------------------------- */
.sam-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.sam-picker-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  background: var(--surface);
}
.sam-picker-card:hover { transform: translateY(-2px); }
.sam-picker-card input[type="radio"] {
  position: absolute;
  top: 12px; right: 12px;
  width: 18px; height: 18px;
}
.sam-picker-card input[type="radio"]:checked ~ .sam-picker-card__label {
  color: var(--primary-text);
}
.sam-picker-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.sam-picker-card img { width: 72px; height: 72px; margin-bottom: 12px; }
.sam-picker-card__label { font-size: 14px; font-weight: 600; }

.sam-theme-swatch {
  width: 100%; height: 56px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.sam-theme-swatch--light { background: linear-gradient(135deg, #f4f6f9 60%, #0d6efd 60%); }
.sam-theme-swatch--dark  { background: linear-gradient(135deg, #0b1120 60%, #0d6efd 60%); }

@media (max-width: 640px) {
  .sam-hero { padding: 64px 16px 48px; }
  .sam-section { padding: 40px 16px; }
}
