/* ============================================================
   Gestionale Oleificio — main.css  (restyling "Blu Industriale")
   Palette: blu ardesia + oro ambrato
   Font: Inter (premium SaaS reference)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');


/* 1. CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  /* Brand palette */
  --primary:              #1B3A4B;
  --primary-dark:         #0F2333;
  --primary-light:        #EBF2F7;
  --accent:               #C9A227;
  --accent-deep:          #A8861B;
  --accent-light:         #FBF6E7;

  /* Neutrals */
  --dark:                 #211D18;
  --dark-mid:             #3A352D;
  --medium-gray:          #5C554A;
  --light-gray:           #F4EFE4;
  --border:               #E4DCCB;
  --white:                #FFFFFF;
  --surface:              #FBF9F3;

  /* Typography */
  --font-display:         'Fraunces', Georgia, serif;
  --font-sans:            'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:            'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --container-max:        1280px;
  --nav-height:           72px;
  --section-py:           clamp(5rem, 10vw, 8rem);

  /* Radii */
  --radius-sm:            6px;
  --radius-md:            10px;
  --radius-lg:            16px;
  --radius-xl:            24px;

  /* Shadows */
  --shadow-sm:            0 1px 3px rgba(33, 29, 24, 0.07), 0 1px 2px rgba(33, 29, 24, 0.05);
  --shadow-md:            0 4px 16px rgba(33, 29, 24, 0.09), 0 2px 6px rgba(33, 29, 24, 0.06);
  --shadow-lg:            0 10px 40px rgba(33, 29, 24, 0.12), 0 4px 12px rgba(33, 29, 24, 0.07);
  --shadow-xl:            0 20px 60px rgba(33, 29, 24, 0.15), 0 8px 24px rgba(33, 29, 24, 0.08);

  /* Motion */
  --transition:           200ms ease;
  --ease-spring:          cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* 2. Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* L'header e' fisso: senza questo margine il titolo di destinazione di ogni
   ancora finisce nascosto sotto la barra. */
[id] { scroll-margin-top: calc(var(--nav-height) + 28px); }
body {
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, video, canvas, svg { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; border-spacing: 0; }


/* 3. Typography
   ------------------------------------------------------------ */
h1, h2 { font-family: var(--font-display); }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
p { line-height: 1.7; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--medium-gray); line-height: 1.7; }
strong { font-weight: 600; }
small { font-size: 0.85em; }
.text-center { text-align: center; }


/* 4. Layout Utilities
   ------------------------------------------------------------ */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: var(--section-py) 0; }
.bg-light { background: var(--light-gray); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-label {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}
.section-header { margin-bottom: 3rem; }
.section-header p { margin-top: 0.75rem; max-width: 640px; }
.section-header.text-center p { margin-left: auto; margin-right: auto; }

.grid { display: grid; grid-template-columns: repeat(var(--cols, 1), 1fr); gap: var(--gap, 1.5rem); }
.grid-2 { --cols: 2; }
.grid-3 { --cols: 3; }
.grid-4 { --cols: 4; }
.flex { display: flex; align-items: center; gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-center { justify-content: center; }
.flex-between { justify-content: space-between; }
.spacer { flex: 1; }


/* 5. Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              opacity var(--transition), transform var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  user-select: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(27,58,75,0.25);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(27,58,75,0.30);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--primary);
  color: var(--white);
}
.btn-white { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-white:hover, .btn-white:focus-visible { opacity: 0.92; }
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(0.92); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.825rem; }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }


/* 6. Navigation — Glassmorphism
   ------------------------------------------------------------ */
header.site-header {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(251, 249, 243, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), background var(--transition);
}
@media (max-width: 640px) {
  header.site-header { top: 8px; left: 8px; right: 8px; border-radius: 14px; }
}
header.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 24px rgba(33, 29, 24, 0.08);
}
header.site-header > .container { height: 100%; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 34px;
  width: auto;
  display: block;
}
.footer-logo-img {
  height: 40px;
  width: auto;
  display: block;
}
@media (max-width: 640px) {
  .nav-logo-img { height: 26px; }
}
.nav-menu { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--medium-gray);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-mobile-cta { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; border-radius: var(--radius-sm); transition: background var(--transition); }
.nav-toggle:hover { background: var(--light-gray); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* 7. Hero
   ------------------------------------------------------------ */
.hero {
  padding-top: calc(var(--nav-height) + 5rem);
  padding-bottom: 6rem;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface) 0%, var(--primary-light) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(27, 58, 75, 0.08);
  color: var(--primary);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(27, 58, 75, 0.15);
}
.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--dark);
  margin-bottom: 1.25rem;
}
.hero-title span { color: var(--primary); }
.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  color: var(--medium-gray);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
}
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--medium-gray);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.65; transform: scale(1.3); } }
.hero-visual { position: relative; }
.hero-graphic {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--primary-light);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(27, 58, 75, 0.1);
}
.hero-float-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.9rem 1.1rem;
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.hero-float-card.card-tl { top: -1.25rem; left: -1.25rem; }
.hero-float-card.card-br { bottom: -1.25rem; right: -1.25rem; }

/* Hero mockup iframe — scalato per mostrare la maschera intera (1440px) */
.hero-mockup-frame {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  /* Trick: rendiamo l'iframe a viewport "logico" 1440x1080 e scaliamo
     proporzionalmente fino a riempire il contenitore .hero-graphic (4/3).
     Usiamo container queries via clamp() su width per scaling fluido. */
}
.hero-mockup-frame iframe {
  /* Viewport logico fisso */
  width: 1440px;
  height: 1080px;
  /* Centrato + scalato per riempire al 100% il wrapper */
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  /* scale calcolato: contenitore 100% / 1440 px logici.
     CSS calc usa unità relative al parent (cqw richiede container-query). */
  transform: translate(-50%, -50%) scale(calc(100cqw / 1440));
  border: none;
  display: block;
  border-radius: 0;
}
.hero-mockup-frame {
  container-type: inline-size;
}


/* 8. Stats Bar — Dark inversion
   ------------------------------------------------------------ */
.stats-bar {
  background: var(--dark);
  padding: 3rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.stat-value {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-label { font-size: 0.875rem; color: rgba(255, 255, 255, 0.55); margin-top: 0.4rem; line-height: 1.4; }


/* 9. Cards
   ------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.card-icon svg { width: 22px; height: 22px; color: var(--primary); stroke: var(--primary); fill: none; }
.card-icon.accent { background: var(--accent-light); }
.card-icon.accent svg { color: var(--accent); stroke: var(--accent); }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--dark); line-height: 1.3; }
.card-text { color: var(--medium-gray); font-size: 0.925rem; line-height: 1.65; }
.card-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--primary); font-size: 0.9rem; font-weight: 600; margin-top: 1.25rem; transition: gap var(--transition), color var(--transition); }
.card-link:hover { gap: 0.65rem; color: var(--primary-dark); }
.card-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.card-highlighted { border-color: var(--primary); background: var(--primary-light); }

.module-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.module-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--primary-light);
}
.module-card__media img,
.module-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.module-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}
.module-card .card-link {
  margin-top: auto;
  padding-top: 1.25rem;
}


/* 10. Feature Section
   ------------------------------------------------------------ */
.features-split { display: grid; grid-template-columns: 3fr 2fr; align-items: center; gap: 5rem; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.feature-item { display: flex; align-items: flex-start; gap: 1rem; }
.feature-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-check svg { width: 14px; height: 14px; stroke: var(--primary); fill: none; }
.feature-text { line-height: 1.6; }
.feature-text strong { display: block; font-weight: 600; margin-bottom: 0.25rem; color: var(--dark); }
.feature-text p { color: var(--medium-gray); font-size: 0.95rem; }
.feature-visual {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}


/* 11. Pain Point / Solution cards
   ------------------------------------------------------------ */
.pain-solution-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.pain-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow var(--transition);
}
.pain-card:hover { box-shadow: var(--shadow-md); }
.pain-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.pain-label.problem { color: #DC2626; }
.pain-label.solution { color: var(--primary); }
.pain-text { font-size: 0.925rem; color: var(--medium-gray); line-height: 1.65; }
.pain-arrow { text-align: center; font-size: 1.5rem; color: var(--medium-gray); }


/* 12. Integration logos row
   ------------------------------------------------------------ */
.integrations-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}
.integration-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.integration-pill:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.integration-pill svg { width: 16px; height: 16px; stroke: var(--primary); fill: none; }


/* 13. Case Study Cards
   ------------------------------------------------------------ */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.case-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-header { background: var(--primary-light); padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1rem; }
.case-header-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.case-header-icon svg { width: 22px; height: 22px; stroke: white; fill: none; }
.case-header-text h3 { font-size: 1rem; font-weight: 600; color: var(--dark); }
.case-header-text p { font-size: 0.85rem; color: var(--medium-gray); }
.case-body { padding: 1.5rem 2rem; }
.case-quote { font-style: italic; color: var(--medium-gray); font-size: 0.925rem; line-height: 1.7; margin-bottom: 1.25rem; }
.case-results { display: flex; gap: 1.5rem; }
.case-result-item { text-align: center; }
.case-result-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -0.02em; }
.case-result-label { font-size: 0.75rem; color: var(--medium-gray); margin-top: 0.25rem; }


/* 14. Demo Form
   ------------------------------------------------------------ */
.demo-form-wrap {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 0.875rem; font-weight: 500; color: var(--dark); display: block; }
label .required { color: #DC2626; margin-left: 0.2rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 58, 75, 0.12);
}
input::placeholder, textarea::placeholder { color: var(--medium-gray); opacity: 0.65; }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}
.form-group.botcheck { display: none !important; }
.form-error { font-size: 0.8rem; color: #DC2626; display: none; }
.form-error.visible { display: block; }
.form-failed { background: #FEF2F2; border: 1px solid #FECACA; border-radius: var(--radius-md); padding: 1rem 1.25rem; color: #991B1B; font-size: 0.925rem; display: none; margin-bottom: 1rem; }
.form-note { font-size: 0.8rem; color: var(--medium-gray); margin-top: 0.75rem; }
.recaptcha-wrap { margin-top: 0.5rem; }
.checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; margin-top: 0.15rem; cursor: pointer; accent-color: var(--primary); }
.checkbox-group label { cursor: pointer; font-size: 0.9rem; color: var(--medium-gray); line-height: 1.5; }


/* 15. CTA Band — Gradient with noise
   ------------------------------------------------------------ */
.cta-band {
  position: relative;
  background: linear-gradient(135deg, #0F2333 0%, #1B3A4B 50%, #122840 100%);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}
.cta-band h2 { color: var(--white); margin-bottom: 1rem; position: relative; }
.cta-band p { color: rgba(255,255,255,0.72); margin-bottom: 2rem; font-size: 1.05rem; max-width: 520px; margin-left: auto; margin-right: auto; position: relative; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }


/* 16. Footer
   ------------------------------------------------------------ */
footer.site-footer { background: #050E15; color: rgba(255,255,255,0.65); padding: 5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; margin-bottom: 3rem; }
.footer-logo { font-size: 1.35rem; font-weight: 800; color: var(--white); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; letter-spacing: -0.025em; text-decoration: none; }
.footer-desc { font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; color: rgba(255,255,255,0.5); }
.footer-social { display: flex; align-items: center; gap: 0.75rem; }
.footer-social a { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; transition: background var(--transition); color: rgba(255,255,255,0.65); }
.footer-social a:hover { background: var(--primary); color: var(--white); }
.footer-social a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.footer-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); margin-bottom: 1.25rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.9rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-contact p { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; margin-bottom: 0.6rem; color: rgba(255,255,255,0.6); line-height: 1.5; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; stroke: rgba(196, 154, 43, 0.85); fill: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.copyright { font-size: 0.85rem; color: rgba(255,255,255,0.35); }
.footer-legal { display: flex; align-items: center; gap: 1.5rem; }
.footer-legal a { font-size: 0.85rem; color: rgba(255,255,255,0.4); transition: color var(--transition); }
.footer-legal a:hover { color: var(--white); }
.footer-poweredby { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 8px; }
.footer-poweredby a { color: rgba(196, 154, 43, 0.85); text-decoration: none; font-weight: 600; }


/* 17. Animations
   ------------------------------------------------------------ */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
  transition-delay: var(--delay, 0ms);
}
[data-animate].is-visible { opacity: 1; transform: translateY(0); }


/* 20. Family Switcher — ecosistema AdHoc Oil
   ------------------------------------------------------------ */
.family-switcher {
  position: relative;
  background:
    radial-gradient(900px 380px at 50% -30%, rgba(201, 162, 39, .10), transparent 60%),
    var(--light-gray);
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 7vw, 5.5rem) 0;
}
.family-switcher__head { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.family-switcher__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 1rem;
}
.family-switcher__eyebrow::before,
.family-switcher__eyebrow::after {
  content: ''; width: 28px; height: 1px; background: var(--accent);
}
.family-switcher__title {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 500; letter-spacing: -0.015em;
}
.family-switcher__title em {
  font-style: italic; color: var(--accent-deep); position: relative; white-space: nowrap;
}
.family-switcher__title em::after {
  content: ''; position: absolute; left: 2%; right: 2%; bottom: .04em; height: .16em;
  background: var(--accent); opacity: .35; border-radius: 100% 60% 100% 60%; z-index: -1;
}
.family-switcher__sub { color: var(--medium-gray); margin-top: 0.75rem; line-height: 1.7; }
.family-switcher__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.family-card {
  position: relative;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.9rem 1.75rem 1.6rem;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
a.family-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.family-card__logo { height: 26px; width: auto; max-width: 100%; object-fit: contain; align-self: flex-start; }
.family-card__desc { font-size: 0.9rem; color: var(--medium-gray); line-height: 1.65; }
.family-card__domain {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-deep);
}
.family-card__cta { margin-top: auto; font-size: 0.88rem; font-weight: 600; color: var(--primary); }
a.family-card:hover .family-card__cta { color: var(--accent-deep); }
.family-card--current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}
.family-card__here {
  position: absolute; top: -11px; right: 18px;
  background: var(--accent); color: var(--dark);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}
@media (max-width: 900px) {
  .family-switcher__grid { grid-template-columns: 1fr; }
  .family-card__logo { height: 30px; }
}


/* 19. Responsive
   ------------------------------------------------------------ */
@media (max-width: 1200px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: -1px;
    right: -1px;
    max-height: calc(100vh - var(--nav-height) - 40px);
    max-height: calc(100dvh - var(--nav-height) - 40px);
    background: var(--white);
    flex-direction: column;
    padding: 1.25rem;
    overflow-y: auto;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 0.875rem 0; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; width: 100%; justify-content: space-between; }
  .nav-link:hover, .nav-link.active { background: transparent; color: var(--primary); }
  .nav-mobile-cta { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
  .nav-mobile-cta .btn { width: 100%; justify-content: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; max-width: 480px; margin: 0 auto; width: 100%; }
  .hero-lead { max-width: 100%; }
  .hero-float-card { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .grid-3 { --cols: 2; }
  .grid-4 { --cols: 2; }
  .features-split { grid-template-columns: 1fr; gap: 2rem; }
  .feature-visual { display: none; }
  .case-grid { grid-template-columns: 1fr; }
  .pain-solution-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .section-header { margin-bottom: 2rem; }
  .cta-band { padding: 4rem 0; }
  .demo-form-wrap { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  :root { --section-py: clamp(3rem, 8vw, 5rem); }
  .container { padding: 0 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item::before { display: none; }
  .grid-2 { --cols: 1; }
  .grid-3 { --cols: 1; }
  .grid-4 { --cols: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  footer.site-footer { padding: 3rem 0 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-legal { justify-content: center; flex-wrap: wrap; }
  .cta-band { padding: 3rem 0; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; width: 100%; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .stats-bar { padding: 2rem 0; }
  .card { padding: 1.5rem; }
  .case-results { gap: 1rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.75rem; }
  .nav-logo { font-size: 1.2rem; }
  .hero-title { font-size: 2rem; letter-spacing: -0.02em; }
}


/* 20. Feature Slide Deck (integrazioni)
   ------------------------------------------------------------ */
.feature-visual--slides {
  padding: 0;
  background: none;
  min-height: auto;
  align-items: stretch;
  justify-content: flex-start;
}
.feature-visual--slides .feature-slide-deck { width: 100%; }

.feature-slide-deck {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--dark);
}
.feature-slides {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}
.feature-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.6s ease;
  background: var(--surface);
}
.feature-slide.active { opacity: 1; }
.feature-slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
}
.process-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}
.process-dot.active {
  background: var(--white);
  transform: scale(1.3);
}


/* Cookie consent banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0A0F14;
  color: rgba(255,255,255,0.85);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  font-size: 14px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
}
#cookie-banner p { margin: 0; flex: 1; }
#cookie-banner a { color: rgba(196, 154, 43, 0.9); }
#cookie-banner button {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
}
#cookie-banner button:hover { background: var(--primary-dark); }


/* ============================================================
   Supply Chain Diagram — Catena del valore
   ============================================================ */

.chain-section {
  background: var(--light-gray);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.chain-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 3rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chain-stage {
  flex: 1;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--chain-delay, 0ms);
}

.chain-section.chain-active .chain-stage {
  opacity: 1;
  transform: translateY(0);
}

.chain-stage--last {
  border-color: var(--primary);
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--white) 100%);
}

.chain-stage__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chain-stage__icon svg { width: 22px; height: 22px; }

.chain-stage__icon--1 { background: var(--primary-light); }
.chain-stage__icon--1 svg { stroke: var(--primary); }
.chain-stage__icon--2 { background: rgba(196,154,43,0.1); }
.chain-stage__icon--2 svg { stroke: var(--accent); }
.chain-stage__icon--3 { background: var(--primary-light); }
.chain-stage__icon--3 svg { stroke: var(--primary); }
.chain-stage__icon--4 { background: rgba(196,154,43,0.1); }
.chain-stage__icon--4 svg { stroke: var(--accent); }
.chain-stage__icon--5 { background: var(--primary); }
.chain-stage__icon--5 svg { stroke: #fff; }

.chain-stage__title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.chain-stage__desc {
  font-size: 0.78rem;
  color: var(--medium-gray);
  line-height: 1.55;
  margin: 0;
}

.chain-stage__tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
}

.chain-stage__tags li {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 100px;
  padding: 2px 8px;
  display: inline-block;
  width: fit-content;
  letter-spacing: 0.02em;
}

.chain-complete-badge {
  margin-top: 0.5rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s ease 1.5s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1) 1.5s;
}

.chain-section.chain-active .chain-complete-badge {
  opacity: 1;
  transform: scale(1);
}

.chain-complete-badge span {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--primary);
  border-radius: 100px;
  padding: 3px 10px;
}

/* Connector arrows between stages */
.chain-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
  align-self: center;
}

.chain-arrow__line {
  flex: 1;
  height: 2px;
  background: rgba(27, 58, 75, 0.1);
  position: relative;
  overflow: hidden;
}

.chain-arrow__fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  transition-delay: var(--chain-delay, 0ms);
}

.chain-section.chain-active .chain-arrow__fill {
  transform: scaleX(1);
}

.chain-arrow__tip {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  transition-delay: calc(var(--chain-delay, 0ms) + 350ms);
}

.chain-section.chain-active .chain-arrow__tip {
  opacity: 0.7;
}

@media (max-width: 992px) {
  .chain-diagram {
    flex-direction: column;
    overflow-x: visible;
  }

  .chain-stage {
    flex-direction: row;
    align-items: flex-start;
    min-width: 0;
    transform: translateX(-20px);
  }

  .chain-section.chain-active .chain-stage {
    transform: translateX(0);
  }

  .chain-stage__content { flex: 1; }

  .chain-arrow {
    flex-direction: column;
    width: 2px;
    height: 24px;
    margin-left: 24px;
    align-self: auto;
  }

  .chain-arrow__line { flex: 1; width: 2px; height: 100%; }
  .chain-arrow__fill {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.35s ease;
    transition-delay: var(--chain-delay, 0ms);
  }
  .chain-section.chain-active .chain-arrow__fill { transform: scaleY(1); }
  .chain-arrow__tip { display: none; }
}


/* ============================================================
   26. Modules Showcase — 2-colonne sticky
   ============================================================ */
.modules-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 3rem;
  align-items: start;
}

/* Colonna sinistra: lista moduli */
.modules-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.module-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  font-family: inherit;
}
.module-item:hover {
  background: var(--surface);
  border-color: rgba(11, 41, 66, 0.08);
}
.module-item.active {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.module-item.active::before {
  content: '';
  position: absolute;
  left: -1.5px;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.module-item__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.module-item__icon.accent {
  background: rgba(217, 119, 6, 0.12);
  color: var(--accent);
}
.module-item.active .module-item__icon {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}
.module-item.active .module-item__icon.accent {
  background: var(--accent);
  color: white;
}
.module-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.module-item__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}
.module-item__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.55;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}
.module-item.active .module-item__text {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.25rem;
}
.module-item__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 0.5rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
.module-item.active .module-item__cta {
  max-height: 30px;
  opacity: 1;
}
.module-item__cta:hover { text-decoration: underline; }

/* Colonna destra: preview sticky */
.modules-preview {
  position: relative;
}
.modules-preview__sticky {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.modules-preview__window {
  background: var(--dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.modules-preview__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1a2332;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.modules-preview__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red    { background: #ff5f57; }
.dot-amber  { background: #febc2e; }
.dot-green  { background: #28c840; }
.modules-preview__url {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.3px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  margin: 0 0.5rem;
}
.modules-preview__zoom {
  width: 28px; height: 28px;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65);
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modules-preview__zoom:hover {
  background: var(--primary);
  color: white;
}
.modules-preview__img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  transition: opacity 0.35s ease;
}
.modules-preview__img.swapping { opacity: 0.25; }
.modules-preview__hint {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  margin: 0;
}
.inline-zoom {
  display: inline-block;
  padding: 1px 5px;
  background: var(--surface);
  border: 1px solid rgba(11, 41, 66, 0.12);
  border-radius: 3px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  margin: 0 2px;
}

/* Lightbox fullscreen */
.mask-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 41, 66, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 9999;
  cursor: zoom-out;
  animation: lightbox-fade 0.2s ease;
}
.mask-lightbox[hidden] { display: none; }
@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mask-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  cursor: default;
  animation: lightbox-zoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lightbox-zoom {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.mask-lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.mask-lightbox__close:hover { background: rgba(255,255,255,0.2); }

/* Responsive: stack su mobile/tablet */
@media (max-width: 1024px) {
  .modules-showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .modules-preview__sticky { position: relative; top: 0; }
  .modules-preview { order: -1; }  /* preview in alto su mobile */
  .module-item__text,
  .module-item__cta {
    max-height: none;
    opacity: 1;
    margin-top: 0.5rem;
  }
}

@media (max-width: 640px) {
  .module-item {
    padding: 1rem;
    grid-template-columns: 40px 1fr;
    gap: 0.75rem;
  }
  .module-item__icon { width: 40px; height: 40px; }
  .module-item__title { font-size: 0.98rem; }
  .modules-preview__chrome { padding: 8px 10px; }
  .modules-preview__url { font-size: 10px; }
}


/* ============================================================
   27. Hero v2 — Data-driven dashboard
   (scoped sotto .hero-v2 per non collidere con la hero originale)
   ============================================================ */
.hero-v2 {
  position: relative;
  padding: calc(var(--nav-height) + 64px) 0 90px;
  overflow: hidden;
}
.hero-v2__bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(11,41,66,.08) 1px, transparent 1.5px);
  background-size: 28px 28px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 80%);
}
.hero-v2 .container { position: relative; z-index: 5; }
.hero-v2__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}

/* Copy */
.hero-v2__copy { min-width: 0; }
.hero-v2__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 14px;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 100px;
  font-size: 13px; color: var(--gray, #57503F); font-weight: 500;
  margin-bottom: 28px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.hero-v2__pill {
  padding: 4px 10px;
  background: #DCFCE7; color: #16A34A;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.hero-v2__pill::before {
  content: ''; width: 6px; height: 6px;
  background: #16A34A; border-radius: 50%;
  box-shadow: 0 0 8px #16A34A;
  animation: heroV2Ping 1.6s ease-in-out infinite;
}
@keyframes heroV2Ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.2); }
}
.hero-v2__title {
  font-size: clamp(36px, 4.2vw, 60px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.015em;
  margin-bottom: 24px;
  color: var(--dark, #0B2942);
}
.hero-v2__accent {
  color: #A8861B;
  position: relative;
  display: inline-block;
}
.hero-v2__accent::before {
  content: '';
  position: absolute; left: -4px; right: -4px; bottom: 0;
  height: 14px;
  background: rgba(201, 162, 39, .28);
  z-index: -1;
  border-radius: 100% 60% 100% 60%;
}
.hero-v2__title small {
  display: block;
  font-size: .4em;
  font-weight: 500;
  color: #8A8175;
  margin-top: 14px;
  letter-spacing: 0;
}
.hero-v2__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--gray, #57503F);
  margin-bottom: 36px;
  max-width: 500px;
}
.hero-v2__lead strong { color: var(--dark, #0B2942); font-weight: 600; }

.hero-v2__cta { display: flex; gap: 14px; margin-bottom: 44px; flex-wrap: wrap; }
.hero-v2__btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: var(--primary, #0B2942);
  color: #fff;
  border-radius: 10px;
  font-weight: 600; font-size: 15px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(11,41,66,.25);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.hero-v2__btn-primary::after { content: '→'; transition: transform .2s; }
.hero-v2__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(11,41,66,.32);
  background: #133B5C;
}
.hero-v2__btn-primary:hover::after { transform: translateX(4px); }
.hero-v2__btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 10px;
  font-weight: 600; font-size: 15px;
  color: var(--dark, #0B2942);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.hero-v2__btn-outline:hover { border-color: #1B3A4B; transform: translateY(-2px); }

.hero-v2__trust {
  padding-top: 28px;
  border-top: 1px solid var(--border, #E2E8F0);
}
.hero-v2__trust-label {
  font-size: 11px; color: #8A8175;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 14px; font-weight: 600;
}
.hero-v2__trust-logos {
  display: flex; gap: 28px; align-items: center;
  flex-wrap: wrap;
  color: var(--gray, #57503F);
  font-weight: 700; font-size: 14px;
  opacity: .65;
}

/* Visual: dashboard */
.hero-v2__visual { position: relative; min-width: 0; }

.hero-dash {
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(11,41,66,.18), 0 0 0 1px rgba(11,41,66,.04);
}
.hero-dash__chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #F8FAFC, #F1F5F9);
  border-bottom: 1px solid var(--border, #E2E8F0);
}
.hero-dash__dot { width: 11px; height: 11px; border-radius: 50%; }
.hero-dash__dot--r { background: #ff5f57; }
.hero-dash__dot--y { background: #febc2e; }
.hero-dash__dot--g { background: #28c840; }
.hero-dash__url {
  flex: 1; text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: #8A8175;
  background: #F4F7FB;
  padding: 5px 12px;
  border-radius: 5px;
  margin: 0 16px;
}
.hero-dash__live {
  background: #DCFCE7; color: #16A34A;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 5px;
}
.hero-dash__live::before {
  content: ''; width: 5px; height: 5px;
  background: #16A34A; border-radius: 50%;
  animation: heroV2Ping 1.6s ease-in-out infinite;
}
.hero-dash__body { padding: 24px; }
.hero-dash__title {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.hero-dash__title h3 {
  font-size: 16px; font-weight: 600; color: var(--dark, #0B2942);
  margin: 0;
}
.hero-dash__date {
  font-size: 12px; color: #8A8175;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* KPI */
.hero-dash__kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 22px;
}
.hero-dash__kpi {
  background: #F4F7FB;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 10px;
  padding: 14px;
}
.hero-dash__kpi-lbl {
  font-size: 10.5px; color: #8A8175;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.hero-dash__kpi-val {
  font-size: 24px; font-weight: 700;
  color: var(--dark, #0B2942);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.hero-dash__kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  color: #16A34A; margin-top: 2px;
}
.hero-dash__kpi--accent {
  background: linear-gradient(135deg, var(--primary, #0B2942), #133B5C);
  border-color: transparent;
}
.hero-dash__kpi--accent .hero-dash__kpi-lbl { color: rgba(255,255,255,.7); }
.hero-dash__kpi--accent .hero-dash__kpi-val { color: #fff; }

/* Chart + tanks */
.hero-dash__cols {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.hero-dash__chart-card,
.hero-dash__tanks {
  background: #F4F7FB;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 10px;
  padding: 16px;
}
.hero-dash__chart-card h4,
.hero-dash__tanks h4 {
  font-size: 12px; font-weight: 600;
  color: var(--gray, #57503F);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 0 0 14px;
  display: flex; justify-content: space-between;
}
.hero-dash__legend {
  display: flex; gap: 12px;
  text-transform: none; letter-spacing: 0;
  font-size: 10.5px; color: #8A8175;
  font-weight: 500;
}
.hero-dash__legend-a::before { content: '●'; margin-right: 4px; color: #1B3A4B; }
.hero-dash__legend-b::before { content: '●'; margin-right: 4px; color: #C9A227; }
.hero-dash__chart { position: relative; height: 130px; }
.hero-dash__chart svg { width: 100%; height: 100%; overflow: visible; }
.hero-dash__area-a  { fill: url(#heroDashGradA); opacity: .25; }
.hero-dash__line-a  { fill: none; stroke: #1B3A4B; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-dash__area-b  { fill: #C9A227; opacity: .08; }
.hero-dash__line-b  { fill: none; stroke: #C9A227; stroke-width: 2; stroke-dasharray: 4 3; opacity: .75; }
.hero-dash__dot-live {
  fill: #fff; stroke: #1B3A4B; stroke-width: 2.5;
  animation: heroV2PulseDot 1.6s ease-in-out infinite;
}
@keyframes heroV2PulseDot {
  0%, 100% { r: 5; }
  50% { r: 7; }
}

/* Tanks */
.hero-tank {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.hero-tank__code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 600; color: #1B3A4B;
  min-width: 64px;
}
.hero-tank__bar {
  flex: 1; height: 6px;
  background: #E2E8F0;
  border-radius: 3px; overflow: hidden;
}
.hero-tank__fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #1B3A4B, #4A6B82);
  width: 0;
  animation: heroV2FillBar 1.5s ease-out forwards;
}
.hero-tank--bio  .hero-tank__fill { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.hero-tank--dop  .hero-tank__fill { background: linear-gradient(90deg, #DC2626, #F87171); }
.hero-tank--aromi .hero-tank__fill { background: linear-gradient(90deg, #D97706, #FBBF24); }
@keyframes heroV2FillBar { to { width: var(--pct, 50%); } }
.hero-tank__pct {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 600;
  color: var(--gray, #57503F);
  min-width: 40px; text-align: right;
}

/* Activity */
.hero-dash__activity {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary, #0B2942), #133B5C);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  color: #fff;
  overflow: hidden;
}
.hero-dash__act-ico {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px;
}
.hero-dash__feed {
  flex: 1; overflow: hidden;
  position: relative; height: 16px;
}
.hero-dash__feed-track {
  position: absolute; width: 100%;
  animation: heroV2FeedScroll 18s linear infinite;
}
@keyframes heroV2FeedScroll {
  0%   { top: 100%; }
  20%  { top: 0; }
  25%  { top: 0; }
  45%  { top: -100%; }
  50%  { top: -100%; }
  70%  { top: -200%; }
  75%  { top: -200%; }
  95%  { top: -300%; }
  100% { top: -300%; }
}
.hero-dash__feed-item {
  height: 16px;
  font-size: 12px; line-height: 16px;
  display: flex; gap: 8px;
}
.hero-dash__feed-item strong { color: #E7D8A6; font-weight: 600; }
.hero-dash__feed-time {
  color: rgba(255,255,255,.5);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
}

/* Floating cards */
.hero-float {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px rgba(11,41,66,.15);
  z-index: 6;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  animation: heroV2Bob 7s ease-in-out infinite;
}
@keyframes heroV2Bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-float--1 { top: -28px; right: -28px; animation-delay: 0s; }
.hero-float--2 { bottom: 40px; left: -42px; animation-delay: -3.5s; }
.hero-float__ico {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.hero-float--1 .hero-float__ico { background: #DCFCE7; color: #16A34A; }
.hero-float--2 .hero-float__ico { background: #FEF3C7; color: #D97706; }
.hero-float__lbl {
  font-size: 10.5px; color: #8A8175;
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.hero-float__val { font-weight: 700; color: var(--dark, #0B2942); margin-top: 1px; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-v2__grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-float--1 { right: 0; top: -20px; }
  .hero-float--2 { left: 0; bottom: 20px; }
}
@media (max-width: 640px) {
  .hero-v2 { padding: calc(var(--nav-height) + 48px) 0 60px; }
  .hero-dash__kpis { grid-template-columns: repeat(2, 1fr); }
  .hero-dash__cols { grid-template-columns: 1fr; }
  .hero-v2__trust-logos { gap: 14px; font-size: 12px; }
  .hero-float { display: none; }
}

/* ============================================================
   BANDI E FINANZIAMENTI
   ============================================================ */
.bandi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.bandi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s ease, transform .2s ease;
}
.bandi-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bandi-card__tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-light);
  border-radius: 3px;
  padding: 4px 9px;
}
.bandi-card__title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.25;
  color: var(--primary);
  margin: 2px 0 0;
}
.bandi-card__desc { font-size: 15px; line-height: 1.65; color: var(--medium-gray); margin: 0; }
.bandi-card__meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--dark-mid);
  font-weight: 600;
}

/* Rassegna automatica — layout compatto */
.bandi-feed {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 26px 20px;
}
.bandi-feed__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.bandi-feed__head h3 {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--primary);
  margin: 0;
}
.bandi-feed__updated { font-size: 12px; color: var(--medium-gray); }
.bandi-feed__note { font-size: 12px; color: var(--medium-gray); margin: 0 0 14px; line-height: 1.5; }

/* due colonne su desktop, righe dense */
.bandi-feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
}
.bandi-feed__item { border-top: 1px solid var(--border); }
.bandi-feed__item a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
}
.bandi-feed__item a:hover .bandi-feed__title { color: var(--accent-deep); }
.bandi-feed__title {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--dark);
  /* massimo due righe: mantiene la griglia ordinata */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bandi-feed__src {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.bandi-feed__deadline { color: #B3261E; font-weight: 700; }
.bandi-feed__loading, .bandi-feed__empty { padding: 14px 0; color: var(--medium-gray); font-size: 14px; }

@media (max-width: 860px) {
  .bandi-feed__list { grid-template-columns: 1fr; }
}

.bandi-cta {
  margin-top: 44px;
  text-align: center;
}
.bandi-cta p { color: var(--medium-gray); margin-bottom: 18px; }

@media (max-width: 640px) {
  .bandi-feed { padding: 22px 20px 8px; }
  .bandi-feed__item a { grid-template-columns: 1fr; }
}
/* ============================================================
   LOGHI CLIENTI — componente condiviso
   Usato da: gestionale-oleificio, gestionale-frantoio, adhocoil
   ============================================================ */

.clienti {
  padding: 0 0 var(--section-padding-y, 72px);
}

.clienti__inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 48px 40px;
}

.clienti__label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--medium-gray);
  margin-bottom: 8px;
}

.clienti__title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(24px, 3vw, 32px);
  text-align: center;
  color: var(--primary, #1B3A4B);
  margin: 0 0 40px;
}

/* fila dei loghi: si avvolgono e restano centrati */
.clienti__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 44px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.clienti__item { flex: 0 1 auto; }

.clienti__item img {
  display: block;
  height: 84px;                 /* altezza visiva uniforme */
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .82;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.clienti__item img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
}

.clienti__item a { display: inline-block; }

/* versione piu' piccola (per aree secondarie / footer) */
.clienti--compact .clienti__item img { height: 56px; max-width: 140px; }
.clienti--compact .clienti__inner { padding: 28px 32px 26px; }

/* su fondo scuro (es. footer): loghi invertiti */
.clienti--dark .clienti__inner { background: transparent; border: 0; }
.clienti--dark .clienti__item img { filter: grayscale(100%) brightness(0) invert(1); opacity: .75; }
.clienti--dark .clienti__item img:hover { filter: grayscale(0%); opacity: 1; }

@media (max-width: 640px) {
  .clienti__inner { padding: 30px 22px 26px; }
  .clienti__item img { height: 60px; max-width: 130px; }
  .clienti__row { gap: 14px 24px; }
}

/* Contenuti: MES, tracciabilità/costi, BI */
.mes-note { text-align: center; font-size: 14px; color: var(--medium-gray); margin-top: 30px; }
.mes-note a { color: var(--accent-deep); }
