:root {
  --ld-dark: #0b1120;
  --ld-dark-2: #111827;
  --ld-surface: #1e293b;
  --ld-cut: 36px;
  --ld-radius: 16px;
  --ld-border-light: #e2e8f0;
  --ld-border-dark: rgba(255,255,255,.1);
  --ld-text-dark-2: #9ca3af;
  --ld-text-light-2: #64748b;
  --ld-glow: 0 0 35px rgba(9,130,221,.35);
  --ld-card-shadow: 0 4px 6px -1px rgba(0,0,0,.04),0 2px 4px -2px rgba(0,0,0,.02);
  --ld-card-shadow-hover: 0 10px 25px -5px rgba(9,130,221,.08);
}

#hero {
  color: #f9fafb;
  background-color: var(--ld-dark);
  background-image: radial-gradient(circle at 75% 35%, rgba(9,130,221,.16), transparent 60%), repeating-linear-gradient(0deg, transparent 0 55px, rgba(255,255,255,.04) 55px 56px), repeating-linear-gradient(90deg, transparent 0 55px, rgba(255,255,255,.04) 55px 56px);
  padding-bottom: calc(var(--ld-cut) + 1rem);
}
#hero .hero-title { color: #f9fafb; }
#hero .hero-sub, #hero .hero-note { color: var(--ld-text-dark-2); }
#hero .badge-pill { background: rgba(9,130,221,.18); color: #9fd7ff; }
#hero .btn-secondary { color: #fff; background: transparent; border-color: rgba(255,255,255,.25); }
#hero .btn-secondary:hover { background: rgba(255,255,255,.08); }
.ld-hero-visual { min-width: 0; position: relative; isolation: isolate; }
.ld-hero-visual::before { content: ""; position: absolute; inset: 18% 12%; z-index: -1; background: rgba(9,130,221,.22); filter: blur(70px); }
#hero .hero-img-container { min-width: 0; min-height: 0; width: 100%; overflow: visible; }
#hero .hero-img { min-width: 0; min-height: 0; width: 100%; height: auto; border-radius: 20px; box-shadow: var(--ld-glow); }
.ld-chip { position: absolute; display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: #f9fafb; font: 12px var(--font-mono); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0,0,0,.35); backdrop-filter: blur(12px); }
.ld-chip svg { width: 48px; height: 18px; overflow: visible; }
.ld-chip path { fill: none; stroke: #65b8f5; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ld-chip-fluid { top: 12%; left: -4%; }
.ld-chip-stable { top: 48%; right: -7%; }
.ld-chip-rhythm { bottom: 8%; left: 0; }

.ld-route { position: relative; overflow: clip; background: var(--ld-dark); }
.ld-node { display: flex; align-items: center; justify-content: center; color: white; background: var(--primary); border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%; font: 600 12px var(--font-mono); }
.ld-node-start, .ld-node-end { position: absolute; z-index: 2; width: 18px; height: 18px; }
.ld-node-start { top: 14px; left: 50%; transform: translateX(-50%); }
.ld-node-end { top: 18px; right: 18px; }
.ld-cut-section { position: relative; margin-top: -1px; }
.ld-cut-section > .container { position: relative; z-index: 1; }
#come-funziona { background: #fff; padding-top: calc(6rem + var(--ld-cut)); padding-bottom: calc(6rem + var(--ld-cut) + 1rem); }
#metriche { color: #f9fafb; background: var(--ld-dark); padding-top: calc(6rem + var(--ld-cut)); padding-bottom: calc(6rem + var(--ld-cut) + 1rem); }
#funzionalita { background: #fff; padding-top: calc(6rem + var(--ld-cut)); padding-bottom: calc(6rem + var(--ld-cut) + 1rem); }
#hardware { color: #f9fafb; background: var(--ld-dark); padding-top: calc(6rem + var(--ld-cut)); }
.ld-cut-section::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: calc(var(--ld-cut) * -1); height: calc(var(--ld-cut) + 2px); background: inherit; clip-path: polygon(0 0, 0 100%, 100% 100%); pointer-events: none; }

#metriche .section-label, #hardware .section-label { color: #65b8f5; }
#metriche .section-title, #hardware .section-title { color: #f9fafb; }
#metriche .section-subtitle { color: var(--ld-text-dark-2); }
#metriche .container { position: relative; z-index: 1; }
#metriche .container::before { content: ""; position: absolute; z-index: -1; inset: -2rem -2rem 0; background-image: radial-gradient(circle at 50% 0,rgba(9,130,221,.18),transparent 60%),repeating-linear-gradient(0deg,transparent 0 55px,rgba(255,255,255,.04) 55px 56px),repeating-linear-gradient(90deg,transparent 0 55px,rgba(255,255,255,.04) 55px 56px); pointer-events: none; }


.ld-steps { position: relative; display: grid; gap: 4rem; margin-top: 3rem; }
.ld-route-line { position: absolute; z-index: 0; inset: 0 50%; width: 20px; height: 100%; overflow: visible; transform: translateX(-50%); }
.ld-route-line path { fill: none; stroke: #0982dd; stroke-width: 2; stroke-dasharray: 7 9; vector-effect: non-scaling-stroke; }
.ld-step { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) 160px minmax(0,1fr); align-items: center; gap: 0; min-height: 420px; }
.ld-step-1, .ld-step-2, .ld-step-3, .ld-step-4 { isolation: isolate; }
.ld-step:nth-of-type(1) .ld-step-card, .ld-step:nth-of-type(3) .ld-step-card { grid-column: 1; justify-self: end; }
.ld-step:nth-of-type(1) .ld-step-phone, .ld-step:nth-of-type(3) .ld-step-phone { grid-column: 3; justify-self: start; }
.ld-step:nth-of-type(even) .ld-step-card { grid-column: 3; justify-self: start; }
.ld-step:nth-of-type(even) .ld-step-phone { grid-column: 1; justify-self: end; }
.ld-step-node { position: relative; grid-column: 2; grid-row: 1; justify-self: center; width: 48px; height: 48px; font-size: 13px; box-shadow: 0 0 0 8px #fff, 0 0 0 9px rgba(9,130,221,.18); }
.ld-step-card { position: relative; isolation: isolate; width: min(100%, 410px); padding: 1.75rem 2rem; overflow: hidden; background: linear-gradient(180deg,#f8fbff,#eef5fc); border: 1px solid #d6e6f5; border-left: 4px solid #0982dd; border-radius: 16px; box-shadow: 0 1px 2px rgba(17,24,39,.05),0 12px 28px -12px rgba(9,130,221,.25); transition: transform 200ms ease-out,box-shadow 200ms ease-out; }
.ld-step-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(9,130,221,.2); }
.ld-step-card::after { content: attr(data-ghost); position: absolute; z-index: -1; top: -4px; right: 8px; color: rgba(9,130,221,.07); font: 800 88px/1 var(--font-mono); pointer-events: none; }
.ld-step-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 1rem; color: #0982dd; background: rgba(9,130,221,.10); border: 1px solid rgba(9,130,221,.25); border-radius: 14px; }
.ld-step-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ld-step-card .how-step-title { font-size: 1.2rem; }
.ld-step-card .how-step-body { max-height: none; overflow: visible; opacity: 1; margin-top: .8rem; color: #475569; line-height: 1.7; }
.ld-phone { position: relative; isolation: isolate; width: 254px; aspect-ratio: 0.49; overflow: visible; border: 4px solid #111827; border-radius: 36px; background: #111827; box-shadow: 0 18px 40px rgba(15,23,42,.18); }
.ld-phone::before { content: ""; position: absolute; z-index: -1; inset: -24px; border-radius: 50%; background: radial-gradient(circle,rgba(9,130,221,.18),transparent 68%); filter: blur(12px); }
.ld-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ld-step-phone { justify-self: start; }

.ld-hold { border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%; }
.ld-hold-sm { width: 15px; height: 13px; flex: 0 0 auto; }
.ld-hold-md { width: 28px; height: 25px; }
.ld-hold-lg { border-radius: 35px 20px 42px 24px; }
.ld-score-panel { display: flex; flex-direction: column; align-items: center; max-width: 600px; margin: 0 auto 4rem; padding: 2rem; text-align: center; background: linear-gradient(180deg,#0f172a,#111827); border: 2px solid rgba(9,130,221,.4); border-radius: 36px 22px 40px 26px; box-shadow: 0 0 40px rgba(9,130,221,.25); }
.ld-score-panel .ld-score-image { min-width: 0; }
.ld-score-panel .ld-score-image .metric-img-wrap { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 100%; height: min(var(--metric-img-h,360px),220px); margin: 0; direction: ltr; }
.ld-score-panel .ld-score-image .metric-img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.ld-score-panel .metric-text { align-items: center; gap: .75rem; }
.ld-score-panel .metric-name { font-size: 1.5rem; }
.ld-score-panel .metric-desc { max-width: 46ch; margin: auto; color: #cbd5e1; }
.metric-text { display: flex; flex-direction: column; gap: 1rem; }
.metric-name { font-size: 1.75rem; font-weight: 800; color: var(--dark-text); }
.metric-desc { max-width: 420px; color: var(--muted-text); font-size: 1.05rem; line-height: 1.7; }

#metriche .metric-name { color: #f9fafb; }
#metriche .metric-desc { color: var(--ld-text-dark-2); }
.ld-signal { position: relative; }
.ld-signal > svg { position: absolute; top: 18px; left: 5%; width: 90%; height: 30px; }
.ld-signal > svg path { stroke: rgba(9,130,221,.55); stroke-width: 2; stroke-dasharray: 4 7; }
.ld-metric-grid { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.25rem; }
.ld-metric-card { display: flex; flex-direction: column; min-width: 0; padding: 1.5rem; background: rgba(15,23,42,.9); border: 1px solid #1e293b; border-radius: var(--ld-radius); transition: transform 200ms ease-out,border-color 200ms ease-out,box-shadow 200ms ease-out; }
.ld-metric-card:hover { transform: translateY(-3px); border-color: rgba(9,130,221,.4); box-shadow: var(--ld-card-shadow-hover); }
.ld-metric-flag { position: relative; display: flex; align-items: flex-start; gap: .6rem; min-height: 46px; margin: 0 0 1rem; color: #f9fafb; font: 12px var(--font-mono); }
.ld-metric-flag::after { content: ""; position: absolute; top: 15px; left: 7px; width: 1px; height: 26px; background: #0982dd; }
.ld-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ld-metric-flag .ld-hold { background: #0982dd; }
.ld-metric-card .metric-name { margin: 0 0 .5rem; color: #f9fafb; font-size: 1.15rem; }
.ld-metric-card .metric-desc { flex: 1; min-height: 0; color: #cbd5e1; font-size: .9rem; }
.ld-metric-card .metric-img-wrap { display: flex; justify-content: center; align-items: center; height: min(var(--metric-img-h,360px),200px); width: 100%; max-width: 100%; margin: 0; padding-top: 1rem; border-top: 1px solid #1e293b; direction: ltr; }
.ld-metric-card .metric-img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.bento-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; align-items: start; margin-top: 3rem; }
.ld-bento-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.bento-card { position: relative; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--ld-border-light); border-radius: 18px; box-shadow: var(--ld-card-shadow); transition: transform 200ms cubic-bezier(.23,1,.32,1), border-color 200ms ease-out, box-shadow 200ms ease-out; }
.bento-card:hover { transform: translateY(-4px); border-color: rgba(9,130,221,.4); box-shadow: var(--ld-card-shadow-hover); }
.bento-title, .bento-desc { position: relative; z-index: 1; }
.bento-title { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.bento-desc { margin: 0 0 16px; font-size: .875rem; line-height: 1.6; }
.bento-img-wrap { height: var(--img-h,220px); margin-top: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; overflow: hidden; background: #0b1120; flex-shrink: 0; }
.bento-img-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.ld-bento-badge { position: static; display: flex; align-items: center; justify-content: center; width: 32px; height: 29px; margin: 0 0 12px; color: #fff; background: #0982dd; border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%; font: 600 12px var(--font-mono); }
.bento-report, .bento-confronto, .bento-ai { color: #f9fafb; background: var(--ld-surface); border-color: var(--ld-border-dark); }
.ld-bento-report, .ld-bento-confronto, .ld-bento-ai { color: #f9fafb; background: var(--ld-surface); border-color: var(--ld-border-dark); }
.ld-bento-report .bento-title, .ld-bento-confronto .bento-title, .ld-bento-ai .bento-title { color: #f9fafb; }
.ld-bento-report .bento-desc, .ld-bento-confronto .bento-desc, .ld-bento-ai .bento-desc { color: var(--ld-text-dark-2); }
.ld-bento-report .bento-img-wrap, .ld-bento-confronto .bento-img-wrap, .ld-bento-ai .bento-img-wrap { background: var(--ld-dark); }
.bento-arc, .bento-grafici, .bento-forza, .bento-storico, .bento-timeline, .bento-riepilogo { color: #111827; background: #f8fafc; border-color: #e2e8f0; }
.ld-bento-arc, .ld-bento-grafici, .ld-bento-forza, .ld-bento-storico, .ld-bento-timeline, .ld-bento-riepilogo { color: #111827; background: #f8fafc; border-color: #e2e8f0; }
.ld-bento-report .bento-img-wrap img, .ld-bento-confronto .bento-img-wrap img, .ld-bento-ai .bento-img-wrap img { width: 100%; max-width: 100%; }

#hardware .hw-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3.5rem; align-items: center; }
.ld-hw-photo { position: relative; display: grid; width: 100%; min-width: 0; aspect-ratio: 16/10; height: auto; min-height: 320px; overflow: hidden; border: 2px solid rgba(9,130,221,.3); border-radius: 24px; background: linear-gradient(180deg,rgba(15,23,42,.85),#0b1120); box-shadow: var(--ld-glow); }
.ld-hw-photo::before { content: ""; position: absolute; z-index: 1; top: 0; left: 8%; width: 84%; height: 3px; background: linear-gradient(90deg,transparent,#0982dd,transparent); pointer-events: none; }
.ld-hw-photo::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg,transparent 0 31px,rgba(255,255,255,.05) 31px 32px),repeating-linear-gradient(90deg,transparent 0 31px,rgba(255,255,255,.05) 31px 32px); pointer-events: none; }
.hw-img { display: block; grid-area: 1/1; width: 100%; height: auto; min-height: 320px; aspect-ratio: 16/10; object-fit: cover; }
.hw-img-placeholder { display: none; grid-area: 1/1; width: 100%; height: 100%; min-height: 320px; align-items: center; justify-content: center; padding: 1.5rem; color: #9ca3af; text-align: center; font-weight: 600; }
.hw-text { margin-bottom: 1.5rem; color: #cbd5e1; font-size: 1.05rem; line-height: 1.7; }
.hw-bullets { display: flex; flex-direction: column; gap: .75rem; padding: 0; list-style: none; }
.hw-bullets li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; color: #f9fafb; background: rgba(30,41,59,.5); border: 1px solid #1e293b; border-radius: 12px; font-weight: 600; }
.ld-hw-number { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; flex: 0 0 auto; color: #65b8f5; background: rgba(9,130,221,.2); border: 1px solid rgba(9,130,221,.35); border-radius: 8px; font: 600 12px var(--font-mono); transform: rotate(2deg); }

@media (max-width: 1199px) and (min-width: 769px) { .ld-step { grid-template-columns: minmax(0,1fr) 140px minmax(0,1fr); } .ld-step-card { width: min(100%,360px); padding: 1.5rem; } .ld-phone { width: min(220px,100%); } }
@media (max-width: 1099px) and (min-width: 769px) { .ld-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 900px) { .ld-bento-col { display: contents; } .bento-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; } }
@media (max-width: 900px) { .ld-chip { display: none; } }
@media (min-width: 1100px) { .bento-card { min-height: 390px; } }
@media (max-width: 768px) {
  :root { --ld-cut: 12px; }
  #hero { padding-bottom: calc(var(--ld-cut) + 1rem); }
  .ld-hero-visual { margin-top: 1rem; }
  .ld-route-line, .ld-node-start, .ld-node-end { display: none; }
  #come-funziona, #metriche, #funzionalita, #hardware { padding-top: calc(4rem + var(--ld-cut)); padding-bottom: 4rem; }
  .ld-steps { gap: 2.5rem; }
  .ld-step { min-height: 0; grid-template-columns: 1fr; gap: 1rem; justify-items: center; }
  .ld-step-card, .ld-step:nth-of-type(even) .ld-step-card, .ld-step:nth-of-type(1) .ld-step-card, .ld-step:nth-of-type(3) .ld-step-card { grid-column: 1; grid-row: 1; }
  .ld-step-phone, .ld-step:nth-of-type(even) .ld-step-phone { grid-column: 1; grid-row: 2; justify-self: center; }
  .ld-step-node { top: 1rem; left: auto; right: 1rem; grid-row: 1; width: 34px; height: 32px; transform: none; box-shadow: 0 0 0 5px #fff; }
  .ld-phone { width: min(230px, 70vw); }
  .ld-score-panel { padding: 1.25rem; margin-bottom: 2.5rem; }
  .ld-score-panel .ld-score-image .metric-img-wrap { height: min(var(--metric-img-h-mobile,240px),220px); }
  .ld-metric-grid { grid-template-columns: 1fr; }
  .ld-metric-card .metric-desc { min-height: 0; }
  .ld-metric-card .metric-img-wrap { height: min(var(--metric-img-h-mobile,240px),200px); }
  .bento-img-wrap { width: 100%; max-width: 100%; }
  #hardware .hw-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .bento-card, .ld-metric-card, .ld-step-card, #hero .btn, #hero .btn:hover { transition: none !important; transform: none !important; }
}
