:root {
  --blu: #1B4D8C;
  --blu-chiaro: #3B82C4;
  --rosso: #D32F2F;
  --arancio: #F39200;
  --wa: #25D366;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(27, 77, 140, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blu); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--blu); }
h3 { font-size: 1.15rem; }
.muted { color: var(--muted); font-weight: 400; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: .85em 1.4em; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--arancio); outline-offset: 2px; }
.btn-primary { background: var(--blu); color: #fff; }
.btn-primary:hover { background: #163f74; }
.btn-accent { background: var(--arancio); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-sm { padding: .55em 1.1em; font-size: .95rem; }
.btn-block { width: 100%; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; }
.nav a:not(.btn):hover { color: var(--blu); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: none;
  padding: 10px; cursor: pointer; flex-direction: column; justify-content: space-between;
}
.menu-toggle span { display: block; height: 3px; border-radius: 2px; background: var(--blu); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(59, 130, 196, .18), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  padding: 56px 0 16px;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 1rem; padding: .3em .8em; border-radius: 999px;
  background: rgba(243, 146, 0, .12); color: #b56c00; font-weight: 700; font-size: .85rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.3rem); color: var(--blu); }
.accent { color: var(--arancio); }
.lead { font-size: 1.15rem; color: #334155; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.hero-points li { font-weight: 600; color: #334155; }
.hero-points li::before { content: "✓"; color: var(--wa); font-weight: 800; margin-right: .4em; }
.hero-art {
  background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

/* Sezioni */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-lead { color: var(--muted); margin: 0 0 2rem; font-size: 1.05rem; }

/* Tariffe */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.price-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 6px solid var(--arancio);
  padding: 28px;
}
.price-main { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1rem; }
.price-value { font-size: 3.4rem; font-weight: 800; color: var(--blu); line-height: 1; }
.price-unit { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.price-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.price-list li { padding: .6rem 0; border-bottom: 1px dashed var(--border); }
.price-list li:last-child { border-bottom: 0; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--bg); border-radius: var(--radius); padding: 24px; }
.steps p { margin: 0; color: #475569; }
.step-n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blu); color: #fff; font-weight: 800; margin-bottom: .8rem;
}
.needs { background: linear-gradient(135deg, var(--blu), var(--blu-chiaro)); color: #fff; border-radius: var(--radius); padding: 24px 28px; }
.needs h3 { margin-bottom: .8rem; }
.needs ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; }
.needs li::before { content: "•"; color: var(--arancio); font-weight: 800; margin-right: .5em; }

/* Preventivo */
.quote-box {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 6px solid var(--blu-chiaro);
  padding: 28px;
}
.quote-box h3 { font-size: 1.4rem; color: var(--blu); margin-bottom: .2em; }
.quote-box > .muted { margin: 0 0 1.2rem; }
.quote { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input {
  font: inherit; padding: .75em .9em; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); width: 100%; min-height: 48px;
}
.field input:focus { outline: none; border-color: var(--blu-chiaro); box-shadow: 0 0 0 3px rgba(59, 130, 196, .25); }
.quote-result { background: var(--bg); border-radius: 10px; padding: 16px; }
.quote-result p { margin: 0; }
.quote-total { font-size: 1.8rem; font-weight: 800; color: var(--blu); }
.quote-rows { margin: .5rem 0 0; padding: 0; list-style: none; font-size: .95rem; color: #475569; }
.quote-error { color: var(--rosso); font-weight: 600; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: grid; gap: 2px; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.contact-list .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.contact-list a { font-size: 1.1rem; font-weight: 600; text-decoration: none; word-break: break-word; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--border); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Footer */
.footer { background: var(--blu); color: #dbe7f5; padding: 32px 0 96px; font-size: .92rem; }
.footer p { margin: .3rem 0; }
.footer a { color: #fff; }
.footer .muted { color: #9fb8d6; }

/* WhatsApp flottante */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.wa-float:hover { transform: scale(1.05); }

/* Mobile */
@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: 12px; }

  .hero { padding: 32px 0 8px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }

  .section { padding: 48px 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .needs ul { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
