/* Chibri Orbyx - landing. Foglio unico condiviso da tutte le pagine. Mobile-first. */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #06b6d4;
  --grad: linear-gradient(135deg, #0f766e, #06b6d4);
  --bg: #f4f7f8;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: anywhere; hyphens: auto; }
h1 { font-size: 1.9rem; letter-spacing: -.02em; }
h2 { font-size: 1.55rem; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---------- Intestazione ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; flex: none; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; line-height: 1; }
.nav { display: none; gap: 20px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--primary); }
.topbar .btn { padding: 9px 14px; font-size: .9rem; }
.nav-login { display: none; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(15, 118, 110, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(15, 118, 110, .36); }
.btn-ghost { background: #fff; color: var(--primary); border-color: #99d5cf; }
.btn-ghost:hover { background: #f0fdfa; }
.btn-light { background: #fff; color: var(--primary); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { background: var(--grad); color: #fff; padding: 48px 0 56px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .16); padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: 2rem; max-width: 22ch; }
.hero h1 span { display: block; font-weight: 600; opacity: .95; font-size: .78em; margin-top: .25em; }
.hero p.lead { font-size: 1.08rem; max-width: 60ch; opacity: .96; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-actions .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 8px 22px rgba(0, 0, 0, .16); }
.hero-actions .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.hero-note { margin-top: 14px; font-size: .9rem; opacity: .9; }

/* ---------- Sezioni ---------- */
.section { padding: 56px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head .kicker { color: var(--primary); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; display: block; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 1px solid var(--line); min-width: 0; }
.card h3 { margin-bottom: .35em; }
.card h2 { font-size: 1.35rem; }
.tagline { margin: 0; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 40px; height: 40px; border-radius: 10px; background: #e6f6f4; color: var(--primary); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; flex: none; }
.two-col { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }

/* ---------- Mockup riepilogo ---------- */
.mock {
  background: #0b1f24; color: #e2f3f1; border-radius: 16px; padding: 18px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  font-size: .92rem; min-width: 0;
}
.mock-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; display: block; }
.mock-bar i:nth-child(1) { background: #f87171; }
.mock-bar i:nth-child(2) { background: #fbbf24; }
.mock-bar i:nth-child(3) { background: #34d399; }
.mock-label { font-size: .72rem; letter-spacing: .14em; color: #5eead4; font-weight: 700; }
.mock-hello { font-size: 1.25rem; font-weight: 700; margin: 4px 0 2px; color: #fff; }
.mock-sub { color: #94a3b8; font-size: .85rem; margin-bottom: 14px; }
.mock-item { display: flex; gap: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.mock-num { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; font-size: .85rem; }
.mock-item b { color: #fff; display: block; }
.mock-item span.desc { color: #b6c7d0; font-size: .84rem; display: block; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-top: 6px; }
.tag-warn { background: rgba(251, 191, 36, .16); color: #fcd34d; }
.tag-info { background: rgba(6, 182, 212, .16); color: #67e8f9; }
.tag-ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.mock-note { color: #7c8e99; font-size: .75rem; margin-top: 8px; font-style: italic; }

/* ---------- Connettori ---------- */
.conn-group { margin-bottom: 22px; }
.conn-group h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.conn-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.conn { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.conn b { display: block; margin-bottom: 2px; }
.conn span { color: var(--muted); font-size: .9rem; }
.modes { counter-reset: m; }
.mode { position: relative; padding-left: 52px; }
.mode::before {
  counter-increment: m; content: counter(m);
  position: absolute; left: 16px; top: 18px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem;
}

/* ---------- Agenti ---------- */
.agent-lead { border: 2px solid var(--accent); }
.rule {
  margin-top: 22px; background: #f0fdfa; border: 1px solid #99f6e4; border-left: 5px solid var(--primary);
  border-radius: var(--radius); padding: 16px 18px; font-weight: 600;
}

/* ---------- Prezzi ---------- */
.toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 22px; flex-wrap: wrap; }
.toggle button { font: inherit; border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; }
.toggle button[aria-pressed="true"] { background: var(--grad); color: #fff; }
.toggle .save { font-size: .75rem; font-weight: 700; }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border: 2px solid var(--primary); }
.badge { position: absolute; top: -12px; left: 20px; background: var(--grad); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; }
.price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price-note { color: var(--muted); font-size: .85rem; min-height: 1.4em; }
.features { list-style: none; padding: 0; margin: 14px 0 18px; flex: 1; }
.features li { padding: 6px 0 6px 26px; position: relative; border-top: 1px solid #f1f5f9; font-size: .95rem; }
.features li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.ai-box { margin-top: 28px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.ai-box header { background: var(--grad); color: #fff; padding: 16px 20px; }
.ai-box header h3 { margin: 0; }
.ai-box .body { padding: 20px; display: grid; gap: 16px; grid-template-columns: 1fr; }
.ai-box ul { margin: 0; padding-left: 20px; }
.ai-box li { margin-bottom: 6px; }
.packs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.pack { background: #f0fdfa; border: 1px solid #99f6e4; color: var(--primary-dark); border-radius: 8px; padding: 6px 12px; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 44px 16px 18px; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 18px 16px; color: var(--muted); }

/* ---------- Moduli ---------- */
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--text);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--primary); outline: 2px solid rgba(6, 182, 212, .35); outline-offset: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--primary); }
.msg { border-radius: 10px; padding: 12px 14px; font-size: .95rem; display: none; }
.msg.show { display: block; }
.msg.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #a7f3d0; }
.msg.err { background: var(--err-bg); color: var(--err); border: 1px solid #fecaca; }
.msg.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }

/* ---------- Attivazione ---------- */
.plan-pick { cursor: pointer; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick .card { height: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.plan-pick input:checked + .card { border: 2px solid var(--primary); box-shadow: 0 0 0 4px rgba(6, 182, 212, .15); }
.plan-pick input:focus-visible + .card { outline: 3px solid var(--accent); outline-offset: 2px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li b.n { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; font-size: .85rem; }

/* ---------- Pagine legali ---------- */
.legal-hero { background: var(--grad); color: #fff; padding: 36px 0; }
.legal-hero h1 { font-size: 1.7rem; margin-bottom: .2em; }
.legal-hero p { margin: 0; opacity: .92; }
.legal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; margin: 28px auto 48px; }
.legal h2 { font-size: 1.2rem; margin-top: 1.8em; padding-top: .2em; }
.legal h2:first-of-type { margin-top: .4em; }
.legal h3 { font-size: 1.02rem; margin-top: 1.3em; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .toc { background: var(--bg); border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; }
.legal .toc ol { margin: 6px 0 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 18px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.legal th, .legal td { text-align: left; border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.legal th { background: #f0fdfa; }

/* ---------- Footer ---------- */
.footer { background: #0b1f24; color: #cbd5e1; padding: 40px 0 28px; font-size: .9rem; }
.footer a { color: #5eead4; }
.footer .grid { gap: 22px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 4px; }
.footer .family { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); color: #94a3b8; }

/* ---------- Menu mobile ---------- */
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; flex: none;
}
.menu-btn svg { width: 22px; height: 22px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid #f1f5f9; }
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- Hero con illustrazione ---------- */
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
.hero-art { max-width: 460px; width: 100%; margin: 0 auto; }
.hero-art svg { width: 100%; height: auto; }
.sectors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.sectors li { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }

/* ---------- Quattro passi ---------- */
.flow { counter-reset: f; }
.flow .card { position: relative; padding-top: 58px; }
.flow .card::before {
  counter-increment: f; content: counter(f);
  position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.flow .card em { display: block; font-style: normal; color: var(--primary-dark); background: #f0fdfa; border-radius: 8px; padding: 8px 10px; margin-top: 10px; font-size: .9rem; }

/* ---------- Badge integrazioni ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.badges li {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; font-size: .95rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); max-width: 100%;
}
.badges li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex: none; }
.badges li.chibri { border-color: #99f6e4; background: #f0fdfa; }
.badges li small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.legend { margin-top: 14px; }

/* ---------- Sicurezza ---------- */
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.sec-list li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.sec-list li .icon { margin: 0; }
.sec-list li b { display: block; }
.sec-list li span { color: var(--muted); font-size: .93rem; }

/* ---------- Nota prezzi ---------- */
.price-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 24px 0 0; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--primary-dark); text-align: center; }
.price-status { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 8px; }
.toggle-wrap { text-align: center; }

/* ---------- Riquadro rassicurante ---------- */
.reassure { background: #f0fdfa; border: 1px solid #99f6e4; border-left: 5px solid var(--primary); border-radius: var(--radius); padding: 16px 18px; }
.reassure strong { display: block; font-size: 1.05rem; color: var(--primary-dark); }
.interval-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.interval-pick label { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.interval-pick input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.interval-pick label:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6, 182, 212, .15); }
.interval-pick .save { font-size: .75rem; color: var(--primary); }
.plan-pick .radio-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #94a3b8; vertical-align: -3px; margin-right: 8px; }
.plan-pick input:checked + .card .radio-dot { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 45%, transparent 50%); }

/* ---------- Schermi medi ---------- */
@media (min-width: 640px) {
  .sec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.6rem; }
  .conn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form .row2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal { padding: 36px 40px; }
}

/* ---------- Schermi grandi ---------- */
@media (min-width: 960px) {
  h2 { font-size: 2rem; }
  .nav { display: flex; }
  .nav-login { display: inline; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .sec-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 80px 0 90px; }
  .hero h1 { font-size: 3.1rem; }
  .section { padding: 80px 0; }
  .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .ai-box .body { grid-template-columns: 1fr 1fr; }
  .price-card .tagline { min-height: 2.9em; }
  .card h2 { font-size: 1.5rem; }
  .footer .grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 640px) and (max-width: 959px) {
  .grid.g3, .grid.g4, .grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- telefono prima di tutto (27/09/2026) ---------- */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img, video, svg { max-width: 100%; height: auto; }
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; }
  .btn { min-height: 48px; }
  table { display: block; overflow-x: auto; }
}
