/* ==========================================================================
   NodoCRM — sito pubblico
   Privacy by design: font self-hosted, nessuna risorsa da terze parti.
   ========================================================================== */

/* ---- Font self-hosted (serviti dal nostro dominio) ---- */
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/jetbrainsmono-400.woff2') format('woff2');
}

/* ---- Design tokens: palette brand Nodo (allineata all'app e alle Brand Guidelines) ---- */
:root {
  --blu: #1E3A5F;          /* Blu Nodo — identità, header, primari, link */
  --blu-scuro: #182f4d;    /* hover (scala blu app) */
  --blu-chiaro: #eef3f8;   /* tinta chiara (blu-50 app) */
  --notte: #0F172A;        /* Notte — sfondi scuri */
  --notte-2: #1c2c46;
  --ambra: #F59E0B;        /* Ambra — accenti, CTA, focus */
  --ambra-scuro: #d98e0a;
  --salvia: #7C9885;       /* Salvia — associativo / positivo soft */
  --salvia-chiaro: #eef3ef;
  --testo: #334155;        /* corpo forte */
  --testo-soft: #475569;   /* corpo (brand) */
  --testo-mute: #64748B;   /* testo secondario / placeholder */
  --bordo: #E2E8F0;        /* bordi, divider */
  --bg: #ffffff;
  --bg-soft: #F8FAFC;      /* sfondo pagina light (brand) */
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --font: 'Poppins', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, 'Courier New', monospace;
}

/* ---- Reset essenziale ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--testo);
  background: var(--bg); line-height: 1.6; font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; color: var(--notte); font-weight: 700; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--testo-soft); }
strong { color: var(--testo); font-weight: 600; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--notte); color: #cdd6e6; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #9fb0ca; }
.center { text-align: center; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blu); font-weight: 500; margin-bottom: 14px; display: inline-block;
}
.section--dark .eyebrow { color: var(--ambra); }
.lead { font-size: 1.18rem; color: var(--testo-soft); }

/* ---- Bottoni ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 600; font-size: 1rem; padding: 13px 24px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blu); color: #fff; box-shadow: 0 6px 18px rgba(30,58,95,.24); }
.btn-primary:hover { background: var(--blu-scuro); color: #fff; }
.btn-ghost { background: transparent; color: var(--notte); border-color: var(--bordo); }
.btn-ghost:hover { border-color: var(--blu); color: var(--blu); }
.btn-amber { background: var(--ambra); color: var(--notte); }
.btn-amber:hover { background: var(--ambra-scuro); color: var(--notte); }
.btn-lg { padding: 16px 30px; font-size: 1.06rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--bordo);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 38px; width: auto; display: block; }
.site-footer .brand-logo { height: 40px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--testo); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { color: var(--blu); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---- Hero ---- */
.hero { padding: 92px 0 72px; background:
  radial-gradient(1200px 500px at 80% -10%, rgba(30,58,95,.10), transparent 60%),
  radial-gradient(900px 400px at 0% 10%, rgba(124,152,133,.16), transparent 55%); }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--testo-soft); display: inline-flex; align-items: center; gap: 8px; }
.hero-note svg { width: 18px; height: 18px; color: var(--salvia); flex: none; }

/* ---- Griglie / card ---- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--bordo); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: .98rem; }
.card .ico {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--blu-chiaro); color: var(--blu); margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }
.card--salvia .ico { background: var(--salvia-chiaro); color: #3f6b58; }
.card--amber .ico { background: #fdf0d9; color: #b9760a; }

/* ---- Liste con spunta ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--testo); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--salvia-chiaro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233f6b58' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
}
.checklist.neg li::before {
  background: #fdECEC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---- Split (testo + pannello) ---- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.panel {
  border-radius: var(--radius); border: 1px solid var(--bordo); background: var(--bg-soft);
  padding: 26px; box-shadow: var(--shadow);
}
.panel .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--bordo); }
.panel .row:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tag { font-family: var(--mono); font-size: .74rem; padding: 3px 9px; border-radius: 999px; background: var(--blu-chiaro); color: var(--blu); }
.tag.ok { background: var(--salvia-chiaro); color: #3f6b58; }
.tag.amber { background: #fdf0d9; color: #b9760a; }

/* ---- Pillole di fiducia ---- */
.trustbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--testo); background: #fff; border: 1px solid var(--bordo); padding: 8px 14px; border-radius: 999px; }
.pill svg { width: 16px; height: 16px; color: var(--blu); }

/* ---- Prezzi ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price { display: flex; flex-direction: column; }
.price.pop { border-color: var(--blu); box-shadow: 0 10px 30px rgba(30,58,95,.16); position: relative; }
.price .badge { position: absolute; top: -12px; left: 26px; background: var(--blu); color: #fff; font-size: .74rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.price .amount { font-size: 2.4rem; font-weight: 700; color: var(--notte); margin: 6px 0 2px; }
.price .amount span { font-size: 1rem; font-weight: 500; color: var(--testo-soft); }
.price .amount .sub { display: block; margin-top: 4px; }
.price ul { list-style: none; margin: 18px 0 24px; padding: 0; }
.price ul li { padding-left: 28px; position: relative; margin-bottom: 10px; font-size: .96rem; }
.price ul li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat; }
.price .btn { margin-top: auto; }

/* ---- Form ---- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .92rem; color: var(--testo); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--bordo);
  border-radius: var(--radius-sm); background: #fff; color: var(--testo); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blu); box-shadow: 0 0 0 3px rgba(30,58,95,.16); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--testo-soft); }
.consent input { margin-top: 4px; }
.form-note { font-size: .86rem; color: var(--testo-soft); }
.form-msg { padding: 14px 16px; border-radius: var(--radius-sm); font-size: .95rem; display: none; }
.form-msg.ok { display: block; background: var(--salvia-chiaro); color: #2f5546; border: 1px solid #cfe3d8; }
.form-msg.err { display: block; background: #fdecec; color: #a1291b; border: 1px solid #f3cfca; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- CTA finale ---- */
.cta-final { background: linear-gradient(135deg, var(--blu), var(--blu-scuro)); border-radius: 20px; padding: 56px; text-align: center; color: #fff; }
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.85); max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---- Footer ---- */
.site-footer { background: var(--notte); color: #9fb0ca; padding: 56px 0 30px; }
.site-footer a { color: #cdd6e6; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.footer-grid h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: .95rem; }
.footer-brand p { color: #8698b5; font-size: .95rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--notte-2); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .86rem; color: #7a8bab; }
.footer-bottom .noc { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .noc svg { width: 16px; height: 16px; color: var(--salvia); }

/* ---- Pagina contenuto (privacy) ---- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; color: var(--notte); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; color: var(--testo-soft); }
.prose .muted { color: var(--testo-soft); font-size: .92rem; }
.updated { font-family: var(--mono); font-size: .82rem; color: var(--testo-soft); }

/* ---- Screenshot prodotto (cornice "finestra app") ---- */
.shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--bordo); background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.16); }
.shot-bar { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 15px; background: #f1f5f9; border-bottom: 1px solid var(--bordo); }
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.shot img { display: block; width: 100%; height: auto; }
.hero-shot { margin-top: 40px; }
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.shot-single { margin-top: 40px; }
.shot-cap { margin-top: 12px; font-size: .9rem; color: var(--testo-mute); text-align: center; }
@media (max-width: 820px) { .shot-grid { grid-template-columns: 1fr; } }

/* ---- Utility ---- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hide { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 0; background: #fff; border-bottom: 1px solid var(--bordo); padding: 8px 24px 18px;
  }
  .nav-links.open li { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--bg-soft); }
  .grid-2, .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-final { padding: 40px 24px; }
  .hero { padding: 60px 0 48px; }
}

/* Rispetta chi preferisce meno animazioni */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
