/* ==========================================================================
   Facile un Prestito — Cessione del Quinto
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy-950: #0b1f33;
  --navy-800: #12314f;
  --navy-700: #1b4066;
  --navy-600: #24507f;
  --gold-500: #c79a45;
  --gold-600: #a97f34;
  --gold-100: #f3e6c8;
  --cream-50: #f7f4ee;
  --cream-100: #efe9dd;
  --ink-900: #1b1b18;
  --ink-600: #4a4944;
  --green-600: #2f6f4e;
  --green-100: #e3f0e8;
  --red-600: #b33a3a;
  --red-100: #f8e8e8;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --shadow-card: 0 20px 50px -20px rgba(11, 31, 51, 0.35);
  --shadow-soft: 0 8px 24px -12px rgba(11, 31, 51, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream-50);
  color: var(--ink-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  color: var(--navy-950);
  margin: 14px 0 0;
  letter-spacing: -0.01em;
}

.section-rule {
  width: 56px;
  height: 3px;
  background: var(--gold-500);
  border-radius: 2px;
  margin: 18px 0 28px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-950);
  color: var(--cream-100);
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-item { display: inline-flex; align-items: center; gap: 8px; opacity: 0.92; }
.topbar-item svg { width: 15px; height: 15px; flex: none; }
.topbar a.topbar-item:hover { color: var(--gold-100); }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-950);
  padding: 18px 0 34px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--gold-500), var(--gold-600));
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  line-height: 1.1;
}
.brand-tag {
  font-size: 0.72rem;
  color: var(--gold-100);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-950);
  background-image:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(199, 154, 69, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 110%, rgba(199, 154, 69, 0.10), transparent 60%);
  color: #fff;
  padding-bottom: 84px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  margin: 18px 0 0;
  letter-spacing: -0.01em;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--gold-500);
}
.hero-sub {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--cream-100);
  margin: 18px 0 0;
  max-width: 46ch;
  font-weight: 500;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.97rem;
  color: var(--cream-100);
}
.hero-points svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--gold-500); }

.hero-badges {
  display: flex;
  gap: 22px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-badge {
  font-size: 0.78rem;
  color: var(--cream-100);
  opacity: 0.85;
  border-left: 2px solid var(--gold-500);
  padding-left: 10px;
  line-height: 1.3;
}

/* ---------- Payslip-style form card (signature element) ---------- */
.payslip-wrap { position: relative; }
.payslip {
  background: #fff;
  color: var(--ink-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  padding: 30px 30px 26px;
  animation: rise-in 0.7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.payslip::before,
.payslip::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--cream-50);
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 6px var(--navy-950) inset;
  display: none;
}
.payslip-perf {
  position: absolute;
  left: -1px; right: -1px;
  top: 108px;
  height: 0;
  border-top: 2px dashed #d9d2c2;
}
.payslip-perf::before, .payslip-perf::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy-950);
  top: -12px;
}
.payslip-perf::before { left: -12px; }
.payslip-perf::after { right: -12px; }

.payslip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 26px;
}
.payslip-head .label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-600);
  font-weight: 700;
}
.payslip-head .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-950);
  margin-top: 4px;
}
.payslip-quinto {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-600);
  font-size: 0.92rem;
  flex: none;
  text-align: center;
  line-height: 1.05;
}

.payslip h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy-950);
  margin: 0 0 6px;
}
.payslip p.form-sub {
  font-size: 0.92rem;
  color: var(--ink-600);
  margin: 0 0 20px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.field input[type="tel"] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #dcd5c6;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1.05rem;
  background: var(--cream-50);
  color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
.field input[type="tel"]:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(199, 154, 69, 0.18);
}
.field input[type="tel"]::placeholder { color: #a8a297; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--ink-600);
  margin: 16px 0 20px;
}
.consent input {
  margin-top: 3px;
  flex: none;
  width: 17px; height: 17px;
  accent-color: var(--navy-800);
}
.consent a { color: var(--navy-800); text-decoration: underline; }

.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }

.btn-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, var(--gold-500), var(--gold-600));
  color: #241a05;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 15px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: var(--shadow-soft);
}
.btn-submit:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.65; cursor: progress; transform: none; }
.btn-submit svg { width: 18px; height: 18px; }

.form-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
  align-items: flex-start;
  gap: 8px;
}
.form-msg.show { display: flex; }
.form-msg.ok { background: var(--green-100); color: var(--green-600); }
.form-msg.err { background: var(--red-100); color: var(--red-600); }
.form-msg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.payslip-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #a8a297;
  margin-top: 16px;
  border-top: 1px solid #ece7d9;
  padding-top: 14px;
}

/* ---------- Punti di forza / Chi siamo / Partnership ---------- */
.section { padding: 84px 0; }
.section.on-cream { background: var(--cream-50); }
.section.on-cream-alt { background: var(--cream-100); }

.chi-siamo { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.chi-siamo p { color: var(--ink-600); font-size: 1.02rem; margin: 0 0 16px; }
.chi-siamo .lead { font-size: 1.12rem; color: var(--navy-950); font-weight: 500; }

.guide-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-soft);
  border-top: 3px solid var(--gold-500);
}
.guide-card .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-600); font-weight: 700; }
.guide-card .names { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy-950); margin: 8px 0 14px; font-weight: 700; }
.guide-card p { margin: 0; font-size: 0.94rem; }

.partnership-strip {
  margin-top: 22px;
  background: var(--navy-950);
  color: var(--cream-100);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  font-size: 0.95rem;
  display: flex;
  gap: 14px;
  align-items: center;
}
.partnership-strip svg { flex: none; width: 26px; height: 26px; color: var(--gold-500); }

.forza-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 8px;
}
.forza-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s, box-shadow .18s;
}
.forza-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.forza-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--navy-950);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.forza-icon svg { width: 24px; height: 24px; color: var(--gold-500); }
.forza-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 8px; color: var(--navy-950); }
.forza-card p { margin: 0; color: var(--ink-600); font-size: 0.94rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy-950);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 10px; }
.cta-band p { color: var(--cream-100); margin: 0 0 26px; }
.btn-anchor {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(155deg, var(--gold-500), var(--gold-600));
  color: #241a05;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform .15s;
}
.btn-anchor:hover { transform: translateY(-2px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--cream-100);
  padding: 46px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 12px; color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--gold-500); }
.footer-legal {
  font-size: 0.74rem;
  line-height: 1.7;
  color: #9fb0c4;
  padding-top: 22px;
}
.footer-legal p { margin: 0 0 10px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: #8497ad;
  padding-top: 18px;
}
.footer-bottom a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .chi-siamo { grid-template-columns: 1fr; }
  .forza-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
}
@media (max-width: 560px) {
  .payslip { padding: 24px 20px 20px; }
  .section { padding: 60px 0; }
}
