/* ===========================================================
   Manage+ — Design tokens (tema chiaro, palette dal logo)
   =========================================================== */

:root {
  --bg:        #F6F8FA;
  --surface:   #FFFFFF;
  --surface-2: #EEF2F6;
  --border:    #E2E8EF;
  --text:      #16212C;
  --text-dim:  #5B6B7C;
  --accent:    #2D6CDF;
  --accent-2:  #F5A623;
  --danger:    #E63946;
  --success:   #2FA84F;

  --font-display: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', monospace;

  --radius: 10px;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(22,33,44,0.04), 0 8px 24px rgba(22,33,44,0.05);
  --shadow-hover: 0 4px 10px rgba(22,33,44,0.06), 0 16px 32px rgba(22,33,44,0.08);
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 .5em; letter-spacing: -0.01em; color: var(--text); }

.icon { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.6; flex-shrink: 0; }
.icon-lg { width: 40px; height: 40px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent-2);
  border-radius: 2px;
  display: inline-block;
}

/* ---------- Header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; }
.logo-img { height: 34px; width: auto; display: block; }
nav.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav.main-nav a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; transition: color .15s; }
nav.main-nav a:hover { color: var(--accent); }
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(45,108,223,.25); }
.btn-primary:hover { transform: translateY(-1px); background: #2359C4; }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -30% -10% auto -10%;
  height: 600px;
  background: radial-gradient(ellipse at top, rgba(45,108,223,0.08), transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.3rem); }
.hero .sottotitolo { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 1.2em; }
.hero .claim { font-family: var(--font-mono); font-size: .88rem; color: var(--accent); }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; }
.hero-illustration { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(22,33,44,0.10)); }

.stat-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 56px;
  box-shadow: var(--shadow);
}
.stat-cell { background: var(--surface); padding: 22px 20px; }
.stat-value { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .82rem; color: var(--text-dim); margin-top: 6px; }

/* ---------- Sezioni generiche ---------- */
section { padding: 76px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.section-head p { color: var(--text-dim); font-size: 1.02rem; }

/* ---------- Problema ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.card h3 { font-size: 1.05rem; margin: 14px 0 8px; }
.card p { color: var(--text-dim); font-size: .93rem; margin: 0; }
.problem-card { border-top: 3px solid var(--danger); }
.problem-card .icon { stroke: var(--danger); }

/* ---------- Come funziona: ledger di step ---------- */
.steps-ledger { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.step-row {
  display: grid; grid-template-columns: 72px 44px 1fr 2fr;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.step-row:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-mono); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-weight: 700; align-self: stretch;
}
.step-icon { display:flex; align-items:center; justify-content:center; }
.step-icon .icon { width: 22px; height: 22px; }
.step-title { padding: 18px 16px; font-weight: 600; }
.step-text { padding: 18px 20px; color: var(--text-dim); font-size: .93rem; border-left: 1px solid var(--border); }

/* ---------- Benefici ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-dim); font-size: .9rem; }
.benefit-card li { margin-bottom: 6px; }
.benefit-icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Casi d'uso ---------- */
.case-card { display: flex; flex-direction: column; gap: 10px; }
.case-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.case-tag {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: rgba(45,108,223,0.08);
  padding: 3px 9px; border-radius: 4px; display: inline-block; width: fit-content;
}
.case-card h3 { font-size: 1rem; margin-top: 6px; }
.case-card p { flex-grow: 1; }
.case-more { font-size: .85rem; color: var(--accent); margin-top: 6px; font-weight: 600; }

/* ---------- Risorse ---------- */
.resources-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 24px; align-items: start; }
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface-2); box-shadow: var(--shadow);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-dim); }
.video-placeholder .icon { stroke: var(--text-dim); }
.video-placeholder p { margin: 0; font-size: .9rem; }
.resource-infographic { display: flex; flex-direction: column; gap: 12px; }
.infographic-thumb {
  width: 100%; height: auto; max-height: 420px; object-fit: cover; object-position: top;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
  display: block;
}
.downloads-row { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.download-btn { display: inline-flex; align-items: center; gap: 10px; }
.download-btn .icon { width: 20px; height: 20px; margin: 0; }

@media (max-width: 900px) {
  .resources-grid { grid-template-columns: 1fr; }
}

/* ---------- Automazione / soglie ---------- */
.automation-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: start; }
.rules-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.rules-table th, .rules-table td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.rules-table th { font-family: var(--font-mono); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; color: var(--text-dim); background: var(--surface-2); }
.rules-table td:first-child { color: var(--text); }
.rules-table td:last-child { color: var(--accent); font-weight: 600; }
.rules-table tr:last-child td { border-bottom: none; }
.automation-illustration { width: 100%; height: auto; }

/* ---------- Perché sceglierlo ---------- */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.why-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; font-size: .95rem; box-shadow: var(--shadow);
}
.why-list .icon { stroke: var(--success); width: 22px; height: 22px; margin-top: 1px; }

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, #EFF4FC, #FBF3E4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-section h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-section p { color: var(--text-dim); max-width: 520px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
footer.site-footer { padding: 52px 0 28px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a, .footer-col p { color: var(--text-dim); font-size: .9rem; margin: 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; font-size: .8rem; color: var(--text-dim); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Pagina caso studio ---------- */
.case-detail-header { padding: 56px 0 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.case-detail-body { padding: 50px 0; max-width: 760px; }
.case-detail-body p { color: var(--text-dim); margin-bottom: 1.3em; white-space: pre-line; }
.back-link { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); display: inline-block; margin-bottom: 20px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-illustration { max-width: 420px; margin: 0 auto; }
  .automation-grid { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .step-row { grid-template-columns: 56px 36px 1fr; }
  .step-text { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); }
  nav.main-nav { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .stat-bar { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
