/* ============================================================
   FINPLO — Foglio di stile principale
   Palette: navy #1A2E4A | blu #2563EB | verde #16A34A
   Font: Inter (Google Fonts)
   ============================================================ */

/* --- VARIABILI --- */
:root {
  --navy:    #1A2E4A;
  --blue:    #2563EB;
  --blue-dk: #1D4ED8;
  --green:   #16A34A;
  --white:   #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100:#F1F5F9;
  --gray-200:#E2E8F0;
  --gray-400:#94A3B8;
  --gray-600:#475569;
  --gray-800:#1E293B;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.12), 0 4px 6px -2px rgba(0,0,0,.06);
  --transition: .2s ease;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

/* --- CONTAINER --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.logo-white { color: var(--white); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--navy); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav mobile */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 1rem;
  }
  .nav-links a:last-child { border-bottom: none; margin-top: 8px; }
}

/* ============================================================
   BOTTONI
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-full { width: 100%; }
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-dk); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-white {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}
.btn-white:hover { background: var(--gray-100); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
}
.btn-green {
  background: var(--green);
  color: var(--white);
}
.btn-green:hover { background: #15803d; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,163,74,.3); }

/* Bottone ghost hero (versione 2) */
.btn-hero-ghost {
  background: transparent;
  border: 2px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.85);
}
.btn-hero-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.6);
  color: var(--white);
  transform: translateY(-1px);
}
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--navy);
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(37,99,235,.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(22,163,74,.1) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,.015) 40px,
      rgba(255,255,255,.015) 41px
    );
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-content { max-width: 680px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: #60A5FA; /* blue-400 */
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   SEZIONI GENERALI
   ============================================================ */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-50); }
.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 48px;
  max-width: 540px;
}

/* ============================================================
   PRODOTTI
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}
.product-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37,99,235,.06);
}
.product-placeholder { opacity: .65; }
.product-placeholder:hover { transform: none; box-shadow: none; }
.product-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.badge-green { background: #DCFCE7; color: var(--green); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.product-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.product-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.placeholder-price { color: var(--gray-400); font-size: 1.5rem; }
.product-desc {
  font-size: .9rem;
  color: var(--gray-600);
  margin-bottom: 20px;
  line-height: 1.6;
}
.feature-list { margin-bottom: 28px; }
.feature-list li {
  font-size: .88rem;
  color: var(--gray-800);
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.feature-list li:last-child { border-bottom: none; }

/* --- Prezzo early-bird --- */
.price-full {
  text-decoration: line-through;
  color: var(--gray-400);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0;
  margin-right: 4px;
}
.price-label {
  font-size: .82rem;
  color: var(--green);
  font-weight: 700;
  margin-top: -10px;
  margin-bottom: 16px;
}

/* --- Badge versione Excel in arrivo --- */
.excel-badge {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  margin-bottom: 20px;
}

/* --- Layout a prodotto singolo (v2) --- */
.products-grid--solo {
  display: flex;
  justify-content: center;
}
.product-solo {
  max-width: 560px;
  width: 100%;
}
.price-note {
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0;
}
.feature-list--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.product-reassurance {
  margin-top: 14px;
  text-align: center;
  font-size: .78rem;
  color: var(--gray-400);
  line-height: 1.7;
}
@media (max-width: 480px) {
  .feature-list--two-col { grid-template-columns: 1fr; }
  .hero-cta-group { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   COME FUNZIONA — STEPS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: var(--white);
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.step-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.step-card p { font-size: .9rem; color: var(--gray-600); line-height: 1.6; }

/* ============================================================
   PERCHÉ FINPLO
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--white); }
.why-icon { font-size: 2rem; margin-bottom: 16px; }
.why-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.why-card p { font-size: .88rem; color: var(--gray-600); line-height: 1.6; }

/* ============================================================
   GARANZIE
   ============================================================ */
.guarantees {
  background: var(--navy);
  padding: 24px 0;
}
.guarantees-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
}
.guarantee-item {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  gap: 16px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--blue); }
.faq-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue);
  transition: transform var(--transition);
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.faq-a p {
  padding-bottom: 20px;
  font-size: .95rem;
  color: var(--gray-600);
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 200px; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #1e40af 100%);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.cta-band p {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--navy);
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand .logo { margin-bottom: 6px; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.5); }
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.footer-right a {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer-right a:hover { color: var(--white); }
.footer-right span { font-size: .78rem; color: rgba(255,255,255,.35); }

/* ============================================================
   THANK YOU PAGE
   ============================================================ */
.ty-page {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
}
.ty-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}
.ty-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px;
}
.ty-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  max-width: 540px;
  width: 100%;
}
.ty-success-icon {
  width: 64px;
  height: 64px;
  background: #DCFCE7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}
.ty-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.ty-card .ty-sub {
  font-size: .95rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.6;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-note {
  font-size: .78rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: 12px;
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.error-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.error-page h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}
.error-page p {
  font-size: .95rem;
  color: var(--gray-600);
  margin-bottom: 8px;
  max-width: 400px;
}
.error-page a.link {
  color: var(--blue);
  font-weight: 600;
}
.error-page a.link:hover { text-decoration: underline; }
.error-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   SPINNER / LOADING
   ============================================================ */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ALERT
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 16px;
}
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero { padding: 70px 0 60px; }
  .section { padding: 60px 0; }
  .ty-card { padding: 32px 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { align-items: flex-start; }
  .cta-band { padding: 60px 0; }
  .guarantees-strip { gap: 10px 24px; }
}
