/* SmartFinance — sito di presentazione. Stile ispirato a finanzasemplice.it:
   corporate-professionale ma caldo, palette blu/bianco/grigio chiaro, molto
   spazio bianco, tipografia sans-serif, niente decorazioni superflue. */

:root {
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --blue-light: #eff4ff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --border: #e2e8f0;
  --bg-alt: #f8fafc;
  --radius: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 760px;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px 0;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-align: center;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

p {
  color: var(--ink-soft);
  margin: 0 0 12px 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

/* ---------- Header ---------- */

header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}

/* Sotto i 480px "Accedi" + "Richiedi accesso" + logo non ci starebbero mai su
   una riga sola: si stringe tutto (testo del logo nascosto, pulsanti più
   compatti) invece di andare a capo in modo disordinato o uscire dai bordi. */
@media (max-width: 480px) {
  .nav {
    padding: 12px 16px;
    gap: 8px;
  }
  .brand span {
    display: none;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-login {
    font-size: 0.82rem;
  }
  .btn-small {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-login {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-login:hover {
  color: var(--blue);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--blue);
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 64px;
  background: linear-gradient(180deg, var(--blue-light) 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 0 40px;
  }
  .dashboard-mock {
    margin-top: 32px;
  }
  .hero-points {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
    padding-left: 8px;
  }
}

.hero-page {
  padding-bottom: 72px;
}

.hero-page .eyebrow {
  display: block;
}

/* Due macchie sfumate decorative dietro al contenuto — solo un tocco di
   colore in piu', niente immagini da caricare. */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  background: #bfdbfe;
  top: -160px;
  left: -140px;
}

.hero::after {
  width: 360px;
  height: 360px;
  background: #dbeafe;
  bottom: -180px;
  right: -120px;
}

.hero-inner {
  max-width: 960px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: 1.15rem;
  margin: 0 auto 28px;
  max-width: 620px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}

.hero-points li {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hero-points strong {
  color: var(--ink);
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Mockup dashboard (grafici di esempio nell'hero) ---------- */

.dashboard-mock {
  margin: 48px auto 0;
  max-width: 900px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 48px -20px rgba(30, 58, 138, 0.28);
  overflow: hidden;
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.mock-titlebar-label {
  margin-left: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.mock-body {
  padding: 24px 28px 28px;
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.mock-kpi {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-kpi-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.mock-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.mock-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.mock-chart-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.mock-chart-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.mock-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mock-chart-wide .mock-svg {
  max-height: 170px;
}

.mock-chart-card:not(.mock-chart-wide) .mock-svg {
  max-width: 150px;
  margin: 0 auto;
}

.mock-legend {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.mock-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  justify-content: center;
}

.mock-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mock-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.mock-swatch-blue {
  background: var(--blue);
}

.mock-swatch-dash {
  background: repeating-linear-gradient(90deg, #94a3b8 0 4px, transparent 4px 7px);
  width: 16px;
  height: 3px;
  border-radius: 0;
}

.mock-caption {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 14px 0 0;
}

@media (max-width: 720px) {
  .mock-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .mock-charts {
    grid-template-columns: 1fr;
  }
}

/* Contenitore con scorrimento orizzontale per tabelle/griglie che non
   reggerebbero uno schermo stretto senza diventare illeggibili. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Mockup posizione portafoglio ---------- */

.position-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  min-width: 520px;
}

.position-mock-row {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 1fr 1fr 1fr;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  align-items: center;
}

.position-mock-row:last-child {
  border-bottom: none;
}

.position-mock-head {
  background: var(--bg-alt);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pos-up {
  color: #15803d;
  font-weight: 700;
}

.pos-down {
  color: #b91c1c;
  font-weight: 700;
}

/* ---------- Mockup Round Up ---------- */

.roundup-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.roundup-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  min-width: 140px;
}

.roundup-step-highlight {
  border-color: var(--blue);
  background: var(--blue-light);
}

.roundup-amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.roundup-step-highlight .roundup-amount {
  color: var(--blue);
}

.roundup-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

.roundup-arrow {
  font-size: 20px;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .roundup-mock {
    flex-direction: column;
  }
  .roundup-arrow {
    transform: rotate(90deg);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-lead {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

.section-cta {
  text-align: center;
  background: var(--blue-light);
}

.section-cta h2 {
  margin-bottom: 8px;
}

/* ---------- Spotlight (Un conto solo, più persone) ---------- */

.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.spotlight-h2 {
  text-align: left;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.spotlight-text .check-list {
  margin: 20px 0 28px;
}

.spotlight-visual {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.split-diagram {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 860px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .spotlight-h2, .spotlight-text .section-lead {
    text-align: center;
  }
  .spotlight-text {
    text-align: center;
  }
  .spotlight-text .check-list {
    text-align: left;
    display: inline-block;
  }
}

/* ---------- Grids & cards ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
}

.grid .card:hover {
  box-shadow: 0 16px 32px -20px rgba(15, 23, 42, 0.25);
  transform: translateY(-2px);
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
  flex-shrink: 0;
}

.card-plain {
  background: transparent;
}

.section-alt .card-plain {
  background: #ffffff;
}

.card p:last-child {
  margin-bottom: 0;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.check-list-x li::before {
  content: '–';
  color: #94a3b8;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  text-align: left;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- Tabella di confronto ---------- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.compare-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--ink);
}

.compare-table td:first-child {
  color: var(--ink-soft);
  font-weight: 600;
}

.compare-table th:nth-child(3),
.compare-table td:nth-child(3) {
  color: var(--blue-dark);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 600px) {
  .compare-table {
    font-size: 0.85rem;
  }
  .compare-table th, .compare-table td {
    padding: 10px 8px;
  }
}

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

details p {
  margin: 12px 0 0;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--ink-soft);
}

.footer-links a:hover {
  color: var(--blue);
}

/* ---------- Contact form (contatti.html) ---------- */

.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.contact-wrap h1 {
  font-size: 1.9rem;
  text-align: center;
}

.contact-wrap > p {
  text-align: center;
  margin-bottom: 32px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.website-field {
  position: absolute;
  left: -9999px;
}

.cf-msg {
  min-height: 20px;
  font-size: 0.9rem;
}

.cf-msg.ok {
  color: #15803d;
}

.cf-msg.err {
  color: #b91c1c;
}

.pin-input {
  letter-spacing: 0.4em;
  font-size: 1.3rem;
  text-align: center;
}

.success-panel {
  text-align: center;
  padding: 32px 0;
}

.success-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
}

.link-back {
  display: inline-block;
  margin-top: 24px;
  text-align: center;
  width: 100%;
}
