/* ═══════════════════════════════════════════
   MaxAI — Design System v1
   Palette: Blue / Navy Premium
   ═══════════════════════════════════════════ */

:root {
  /* ── Palette ── */
  --bg-dark: #0A1628;
  --bg-dark-2: #111F35;
  --bg-card: #162544;
  --bg-light: #F8FAFC;
  --bg-gray: #F1F5F9;
  
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-light: #DBEAFE;
  --accent-glow: rgba(59, 130, 246, 0.15);
  
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-dark: #0F172A;
  --text-gray: #64748B;
  
  --border: rgba(148, 163, 184, 0.15);
  --border-light: #E2E8F0;
  
  --gradient-hero: linear-gradient(135deg, #0A1628 0%, #1E3A5F 50%, #0F2847 100%);
  --gradient-accent: linear-gradient(135deg, #3B82F6, #8B5CF6);
  --gradient-card: linear-gradient(180deg, rgba(59,130,246,0.05) 0%, transparent 100%);

  /* ── Typography (Figma: Manrope) ── */
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* ── Spacing ── */
  --max-w: 1200px;
  --section-pad: 100px 24px;
  --section-pad-mobile: 64px 20px;
  
  /* ── Radius ── */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* ── Shadows ── */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
  --shadow-blue: 0 0 40px rgba(59,130,246,0.15);

  /* ── Transitions ── */
  --transition: 0.2s ease;
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.nav-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-logo span { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--transition);
}

.nav-cta:hover { background: var(--accent-hover); }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 160px 24px 120px;
  text-align: center;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url('/images/hero-01-network.webp') center/cover no-repeat,
    url('/images/hero-02-strategy.webp') center/cover no-repeat,
    url('/images/hero-03-growth.webp') center/cover no-repeat;
  background-blend-mode: normal;
  animation: hero-crossfade 12s ease-in-out infinite;
  z-index: 0;
  opacity: 0.25;
}

@keyframes hero-crossfade {
  0%, 26%   { background-image: url('/images/hero-01-network.webp'); }
  33%, 59%  { background-image: url('/images/hero-02-strategy.webp'); }
  66%, 92%  { background-image: url('/images/hero-03-growth.webp'); }
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero h1 span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 650px;
  margin-left: auto; margin-right: auto;
}

.hero-micro {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 16px 36px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  transition: all var(--transition);
  box-shadow: 0 0 30px rgba(59,130,246,0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(59,130,246,0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 16px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   SECTIONS (shared)
   ═══════════════════════════════════════════ */
.section {
  padding: var(--section-pad);
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

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

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

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 48px;
}

.section-light .section-sub { color: var(--text-gray); }

/* ═══════════════════════════════════════════
   PROBLEM GRID
   ═══════════════════════════════════════════ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition);
}

.problem-card:hover { border-color: var(--accent); }

.problem-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.problem-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.problem-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.problem-cta {
  display: inline-block;
  margin-top: 32px;
  background: var(--accent);
  color: #fff;
  padding: 16px 36px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  transition: all var(--transition);
}

.problem-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   PERSPECTIVE SECTION
   ═══════════════════════════════════════════ */
.perspective-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin-bottom: 40px;
}

.benefits-short {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.benefit-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   MODULES GRID
   ═══════════════════════════════════════════ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition);
}

.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.module-card:hover::before { opacity: 1; }

.module-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.module-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.module-problem {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.module-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.module-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.module-benefits {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}

.module-benefits li::before {
  content: '→ ';
  color: var(--accent);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   MODULES CLOSING
   ═══════════════════════════════════════════ */
.modules-closing {
  text-align: center;
  margin-top: 64px;
}

.modules-closing .btn-primary {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .modules-closing .btn-primary {
    display: block;
    width: 100%;
    white-space: nowrap;
    font-size: 14px;
    padding: 14px 20px;
  }
}

/* ═══════════════════════════════════════════
   PROCESS STEPS
   ═══════════════════════════════════════════ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 700px;
}

.process-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.process-num {
  width: 48px; height: 48px;
  min-width: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.process-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.process-step p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-light .process-step p { color: var(--text-gray); }

/* ═══════════════════════════════════════════
   BENEFITS GRID
   ═══════════════════════════════════════════ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.benefit-card:hover { border-color: var(--accent); }

/* ═══════════════════════════════════════════
   CASE STUDIES
   ═══════════════════════════════════════════ */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.case-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.case-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none; border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-open .faq-q::after {
  content: '−';
}

.faq-a {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  display: none;
}

.faq-open .faq-a { display: block; }

/* ═══════════════════════════════════════════
   FINAL CTA
   ═══════════════════════════════════════════ */
.cta-final {
  padding: var(--section-pad);
  text-align: center;
  background: var(--gradient-hero);
}

.cta-final .section-title { color: var(--text-primary); }

.cta-final .section-sub {
  color: var(--text-secondary);
  margin-left: auto; margin-right: auto;
}

.cta-final-micro {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 24px;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --section-pad: 64px 20px;
  }
  
  .hero { padding: 120px 20px 80px; }
  
  .modules-grid { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  
  .process-step { flex-direction: column; gap: 12px; }
  
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   ═══════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 14px 22px 14px 18px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.25s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
  background: #20BD5A;
}

.whatsapp-float svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.whatsapp-float .wa-label {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 20px;
    right: 16px;
    padding: 14px 18px;
    gap: 8px;
    font-size: 13px;
  }
  .whatsapp-float .wa-label {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   SECTION-LIGHT OVERRIDES (readability fix)
   ═══════════════════════════════════════════ */
.section-light .section-sub,
.section-light .perspective-text {
  color: #475569;
}

.section-light .benefit-tag {
  background: #E2E8F0;
  border-color: #CBD5E1;
  color: #1E293B;
}

.section-light .case-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.section-light .case-card h3 {
  color: #0F172A;
}

.section-light .case-card p {
  color: #475569;
}

.section-light .section-title {
  color: #0F172A;
}

/* Fix Metodo cards (inline styles) — target the specific grid inside section-light */
.section-light .container > div[style*=grid] > div[style*=bg-card] {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.section-light .container > div[style*=grid] > div[style*=bg-card] h3 {
  color: #0F172A;
}

.section-light .container > div[style*=grid] > div[style*=bg-card] p {
  color: #475569;
}

/* ═══════════════════════════════════════════
   AI AZIENDALE vs AI ONLINE — NUOVA SEZIONE
   ═══════════════════════════════════════════ */
.ai-approach-text {
  max-width: 700px;
  margin-bottom: 48px;
}

.ai-approach-text p {
  font-size: 17px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Box comparativo */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 8px;
}

.comparison-col {
  border-radius: var(--radius-lg);
  padding: 32px;
}

.comparison-col-online {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

.comparison-col-aziendale {
  background: var(--bg-dark);
  border: 1px solid var(--accent);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.12);
}

.comparison-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.comparison-col-online .comparison-title {
  color: #64748B;
}

.comparison-col-aziendale .comparison-title {
  color: var(--text-primary);
}

.comparison-list {
  list-style: none;
  font-size: 15px;
  line-height: 1.8;
}

.comparison-list li {
  padding: 8px 0;
  position: relative;
  padding-left: 28px;
}

.comparison-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  top: 8px;
  font-weight: 700;
  font-size: 14px;
}

.comparison-col-online .comparison-list li {
  color: #64748B;
}

.comparison-col-online .comparison-list li::before {
  color: #94A3B8;
}

.comparison-col-aziendale .comparison-list li {
  color: var(--text-secondary);
}

.comparison-col-aziendale .comparison-list li::before {
  content: '✓';
  color: var(--accent);
}

/* Sezione "Perché è importante" (dark) */
.ai-growth-text {
  max-width: 700px;
  margin-bottom: 56px;
}

.ai-growth-text p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.ai-cta-block {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
}

/* Responsive */
@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .comparison-col {
    padding: 24px;
  }
  .ai-cta-block {
    padding: 32px 20px;
  }
  .ai-cta-block .btn-primary {
    display: block;
    width: 100%;
    white-space: nowrap;
    font-size: 14px;
    padding: 14px 20px;
  }
}
