/* =========================================================
   silvestrifabio.com — foglio di stile unico
   Colori brand: blu notte #343b67 · blu #608eb3 · azzurro #d4e7f3
   ========================================================= */

/* Caratteri ospitati sul sito (nessuna chiamata a Google) */
@font-face { font-family: "DM Sans"; src: url("../fonts/dmsans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --navy: #343b67;
  --navy-deep: #262b4d;
  --blue: #608eb3;
  --blue-dark: #4a7699;
  --sky: #d4e7f3;
  --sky-soft: #eef5fa;
  --ink: #1f2340;
  --muted: #5b6080;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --ok: #2f7d5b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31,35,64,.05), 0 10px 30px rgba(31,35,64,.08);
  --max: 1160px;
  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy); color: #e8ecf6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--sky); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.section-dark .lead { color: #c9d3e8; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 48px; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-accent { background: var(--blue); color: #fff; }
.btn-accent:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.section-dark .btn-ghost { color: #fff; border-color: #fff; }
.section-dark .btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .96rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue-dark); }
.nav .btn { padding: 10px 20px; font-size: .92rem; color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky-soft) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 72px; }
.hero-text { padding-bottom: 72px; }
.hero-text .lead { font-size: 1.22rem; }
.hero-media { position: relative; align-self: end; }
.hero-media img { width: 100%; max-height: 620px; object-fit: cover; object-position: top; border-radius: 22px 22px 0 0; }
.hero-badge {
  position: absolute; left: -28px; bottom: 40px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; display: flex; gap: 12px; align-items: center; max-width: 260px;
}
.hero-badge img { width: 34px; height: auto; }
.hero-badge strong { display: block; font-family: var(--font-head); color: var(--navy); }
.hero-badge span { font-size: .86rem; color: var(--muted); }
.hero-pattern {
  position: absolute; right: -60px; top: -40px; width: 380px; opacity: .08; pointer-events: none;
}
.trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; font-size: .94rem; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--blue); flex: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 44px; gap: 0; }
  .hero-grid > *, .split > *, .contact-grid > * { min-width: 0; }
  .hero-text { padding-bottom: 40px; }
  .hero-media img { max-height: 460px; }
  .hero-badge { left: 12px; bottom: 16px; }
}

/* ---------- Card servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
  text-decoration: none; color: inherit;
}
a.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--sky-soft); color: var(--navy);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card .icon svg { width: 26px; height: 26px; }
.card p { color: var(--muted); flex: 1; }
.card .more { font-family: var(--font-head); font-weight: 600; color: var(--blue-dark); margin-top: 8px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Split (testo + immagine) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; max-height: 560px; object-fit: cover; object-position: top; }
.split.reverse .split-media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-media { order: 0; }
  .split img { max-height: 420px; }
}

/* ---------- Liste con spunta ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 34px; margin-bottom: 14px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23343b67' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat;
}
.checks strong { color: var(--navy); }
.section-dark .checks strong { color: #fff; }

/* ---------- Griglia vantaggi ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { padding: 4px 0; }
.feature .num {
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--blue);
  border: 2px solid var(--sky); border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px;
}
.feature p { color: var(--muted); }
.section-dark .feature p { color: #c9d3e8; }
.section-dark .feature .num { color: var(--sky); border-color: rgba(212,231,243,.35); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }

/* ---------- Passaggi (come funziona) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { background: #fff; border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--line); position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--sky); display: block; margin-bottom: 10px;
}
.step p { color: var(--muted); margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: #fff; line-height: 1.1; }
.stat span { color: #c9d3e8; font-size: .95rem; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; gap: 32px 16px; } }

/* ---------- Zone ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { background: var(--sky-soft); color: var(--navy); border-radius: 999px; padding: 8px 16px; font-weight: 500; font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem;
  color: var(--navy); padding: 20px 40px 20px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--blue);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-right: 40px; }

/* ---------- Form contatto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
@media (max-width: 560px) { .form-card { padding: 24px 20px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(96,142,179,.18); }
.field textarea { min-height: 120px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 6px 0 20px; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--navy); }
.form-card .btn { width: 100%; }
.form-note { font-size: .84rem; color: var(--muted); text-align: center; margin: 14px 0 0; }
.hidden { display: none !important; }
.contact-direct { margin-top: 28px; display: grid; gap: 14px; }
.contact-direct a { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 500; }
.contact-direct svg { width: 22px; height: 22px; flex: none; }

/* ---------- Citazione ---------- */
.quote {
  font-family: var(--font-head); font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.4;
  color: var(--navy); border-left: 4px solid var(--blue); padding-left: 24px; margin: 28px 0;
}

/* ---------- Banda CTA ---------- */
.cta-band { background: var(--sky-soft); border-radius: 22px; padding: 56px 48px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .cta-band { padding: 36px 24px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b9c2da; padding: 64px 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer img.flogo { height: 24px; width: auto; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #dfe5f3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; font-size: .82rem; color: #8f99b6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Barra CTA fissa su mobile ---------- */
.mobile-cta { display: none; }
@media (max-width: 700px) {
  .mobile-cta {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    box-shadow: 0 8px 24px rgba(31,35,64,.25); border-radius: 999px;
  }
  .mobile-cta .btn { flex: 1; }
  body.has-mobile-cta { padding-bottom: 84px; }
}

/* ---------- Pagine semplici (blog, privacy, grazie) ---------- */
.page-head { background: var(--sky-soft); padding: 72px 0 56px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.post-meta { color: var(--muted); font-size: .92rem; }
.draft-note { background: #fff7e6; border: 1px solid #f1d69b; color: #7a5a12; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .92rem; margin-bottom: 28px; }

/* Accessibilità */
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.form-error { background: #fdecea; color: #8a2a1c; border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; margin: 14px 0 0; }
.form-error a { color: inherit; font-weight: 600; }

/* Striscia payoff */
.payoff { padding: 72px 0; }
.payoff img { margin: 0 auto 18px; opacity: .9; }
.payoff-text { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.8rem, 4.5vw, 3rem); color: #fff; margin: 0; letter-spacing: -.01em; }
