/* Tema chiaro "da sviluppatore" in tonalità acqua: fondo verde-azzurro tenue con griglia di puntini,
   riquadri bianchi, un solo accento verde petrolio (teal) con l'azzurro per sfumature e dettagli,
   Inter per i testi e JetBrains Mono per etichette e dettagli.
   Logo e riquadro di codice delle competenze sono blu-petrolio scuro, come un editor. */
:root {
  color-scheme: light;
  --bg: #eaf4f3;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-2: rgba(15, 118, 110, .06);
  --sunken: #eef7f6;
  --line: rgba(13, 79, 87, .12);
  --line-strong: rgba(13, 79, 87, .22);
  --ink: #0b2530;
  --text-2: #2b4752;
  --muted: #5a7480;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 118, 110, .08);
  --accent-line: rgba(15, 118, 110, .32);
  --sky: #0284c7;
  --deep: #0b2530;
  --deep-2: #12384a;
  --green: #047857;
  --violet: #7c3aed;
  --amber: #b45309;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 37, 48, .05), 0 10px 28px rgba(13, 79, 87, .08);
  --font: "Inter", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Inter", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: transparent; /* lo sfondo è su html e .bg-fx */
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(15, 118, 110, .18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Sfondo: griglia di puntini e una luce tenue in alto ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 15% -5%, rgba(20, 184, 166, .22), transparent 70%),
    radial-gradient(ellipse 55% 40% at 95% 5%, rgba(14, 165, 233, .18), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(14, 165, 233, .1), transparent 70%),
    linear-gradient(180deg, #e3f3f0 0%, #eaf4f6 45%, #eef5f8 100%);
}
.bg-fx .grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(13, 79, 87, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .45) 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .45) 45%, transparent 85%);
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(240, 249, 247, .82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #14b8a6, #0ea5e9 60%, transparent);
  opacity: .55;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  color: #5eead4;
}
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1.05rem; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
.brand-text small { color: var(--muted); font-family: var(--mono); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  font-weight: 500;
  font-size: .92rem;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav-ico { display: none; }
.menu-toggle { display: none; }
.nav { margin-left: auto; }

/* Scelta della lingua: un menu a tendina nativo (comodo anche sul telefono) */
.lang-pick {
  position: relative; display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel);
  color: var(--text-2); transition: border-color .2s, color .2s;
}
.lang-pick:hover, .lang-pick:focus-within { border-color: var(--accent); color: var(--accent); }
.lang-pick svg { position: absolute; left: 9px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.lang-pick select {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 28px 7px 31px; font-size: .86rem; font-weight: 600; color: inherit;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.lang-pick select:focus { outline: none; }
.lang-pick select option { color: var(--ink); }
/* Schermi medi: logo e lingua sopra, le schede sotto su tutta la larghezza */
@media (max-width: 1040px) {
  .brand { flex: 1; }
  .lang-pick { order: 1; }
  .nav { order: 2; width: 100%; margin-left: 0; }
}
.badge.lang-note { display: inline-flex; align-items: center; gap: 5px; background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.lang-note svg { width: 12px; height: 12px; }

.draft-banner {
  padding: 10px clamp(16px, 4vw, 48px);
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #78350f;
  font-size: .9rem;
}
.draft-banner a { margin-left: 8px; font-weight: 600; color: var(--amber); }

/* ---------- Layout ---------- */
.main {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px) 80px;
  outline: none;
  counter-reset: sezione;
  animation: fadeUp .4s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { margin-bottom: 34px; }
.page-head h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.page-head p { margin: 0; color: var(--muted); max-width: 660px; font-size: 1.05rem; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: rgba(240, 249, 247, .7);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
}
.footer-lock { color: var(--muted); opacity: .45; display: inline-flex; padding: 6px; transition: opacity .2s, color .2s; }
.footer-lock:hover { opacity: 1; color: var(--accent); }
.footer-lock svg { width: 18px; height: 18px; }

/* ---------- Bottoni e form ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(11, 37, 48, .1), 0 6px 16px rgba(15, 118, 110, .22);
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--panel); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(11, 37, 48, .05); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; box-shadow: none; }
.btn.danger:hover { background: #fee2e2; }
.btn.small { padding: 7px 12px; font-size: .86rem; border-radius: 7px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field > small { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field select option { background: var(--panel-solid); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.field .err { color: var(--danger); font-size: .8rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all .2s;
}
.chip:hover { color: var(--accent); border-color: var(--accent-line); }
.chip.active { color: var(--accent-ink); border-color: transparent; background: var(--accent); }

.no-photo { width: 100%; height: 100%; display: grid; place-items: center; color: #94a3b8; background: var(--sunken); }
.no-photo svg { width: 42px; height: 42px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  background: var(--sunken);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.item-meta { color: var(--muted); font-size: .85rem; }
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }

.spec { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Riquadri: base comune ---------- */
.card, .form-card, .area-card, .service, .program {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Programmi ---------- */
.programs { display: flex; flex-direction: column; gap: 24px; }
.program {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.program:hover { border-color: var(--accent-line); }
.program-media {
  position: relative;
  display: grid; place-items: center;
  min-height: 220px;
  background:
    radial-gradient(circle at 30% 25%, rgba(15, 118, 110, .1), transparent 60%),
    radial-gradient(rgba(11, 37, 48, .1) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--sunken);
}
/* Screenshot: intero, nelle sue proporzioni, dentro una cornice a finestra */
.program-media.has-shot {
  place-items: start stretch;
  padding: 26px;
  border-right: 1px solid var(--line);
}
.shot {
  position: sticky; top: 92px;
  display: block; width: 100%;
  padding: 0; margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(11, 37, 48, .14);
  cursor: zoom-in;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.shot:hover, .shot:focus-visible { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 18px 40px rgba(11, 37, 48, .18); }
.shot-bar { display: flex; gap: 6px; padding: 8px 11px; background: #e6f3f1; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.shot-bar i:nth-child(2) { background: #fbbf24; }
.shot-bar i:nth-child(3) { background: #34d399; }
.shot img { display: block; width: 100%; height: auto; }
.shot-zoom {
  position: absolute; right: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(11, 37, 48, .82);
  color: #fff; font-family: var(--mono); font-size: .72rem;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { opacity: 1; transform: none; }
.modal-card.wide { width: min(1200px, 100%); padding: 22px; }
.shot-title { margin: 0 50px 14px 4px; font-size: 1.15rem; }
.shot-full { display: block; width: 100%; height: auto; max-height: calc(100vh - 130px); object-fit: contain; border-radius: 8px; background: var(--sunken); }
.program-media .initial { font-family: var(--mono); font-size: 4rem; font-weight: 600; color: var(--accent); }
.program-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.program-body h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.025em; }
.program-body .tagline { color: var(--accent); margin: 2px 0 0; font-weight: 500; }
.program-body .text { white-space: pre-line; color: var(--text-2); }
.program-body .text a, .trial p a, .req a { overflow-wrap: anywhere; }
.program.game .row { margin-top: 6px; }
.program.game .play-now { padding: 13px 26px; font-size: 1.02rem; }
.features { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.features li { position: relative; padding-left: 22px; color: var(--text-2); }
.features li::before { content: "▹"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--mono); }
.trial {
  border-radius: 10px;
  background: #f0fdf7;
  border: 1px solid #c6f0dc;
  border-left: 3px solid var(--ok);
  padding: 16px 18px;
}
.trial h4 { margin: 0 0 4px; color: var(--green); font-family: var(--mono); font-size: .86rem; font-weight: 600; }
.trial p { margin: 0 0 12px; white-space: pre-line; color: var(--text-2); }
.details-toggle { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; text-align: left; cursor: pointer; }
.req { font-size: .88rem; color: var(--muted); white-space: pre-line; }

/* ---------- Home: pubblicità per le aziende ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 64px);
  padding: clamp(8px, 2vw, 24px) 0 clamp(24px, 4vw, 40px);
  margin-bottom: clamp(48px, 7vw, 88px);
}
.hero-eyebrow { display: inline-block; margin-bottom: 18px; color: var(--green); font-family: var(--mono); font-size: .9rem; }
.hero-eyebrow::before { content: "> "; color: var(--muted); }
.hero-eyebrow::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 4px; vertical-align: -.15em; background: var(--ok); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero h1, .about-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.045em;
  color: var(--ink);
  text-wrap: balance;
}
/* Parole evidenziate nei titoli (*così* nei testi) */
.hl { background: linear-gradient(90deg, #0f766e, #0284c7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin: 0 0 30px; max-width: 600px; color: var(--text-2); font-size: 1.12rem; line-height: 1.65; }
.btn.big { padding: 14px 22px; font-size: 1rem; border-radius: 10px; }
.btn.big svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn.big:hover svg { transform: translateX(3px); }
.hero-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: .95rem; }
.hero-points li { display: flex; align-items: flex-start; gap: 10px; }
.hero-points svg { flex: none; width: 18px; height: 18px; margin-top: 3px; padding: 3px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
/* Il grande pulsante della Home */
.btn.hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  width: 100%; max-width: 560px; justify-content: center;
  padding: 19px 28px; border-radius: 14px;
  font-size: 1.14rem; font-weight: 700; letter-spacing: -.01em; text-align: center;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  box-shadow: 0 2px 4px rgba(11, 37, 48, .12), 0 14px 32px rgba(15, 118, 110, .35);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn.hero-cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 4px 8px rgba(11, 37, 48, .14), 0 20px 40px rgba(15, 118, 110, .42); }
.btn.hero-cta svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.hero-cta svg:last-child { transition: transform .2s; }
.btn.hero-cta:hover svg:last-child { transform: translateX(4px); }

/* Foto nella Home: libera, con nome e bollino in un riquadro sotto */
.home-side { justify-self: center; margin: 0; width: clamp(260px, 30vw, 360px); }
.home-photo { width: calc(100% - 18px); margin: 0 18px 0 0; }
.home-photo img { object-position: 50% 18%; }
.hero-caption {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 34px; padding: 14px 16px;
  border-radius: 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-who { display: flex; flex-direction: column; line-height: 1.35; }
.hero-who strong { font-size: 1.02rem; }
.hero-who span { color: var(--muted); font-size: .84rem; }
.hero-caption-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.hero-caption-row a { color: var(--accent); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero-caption-row a:hover { text-decoration: underline; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0e7490); color: #fff;
  font-size: .8rem; font-weight: 700;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .28);
}
.hero-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Un esempio concreto (il finto terminale, spostato sotto quando nella Home c'è la foto) */
.example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.example-text p { margin: 0 0 22px; color: var(--text-2); font-size: 1.08rem; line-height: 1.7; }
.example-text .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Finto terminale: un'automazione che lavora da sola */
.demo { margin: 0; }
.demo-frame { position: relative; isolation: isolate; margin: 0 18px 18px 0; }
.demo-frame::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
  border: 1px solid var(--accent-line); border-radius: 16px;
  background: radial-gradient(rgba(15, 118, 110, .28) 1px, transparent 1px) 0 0 / 12px 12px;
}
.demo-win { border-radius: 14px; overflow: hidden; background: var(--deep); border: 1px solid var(--deep-2); box-shadow: 0 24px 60px rgba(11, 37, 48, .28), 0 2px 6px rgba(11, 37, 48, .12); }
.demo-win .code-bar { padding: 10px 14px; }
.demo-win .code-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-live { white-space: nowrap; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #5eead4; font-family: var(--mono); font-size: .7rem; font-weight: 500; }
.demo-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.demo-body { padding: 20px 22px 22px; font-family: var(--mono); font-size: .84rem; line-height: 1.6; color: #cbd5e1; }
.demo-cmd { color: #94a3b8; margin-bottom: 12px; }
.demo-step { display: flex; gap: 10px; padding: 5px 0; }
.demo-ok { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; background: rgba(52, 211, 153, .16); color: #6ee7b7; font-size: .72rem; font-weight: 700; }
.demo-bar { height: 6px; margin: 16px 0 18px; border-radius: 6px; background: rgba(148, 163, 184, .16); overflow: hidden; }
.demo-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #38bdf8); transform-origin: left; }
.demo-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-result div { padding: 12px 14px; border-radius: 10px; background: rgba(148, 163, 184, .08); border: 1px solid rgba(148, 163, 184, .14); }
.demo-result div:first-child { background: rgba(20, 184, 166, .12); border-color: rgba(94, 234, 212, .3); }
.demo-result small { display: block; color: #94a3b8; font-size: .7rem; }
.demo-result strong { display: block; font-family: var(--font); font-size: clamp(1.05rem, 2.1vw, 1.35rem); font-weight: 800; letter-spacing: -.02em; color: #5eead4; line-height: 1.3; }
.demo-result .demo-old { color: #94a3b8; text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .8); text-decoration-thickness: 2px; }
.demo figcaption { margin-top: 14px; color: var(--muted); font-family: var(--mono); font-size: .74rem; text-align: center; }
/* Animazione: le righe compaiono una alla volta, poi la barra si riempie e arriva il risultato */
.demo-win.run .demo-step { animation: stepIn .45s ease both; animation-delay: calc(.5s + var(--i) * .7s); }
.demo-win.run .demo-ok { animation: okIn .3s ease both; animation-delay: calc(.85s + var(--i) * .7s); }
.demo-win.run .demo-bar i { animation: fill 3.1s cubic-bezier(.4, 0, .2, 1) .4s both; }
.demo-win.run .demo-result { animation: stepIn .5s ease 3.6s both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes okIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.home-section { margin-bottom: clamp(56px, 8vw, 96px); counter-increment: sezione; }
#contatti, #attestati, #metodo { scroll-margin-top: 100px; }
.section-title {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 22px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
}
.section-title::before { content: counter(sezione, decimal-leading-zero) "."; font-family: var(--mono); font-size: .62em; font-weight: 500; color: var(--accent); }
.section-title::after { content: ""; flex: 1; max-width: 320px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(20, 184, 166, .6), rgba(14, 165, 233, .35), transparent); }
.section-sub { margin: -8px 0 26px; max-width: 680px; color: var(--muted); }
.section-sub strong { color: var(--text-2); font-weight: 600; }

/* Ti riconosci? */
.pains { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pain { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .7); border: 1px solid var(--line); }
.pain p { margin: 0; color: var(--text-2); font-weight: 500; line-height: 1.45; }
.pain-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff4e6; color: var(--amber); border: 1px solid #fde3c0; }
.pain-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pains-close { margin: 24px 0 0; font-size: 1.12rem; color: var(--text-2); }
.pains-close strong { color: var(--accent); }

/* Cosa posso fare per te / Come lavoro */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.service { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.service::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #14b8a6, #0ea5e9); opacity: 0; transition: opacity .25s; }
.service:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 2px 4px rgba(11, 37, 48, .05), 0 16px 32px rgba(11, 37, 48, .08); }
.service:hover::after { opacity: 1; }
.service h3 { margin: 6px 0 0; font-size: 1.1rem; letter-spacing: -.015em; }
.service p { margin: 0; color: var(--muted); font-size: .94rem; }

/* Come funziona */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: none; }
.step { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .75)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--deep), var(--deep-2)); color: #5eead4; font-family: var(--mono); font-weight: 600; box-shadow: 0 6px 16px rgba(11, 37, 48, .2); }
.step h3 { margin: 16px 0 6px; font-size: 1.1rem; letter-spacing: -.015em; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }

/* Cosa ho già costruito */
.home-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.area-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px;
  color: var(--ink); text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.area-card:hover, .area-card:focus-visible { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 2px 4px rgba(11, 37, 48, .05), 0 16px 32px rgba(11, 37, 48, .08); }
.area-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, rgba(20, 184, 166, .14), rgba(14, 165, 233, .14)); border: 1px solid var(--accent-line); color: var(--accent); }
.area-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.area-card h3 { margin: 6px 0 0; font-size: 1.08rem; letter-spacing: -.015em; }
.area-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.area-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.area-more { margin-top: auto; padding-top: 8px; color: var(--accent); font-family: var(--mono); font-size: .8rem; }

/* Banner scuro di invito al contatto */
.cta-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
  margin-bottom: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 5vw, 48px) clamp(24px, 5vw, 56px);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, rgba(14, 165, 233, .35), transparent 70%),
    radial-gradient(ellipse 50% 80% at 0% 100%, rgba(20, 184, 166, .3), transparent 70%),
    linear-gradient(135deg, var(--deep), var(--deep-2));
  color: #e2f3f1;
  box-shadow: 0 24px 60px rgba(11, 37, 48, .25);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 20px 20px; pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band > div:first-child { flex: 1 1 380px; }
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; color: #fff; text-wrap: balance; }
.cta-band .hl { background: linear-gradient(90deg, #5eead4, #7dd3fc); -webkit-background-clip: text; background-clip: text; }
.cta-band p { margin: 0; color: #a9c7cc; font-size: 1.05rem; }
.btn.light { background: #fff; color: var(--deep); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.btn.light:hover { background: #ccfbf1; }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); box-shadow: none; }
.btn.outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ---------- Chi sono ---------- */
.about-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 80px);
  padding: clamp(8px, 2vw, 24px) 0 clamp(24px, 4vw, 40px);
  margin-bottom: clamp(48px, 7vw, 88px);
}
.about-hero .hero-lead { max-width: 640px; }
.about-hero.solo { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.hero-mark {
  width: clamp(140px, 18vw, 210px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 14px; border: 1px solid var(--accent-line); background: var(--panel); box-shadow: var(--shadow);
}
.hero-mark span { font-family: var(--mono); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 600; color: var(--accent); }
/* Foto con una cornice sfalsata dietro, come un riquadro di selezione */
.hero-photo {
  position: relative;
  isolation: isolate;
  width: clamp(230px, 28vw, 340px); aspect-ratio: 4 / 5;
  margin: 0 18px 18px 0;
}
.hero-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
  border: 1px solid var(--accent-line); border-radius: 16px;
  background: radial-gradient(rgba(15, 118, 110, .3) 1px, transparent 1px) 0 0 / 12px 12px;
}
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: var(--sunken); box-shadow: 0 20px 50px rgba(11, 37, 48, .18); }

.home-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.about-story { padding: clamp(24px, 3.5vw, 36px); }
.about-story p { margin: 0 0 16px; font-size: 1.02rem; line-height: 1.75; color: var(--text-2); white-space: pre-line; }
.about-story p:last-child { margin-bottom: 0; }
.about-story .about-lead { margin-bottom: 22px; padding-left: 18px; border-left: 3px solid; border-image: linear-gradient(180deg, #14b8a6, #0ea5e9) 1; font-size: 1.22rem; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; color: var(--ink); }
.about-side { display: flex; flex-direction: column; gap: 16px; }
.home-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-facts div { padding: 14px 8px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); text-align: center; box-shadow: 0 1px 2px rgba(11, 37, 48, .04); }
.home-facts strong { display: block; width: fit-content; margin: 0 auto; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; line-height: 1.25; background: linear-gradient(90deg, #0f766e, #0284c7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-facts span { color: var(--muted); font-size: .78rem; }
.about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.about-side .code-card { margin-top: 0; }
.about-certs { align-self: flex-start; color: var(--accent); font-family: var(--mono); font-size: .84rem; text-decoration: none; }
.about-certs:hover { text-decoration: underline; }

/* Competenze scritte come un piccolo file di codice (scuro, come un editor) */
.code-card { margin-top: 22px; border-radius: 10px; border: 1px solid var(--deep-2); background: var(--deep); overflow: hidden; box-shadow: 0 10px 28px rgba(11, 37, 48, .18); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--deep-2); border-bottom: 1px solid rgba(148, 163, 184, .15); }
.code-bar i { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.code-bar i:nth-child(2) { background: #fbbf24; }
.code-bar i:nth-child(3) { background: #34d399; }
.code-bar span { margin-left: 8px; color: #94a3b8; font-family: var(--mono); font-size: .74rem; }
.code-card pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: .85rem; line-height: 1.75; color: #cbd5e1; }
.code-card code { font: inherit; padding: 0; background: none; }
.tok-var { color: #67e8f9; }
.tok-op { color: #c4a1ff; }
.tok-str { color: #86efac; }

/* ---------- Formazione certificata (Home): solo le immagini degli attestati ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cert-shot {
  position: relative; display: block; width: 100%;
  padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .3s, border-color .25s, box-shadow .3s;
}
.cert-shot img { display: block; width: 100%; aspect-ratio: 1280 / 938; object-fit: cover; }
.cert-shot:hover, .cert-shot:focus-visible { transform: translateY(-4px) rotate(-.4deg); border-color: var(--accent-line); box-shadow: 0 4px 8px rgba(11, 37, 48, .06), 0 22px 44px rgba(11, 37, 48, .14); }
.cert-shot:hover .shot-zoom, .cert-shot:focus-visible .shot-zoom { opacity: 1; transform: none; }
.cert-full { max-height: calc(100vh - 200px); }
.cert-modal-link { margin: 14px 4px 0; }
.cert-modal-link a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Contatti (in fondo alla Home) ---------- */
.info-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.card { padding: 24px 26px; }
.card h2 { margin: 0 0 14px; font-size: 1.15rem; letter-spacing: -.02em; }
.card .text { white-space: pre-line; color: var(--text-2); }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-list li { display: flex; gap: 14px; align-items: center; padding: 8px; margin: -8px; border-radius: 9px; transition: background .2s; }
.contact-list li:hover { background: var(--panel-2); }
.contact-list .ico { width: 40px; height: 40px; border-radius: 9px; background: linear-gradient(135deg, rgba(20, 184, 166, .14), rgba(14, 165, 233, .14)); border: 1px solid var(--accent-line); color: var(--accent); display: grid; place-items: center; flex: none; }
.contact-list .ico svg { width: 18px; height: 18px; }
.contact-list small { display: block; color: var(--muted); font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.contact-list a, .contact-list strong { color: var(--ink); font-weight: 600; text-decoration: none; word-break: break-all; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Modale ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 37, 48, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-card {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(11, 37, 48, .25);
  padding: 28px;
  animation: pop .22s cubic-bezier(.2, .8, .2, 1);
  scrollbar-color: var(--line-strong) transparent;
}
.modal-card.narrow { width: min(560px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-size: 1.35rem; line-height: 1;
  z-index: 2;
  transition: all .2s;
}
.modal-x:hover { border-color: var(--accent); color: var(--accent); }
body.modal-open { overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translate(-50%, 30px);
  opacity: 0; pointer-events: none;
  background: var(--ink);
  box-shadow: 0 12px 40px rgba(11, 37, 48, .3);
  color: #fff;
  padding: 12px 18px;
  border-radius: 9px;
  font-weight: 500; font-size: .92rem;
  z-index: 200;
  transition: opacity .2s, transform .2s;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #991b1b; }

/* ---------- Admin ---------- */
.login { max-width: 440px; margin: 40px auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.tabs button {
  border: 0; background: none;
  padding: 8px 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 7px;
  white-space: nowrap;
  transition: all .2s;
}
.tabs button:hover { color: var(--ink); background: var(--panel-2); }
.tabs button.active { color: var(--accent); background: var(--accent-soft); }
.tabs .count { background: var(--sunken); border-radius: 5px; padding: 1px 7px; font-family: var(--mono); font-size: .72rem; margin-left: 6px; }

.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color .2s;
}
.admin-row:hover { border-color: var(--accent-line); }
.admin-row .thumb { width: 60px; height: 60px; border-radius: 7px; overflow: hidden; background: var(--sunken); flex: none; }
.admin-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-row .thumb .no-photo svg { width: 24px; height: 24px; }
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .info span { color: var(--muted); font-size: .86rem; }
.admin-row select { padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font-size: .86rem; }
.admin-row select option { background: var(--panel-solid); }

.form-card { padding: 24px; }
.form-card h2 { margin: 0 0 16px; font-size: 1.15rem; letter-spacing: -.02em; }
.form-section {
  margin: 26px 0 10px;
  font-family: var(--mono);
  font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
}
.form-section::before { content: "// "; color: var(--muted); }

.photo-tile { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--sunken); border: 1px solid var(--line-strong); }
.photo-tile.cover { border-color: var(--accent); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }

.notice { padding: 12px 15px; border-radius: 9px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: .9rem; }
.notice a { color: var(--amber); }
.notice.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.steps { margin: 8px 0 0; padding-left: 20px; }
.steps li { margin: 4px 0; }
code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line); }

details summary { list-style-position: inside; }

.sticky-actions {
  position: sticky; bottom: -1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 35%);
  padding: 22px 0 4px;
  margin-top: 8px;
}

input[type="checkbox"] { accent-color: var(--accent); }

/* ---------- Insight (statistiche) ---------- */
:root { --viz-1: #0891b2; --viz-2: #7c3aed; --viz-track: rgba(11, 37, 48, .07); }
.ins-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ins-live { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ins-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.ins-dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(5, 150, 105, .18); animation: insPulse 2s ease-in-out infinite; }
@keyframes insPulse { 50% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); } }
.ins-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ins-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: help; min-width: 0; }
.ins-kpi small { color: var(--muted); font-size: .8rem; }
.ins-kpi strong { font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ins-delta { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.ins-delta.up { color: var(--ok); }
.ins-delta.down { color: var(--danger); }
.ins-note { margin: 10px 0 20px; font-size: .82rem; }
.ins-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.form-card .ins-head h2 { margin: 0; font-size: 1.05rem; }
.ins-sub { margin: 18px 0 10px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.ins-legend { display: flex; gap: 14px; font-size: .84rem; color: var(--muted); }
.ins-legend span, .ins-tip span { display: inline-flex; align-items: center; gap: 6px; }
.ins-legend i, .ins-tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ins-trend { position: relative; width: 100%; min-height: 240px; }
.ins-trend svg { display: block; overflow: visible; }
.ins-grid-line { stroke: var(--line); stroke-width: 1; }
.ins-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ins-cross { stroke: var(--line-strong); stroke-width: 1; }
.ins-pt { stroke: var(--panel-solid); stroke-width: 2; }
.ins-tip { position: absolute; top: 8px; pointer-events: none; display: flex; flex-direction: column; gap: 3px; min-width: 170px; padding: 10px 12px; border-radius: 8px; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(11, 37, 48, .14); font-size: .84rem; }
.ins-tip b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.ins-tip i:not([style]) { background: transparent; }
.ins-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ins-grid .form-card { margin: 0; min-width: 0; }
.ins-wide { grid-column: 1 / -1; }
.ins-bars { display: flex; flex-direction: column; gap: 8px; }
.ins-bar-row { display: grid; grid-template-columns: minmax(90px, 38%) minmax(40px, 1fr) auto; align-items: center; gap: 10px; font-size: .88rem; }
.ins-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-bar-track { display: block; height: 10px; border-radius: 4px; background: var(--viz-track); overflow: hidden; }
.ins-bar-track > span { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-1); }
.ins-bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ins-bar-val small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }
.ins-table-wrap { overflow-x: auto; }
.ins-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ins-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ins-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-table tr:last-child td { border-bottom: 0; }
.ins-col-bar { width: 38%; min-width: 160px; }
.ins-cell-bar { display: flex; align-items: center; gap: 10px; }
.ins-cell-bar .ins-bar-track { flex: 1; }
.ins-recent td:nth-child(4) { white-space: normal; min-width: 160px; }
.ins-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: end; gap: 2px; height: 120px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.ins-hour { height: 100%; display: flex; align-items: flex-end; cursor: help; }
.ins-hour:hover { background: var(--panel-2); }
.ins-hour i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--viz-1); }
.ins-hours-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .74rem; margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .info-grid, .home-two { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .demo { max-width: 540px; }
  .about-hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .example { grid-template-columns: minmax(0, 1fr); }
  .home-side { width: min(340px, 100%); margin: 8px auto 0; }
  .about-hero .hero-photo { width: min(260px, 70vw); }
  .program { grid-template-columns: minmax(0, 1fr); }
  .program-media { min-height: 0; aspect-ratio: 16 / 7; }
  .program-media.has-shot { aspect-ratio: auto; padding: 20px 20px 0; place-items: start center; border-right: 0; background: transparent; }
  .shot { position: relative; top: 0; max-width: 680px; }
  .ins-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  /* Su telefono le schede diventano una griglia ordinata 2 x 2 di caselle uguali, con icona */
  .topbar { position: relative; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  /* 6 schede: una griglia ordinata 3 x 2 */
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    min-height: 58px; padding: 8px 4px;
    border-radius: 9px;
    background: var(--panel);
    border: 1px solid var(--line);
    font-size: .78rem; line-height: 1.15; text-align: center;
  }
  .nav a.active { border-color: var(--accent-line); background: var(--accent-soft); }
  .nav-ico {
    display: block; width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .nav a:not(.active) .nav-ico { color: var(--accent); opacity: .8; }
  .grid-2 { grid-template-columns: 1fr; }
  .section-title::after { display: none; }
  .home-facts strong { font-size: 1.25rem; }
  .hero-lead { font-size: 1.04rem; }
  .hero .row .btn, .about-hero .row .btn { flex: 1 1 100%; }
  .btn.hero-cta { padding: 15px 16px; gap: 10px; font-size: 1rem; }
  .btn.hero-cta svg { width: 19px; height: 19px; }
  .demo-body { padding: 16px; font-size: .76rem; }
  .demo-result strong { font-size: 1.1rem; }
  .cta-band .row, .cta-band .row .btn { flex: 1 1 100%; }
  .pains, .services { grid-template-columns: minmax(0, 1fr); }
  .about-hero .hero-photo { width: min(220px, 62vw); }
  .about-story .about-lead { font-size: 1.1rem; }
  .code-card pre { font-size: .78rem; padding: 14px; }
  .ins-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ins-kpi strong { font-size: 1.3rem; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 14px 14px 0 0; max-height: 94vh; padding: 24px 16px; }
  .admin-row { flex-wrap: wrap; }
  .admin-row .info { flex-basis: calc(100% - 80px); }
  .program-body { padding: 20px; }
  .program-media.has-shot { padding: 14px 14px 0; }
  .modal-card.wide { border-radius: 14px 14px 0 0; padding: 18px 12px; }

  /* ---- Telefono: menu a scomparsa e prima schermata con titolo, foto e pulsante ---- */
  .topbar { gap: 10px; padding: 10px 16px; }
  .brand { flex: 1; min-width: 0; }
  .brand-text small { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .lang-pick select { padding: 7px 24px 7px 29px; font-size: .82rem; }
  .menu-toggle {
    order: 2; flex: none; display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  }
  .menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .menu-toggle .mt-close { display: none; }
  .topbar.nav-open .menu-toggle { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
  .topbar.nav-open .mt-open { display: none; }
  .topbar.nav-open .mt-close { display: inline; }
  .topbar { flex-wrap: wrap; }
  .nav { display: none; order: 3; width: 100%; padding-bottom: 4px; }
  .topbar.nav-open .nav { display: grid; animation: menuIn .18s ease both; }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

  .main { padding-top: 22px; }
  .hero { display: flex; flex-direction: column; gap: 0; padding-top: 0; margin-bottom: 56px; }
  .hero-text { display: contents; }
  .hero-eyebrow { order: 1; align-self: flex-start; margin-bottom: 10px; font-size: .76rem; line-height: 1.45; }
  .hero h1 { order: 2; margin-bottom: 18px; font-size: clamp(1.75rem, 8.2vw, 2.05rem); line-height: 1.08; }
  .hero .home-side, .hero .demo { order: 3; }
  .btn.hero-cta { order: 4; margin-top: 20px; max-width: none; }
  .hero-lead { order: 5; margin: 26px 0 0; font-size: 1rem; }
  .hero-points { order: 6; margin-top: 20px; }

  .home-side {
    width: 100%; margin: 0;
    display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: 16px; align-items: center;
  }
  .home-photo { width: auto; margin: 0 10px 10px 0; }
  .home-photo::before { inset: 10px -10px -10px 10px; border-radius: 14px; }
  .home-photo img { border-radius: 14px; }
  .hero-caption { margin: 0; padding: 0; gap: 12px; border: 0; background: none; box-shadow: none; }
  .hero-who strong { font-size: 1.05rem; }
  .hero-who span { font-size: .8rem; }
  .hero-caption-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-badge { font-size: .74rem; padding: 6px 11px; white-space: normal; line-height: 1.25; }
}
