/* =========================================================
   Quotazione Casa Immobiliare — Landing Page
   Design system: bianco pulito, blu navy + oro (coerenti col logo)
   ========================================================= */

:root {
  --navy-950: #0f1c33;
  --navy-900: #16233f;
  --navy-800: #1e2f52;
  --navy-700: #2a3f6b;
  --gold-600: #a9823f;
  --gold-500: #c9a35a;
  --gold-300: #e3c98a;
  --gold-100: #f6ecd8;
  --ink: #1c2130;
  --muted: #5b6472;
  --muted-light: #8a92a0;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-navy-soft: #eef1f8;
  --border: #e6e8ef;
  --success: #2e7d52;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(15, 28, 51, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 28, 51, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 28, 51, 0.16);
  --container: 1180px;
  --ff-head: "Poppins", "Segoe UI", sans-serif;
  --ff-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  color: var(--navy-900);
  line-height: 1.18;
  margin: 0 0 .6em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--muted); }

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

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

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

.eyebrow {
  display: inline-block;
  font-family: var(--ff-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p.lead { font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* Su schermi molto stretti (~320-360px) i bottoni con testo lungo (es. CTA
   in italiano di piu' parole) possono eccedere lo spazio disponibile: dato
   che white-space:nowrap li forza su una riga, alcuni contenitori con
   overflow:hidden o position:fixed li tagliavano invece di scrollare.
   Sotto questa soglia permettiamo l'a capo su piu' righe. */
@media (max-width: 400px) {
  .btn { white-space: normal; text-align: center; padding: 14px 22px; }
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #23180a;
  box-shadow: 0 10px 24px rgba(169, 130, 63, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(169, 130, 63, 0.45); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--navy-900);
}
.btn-outline:hover { background: var(--navy-900); color: #fff; }

.btn-ghost-light {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.22); }

.btn-block { width: 100%; }
.btn-sm { padding: 12px 20px; font-size: .92rem; }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1ebe5b; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 68px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-family: var(--ff-head);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy-800);
}
.main-nav a:hover { color: var(--gold-600); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 600;
  color: var(--navy-900);
  font-size: 0.95rem;
}
.header-phone svg { flex: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--navy-900);
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 940px) {
  .main-nav { position: fixed; top: 96px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 20px; box-shadow: var(--shadow-md); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .2s ease; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .header-phone { padding: 13px; margin: -13px; }
  .header-phone span.phone-text { display: none; }
  .nav-toggle { display: block; padding: 12px; margin: -6px; }
  .header-actions .btn-primary.btn-sm span.btn-full-text { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-700) 100%);
  padding: 76px 0 0;
}
.hero-skyline { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0.5; pointer-events: none; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding-bottom: 70px;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Fix: i figli di un grid/flex container non si restringono sotto il
   loro min-content intrinseco per via di badge/bottoni non wrappabili
   (min-width:auto di default). Forziamo lo shrink corretto su mobile. */
.hero-grid > *,
.final-cta-grid > *,
.pas-grid > *,
.callout-buyers > *,
.usp-grid > *,
.steps > *,
.stats-grid > *,
.testi-grid > *,
.footer-grid > * {
  min-width: 0;
}

.hero-copy h1 { color: #fff; }
.hero-copy .accent { color: var(--gold-300); }
.hero-copy p.sub {
  color: #cfd6e6;
  font-size: 1.12rem;
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-eyebrow {
  background: rgba(201,163,90,0.15);
  color: var(--gold-300);
}

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dfe4ef;
  font-size: 0.92rem;
  font-weight: 500;
}
.trust-item svg { flex: none; color: var(--gold-300); }
.stars { color: var(--gold-300); letter-spacing: 2px; }

/* Hero form card */
.hero-form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-form-card .badge-free {
  position: absolute;
  top: -16px;
  right: 24px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #23180a;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
}
.hero-form-card h3 { margin-bottom: 4px; }
.hero-form-card .form-sub { font-size: 0.92rem; margin-bottom: 20px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 6px;
  font-family: var(--ff-head);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  font-family: var(--ff-body);
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.78rem;
  color: var(--muted-light);
  margin: 14px 0 18px;
}
.consent input { margin-top: 3px; }

.form-note {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--muted-light);
  margin-top: 14px;
}
.form-note svg { flex: none; color: var(--success); }

.form-success {
  display: none;
  text-align: center;
  padding: 20px 6px;
}
.form-success.show { display: block; }
.form-success svg { color: var(--success); margin-bottom: 10px; }

.form-error {
  display: none;
  text-align: center;
  padding: 20px 6px;
}
.form-error.show { display: block; }
.form-error svg { color: #c0433f; margin-bottom: 10px; }
.form-error .btn { margin-top: 10px; }

/* ---------- Logos / social proof strip ---------- */
.proof-strip {
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}
.proof-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.proof-item {
  font-family: var(--ff-head);
  font-weight: 600;
  color: var(--navy-800);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proof-item svg { color: var(--gold-600); }

/* ---------- Problem / Agitate / Solve ---------- */
.pas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .pas-grid { grid-template-columns: 1fr; gap: 36px; } }

.problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.problem-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 500;
}
.problem-list li svg { flex: none; color: #c0433f; margin-top: 2px; }

.solve-card {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.solve-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(201,163,90,0.28), transparent 55%);
}
.solve-card h3 { color: #fff; position: relative; }
.solve-card p { color: #cfd6e6; position: relative; }
.solve-card .eyebrow { background: rgba(201,163,90,0.18); color: var(--gold-300); }
.solve-card ul { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; gap: 12px; position: relative; }
.solve-card ul li { display: flex; gap: 10px; align-items: center; font-weight: 500; color: #fff; }
.solve-card ul li svg { color: var(--gold-300); flex: none; }

/* ---------- USP / FAB cards ---------- */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1080px) { .usp-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .usp-grid { grid-template-columns: 1fr; } }

.usp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.usp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.usp-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--gold-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-600);
  margin-bottom: 18px;
}
.usp-card h3 { margin-bottom: 8px; }
.usp-card .usp-benefit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
  display: flex;
  gap: 8px;
}
.usp-card .usp-benefit svg { color: var(--success); flex: none; margin-top: 2px; }

/* Featured USP (database acquirenti) callout */
.callout-buyers {
  margin-top: 40px;
  background: linear-gradient(120deg, var(--gold-100), #fff 60%);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
}
@media (max-width: 780px) { .callout-buyers { grid-template-columns: 1fr; text-align: center; } }
.callout-buyers .usp-icon { background: #fff; width: 64px; height: 64px; margin: 0 auto; }
.callout-buyers h3 { margin-bottom: 6px; }
.callout-buyers p { margin: 0; color: var(--navy-800); }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 30px 22px 24px; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border); }
.step .step-num {
  counter-increment: step;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-head);
  font-weight: 700;
  margin-bottom: 16px;
}
.step .step-num::before { content: counter(step); }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.92rem; margin: 0; }

/* ---------- Stats ---------- */
.stats-band {
  background: var(--navy-900);
  color: #fff;
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 780px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stat-num {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 4px;
}
.stat-label { font-size: 0.88rem; color: #cfd6e6; }

/* ---------- Testimonials ---------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .testi-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .testi-grid { grid-template-columns: 1fr; } }

.testi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.testi-stars { color: var(--gold-500); letter-spacing: 2px; margin-bottom: 12px; font-size: 0.95rem; }
.testi-card p.quote { color: var(--ink); font-size: 0.96rem; flex: 1; }
.testi-person { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.testi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-300);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 0.9rem;
  flex: none;
}
.testi-name { font-family: var(--ff-head); font-weight: 600; font-size: 0.9rem; color: var(--navy-900); }
.testi-loc { font-size: 0.8rem; color: var(--muted-light); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy-900);
}
.faq-question .icon-plus { flex: none; transition: transform .2s ease; color: var(--gold-600); }
.faq-item.open .icon-plus { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-answer-inner { padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; }
.faq-item.open .faq-answer { max-height: 320px; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #fff;
  position: relative;
  overflow: hidden;
}
.final-cta .container { position: relative; z-index: 2; }
.final-cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
@media (max-width: 900px) { .final-cta-grid { grid-template-columns: 1fr; } }
.final-cta h2 { color: #fff; }
.final-cta p.sub { color: #cfd6e6; font-size: 1.05rem; }
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,163,90,0.16);
  color: var(--gold-300);
  border: 1px solid rgba(201,163,90,0.4);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.final-cta .hero-form-card { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b9c1d4; padding: 64px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo-badge {
  display: inline-block;
  background: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 0;
}
.footer-brand img { height: 44px; width: auto; display: block; }
.footer-brand p { color: #8f99b3; font-size: 0.9rem; max-width: 280px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: #b9c1d4; font-size: 0.9rem; }
.footer-links a:hover { color: var(--gold-300); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 0.9rem; }
.footer-contact svg { flex: none; color: var(--gold-300); margin-top: 2px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.8rem;
  color: #7c869e;
}
.footer-bottom a { color: #7c869e; }
.footer-bottom a:hover { color: var(--gold-300); }

/* ---------- Floating helpers ---------- */
.mobile-cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(15,28,51,0.14);
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .mobile-cta-bar { display: flex; } body { padding-bottom: 74px; } }
/* Sotto i 400px il testo dei bottoni puo' andare su due righe (vedi regola
   .btn white-space:normal sopra), rendendo la barra fissa piu' alta:
   aumentiamo lo spazio riservato per non nascondere il footer sotto. */
@media (max-width: 400px) { body { padding-bottom: 112px; } }

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 95;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37,211,102,0.45);
}
@media (min-width: 721px) { .whatsapp-float { bottom: 26px; } }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.text-center { text-align: center; }
