/* ===========================================================
   PLCinCloud — marketing site
   Brand: dark purple dominant + teal/violet gradient accent
   Type: Bowlby One SC (display) + Manrope (body) + JetBrains Mono (mono)
   =========================================================== */

* { box-sizing: border-box; }

:root {
  --bg-deep:  #0E0A22;
  --bg-1:     #15112B;
  --bg-2:     #1F1B3A;
  --bg-3:     #2A2548;
  --bg-card:  rgba(255,255,255,0.025);

  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.18);

  --fg-1: #F4F2FB;
  --fg-2: #B5AFD0;
  --fg-3: #7E78A0;
  --fg-mute: #5A5577;

  --teal:    #27C19F;
  --teal-2:  #1FA382;
  --violet:  #7C5BD8;
  --violet-2:#6B47C9;
  --warm:    #FFB938;
  --pink:    #F0596B;

  --grad: linear-gradient(90deg, #7C5BD8 0%, #27C19F 100%);
  --grad-warm: linear-gradient(90deg, #FFB938 0%, #F0596B 100%);

  --radius: 14px;
  --radius-sm: 8px;

  --container: 1200px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--fg-1);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-display { font-family: 'Bowlby One SC', sans-serif; letter-spacing: 0.005em; }
.mono { font-family: 'JetBrains Mono', monospace; }

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

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.grad-warm {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.04);
  color: var(--fg-1);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: var(--line-3); }
.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124,91,216,0.32);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 18px; }

.link-quiet { color: var(--fg-2); font-size: 14px; font-weight: 500; }
.link-quiet:hover { color: var(--fg-1); }

.play-circle {
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  padding-left: 2px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.ok { background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(39,193,159,0.15);
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: blink 2s infinite;
  vertical-align: middle;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================ NAV ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 32px;
  background: rgba(14,10,34,0.7);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line-1);
}
.nav-brand img {
  height: 32px;
  filter: brightness(0) invert(1);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
}
.nav-links a:hover { color: var(--fg-1); }
.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 900px) {
  .nav { padding: 12px 16px; gap: 16px; }
  .nav-links { display: none; }
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  padding: 80px 32px 60px;
  overflow: hidden;
  min-height: 720px;
  background: linear-gradient(180deg, #15112B 0%, #0E0A22 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg svg { width: 100%; height: 100%; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(39,193,159,0.10);
  border: 1px solid rgba(39,193,159,0.22);
  color: var(--fg-1);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.02;
  margin: 0 0 24px;
  letter-spacing: 0.005em;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 560px;
  margin: 0 0 36px;
}
.hero-sub strong { color: var(--fg-1); font-weight: 700; }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--fg-2);
}
.trust-item { display: inline-flex; align-items: center; gap: 6px; }
.trust-item .check { width: 14px; height: 14px; font-size: 9px; }

/* hero mockup */
.hero-mockup {
  position: absolute;
  right: -60px;
  top: 100px;
  width: 720px;
  z-index: 1;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
  transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  transform-origin: right center;
}
@media (max-width: 1280px) {
  .hero-mockup { display: none; }
  .hero { min-height: auto; }
}

.mock-window {
  background: #15112B;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
}
.mock-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1F1B3A;
  border-bottom: 1px solid var(--line-1);
}
.mock-dots { display: flex; gap: 5px; }
.mock-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.mock-dots span:first-child { background: #F0596B; }
.mock-dots span:nth-child(2) { background: #FFB938; }
.mock-dots span:nth-child(3) { background: #27C19F; }
.mock-url {
  flex: 1;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
  background: rgba(0,0,0,0.25);
  padding: 4px 10px;
  border-radius: 6px;
  max-width: 360px;
  margin: 0 auto;
}
.mock-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.mock-body { display: grid; grid-template-columns: 56px 1fr; }
.mock-sidebar {
  background: #1F1B3A;
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line-1);
}
.mock-logo-mini {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--grad);
  margin-bottom: 8px;
}
.mock-nav-item {
  height: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 5px;
}
.mock-nav-item.active { background: rgba(39,193,159,0.18); }
.mock-main { padding: 14px; }
.mock-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.mock-kpi {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 9px 10px;
}
.mock-kpi .lbl {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  font-weight: 600;
  margin-bottom: 3px;
}
.mock-kpi .val {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 18px;
  line-height: 1;
  color: var(--fg-1);
}
.mock-kpi .val span {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  color: var(--fg-3);
  font-weight: 600;
  margin-left: 2px;
}
.mock-kpi .spark {
  height: 14px;
  display: block;
  margin-top: 4px;
  width: 100%;
}
.mock-chart {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  height: 140px;
  margin-bottom: 12px;
  padding: 8px;
}
.mock-chart svg { width: 100%; height: 100%; }
.mock-rows {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  overflow: hidden;
}
.mock-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  padding: 8px 12px;
  align-items: center;
  font-size: 11px;
  border-bottom: 1px solid var(--line-1);
}
.mock-row:last-child { border-bottom: none; }
.mock-row .badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
  text-align: center;
  letter-spacing: 0.04em;
}
.mock-row .badge.ok   { background: rgba(39,193,159,0.18); color: var(--teal); }
.mock-row .badge.warn { background: rgba(244,192,84,0.18); color: var(--warm); }
.mock-row .badge.err  { background: rgba(240,89,107,0.18); color: var(--pink); }
.mock-row .rn { color: var(--fg-1); }
.mock-row .rv { font-family: 'JetBrains Mono', monospace; color: var(--fg-2); font-size: 10.5px; }

/* ============================ STRIP ============================ */
.strip {
  padding: 28px 32px;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  background: rgba(0,0,0,0.2);
}
.strip-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 600;
  margin-bottom: 14px;
}
.strip-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  opacity: 0.7;
}
.strip-logos span { white-space: nowrap; }

/* ============================ STATS ============================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--container);
  margin: 80px auto;
  padding: 0 32px;
  gap: 32px;
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 24px 0;
  border-left: 1px solid var(--line-2);
  padding-left: 24px;
}
.stat-val {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 64px;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-val span {
  font-size: 28px;
  margin-left: 4px;
}
.stat-lbl {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.45;
}

/* ============================ SECTION ============================ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 100px 32px;
  position: relative;
}
.section-dark {
  max-width: none;
  background: linear-gradient(180deg, #15112B 0%, #0E0A22 100%);
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
}
.section-dark > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05;
  margin: 0 0 18px;
}
.section-sub {
  font-size: 17px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.55;
}

/* ============================ HOW IT WORKS ============================ */
.how-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-arrow { transform: rotate(90deg); justify-self: center; }
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 16px;
  padding: 28px;
  position: relative;
}
.how-num {
  position: absolute;
  top: 18px; right: 22px;
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 28px;
  color: rgba(255,255,255,0.06);
}
.how-ico {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: rgba(39,193,159,0.10);
  border: 1px solid rgba(39,193,159,0.22);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  margin-bottom: 18px;
}
.how-ico svg { width: 26px; height: 26px; }
.how-step h3 {
  font-size: 20px;
  margin: 0 0 10px;
  letter-spacing: 0.005em;
}
.how-step p {
  font-size: 14px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.55;
}
.how-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--fg-mute);
}

/* ============================ MODULES ============================ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .modules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .modules-grid { grid-template-columns: 1fr; } }

.mod {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 14px;
  padding: 22px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.mod::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width 0.4s ease;
}
.mod:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.mod:hover::before { width: 100%; }
.mod-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 14px;
}
.mod h3 {
  font-size: 17px;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--fg-1);
  letter-spacing: 0.005em;
  font-weight: 700;
}
.mod p {
  font-size: 13.5px;
  color: var(--fg-2);
  margin: 0 0 18px;
  line-height: 1.55;
}
.mod-arrow {
  font-size: 13px;
  color: var(--fg-1);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.15s ease;
}
.mod:hover .mod-arrow { gap: 10px; }
.mod.featured {
  background: linear-gradient(135deg, rgba(124,91,216,0.18) 0%, rgba(39,193,159,0.12) 100%);
  border-color: rgba(124,91,216,0.35);
}
.mod.mod-wide {
  grid-column: span 2;
}
@media (max-width: 1100px) { .mod.mod-wide { grid-column: span 2; } }
@media (max-width: 600px)  { .mod.mod-wide { grid-column: span 1; } }

/* ============================ DEEP FEATURE ============================ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 40px; } }

.feature-text h2 {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  margin: 0 0 18px;
}
.feature-text .lead {
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 0 0 24px;
}
.feature-text .lead strong { color: var(--fg-1); font-weight: 700; }

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--fg-1);
}

.feature-alt .feature-text { order: 1; }
.feature-alt .feature-visual { order: 2; }
.feature:not(.feature-alt) .feature-text { order: 2; }
.feature:not(.feature-alt) .feature-visual { order: 1; }

/* diagram (interconnessione) */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 18px;
  padding: 28px;
}
.diag-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.diag-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.025);
  text-align: center;
}
.node-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.node-icon svg { width: 24px; height: 24px; }
.node-plc .node-icon  { background: rgba(91,168,240,0.15); color: #5BA8F0; }
.node-agent .node-icon { background: rgba(244,192,84,0.15); color: var(--warm); }
.node-cloud .node-icon { background: rgba(124,91,216,0.18); color: var(--violet); }
.node-label {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.node-label span {
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
}
.diag-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.arrow-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.04em;
}
.arrow-line {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  position: relative;
}
.arrow-line::after {
  content: '';
  position: absolute;
  right: -2px; top: -3px;
  width: 0; height: 0;
  border-left: 6px solid var(--teal);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.diag-out {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(39,193,159,0.06);
  border: 1px solid rgba(39,193,159,0.18);
  text-align: center;
}
.diag-row:nth-child(2) {
  grid-template-columns: repeat(4, 1fr);
}
.out-icon { font-size: 20px; }
.out-text { font-size: 11.5px; line-height: 1.3; color: var(--fg-1); }

/* mes board */
.mes-board {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 18px;
  padding: 28px;
}
.mes-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(39,193,159,0.12);
  color: var(--teal);
  margin-bottom: 20px;
}
.mes-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}
.mes-step {
  flex: 1;
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-1);
  text-align: center;
  font-size: 11.5px;
  line-height: 1.3;
}
.mes-step .ico { font-size: 22px; margin-bottom: 6px; }
.mes-step span { color: var(--fg-3); font-size: 10.5px; }
.mes-link {
  height: 1px;
  flex: 0 0 12px;
  background: var(--line-2);
}
.mes-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mes-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}
.mes-card-h {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 600;
  margin-bottom: 8px;
}
.mes-card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11.5px;
}
.mes-card-row .mono { color: var(--fg-2); font-size: 10.5px; }
.mes-card-row .mono.ok { color: var(--teal); }
.mes-bar {
  height: 4px;
  background: var(--bg-3);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.mes-bar span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
}

/* vs grid */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.vs-col {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-1);
}
.vs-h {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}
.vs-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}
.vs-col li {
  padding: 6px 0;
  color: var(--fg-2);
}
.vs-old { background: rgba(240,89,107,0.04); border-color: rgba(240,89,107,0.18); }
.vs-old .vs-h { color: var(--pink); }
.vs-old li { text-decoration: line-through; opacity: 0.7; }
.vs-new { background: rgba(39,193,159,0.06); border-color: rgba(39,193,159,0.24); }
.vs-new .vs-h { color: var(--teal); }
.vs-new li { color: var(--fg-1); }
.vs-new li::before { content: '✓ '; color: var(--teal); font-weight: 700; }

/* ============================ PROTOCOLS ============================ */
.proto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .proto-grid { grid-template-columns: repeat(2, 1fr); } }
.proto {
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 14px;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
a.proto:hover {
  border-color: var(--line-3);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.proto-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.02em;
}
.proto-name {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 20px;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.proto-desc {
  font-size: 13px;
  color: var(--fg-1);
  margin-bottom: 8px;
  line-height: 1.45;
}
.proto-models {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-3);
}

/* ============================ CREDITO 4.0 ============================ */
.section-credito {
  background: linear-gradient(180deg, #2A2548 0%, #15112B 100%);
  border-top: 1px solid rgba(255,185,56,0.18);
  border-bottom: 1px solid rgba(255,185,56,0.18);
  max-width: none;
  padding: 100px 32px;
  position: relative;
  overflow: hidden;
}
.section-credito::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,185,56,0.2) 0%, transparent 60%);
}
.credito-content {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}
.section-credito .section-title {
  text-align: left;
}
.section-credito .section-sub {
  text-align: left;
  color: var(--fg-2);
  margin-bottom: 48px;
}
.section-credito .section-sub strong { color: var(--fg-1); }
.credito-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .credito-grid { grid-template-columns: 1fr; } }
.credito-card {
  padding: 28px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,185,56,0.22);
  border-radius: 16px;
  position: relative;
}
.credito-num {
  font-size: 48px;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}
.credito-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--fg-1);
}
.credito-card p {
  font-size: 14px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.55;
}

/* ============================ INTEGRATIONS ============================ */
.integrations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .integrations { grid-template-columns: 1fr; } }
.integ-group {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 14px;
}
.integ-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 16px;
}
.integ-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.integ-chips span {
  font-size: 12.5px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-1);
  border-radius: 999px;
  color: var(--fg-1);
}

/* ============================ PRICING ============================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 18px;
  padding: 32px 28px;
  position: relative;
}
.price-card.featured {
  background: linear-gradient(180deg, rgba(124,91,216,0.20) 0%, rgba(39,193,159,0.10) 100%);
  border: 1px solid rgba(124,91,216,0.40);
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(124,91,216,0.20);
}
.price-badge {
  position: absolute;
  top: -12px; right: 20px;
  background: var(--grad);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.price-h {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 26px;
  margin-bottom: 6px;
}
.price-sub {
  font-size: 13px;
  color: var(--fg-2);
  margin-bottom: 24px;
  line-height: 1.45;
  min-height: 38px;
}
.price-val {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-1);
}
.price-val .curr {
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.price-val .num {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 48px;
  line-height: 1;
  color: var(--fg-1);
}
.price-val .period {
  font-size: 13px;
  color: var(--fg-2);
  font-weight: 600;
}
.price-feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg-1);
}
.price-feats li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ============================ TESTIMONIAL ============================ */
.testimonial {
  max-width: 880px;
  text-align: center;
  padding: 80px 32px;
}
.quote-mark {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: 96px;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: -20px;
}
.testimonial blockquote {
  font-family: 'Bowlby One SC', sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.3;
  margin: 0 0 28px;
  color: var(--fg-1);
  letter-spacing: 0.005em;
  font-weight: 400;
}
.quote-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}
.quote-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}
.quote-author > div { text-align: left; }
.quote-name { font-weight: 700; color: var(--fg-1); }
.quote-role { font-size: 12.5px; color: var(--fg-3); }

/* ============================ FAQ ============================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}
.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  padding: 18px 22px;
  transition: background 0.15s ease;
}
.faq-list details[open] { background: rgba(255,255,255,0.04); }
.faq-list summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--fg-1);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  font-size: 22px;
  color: var(--teal);
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 14px 0 0;
}

/* ============================ FINAL CTA ============================ */
.final-cta {
  max-width: none;
  padding: 100px 32px;
  background: linear-gradient(180deg, #15112B 0%, #2A2548 100%);
  border-top: 1px solid var(--line-1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.cta-bg svg { width: 100%; height: 100%; }
.cta-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.cta-content h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  margin: 0 0 16px;
  line-height: 1.05;
}
.cta-content p {
  font-size: 17px;
  color: var(--fg-2);
  margin: 0 0 32px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-3);
}

/* ============================ FOOTER ============================ */
.footer {
  background: #0A0719;
  border-top: 1px solid var(--line-1);
  padding: 64px 32px 24px;
}
.footer-main {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 600px) { .footer-main { grid-template-columns: 1fr; } }
.footer-brand p {
  font-size: 13.5px;
  color: var(--fg-2);
  margin: 16px 0;
  line-height: 1.55;
}
.footer-logo {
  height: 32px;
  filter: brightness(0) invert(1);
}
.footer-iso {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.footer-iso span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--fg-2);
  letter-spacing: 0.04em;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
  font-weight: 700;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--fg-2);
  padding: 4px 0;
}
.footer-col a:hover { color: var(--fg-1); }
.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--fg-3);
}
.footer-legal { display: flex; gap: 18px; }
.footer-legal a:hover { color: var(--fg-1); }

/* ============================ MOBILE NAV (hamburger + drawer) ============================ */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg-1);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  top: 0; right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: linear-gradient(180deg, #15112B 0%, #0E0A22 100%);
  border-left: 1px solid var(--line-2);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
  z-index: 60;
  overflow-y: auto;
  padding: 80px 22px 24px;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile-inner { display: flex; flex-direction: column; gap: 4px; }
.nav-mobile-inner a {
  display: block;
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-1);
  border-radius: 10px;
  border-bottom: 1px solid var(--line-1);
}
.nav-mobile-inner a:hover { background: rgba(255,255,255,0.04); }
.nav-mobile-inner a.btn {
  margin-top: 16px;
  border-bottom: none;
}
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8,5,18,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 55;
}
.nav-mobile-backdrop.show { opacity: 1; visibility: visible; }

/* ============================ BREAKPOINT 1024px (tablet landscape) ============================ */
@media (max-width: 1024px) {
  .section { padding: 80px 28px; }
  .hero { padding: 64px 28px 56px; min-height: auto; }
  .stat-val { font-size: 52px; }
  .stat-val span { font-size: 22px; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .mod.mod-wide { grid-column: span 2; }
}

/* ============================ BREAKPOINT 900px (mostra hamburger) ============================ */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta .link-quiet { display: none; }
  .nav-cta .btn-primary { height: 38px; padding: 0 14px; font-size: 13px; }
  .nav-cta { gap: 10px; }
}

/* ============================ BREAKPOINT 768px (tablet portrait + mobile) ============================ */
@media (max-width: 768px) {
  html { scroll-padding-top: 64px; }

  /* NAV */
  .nav { padding: 10px 16px; gap: 12px; }
  .nav-brand img { height: 28px; }

  /* HERO */
  .hero { padding: 48px 20px 48px; }
  .hero-content { max-width: 100%; }
  .eyebrow { font-size: 11.5px; padding: 5px 10px; }
  .hero-title { font-size: clamp(30px, 9vw, 44px); }
  .hero-sub { font-size: 15.5px; margin-bottom: 28px; }
  .hero-cta { gap: 10px; margin-bottom: 32px; }
  .hero-cta .btn { width: 100%; }
  .hero-trust { gap: 12px 18px; font-size: 12px; }

  /* STRIP */
  .strip { padding: 22px 16px; }
  .strip-logos { gap: 18px 24px; font-size: 14px; }
  .strip-label { font-size: 10.5px; }

  /* STATS */
  .stats {
    margin: 56px auto;
    padding: 0 20px;
    gap: 20px 16px;
    grid-template-columns: repeat(2, 1fr);
  }
  .stat { padding: 12px 0 12px 14px; border-left-width: 1px; }
  .stat-val { font-size: 40px; }
  .stat-val span { font-size: 18px; }
  .stat-lbl { font-size: 12px; }

  /* SECTION */
  .section { padding: 56px 20px; }
  .section-head { margin-bottom: 36px; }
  .section-title { font-size: clamp(26px, 7.5vw, 38px); }
  .section-sub { font-size: 15px; }

  /* HOW-IT-WORKS */
  .how-step { padding: 22px; }
  .how-step h3 { font-size: 18px; }
  .how-num { font-size: 24px; top: 14px; right: 18px; }
  .how-ico { width: 46px; height: 46px; margin-bottom: 14px; }

  /* MODULES */
  .modules-grid { grid-template-columns: 1fr; gap: 10px; }
  .mod { padding: 20px; }
  .mod h3 { font-size: 16px; }
  .mod p { font-size: 13px; }
  .mod.mod-wide { grid-column: span 1; }

  /* FEATURE blocks (Interconnessione, MES) */
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature-text h2 { font-size: clamp(26px, 7.5vw, 36px); }
  .feature-alt .feature-text,
  .feature:not(.feature-alt) .feature-text { order: 1; }
  .feature-alt .feature-visual,
  .feature:not(.feature-alt) .feature-visual { order: 2; }

  /* DIAGRAM stack vertically */
  .diagram { padding: 20px; }
  .diag-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .diag-arrow {
    flex-direction: row;
    gap: 8px;
    transform: rotate(90deg);
    margin: 6px 0;
  }
  .arrow-line { width: 32px; }
  .diag-row:nth-child(2) {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 18px !important;
  }

  /* MES board */
  .mes-board { padding: 20px; }
  .mes-flow {
    overflow-x: auto;
    margin: 0 -20px 24px;
    padding: 0 20px 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .mes-step {
    flex: 0 0 88px;
    min-width: 88px;
    scroll-snap-align: start;
  }
  .mes-link { flex: 0 0 8px; }
  .mes-cards { grid-template-columns: 1fr; gap: 8px; }

  /* VS grid */
  .vs-grid { grid-template-columns: 1fr; }

  /* PROTOCOLS */
  .proto-grid { grid-template-columns: 1fr; gap: 10px; }
  .proto { padding: 20px; }

  /* CREDITO */
  .section-credito { padding: 64px 20px; }
  .section-credito::before { width: 380px; height: 380px; top: -140px; right: -140px; }
  .credito-grid { grid-template-columns: 1fr; gap: 12px; }
  .credito-card { padding: 22px; }
  .credito-card h3 { font-size: 18px; }
  .credito-num { font-size: 38px; }

  /* INTEGRATIONS */
  .integrations { grid-template-columns: 1fr; gap: 14px; }
  .integ-group { padding: 20px; }

  /* TESTIMONIAL */
  .testimonial { padding: 56px 20px; }
  .quote-mark { font-size: 64px; margin-bottom: -12px; }

  /* FAQ */
  .faq-list details { padding: 16px 18px; }
  .faq-list summary { font-size: 14.5px; gap: 12px; }
  .faq-list details p { font-size: 14px; margin-top: 12px; }

  /* FINAL CTA */
  .final-cta { padding: 64px 20px; }
  .cta-content p { font-size: 15px; }
  .cta-actions .btn { width: 100%; }
  .cta-meta { gap: 12px 18px; font-size: 12px; }

  /* FOOTER */
  .footer { padding: 48px 20px 24px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { gap: 12px; }
  .footer-legal { gap: 14px; flex-wrap: wrap; }
}

/* ============================ BREAKPOINT 480px (smartphone) ============================ */
@media (max-width: 480px) {
  .nav { padding: 9px 14px; gap: 8px; }
  .nav-brand img { height: 26px; }
  .nav-cta { gap: 8px; }

  .hero { padding: 40px 18px 40px; }
  .eyebrow { font-size: 11px; gap: 6px; padding: 4px 9px; }
  .hero-title { font-size: clamp(28px, 10vw, 38px); margin-bottom: 18px; }
  .hero-sub { font-size: 15px; margin-bottom: 24px; }
  .hero-trust { gap: 10px 14px; font-size: 11.5px; }

  .section { padding: 48px 18px; }
  .section-head { margin-bottom: 28px; }

  .stats { grid-template-columns: 1fr; gap: 16px; padding: 0 18px; }
  .stat { padding: 10px 0 10px 14px; }
  .stat-val { font-size: 44px; }

  .strip { padding: 18px 14px; }
  .strip-logos { gap: 14px 18px; font-size: 13px; }

  /* small touch targets */
  .btn-lg { height: 48px; padding: 0 20px; font-size: 14.5px; }

  /* footer */
  .footer-main { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================ MODULE PAGE (modulo.blade.php / moduli_index) ============================ */
@media (max-width: 768px) {
  .mod-page-head { padding: 64px 20px 32px !important; }
  .mod-page-head h1 { font-size: clamp(28px, 8vw, 40px) !important; }
  .mod-page-head .tagline { font-size: 15.5px !important; }
  .mod-page-head .intro { font-size: 14.5px !important; line-height: 1.6 !important; }
  .mod-page-head .cta-row .btn { width: 100%; }
  .mod-features,
  .mod-specs,
  .mod-sectors,
  .mod-related,
  .mod-page-cta { padding-left: 20px !important; padding-right: 20px !important; }
  .mod-features { padding-top: 24px !important; padding-bottom: 40px !important; gap: 10px !important; }
  .mod-feat { padding: 18px !important; }
  .mod-specs { padding-bottom: 40px !important; }
  .mod-specs h2 { font-size: 22px !important; }
  .mod-specs-grid { padding: 18px !important; gap: 10px !important; grid-template-columns: 1fr !important; }
  .mod-page-cta { padding: 36px 20px !important; margin: 0 18px 56px !important; }
  .mod-page-cta h2 { font-size: 22px !important; }
  .mod-related h2 { font-size: 20px !important; }
  .moduli-head { padding: 56px 20px 24px !important; }
  .moduli-head h1 { font-size: clamp(28px, 8vw, 40px) !important; }
  .moduli-head p { font-size: 15.5px !important; }
  .moduli-list { padding: 0 20px 56px !important; }
}

/* ============================ Utilità responsive ============================ */
@media (min-width: 901px) {
  .nav-mobile, .nav-mobile-backdrop { display: none !important; }
}
