/* Pagina pubblica lista d'attesa (/beta). Indipendente da app.css: ha i suoi
   token (copiati dal design system) così una modifica alla SPA non la rompe.
   La CSP vieta stili inline → tutto qui. */

@font-face {
  font-family: 'Sora';
  src: url('/vendor/sora.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #e5e8ec;
  --bg-a: #edeff2;
  --bg-b: #e0e3e7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #d8dce1;
  --text: #191c22;
  --muted: #5b626b;
  --brand: #ff5a47;
  --brand-fg: #bd351f;
  --brand-deep: #ef4630;
  --brand-ink: #26140f;
  --brand-soft: #fbe7e3;
  --accent: #ff5a47;
  --ok: #1e9160;
  --ok-soft: #e3f1e9;
  --danger: #c62839;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 23, 29, .08), 0 14px 40px rgba(20, 23, 29, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171d;
    --bg-a: #191d24;
    --bg-b: #101318;
    --surface: #1c212a;
    --surface-2: #262c36;
    --border: #333a45;
    --text: #edeff3;
    --muted: #97a1ad;
    --brand: #ff5a47;
    --brand-fg: #ff7a6b;
    --brand-deep: #ff6f5e;
    --brand-ink: #26140f;
    --brand-soft: #2b1f1c;
    --accent: #ff5a47;
    --ok: #3fbf8f;
    --ok-soft: #17352a;
    --danger: #e0656c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-a), var(--bg-b));
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.15rem 3rem;
}

.wrap { width: 100%; max-width: 460px; }

.brand-row { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem; }
.brand-row img { width: 40px; height: 40px; border-radius: 11px; }
.brand-name {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}

h1 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
.lead { font-size: 1.02rem; line-height: 1.5; color: var(--muted); margin: 0 0 1.5rem; }

.points { list-style: none; margin: 0 0 1.6rem; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.points li { display: flex; align-items: flex-start; gap: .6rem; font-size: .96rem; line-height: 1.4; }
.points .tick {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-fg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .8rem;
  margin-top: .05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1.15rem;
}
.card > label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .45rem; }

form { display: flex; flex-direction: column; gap: .6rem; }
input[type=email] {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
}
input[type=email]:focus { outline: none; border-color: var(--brand); background: var(--surface); }

/* Honeypot: campo esca invisibile agli umani, che i bot riempiono. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--brand-ink);
  background: var(--brand);
  padding: .9rem 1rem;
  border-radius: var(--radius);
  transition: background .15s;
}
button:hover { background: var(--brand-deep); }
button:disabled { opacity: .65; cursor: default; }

.status { margin: .7rem 0 0; font-size: .9rem; line-height: 1.4; min-height: 1.2em; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }

.done {
  background: var(--ok-soft);
  border: 1px solid var(--ok);
  border-radius: 16px;
  padding: 1.4rem 1.2rem;
  text-align: center;
}
.done h2 { font-family: 'Sora', system-ui, sans-serif; margin: 0 0 .4rem; font-size: 1.3rem; }
.done p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

.foot { margin-top: 1.4rem; font-size: .8rem; color: var(--muted); text-align: center; line-height: 1.5; }
.foot a { color: var(--brand-fg); }

.hidden { display: none !important; }

/* Contatore globale (prova sociale) */
.totals { margin: 0 0 1.6rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.totals-eyebrow { margin: 0 0 .75rem; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.totals-grid { display: flex; gap: .6rem; justify-content: space-between; text-align: center; }
.tstat { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.tstat strong { font-family: 'Sora', system-ui, sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.05; letter-spacing: -.02em; color: var(--brand-fg); }
.tstat > span { font-size: .76rem; color: var(--muted); line-height: 1.25; }

/* Pagine legali (privacy) — prosa leggibile dentro .wrap */
.legal { max-width: 640px; }
.legal .updated { font-size: .82rem; color: var(--muted); margin: 0 0 1.6rem; }
.legal h2 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.1rem; letter-spacing: -.01em;
  margin: 1.8rem 0 .5rem;
}
.legal p, .legal li { font-size: .95rem; line-height: 1.6; color: var(--text); }
.legal p { margin: 0 0 .8rem; }
.legal ul { margin: 0 0 .8rem; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.legal a { color: var(--brand-fg); }
.legal strong { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
