/* ---------------------------------------------------------------------------
   Inter, servito da questo dominio. Non da Google.
   Caricare i font da fonts.gstatic.com trasmette l'indirizzo IP del visitatore
   a Google prima di qualsiasi consenso. Qui i file stanno su assets/fonts/ e
   non esce nessuna richiesta verso terzi.
   Un solo file variabile copre i pesi 400-800: 47 KB (latin) invece di cinque
   file statici, ed e' anche piu' veloce.
   Inter — SIL Open Font License 1.1 — https://github.com/rsms/inter
--------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --color-bg: #ffffff;
  --color-text-main: #111827;
  --color-text-muted: #4b5563;
  --color-text-subtle: #6b7280;
  
  --color-primary: #1e40af;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-primary-border: #bfdbfe;
  
  --color-surface-soft: #f8fafc;
  --color-surface-alt: #f0f7ff;
  --color-border: #e5e7eb;
  --color-border-subtle: #f3f4f6;
  
  --color-badge-bg: #e0f2fe;
  --color-badge-text: #0369a1;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --max-width: 1200px;
  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* --- HEADER / NAVBAR --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo-link {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none !important;
  color: inherit !important;
  line-height: 1.15;
}

.brand-logo-link:hover .brand-name {
  color: var(--color-primary);
  transition: color 0.2s ease;
}

.brand-name {
  display: block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.brand-tag {
  display: block;
  font-size: 0.68rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-top: 2px;
}

.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #ffffff;
  transition: all 0.2s ease;
}

.btn-header:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* --- HERO SECTION --- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #0f172a;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--color-surface-soft);
  border-color: #cbd5e1;
}

.hero-mockup-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-mockup-img {
  width: 100%;
  max-width: 620px;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
}

.hero-mockup-img:hover {
  transform: scale(1.01);
}

/* --- SECTION: IL PROBLEMA --- */
.section-problem {
  padding: 5rem 0;
  background: #ffffff;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

.problem-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.problem-item {
  display: flex;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.problem-bullet {
  font-weight: 700;
  color: #0f172a;
}

.problem-img-wrapper {
  display: flex;
  justify-content: center;
}

.problem-img {
  max-width: 440px;
  width: 100%;
}

/* --- SECTION: LA SOLUZIONE --- */
.section-solution {
  padding: 5rem 0;
  background: #eef5ff;
}

.solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

.solution-text {
  max-width: 520px;
}

.solution-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.solution-mockup {
  width: 100%;
  max-width: 650px;
  filter: drop-shadow(0 15px 25px rgba(30, 64, 175, 0.1));
}

/* --- SECTION: PERCHÉ SCEGLIERMI --- */
.section-features {
  padding: 5.5rem 0;
  background: #ffffff;
  text-align: center;
}

.features-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: center;
  margin-bottom: 3.5rem;
}

.feature-card {
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-border);
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  margin: 0 auto 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.feature-text {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- SECTION: COME FUNZIONA --- */
.section-workflow {
  padding: 5.5rem 0;
  background: var(--color-surface-soft);
}

.workflow-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-primary-border);
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.step-content p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.workflow-img {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* --- SECTION: FAQ --- */
.section-faq {
  padding: 5.5rem 0;
  background: #ffffff;
}

.faq-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
}

.faq-q {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.faq-a {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- SECTION: CTA FINALE --- */
.section-cta {
  padding: 6rem 0;
  background: radial-gradient(ellipse at bottom, #dbeafe 0%, #ffffff 70%);
  text-align: center;
}

.cta-box {
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
}

.cta-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* --- FOOTER --- */
.site-footer {
  padding: 2.5rem 0;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.88rem;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link:hover {
  color: #ffffff;
}

/* --- FLOATING WHATSAPP BUTTON --- */
.wa-floating-btn {
  position: fixed;
  /* consent.js pubblica --cb-consent-h con l'altezza del banner mentre e' aperto.
     Cosi' il pulsante sale e non viene mai coperto: e' la conversione principale
     e vive nella thumb zone (PIPELINE.md §3.2 punto 1). */
  bottom: calc(1.5rem + var(--cb-consent-h, 0px));
  right: 1.5rem;
  z-index: 100;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45);
  transition: all 0.25s ease;
}

.wa-floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.wa-floating-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl) !important;
  border-color: #93c5fd !important;
}

.btn-primary, .btn-secondary, .btn-header {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.btn-primary:hover, .btn-header:hover {
  transform: translateY(-2px);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.32);
}

.btn-secondary {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #94a3b8;
}

/* Card Hover Elevation & Rim Light */
.feature-card, .problem-card, .package-card, .workflow-step, .faq-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.feature-card:hover, .problem-card:hover, .package-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px -8px rgba(2, 132, 199, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: #bfdbfe;
}

.workflow-step:hover, .faq-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.07);
  border-color: #cbd5e1;
}

.hero-mockup-img, .solution-mockup {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mockup-img:hover, .solution-mockup:hover {
  transform: scale(1.018);
}

/* Floating WhatsApp Breathing Pulse */
@keyframes waFloatPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.38), 0 0 0 0 rgba(34, 197, 94, 0.35);
  }
  50% {
    transform: translateY(-4px) scale(1.025);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.48), 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

.wa-floating-btn {
  animation: waFloatPulse 3.2s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.wa-floating-btn:hover {
  animation: none;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.55);
}

/* Pulsing Live Dot */
@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* SCROLL REVEAL SYSTEM */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Header Elevation on Scroll */
.site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-bottom-color: rgba(226, 232, 240, 0.85);
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .wa-floating-btn {
    animation: none !important;
  }
  .pulse-dot {
    animation: none !important;
  }
  .btn-primary::after {
    display: none !important;
  }
}

/* --- RESPONSIVE DESKTOP BREAKPOINTS --- */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .problem-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .solution-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .workflow-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

