/* Landing NuvHome: stessi colori e caratteri dell'app (src/theme/rocketHome.ts), indaco e menta. */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("/launch/fonts/PlusJakartaSans_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("/launch/fonts/PlusJakartaSans_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("/launch/fonts/PlusJakartaSans_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("/launch/fonts/PlusJakartaSans_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("/launch/fonts/PlusJakartaSans_800ExtraBold.ttf") format("truetype"); }

:root {
  --bg: #f5f4fa;
  --surface: #ffffff;
  --surface-muted: #ededfc;
  --text: #1a1a3a;
  --text-muted: #5e5f7a;
  --text-faint: rgba(26, 26, 58, 0.46);
  --accent: #5552d9;
  --accent-ink: #ffffff;
  --accent-text: #5552d9;
  --accent-soft: #ededfc;
  --accent-border: #d6d5fa;
  --mint: #bff2dc;
  --on-mint: #0d3b2a;
  --border: #eae9f4;
  --border-strong: #d6d5fa;
  --success: #16794f;
  --danger: #b42328;
  --shadow: 0 1px 2px rgba(20, 20, 60, 0.04), 0 12px 32px rgba(20, 20, 60, 0.1);
  --logo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='2' y='2' width='44' height='44' rx='13' fill='%235552D9'/%3E%3Cpath d='M14 36V21l10-8 10 8v15M14 21l20 15' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--sans);
  /* Nomi usati dalla pagina dell'informativa. */
  --muted: var(--text-muted);
  --line: var(--border);
  --panel: var(--surface);
  --green-dark: var(--text);
  --blue: var(--accent-text);
}

/* Tema scuro spento per ora: nessuna pagina ha la classe "tema-scuro-attivo".
   Per riaccenderlo rimettere ":root {" al posto di ":root.tema-scuro-attivo {". */
@media (prefers-color-scheme: dark) {
  :root.tema-scuro-attivo {
    --bg: #0e0f1f;
    --surface: #17182e;
    --surface-muted: #222447;
    --text: #f2f2fa;
    --text-muted: #a3a5c2;
    --text-faint: rgba(242, 242, 250, 0.46);
    --accent: #5a57f0;
    --accent-ink: #ffffff;
    --accent-text: #b3b1ff;
    --accent-soft: #222447;
    --accent-border: #2e3060;
    --mint: #a8ebcf;
    --on-mint: #0d3b2a;
    --border: #25274a;
    --border-strong: #2e3060;
    --success: #7fe0b2;
    --danger: #ff8a8d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }

.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

/* ── Barra in alto ─────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-block; flex: none; width: 36px; height: 36px; background: var(--logo) center / contain no-repeat; color: transparent; font-size: 0; overflow: hidden; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-name span { color: inherit; font-weight: inherit; }
.brand-name.small { font-size: 1rem; }
.topbar-links { display: flex; gap: 22px; margin-left: 12px; font-weight: 500; font-size: 0.95rem; }
.topbar-links a { text-decoration: none; color: var(--text-muted); }
.topbar-links a:hover { color: var(--text); }
.topbar-actions { display: flex; gap: 10px; margin-left: auto; }
.topbar-actions a { white-space: nowrap; }

.accent-button, .ghost-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.accent-button { background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
.accent-button:hover { transform: translateY(-1px); }
.accent-button:disabled { opacity: 0.6; cursor: wait; }
.ghost-button { background: var(--accent-soft); color: var(--accent-text); border: 1px solid transparent; }
.ghost-button:hover { border-color: var(--accent-border); }
.large { min-height: 52px; padding: 0 24px; font-size: 1rem; }

/* ── Apertura ──────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; padding: 56px 0 56px; }
.eyebrow { margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; color: var(--accent-text); }
h1 { margin: 0 0 20px; font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; text-wrap: balance; }
h2 { margin: 0 0 28px; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; max-width: 760px; text-wrap: balance; }
h3 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -0.01em; }
.lead { margin: 0 0 28px; font-size: 1.15rem; color: var(--text-muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.quick-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; max-width: 600px; }
.quick-form label { display: grid; }
.quick-form input:not([type="checkbox"]) { min-height: 52px; }
.quick-form .quick-note, .quick-form .quick-trust { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.quick-form .quick-trust { font-size: 0.8rem; }
.quick-form .quick-consent, .quick-form .form-status { grid-column: 1 / -1; font-size: 0.88rem; }
.quick-consent a { color: var(--accent-text); }
.quick-form .form-status:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-note { margin: 18px 0 0; color: var(--text-muted); font-size: 0.95rem; }
.hero-note a { color: var(--accent-text); font-weight: 700; text-decoration: none; }

.hero-visual { position: relative; display: grid; gap: 14px; padding: 28px; border-radius: 28px; background: var(--surface-muted); }
/* Video di presentazione in formato 4:5: alto abbastanza perche le scritte si leggano anche sul telefono. */
.hero-demo { margin: 0; padding: 14px; }
.demo-window { position: relative; overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.demo-video, .demo-still { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; background: #1a1a3a; }
.demo-still { display: none; }
.demo-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.demo-toggle, .demo-expand { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.demo-toggle { width: 40px; padding: 0; font-size: 0.72rem; }
.demo-expand { padding: 0 16px; }
.demo-toggle:hover, .demo-toggle:focus-visible, .demo-expand:hover, .demo-expand:focus-visible { border-color: var(--accent); }
.demo-toggle[hidden], .demo-expand[hidden] { display: none; }
.hero-demo figcaption { margin: 12px 4px 0; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
/* Chi ha chiesto meno animazioni vede una schermata ferma al posto del video. */
@media (prefers-reduced-motion: reduce) {
  .demo-video, .demo-controls { display: none; }
  .demo-still { display: block; }
}

/* ── Blocchi ───────────────────────────────────────────────────── */
.block { padding: 64px 0; }
.block.contrast { background: var(--surface-muted); margin: 32px 0; }
.block.contrast .eyebrow { color: var(--accent-text); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border-radius: 24px; padding: 24px; }
.steps p, .feature p { margin: 0; color: var(--text-muted); }
.step-number { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--surface); border-radius: 24px; padding: 22px; }
.feature-glyph { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 1.15rem; }

.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-item { background: var(--surface-muted); border-radius: 24px; padding: 22px; }
.faq-item h3 { margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--text-muted); }

.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tool { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 24px; background: var(--surface); border: 1px solid transparent; text-decoration: none; transition: border-color 0.15s; }
.tool:hover { border-color: var(--accent-border); }
.tool h3 { margin: 4px 0 0; }
.tool p { margin: 0; color: var(--text-muted); flex: 1; }
.tool-tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--mint); color: var(--on-mint); font-size: 0.78rem; font-weight: 700; }
.tool-link { margin-top: 10px; font-weight: 700; color: var(--accent-text); }
/* Il nuovo design non usa illustrazioni. */
.tool-art { display: none; }

.privacy-note a { color: var(--accent-text); font-weight: 700; }

/* ── Pre-iscrizione ────────────────────────────────────────────── */
.signup { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; padding: 40px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.signup-copy p { color: var(--text-muted); }
.signup-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signup-form label { display: grid; gap: 6px; font-weight: 500; font-size: 0.92rem; }
.signup-form .full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
/* Menu uguali su tutti i browser: Safari ignora altezza e spazi del menu di sistema. */
select { appearance: none; -webkit-appearance: none; padding-right: 40px; text-overflow: ellipsis; }
label:has(> select) { position: relative; }
label:has(> select)::after { content: ""; position: absolute; right: 18px; bottom: 21px; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); pointer-events: none; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.consent { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; color: var(--text-muted); }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.privacy-note { margin: 0; font-size: 0.82rem; color: var(--text-faint); }
.form-status { margin: 0; min-height: 1.4em; font-weight: 500; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

.footer { border-top: 1px solid var(--border); padding: 28px 0 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--text-muted); text-decoration: none; }
.footer-social { display: inline-flex; align-items: center; gap: 6px; }
.footer-social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Loghi ufficiali a colori dei social: niente tratto, i colori sono quelli dei marchi. */
.footer-social svg.social-logo { stroke: none; fill: none; width: 18px; height: 18px; }
.footer a:hover { color: var(--accent-text); }

/* ── Il cassetto della casa (archivio dei documenti) ───────────── */
.drawer-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 40px; }
.drawer-intro h2 { margin: 0; max-width: 640px; }
.drawer-intro .lead { max-width: 520px; }
.drawer-stage { position: relative; padding-bottom: 56px; }
.drawer-window { margin: 0; }
.drawer-window img { display: block; width: 100%; height: auto; background: var(--bg); }
.drawer-stage .drawer-window { width: min(840px, 100%); }
.drawer-phone { margin: 0; width: 230px; padding: 7px; border-radius: 34px; background: #1a1a3a; box-shadow: 0 24px 60px rgba(20, 20, 60, 0.28); }
.drawer-phone img { display: block; width: 100%; height: auto; border-radius: 27px; background: #f5f4fa; }
.drawer-stage .drawer-phone { position: absolute; right: 0; bottom: 0; }
.drawer-find { list-style: none; margin: 8px 0 72px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.drawer-find li { padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 0.92rem; font-weight: 600; }
.drawer-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; margin-bottom: 72px; }
.drawer-row-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.drawer-row-flip .drawer-copy { order: 2; }
.drawer-copy h3 { margin: 0 0 14px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
.drawer-copy > p:not(.eyebrow) { margin: 0; color: var(--text-muted); max-width: 460px; }
.drawer-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; color: var(--text-muted); font-size: 0.95rem; }
.drawer-checks li::before { content: "✓"; margin-right: 10px; color: var(--success); font-weight: 800; }
.drawer-phone-solo { justify-self: center; width: min(250px, 100%); }
.drawer-safe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 48px; }
.drawer-safe div { background: var(--surface); border-radius: 22px; padding: 20px; }
.drawer-safe h3 { margin: 0 0 4px; }
.drawer-safe p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.drawer-final { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 28px 32px; border-radius: 28px; background: var(--accent); color: var(--accent-ink); }
.drawer-final h3 { margin: 0; max-width: 560px; font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 800; }
.drawer-final .accent-button { background: var(--mint); color: var(--on-mint); }
/* ── Telefono e tablet ─────────────────────────────────────────── */
@media (max-width: 1020px) {
  .feature-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-links { display: none; }
  .drawer-intro, .drawer-row, .drawer-row-flip { grid-template-columns: 1fr; gap: 28px; }
  .drawer-row-flip .drawer-copy { order: 0; }
}
@media (max-width: 860px) {
  /* Sul telefono la demo sta prima del modulo: i blocchi del testo si dispongono nella stessa griglia della demo. */
  .hero { grid-template-columns: 1fr; padding: 40px 0 32px; gap: 0; }
  .hero-copy { display: contents; }
  .hero-visual { order: 1; margin-bottom: 28px; }
  .quick-form { order: 2; }
  .hero-note { order: 3; }
  .steps, .signup, .faq-grid, .drawer-safe { grid-template-columns: 1fr; }
  .drawer-stage { padding-bottom: 0; }
  .drawer-stage .drawer-phone { position: static; margin: 20px auto 0; }
  .signup { padding: 24px; }
}
@media (max-width: 560px) {
  .feature-grid, .tool-grid, .signup-form { grid-template-columns: 1fr; }
  .quick-form { grid-template-columns: 1fr; }
  /* Accedi resta visibile anche sul telefono, accanto a Registrati. */
  .topbar-actions .accent-button, .topbar-actions .ghost-button { padding: 0 14px; font-size: 0.9rem; }
  .hero-visual { padding: 10px; }
  .block { padding: 44px 0; }
}

/* Icona accanto al nome di ogni strumento gratuito (set di icone del design system). */
.tool-name { display: flex; align-items: center; gap: 10px; }
.tool-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.tool-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Domande frequenti che sul computer sono già nei riquadri del cassetto: si leggono solo sul telefono. */
.faq-phone { display: none; }
@media (max-width: 640px) {
  .faq-phone { display: block; }
  .drawer-safe { display: none; }
}
/* Telefoni stretti: la barra in alto si stringe un po'. */
@media (max-width: 400px) {
  .topbar-inner { gap: 12px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .accent-button, .topbar-actions .ghost-button { padding: 0 12px; }
  .brand-name { font-size: 1.05rem; }
}
/* Sul telefono il bottone in alto dice solo Registrati: il resto non ci sta. */
@media (max-width: 560px) {
  .cta-extra { display: none; }
}
@media (max-width: 350px) {
  .brand-name { display: none; }
}
