:root {
  --bg: #fef9f3;
  --bg-alt: #f5ede2;
  --fg: #1a1a1a;
  --fg-muted: #6b6b6b;
  --accent: #c2410c;
  --accent-light: #fde8d8;
  --accent-dark: #9a3409;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --border: #e8d9c8;
  --radius: 12px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- NAVBAR --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254,249,243,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-tagline {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* --- HERO --- */
.hero {
  padding: 80px 32px 0;
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-bottom: 80px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--fg);
  margin-bottom: 24px;
}
.hero-headline em {
  color: var(--accent);
  font-style: italic;
}
.hero-lede {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 480px;
}

/* --- PHONE FRAME --- */
.hero-visual {
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 280px;
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.phone-screen {
  background: var(--bg);
  border-radius: 30px;
  overflow: hidden;
}
.screen-topbar {
  background: #f0ebe4;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.screen-dots {
  display: flex;
  gap: 5px;
}
.screen-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
}
.screen-dots span:first-child { background: #ff5f57; }
.screen-dots span:nth-child(2) { background: #febc2e; }
.screen-dots span:last-child { background: #28c840; }
.screen-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
}
.screen-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.job-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.job-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
}
.job-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.job-badge.urgente { background: #fef2f2; color: #dc2626; }
.job-badge.in-corso { background: #fff7ed; color: #c2410c; }
.job-detail {
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}
.job-meta {
  font-size: 10px;
  color: var(--fg-muted);
}
.quote-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--fg-muted);
  padding: 3px 0;
}
.quote-row.quote-total {
  font-weight: 700;
  color: var(--fg);
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
}
.status-track {
  display: flex;
  gap: 4px;
}
.status-step {
  flex: 1;
  font-size: 9px;
  text-align: center;
  padding: 4px 2px;
  border-radius: 4px;
  background: #f0ebe4;
  color: var(--fg-muted);
  font-weight: 500;
}
.status-step.done { background: #dcfce7; color: #16a34a; }
.status-step.active { background: #fde8d8; color: var(--accent); font-weight: 700; }

/* --- STAT STRIP --- */
.hero-stat-strip {
  background: var(--accent);
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 0;
}
.stat {
  flex: 1;
  text-align: center;
  padding: 28px 32px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  background: rgba(255,255,255,0.2);
  align-self: stretch;
  margin: 16px 0;
}

/* --- SHARED SECTION STYLES --- */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-eyebrow.light { color: rgba(255,255,255,0.6); }
.section-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--fg);
  margin-bottom: 20px;
}
.section-body {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 640px;
}

/* --- PROBLEMA --- */
.problema { padding: 96px 32px; background: var(--bg-alt); }
.problema-inner { max-width: 1200px; margin: 0 auto; }
.chaos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.chaos-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.chaos-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.chaos-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
}

/* --- FLUSSO --- */
.flusso { padding: 96px 32px; }
.flusso-inner { max-width: 1200px; margin: 0 auto; }
.timeline {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 2px;
}
.timeline-item {
  display: flex;
  gap: 32px;
  padding: 0 0 48px 0;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-num {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--bg);
}
.timeline-content { padding-top: 6px; }
.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.timeline-content p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 480px;
}

/* --- FUNZIONALITA --- */
.funzionalita { padding: 96px 32px; background: var(--bg-alt); }
.funzionalita-inner { max-width: 1200px; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.feature-card.feature-accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
}
.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card.feature-accent .feature-icon { background: var(--accent); color: white; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* --- MARGINE --- */
.margine {
  padding: 96px 32px;
  background: #1a1a1a;
}
.margine-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.margine-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: white;
  margin-bottom: 24px;
}
.margine-body {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 16px;
}
.margin-card {
  background: #252525;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.margin-card-header {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.margin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
}
.margin-row.margin-total {
  color: white;
  font-weight: 700;
  font-size: 16px;
}
.val.green { color: #4ade80; font-weight: 600; }
.val.red { color: #f87171; font-weight: 600; }
.margin-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }
.margin-pct {
  text-align: right;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: #4ade80;
  letter-spacing: -2px;
  margin-top: 8px;
}

/* --- CHIUSURA --- */
.chiusura {
  padding: 120px 32px;
  background: var(--accent);
  text-align: center;
}
.chiusura-inner { max-width: 720px; margin: 0 auto; }
.chiusura-ornament { margin-bottom: 32px; }
.chiusura-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: white;
  margin-bottom: 24px;
}
.chiusura-body {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

/* --- FOOTER --- */
.footer {
  background: #1a1a1a;
  padding: 40px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: white;
  margin-bottom: 4px;
}
.footer-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual { order: -1; }
  .phone-frame { width: 240px; }
  .margine-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .chaos-grid {
    grid-template-columns: 1fr;
  }
  .hero-stat-strip {
    flex-direction: column;
  }
  .stat-divider {
    width: auto;
    height: 1px;
    margin: 0 16px;
  }
  .timeline::before { display: none; }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .nav-inner { padding: 12px 20px; }
  .hero, .problema, .flusso, .funzionalita, .margine, .chiusura { padding-left: 20px; padding-right: 20px; }
}