/* ==========================================================================
   FirmaPro — sito pubblico (landing + prezzi)
   Stesso sistema dell'app: neutro caldo + accent verde petrolio, Manrope + Inter
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-subtle: #f5f7fb;
  --bg-deep: #071640;
  --border: rgb(20 24 31 / 0.09);
  --border-strong: rgb(20 24 31 / 0.18);
  --text: #0b1d51;
  --text-body: #3a4250;
  --text-muted: #667080;
  --accent: #0056fc;
  --accent-hover: #0046d1;
  --accent-soft: rgb(0 86 252 / 0.08);
  --accent-bright: #8fb5ff;

  --font-head: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --text-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --text-hero: clamp(2.375rem, 1.6rem + 3.4vw, 4rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem; --space-24: 6rem;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(20 24 31 / 0.06);
  --shadow-md: 0 4px 12px rgb(20 24 31 / 0.08);
  --shadow-lg: 0 24px 60px rgb(20 24 31 / 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; color: var(--text-body); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
p { max-width: 65ch; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: 1160px; margin-inline: auto; padding-inline: var(--space-6); }
section { padding-block: var(--space-24); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: var(--space-1) var(--space-3); border-radius: 999px; }
.section-head { max-width: 680px; margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-2xl); margin: var(--space-4) 0; }
.section-head p { font-size: var(--text-lg); color: var(--text-muted); }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius); font-weight: 700; font-size: var(--text-base); border: 1px solid transparent; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-subtle); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-sm); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; gap: var(--space-8); height: 68px; }
.brand { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-head); font-weight: 800; font-size: var(--text-lg); color: var(--text); }
.brand-icon { width: 36px; height: 36px; flex-shrink: 0; }
.brand-word { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: #0b1d51; letter-spacing: -0.03em; line-height: 1; }
.brand-word b { color: var(--accent); font-weight: 800; }
.brand-tag { display: block; font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }
.nav { display: flex; gap: var(--space-6); font-size: var(--text-sm); font-weight: 600; }
.nav a { color: var(--text-body); transition: color .15s ease; }
.nav a:hover { color: var(--accent); }
.header-cta { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; border-radius: var(--radius); cursor: pointer; color: var(--text); place-items: center; }
.menu-toggle:hover { background: var(--bg-subtle); }

/* Hero */
.hero { padding-block: var(--space-16) var(--space-24); background: radial-gradient(900px 420px at 85% 10%, rgb(0 86 252 / 0.08), transparent 70%), var(--bg); }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16); align-items: center; }
.hero h1 { font-size: var(--text-hero); margin: var(--space-6) 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: var(--text-lg); color: var(--text-muted); margin-bottom: var(--space-8); }
.hero-ctas { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-note { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); font-size: var(--text-sm); color: var(--text-muted); }
.hero-note span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-note svg { color: var(--accent); }

/* Visual hero: documento + telefono */
.visual { position: relative; height: 520px; }
.doc-mock { position: absolute; top: 0; left: 0; width: 78%; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-8); border: 1px solid var(--border); transform: rotate(-2deg); }
.doc-mock .dm-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: var(--space-4); border-bottom: 2px solid var(--text); margin-bottom: var(--space-4); }
.dm-logo { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-head); font-weight: 800; font-size: var(--text-sm); color: var(--text); }
.dm-logo span { width: 26px; height: 26px; border-radius: 6px; background: var(--text); display: grid; place-items: center; color: #f5b301; }
.dm-num { font-size: 0.75rem; color: var(--text-muted); }
.dm-title { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: var(--text-lg); line-height: 1.2; margin-bottom: var(--space-4); }
.dm-lines { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-6); }
.dm-check { display: flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; }
.dm-check i { width: 14px; height: 14px; border-radius: 3px; background: var(--text); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.dm-bar { height: 8px; border-radius: 4px; background: var(--bg-subtle); }
.dm-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.dm-sig { border-bottom: 1px solid var(--text); height: 54px; display: flex; align-items: flex-end; justify-content: center; color: #1b2a4a; }
.dm-sig-label { font-size: 0.6875rem; color: var(--text-muted); margin-top: var(--space-1); }
.phone { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 9 / 18.5; background: var(--bg-deep); border-radius: 36px; padding: 10px; box-shadow: var(--shadow-lg); }
.phone-screen { height: 100%; background: #fff; border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.ps-top { padding: var(--space-6) var(--space-4) var(--space-3); font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: var(--text-sm); border-bottom: 1px solid var(--border); }
.ps-top small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--text-muted); font-size: 0.6875rem; }
.ps-body { flex: 1; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.ps-pad { flex: 1; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg-subtle); position: relative; display: grid; place-items: center; color: #1b2a4a; }
.ps-pad::after { content: 'Firma qui con il dito'; position: absolute; bottom: var(--space-2); font-size: 0.625rem; color: var(--text-muted); }
.ps-btn { height: 38px; border-radius: var(--radius); background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.sig-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s ease forwards 0.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.toast-mock { position: absolute; left: 0; bottom: 120px; z-index: 2; display: flex; align-items: center; gap: var(--space-3); background: var(--text); color: #fff; padding: var(--space-3) var(--space-4); border-radius: var(--radius); font-size: var(--text-sm); box-shadow: var(--shadow-lg); animation: rise .5s ease both 2.6s; }
.toast-mock svg { color: var(--accent-bright); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Strip */
.strip { padding-block: var(--space-8); border-block: 1px solid var(--border); background: var(--bg-subtle); }
.strip ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.strip li { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; color: var(--text); font-size: var(--text-sm); }
.strip svg { color: var(--accent); flex-shrink: 0; }

/* Come funziona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); counter-reset: step; }
.step { padding: var(--space-8); border-radius: var(--radius-lg); background: var(--bg-subtle); position: relative; }
.step-num { font-family: var(--font-head); font-weight: 800; font-size: var(--text-sm); color: var(--accent); margin-bottom: var(--space-6); display: flex; align-items: center; gap: var(--space-3); }
.step-num::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.step h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.step p { color: var(--text-muted); }
.step-time { margin-top: var(--space-6); display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 700; color: var(--text); }

/* Funzioni */
.features { background: var(--bg-subtle); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.feat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.feat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feat-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--space-6); }
.feat h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.feat p { color: var(--text-muted); font-size: var(--text-sm); }

/* Split cantiere */
.split .container { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.split-panel { background: var(--bg-deep); border-radius: var(--radius-lg); padding: var(--space-12); color: #c9d6f2; }
.split-panel h3 { color: #fff; font-size: var(--text-xl); margin-bottom: var(--space-6); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.compare h4 { font-family: var(--font-body); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); color: #8592b3; }
.compare h4.now { color: var(--accent-bright); }
.compare ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); }
.compare li { display: flex; gap: var(--space-2); }
.compare li svg { margin-top: 4px; flex-shrink: 0; }
.compare .old svg { color: #8592b3; }
.compare .new svg { color: var(--accent-bright); }
.check-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-8); }
.check-list li { display: flex; gap: var(--space-3); }
.check-list svg { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.check-list strong { color: var(--text); }

/* Prezzi */
.pricing .section-head { margin-inline: auto; text-align: center; }
.pricing .section-head p { margin-inline: auto; }
.billing-toggle { display: inline-flex; background: var(--bg-subtle); border-radius: 999px; padding: 4px; margin-bottom: var(--space-8); }
.billing-toggle button { border: 0; background: none; padding: var(--space-2) var(--space-6); border-radius: 999px; font: inherit; font-weight: 600; font-size: var(--text-sm); color: var(--text-muted); cursor: pointer; transition: all .15s ease; min-height: 40px; }
.billing-toggle button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.billing-toggle .save { color: var(--accent); font-weight: 700; margin-left: var(--space-1); }
.price-wrap { text-align: center; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); max-width: 860px; margin-inline: auto; text-align: left; }
.price-card { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); background: var(--bg); }
.price-card.pro { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); position: relative; }
.price-flag { position: absolute; top: -13px; left: var(--space-8); background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 3px var(--space-3); border-radius: 999px; }
.price-card h3 { font-size: var(--text-lg); }
.price-card .desc { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-1); }
.price { display: flex; align-items: baseline; gap: var(--space-2); }
.price strong { font-family: var(--font-head); font-size: 2.75rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price span { color: var(--text-muted); font-size: var(--text-sm); }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); flex: 1; }
.price-card li { display: flex; gap: var(--space-2); }
.price-card li svg { color: var(--accent); margin-top: 3px; flex-shrink: 0; }
.price-foot { text-align: center; margin-top: var(--space-6); font-size: var(--text-sm); color: var(--text-muted); }

/* FAQ */
.faq { background: var(--bg-subtle); }
.faq .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--space-16); }
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
summary { list-style: none; cursor: pointer; padding: var(--space-4) var(--space-6); font-weight: 700; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: 56px; }
summary::-webkit-details-marker { display: none; }
summary svg { transition: transform .2s ease; color: var(--text-muted); flex-shrink: 0; }
details[open] summary svg { transform: rotate(45deg); color: var(--accent); }
details p { padding: 0 var(--space-6) var(--space-6); color: var(--text-muted); font-size: var(--text-sm); }

/* CTA finale */
.final { background: var(--bg-deep); color: #c9d6f2; text-align: center; }
.final h2 { color: #fff; font-size: var(--text-2xl); max-width: 720px; margin: 0 auto var(--space-4); }
.final p { margin: 0 auto var(--space-8); font-size: var(--text-lg); }
.final .btn-primary { background: var(--accent-bright); color: var(--bg-deep); }
.final .btn-primary:hover { background: #b0cbff; }

/* Footer */
.footer { padding-block: var(--space-12); font-size: var(--text-sm); color: var(--text-muted); border-top: 1px solid var(--border); }
.footer .container { display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1024px) {
  .hero .container, .split .container, .faq .container { grid-template-columns: 1fr; gap: var(--space-12); }
  .visual { height: 480px; max-width: 560px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .strip ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { padding-block: var(--space-16); }
  .nav, .header-cta .hide-sm { display: none; }
  .menu-toggle { display: grid; }
  .header.open .nav { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--space-4) var(--space-6) var(--space-6); gap: 0; box-shadow: var(--shadow-md); }
  .header.open .nav a { padding: var(--space-3) 0; min-height: 44px; font-size: var(--text-base); border-bottom: 1px solid var(--border); }
  .hero { padding-top: var(--space-12); }
  .steps, .feat-grid, .price-grid, .compare { grid-template-columns: 1fr; }
  .visual { height: 400px; }
  .doc-mock { padding: var(--space-6); width: 84%; }
  .split-panel { padding: var(--space-8); }
}
@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
  .strip ul { grid-template-columns: 1fr; gap: var(--space-3); }
  .hero-ctas .btn { flex: 1; }
  .visual { height: 360px; }
  .doc-mock .dm-lines .dm-check:nth-child(n+4) { display: none; }
  .toast-mock { left: 0; bottom: 16px; font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sig-path { animation: none; stroke-dashoffset: 0; }
  .toast-mock { animation: none; }
  html { scroll-behavior: auto; }
}
