/* ==========================================================================
   Piquo.it — Design System v2 "Halftone Atelier"
   Monocromatico, mono tracciata, grana di stampa, dot halftone.
   Solo tema chiaro.
   ========================================================================== */

:root {
  --bg: #f0f0ed;
  --bg-2: #e7e7e3;
  --ink: #0b0b0b;
  --mute: #686864;
  --dim: #9a9a95;
  --line: rgba(0, 0, 0, .18);
  --line-2: rgba(0, 0, 0, .08);
  --inv-bg: #0b0b0b;
  --inv-ink: #f0f0ed;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-op: .13;
  --f-disp: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --nav-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-full: calc(var(--nav-h) + var(--safe-t));
}


/* ---------- Base (scoped to new pages) ---------- */
body.pq-page, body.pq-legacy {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-disp);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.pq-page *, body.pq-page *::before, body.pq-page *::after { box-sizing: border-box; }
:where(body.pq-page) h1, :where(body.pq-page) h2, :where(body.pq-page) h3, :where(body.pq-page) h4, :where(body.pq-page) p, :where(body.pq-page) ul, :where(body.pq-page) ol, :where(body.pq-page) figure, :where(body.pq-page) dl, :where(body.pq-page) dd { margin: 0; padding: 0; }
:where(body.pq-page) ul, :where(body.pq-page) ol { list-style: none; }
:where(body.pq-page) a { color: inherit; text-decoration: none; }
:where(body.pq-page) img, :where(body.pq-page) canvas, :where(body.pq-page) svg { display: block; max-width: 100%; }
:where(body.pq-page) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
body.pq-page ::selection, body.pq-legacy ::selection { background: var(--inv-bg); color: var(--inv-ink); }

/* Grana di stampa (overlay globale) */
body.pq-page::after, body.pq-legacy::after {
  content: ""; position: fixed; inset: -50%; z-index: 9990; pointer-events: none;
  background-image: var(--grain); background-size: 240px 240px;
  opacity: var(--grain-op);
  animation: pq-grain 1.1s steps(6) infinite;
}
@keyframes pq-grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-3%, 2%); }
  33% { transform: translate(2%, -4%); } 50% { transform: translate(-4%, -1%); }
  67% { transform: translate(3%, 3%); } 83% { transform: translate(-1%, 4%); } 100% { transform: translate(0, 0); }
}

.pq-wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.pq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tipografia ---------- */
.pq-mono { font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; line-height: 1.5; }
.pq-mute { color: var(--mute); }
.pq-display {
  font-family: var(--f-disp); font-weight: 500; letter-spacing: -.055em; line-height: .95;
  font-size: clamp(44px, 8.4vw, 136px);
}
.pq-h2 {
  font-family: var(--f-disp); font-weight: 500; letter-spacing: -.045em; line-height: .96;
  font-size: clamp(34px, 5.4vw, 84px);
}
.pq-h3 { font-family: var(--f-disp); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(22px, 2.4vw, 34px); }
.pq-display em, .pq-h2 em, .pq-h3 em, .pq-serif {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em;
}
.pq-lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; font-weight: 300; color: var(--mute); max-width: 46ch; }
.pq-lead strong { color: var(--ink); font-weight: 400; }
.pq-p { font-weight: 300; color: var(--mute); max-width: 56ch; }

/* ---------- Bottoni ---------- */
.pq-btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 17px 24px; border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .25s, color .25s, gap .25s;
  cursor: pointer;
}
.pq-btn::after { content: "\2192"; transition: transform .25s; }
.pq-btn:hover { background: var(--ink); color: var(--bg); }
.pq-btn:hover::after { transform: translateX(4px); }
.pq-btn--solid { background: var(--ink); color: var(--bg); }
.pq-btn--solid:hover { background: transparent; color: var(--ink); }
.pq-btn--sm { padding: 11px 16px; font-size: 11px; }
.pq-btn:focus-visible, .pq-nav a:focus-visible, .pq-foot a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pq-link { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s; }
.pq-link:hover { border-color: var(--ink); }

/* ---------- Nav ---------- */
.pq-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 9000; height: var(--nav-full); padding-top: var(--safe-t);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
  font-family: var(--f-mono);
}
.pq-nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.pq-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.pq-logo-mark { display: grid; grid-template-columns: repeat(3, 5px); gap: 2.5px; }
.pq-logo-mark i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); display: block; }
.pq-logo-mark i:nth-child(1), .pq-logo-mark i:nth-child(9) { transform: scale(.45); }
.pq-logo-mark i:nth-child(2), .pq-logo-mark i:nth-child(4), .pq-logo-mark i:nth-child(6), .pq-logo-mark i:nth-child(8) { transform: scale(.75); }
.pq-logo-t { font-family: var(--f-disp); font-weight: 600; font-size: 21px; letter-spacing: -.05em; line-height: 1; }
.pq-logo-t span { color: var(--mute); font-weight: 400; }
.pq-nav-links { display: none; gap: 30px; align-items: center; }
.pq-nav-links a { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); transition: color .2s; position: relative; padding-block: 6px; }
.pq-nav-links a:hover, .pq-nav-links a[aria-current] { color: var(--ink); }
.pq-nav-links a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); }
.pq-nav-right { display: flex; align-items: center; gap: 10px; }
.pq-ico-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s; }
.pq-ico-btn:hover { background: var(--ink); color: var(--bg); }
.pq-ico-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.pq-nav-cta { display: none; }
.pq-burger { display: inline-flex; }
@media (min-width: 980px) {
  .pq-nav-links { display: flex; }
  .pq-nav-cta { display: inline-flex; }
  .pq-burger { display: none; }
}
.pq-menu {
  position: fixed; inset: var(--nav-full) 0 0 0; z-index: 8999; background: var(--bg);
  padding: 32px var(--pad) 40px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
}
html.pq-menu-open .pq-menu { opacity: 1; visibility: visible; transform: none; }
html.pq-menu-open body { overflow: hidden; }
.pq-menu a { font-family: var(--f-disp); font-weight: 500; letter-spacing: -.045em; font-size: clamp(38px, 11vw, 64px); line-height: 1.05; padding: 8px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: baseline; }
.pq-menu a small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; color: var(--mute); }
.pq-menu .pq-btn { margin-top: 28px; justify-content: space-between; font-size: 13px; letter-spacing: .14em; }

/* ---------- Sezioni ---------- */
.pq-sec { position: relative; padding-block: clamp(80px, 11vw, 150px); border-top: 1px solid var(--line-2); }
.pq-sec-head { display: grid; gap: 28px; margin-bottom: clamp(44px, 6vw, 88px); }
@media (min-width: 900px) { .pq-sec-head { grid-template-columns: 1fr 2.4fr; align-items: start; } }
.pq-idx { display: flex; gap: 14px; align-items: center; color: var(--mute); }
.pq-idx b { font-weight: 400; color: var(--ink); }
.pq-idx::before { content: ""; width: 28px; height: 1px; background: var(--ink); }
.pq-inv { background: var(--inv-bg); color: var(--inv-ink); --line: rgba(128,128,128,.35); --line-2: rgba(128,128,128,.2); --mute: #85857f; }
.pq-inv .pq-btn { border-color: var(--inv-ink); color: var(--inv-ink); }
.pq-inv .pq-btn:hover { background: var(--inv-ink); color: var(--inv-bg); }
.pq-inv .pq-btn--solid { background: var(--inv-ink); color: var(--inv-bg); }
.pq-inv .pq-btn--solid:hover { background: transparent; color: var(--inv-ink); }
.pq-inv .pq-idx b, .pq-inv .pq-idx::before { color: var(--inv-ink); }
.pq-inv .pq-idx::before { background: var(--inv-ink); }
.pq-inv .pq-lead strong { color: var(--inv-ink); }

/* ---------- Hero ---------- */
.pq-hero { position: relative; padding-top: calc(var(--nav-full) + clamp(28px, 4.5vw, 64px)); overflow: hidden; }
.pq-hero-top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: clamp(28px, 4vw, 56px); color: var(--mute); flex-wrap: wrap; }
.pq-hero-top .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 10px; animation: pq-pulse 2.4s ease-in-out infinite; }
@keyframes pq-pulse { 50% { opacity: .25; } }
.pq-hero h1 { max-width: 15ch; }
.pq-hero-row { display: grid; gap: 32px; margin-top: clamp(28px, 4vw, 52px); align-items: end; }
@media (min-width: 900px) { .pq-hero-row { grid-template-columns: 1fr auto; } }
.pq-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Tilted Grid (righe di immagini su cilindro 3D) ---------- */
.tg {
  position: relative; height: clamp(360px, 54vw, 800px); margin-top: clamp(8px, 2vw, 28px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 17%, #000 83%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 17%, #000 83%, transparent 100%);
  --w: clamp(140px, 18.5vw, 280px);
  --h: calc(var(--w) * 1.26);
  --r: calc(var(--w) * 2.5);
}
.tg::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 16%; z-index: 1; background: linear-gradient(to top, transparent, var(--bg)); pointer-events: none; }
.tg::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.tg-scene { position: absolute; inset: 0; perspective: 2600px; perspective-origin: 50% 30%; overflow: hidden; }
.tg-tilt { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(12deg) rotateZ(-6deg) translateY(2%); will-change: transform; }
.tg-row { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; transform: translate3d(0, var(--y), calc(var(--r) * -1)); }
.tg-spin { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.tg-tile {
  position: absolute; width: var(--w); height: var(--h); left: calc(var(--w) / -2); top: calc(var(--h) / -2);
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--r));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); background: #f6f6f3; overflow: hidden;
}
.tg-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-caption { position: absolute; z-index: 2; left: var(--pad); top: 0; color: var(--mute); }

/* ---------- Marquee ---------- */
.pq-marq { border-block: 1px solid var(--line-2); overflow: hidden; padding-block: 16px; white-space: nowrap; color: var(--mute); }
.pq-marq-in { display: inline-flex; gap: 0; animation: pq-marq 46s linear infinite; }
.pq-marq-in span { padding-inline: 22px; display: inline-flex; align-items: center; gap: 44px; }
.pq-marq-in span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .5; }
@keyframes pq-marq { to { transform: translateX(-50%); } }

/* ---------- Righe servizi (editoriali) ---------- */
.pq-rows { border-top: 1px solid var(--line); }
.pq-row {
  display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; padding: 30px 0; border-bottom: 1px solid var(--line);
  position: relative; transition: padding .35s cubic-bezier(.2, .8, .2, 1), background .25s, color .25s;
}
.pq-row > .n { color: var(--mute); padding-top: 10px; }
.pq-row h3 { font-family: var(--f-disp); font-weight: 500; letter-spacing: -.045em; line-height: 1; font-size: clamp(30px, 5vw, 68px); }
.pq-row h3 em { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; }
.pq-row p { grid-column: 2; color: var(--mute); font-weight: 300; max-width: 52ch; margin-top: 6px; }
.pq-row .go { grid-column: 2; margin-top: 14px; color: var(--ink); }
@media (min-width: 900px) {
  .pq-row { grid-template-columns: 70px 1.4fr 1fr 40px; align-items: center; padding-block: 38px; }
  .pq-row p { grid-column: 3; margin: 0; }
  .pq-row .go { grid-column: 4; margin: 0; text-align: right; font-size: 22px; transition: transform .3s; }
  .pq-row:hover { padding-inline: 20px; background: var(--ink); color: var(--bg); }
  .pq-row:hover > .n, .pq-row:hover p { color: var(--bg); opacity: .65; }
  .pq-row:hover .go { color: var(--bg); transform: translateX(6px); }
}
.pq-row--lead h3 { font-size: clamp(34px, 6vw, 84px); }
.pq-tag { display: inline-block; border: 1px solid currentColor; padding: 2px 7px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; vertical-align: middle; margin-left: 10px; opacity: .7; }

/* ---------- Griglie a celle ---------- */
.pq-cells { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pq-cells > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(22px, 2.6vw, 38px); }
.pq-c2 { grid-template-columns: repeat(1, 1fr); } .pq-c3 { grid-template-columns: repeat(1, 1fr); } .pq-c4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .pq-c2 { grid-template-columns: repeat(2, 1fr); } .pq-c3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .pq-c4 { grid-template-columns: repeat(4, 1fr); } }
.pq-cell h3, .pq-cell h4 { font-weight: 500; letter-spacing: -.03em; font-size: 22px; line-height: 1.1; margin: 22px 0 10px; }
.pq-cell p { font-weight: 300; color: var(--mute); font-size: 15px; }
.pq-cell .big { font-family: var(--f-disp); font-weight: 500; letter-spacing: -.06em; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.pq-cell .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.pq-cell .tags span { border: 1px solid var(--line); padding: 3px 8px; color: var(--mute); }
.pq-cell { transition: background .25s; }
.pq-cell:hover { background: var(--bg-2); }
.pq-inv .pq-cell:hover { background: rgba(128, 128, 128, .12); }

/* ---------- Stat strip ---------- */
.pq-stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .pq-stats { grid-template-columns: repeat(4, 1fr); } }
.pq-stats > div { padding: 28px 20px 28px 0; border-bottom: 1px solid var(--line-2); }
.pq-stats b { display: block; font-weight: 500; letter-spacing: -.06em; font-size: clamp(34px, 4.6vw, 64px); line-height: 1; margin-bottom: 8px; }

/* ---------- Terminale / finestra ---------- */
.pq-term { border: 1px solid var(--line); background: var(--bg-2); font-family: var(--f-mono); font-size: 12.5px; line-height: 1.75; overflow: hidden; }
.pq-term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.pq-term-bar i { width: 8px; height: 8px; border: 1px solid var(--mute); display: block; border-radius: 50%; }
.pq-term-bar span { margin-left: auto; }
.pq-term-body { padding: 18px 20px 22px; overflow-x: auto; white-space: pre; color: var(--ink); }
.pq-term-body .c { color: var(--dim); } .pq-term-body .m { color: var(--mute); } .pq-term-body .ok::before { content: "\2713  "; }

/* ---------- Passi ---------- */
.pq-steps { counter-reset: s; display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .pq-steps { grid-template-columns: repeat(var(--cols, 5), 1fr); border-left: 1px solid var(--line); } }
.pq-step { padding: 28px 22px 34px; border-bottom: 1px solid var(--line); position: relative; }
@media (min-width: 900px) { .pq-step { border-right: 1px solid var(--line); min-height: 280px; display: flex; flex-direction: column; } }
.pq-step .k { color: var(--mute); display: block; margin-bottom: auto; padding-bottom: 60px; }
.pq-step h3 { font-weight: 500; font-size: 26px; letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; }
.pq-step p { font-weight: 300; color: var(--mute); font-size: 14.5px; }
.pq-step .dots { position: absolute; top: 28px; right: 22px; display: grid; grid-template-columns: repeat(4, 5px); gap: 4px; }
.pq-step .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .15; }
.pq-step .dots i.on { opacity: 1; }

/* ---------- Split ---------- */
.pq-split { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 900px) { .pq-split { grid-template-columns: 1fr 1fr; } .pq-split--r > :first-child { order: 2; } }

/* ---------- Stack list ---------- */
.pq-kv { border-top: 1px solid var(--line); }
.pq-kv > div { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.pq-kv dt { color: var(--mute); } .pq-kv dd { font-weight: 300; }

/* ---------- Tool banner ---------- */
.pq-tool { display: grid; gap: 22px; padding: clamp(26px, 3vw, 44px); border: 1px solid var(--line); transition: background .25s, color .25s; }
.pq-tool:hover { background: var(--ink); color: var(--bg); }
.pq-tool:hover .pq-mute, .pq-tool:hover .pq-p { color: var(--bg); opacity: .65; }
.pq-tool h3 { font-weight: 500; letter-spacing: -.04em; font-size: clamp(26px, 3vw, 40px); line-height: 1; }

/* ---------- FAQ ---------- */
.pq-faq { border-top: 1px solid var(--line); }
.pq-faq details { border-bottom: 1px solid var(--line); }
.pq-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding: 26px 0; font-weight: 500; letter-spacing: -.03em; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.15; }
.pq-faq summary::-webkit-details-marker { display: none; }
.pq-faq summary::after { content: "+"; font-family: var(--f-mono); font-weight: 300; font-size: 26px; transition: transform .25s; flex-shrink: 0; }
.pq-faq details[open] summary::after { transform: rotate(45deg); }
.pq-faq details p { padding: 0 0 28px; max-width: 64ch; font-weight: 300; color: var(--mute); }

/* ---------- CTA finale ---------- */
.pq-cta h2 { max-width: 14ch; }
.pq-cta-mail { display: inline-block; margin-top: 36px; font-weight: 400; letter-spacing: -.04em; font-size: clamp(24px, 4vw, 54px); border-bottom: 1px solid var(--line); padding-bottom: 6px; word-break: break-all; transition: border-color .2s; }
.pq-cta-mail:hover { border-color: var(--ink); }

/* ---------- Sotto-pagine ---------- */
.pq-phero { padding-top: calc(var(--nav-full) + clamp(48px, 8vw, 110px)); padding-bottom: clamp(56px, 8vw, 110px); position: relative; overflow: hidden; }
.pq-phero h1 { max-width: 13ch; }
.pq-phero .pq-lead { margin-top: 32px; }
.pq-phero .pq-hero-cta { margin-top: 36px; }
.pq-crumb { display: inline-flex; gap: 10px; color: var(--mute); margin-bottom: 30px; }
.pq-crumb a:hover { color: var(--ink); }
.pq-halfbg { position: absolute; right: -4%; top: 12%; width: min(52vw, 640px); aspect-ratio: 1; pointer-events: none; opacity: .9;
  background: radial-gradient(circle, var(--ink) 1.3px, transparent 1.7px) 0 0 / 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 60% 40%, #000 0, transparent 68%); mask-image: radial-gradient(circle at 60% 40%, #000 0, transparent 68%); }
@media (max-width: 760px) { .pq-halfbg { opacity: .35; width: 90vw; } }
.pq-list { border-top: 1px solid var(--line); }
.pq-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); font-weight: 300; }
.pq-list li::before { content: "\2192"; font-family: var(--f-mono); color: var(--mute); }

/* ---------- Reveal ---------- */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; }

/* ---------- Footer con wordmark halftone ---------- */
.pq-foot { position: relative; border-top: 1px solid var(--line); background: var(--bg); overflow: hidden; font-family: var(--f-mono); }
.pq-foot-top { display: grid; gap: 40px; padding-block: clamp(56px, 7vw, 96px) clamp(24px, 4vw, 48px); }
@media (min-width: 900px) { .pq-foot-top { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.pq-foot h4 { color: var(--mute); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400; margin-bottom: 18px; }
.pq-foot li { margin-bottom: 10px; }
.pq-foot li a { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); opacity: .8; transition: opacity .2s; }
.pq-foot li a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.pq-foot-brand p { font-family: var(--f-disp); font-weight: 300; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.03em; line-height: 1.25; max-width: 22ch; margin: 22px 0 28px; }
.pq-ht { position: relative; width: 100%; padding-inline: var(--pad); }
.pq-ht canvas { width: 100%; aspect-ratio: 16 / 5.4; touch-action: pan-y; cursor: crosshair; }
.pq-foot-bot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-block: 22px 28px; border-top: 1px solid var(--line-2); color: var(--mute); }
.pq-foot-bot a:hover { color: var(--ink); }

/* ---------- Cookie ---------- */
.pq-cb { position: fixed; z-index: 9995; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--bg); border: 1px solid var(--ink); padding: 20px; font-family: var(--f-mono); }
.pq-cb p { font-size: 11.5px; line-height: 1.65; letter-spacing: .03em; color: var(--mute); margin: 0 0 16px; }
.pq-cb p a { color: var(--ink); text-decoration: underline; }
.pq-cb div { display: flex; gap: 8px; }
.pq-cb button { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 11px 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.pq-cb button.y { background: var(--ink); color: var(--bg); }
@media (min-width: 700px) { .pq-cb { left: auto; right: 24px; bottom: 24px; } }

/* ---------- Legacy (pagine con strumenti): ritocchi coerenti ---------- */
body.pq-legacy { font-family: var(--f-disp); }
body.pq-legacy h1, body.pq-legacy h2, body.pq-legacy h3, body.pq-legacy h4 { font-family: var(--f-disp) !important; letter-spacing: -.04em; font-weight: 500; }
body.pq-legacy h1.font-black, body.pq-legacy h2.font-black { font-weight: 500; letter-spacing: -.055em; }
body.pq-legacy .tracking-widest, body.pq-legacy .tracking-\[0\.3em\], body.pq-legacy .tracking-\[0\.2em\] { font-family: var(--f-mono); }
body.pq-legacy .material-symbols-outlined { font-family: 'Material Symbols Outlined' !important; letter-spacing: normal; }
body.pq-legacy > main, body.pq-legacy > header:first-of-type { scroll-margin-top: var(--nav-full); }

@media (prefers-reduced-motion: reduce) {
  body.pq-page::after, body.pq-legacy::after, .pq-marq-in, .pq-hero-top .dot { animation: none; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
}
@media (hover: none) { .pq-row:hover { padding-inline: 0; background: transparent; color: inherit; } .pq-tool:hover { background: transparent; color: inherit; } }

html:has(body.pq-page), body.pq-page { overflow-x: clip; }

/* ==========================================================================
   Glass Folder — cartella in vetro con contenuti (pagina Chi siamo, home)
   Stage disegnato a 340×272 e scalato da --k (impostato in piquo.js).
   Tono vetro latteo (tema chiaro).
   ========================================================================== */
.gf-grid { display: grid; gap: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 760px) { .gf-grid { grid-template-columns: repeat(3, 1fr); } }
.gf-card { display: flex; flex-direction: column; gap: 26px; }
.gf {
  --k: 1; --px: 0; --py: 0;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.36, .5, 1);
  --hinge: 0deg; --lift: 42px; --spread: 0px; --fan: 0deg; --stack: 15px;
  --gf-ink: #141416; --gf-soft: rgba(20, 20, 22, .55);
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 340 / 326; isolation: isolate;
  font-family: var(--f-disp); -webkit-tap-highlight-color: transparent;
}
.gf:hover, .gf:focus-within { --hinge: -11deg; --lift: -34px; --spread: 8px; --fan: 1.4deg; --stack: 10px; }
.gf[data-open] { --hinge: -24deg; --lift: -96px; --spread: 40px; --fan: 5deg; --stack: 30px; }
.gf-stage { position: absolute; left: 0; top: 0; width: 340px; height: 272px; transform-origin: 0 0; transform: translateY(calc(54px * var(--k))) scale(var(--k)); }
.gf-tilt { position: absolute; inset: 0; transform: perspective(1400px) rotateX(calc(var(--py) * -3deg)) rotateY(calc(var(--px) * 4deg)); transition: transform .9s var(--ease); }
.gf-shadow { position: absolute; left: 18px; right: 18px; bottom: -6px; height: 60px; border-radius: 40px; background: rgba(16, 18, 24, .3); filter: blur(22px); transform: translateX(calc(var(--px) * -8px)); transition: transform .9s var(--ease), opacity .9s var(--ease); }
.gf-back { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #f3f3f4, #e3e3e6); clip-path: path('M0 56A22 22 0 0 1 22 34L146 34C170 34 172 0 198 0L318 0A22 22 0 0 1 340 22L340 250A22 22 0 0 1 318 272L22 272A22 22 0 0 1 0 250Z'); transition: translate 1s var(--ease), opacity .9s var(--ease); }
.gf-art { position: absolute; left: -12px; top: -12px; width: 364px; height: 296px; max-width: none !important; opacity: 0; transform: translate(calc(var(--px) * -7px), calc(var(--py) * -6px)) scale(1.02); transition: transform 1.1s var(--ease), opacity .35s ease; }
.gf-art[data-ready] { opacity: 1; }
.gf-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 22%), radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.16), rgba(255,255,255,0) 60%); }
.gf-files { position: absolute; inset: 0; z-index: 5; pointer-events: none; clip-path: inset(-400px -400px 10px -400px); }
.gf-sheet {
  position: absolute; left: 34px; top: 96px; width: 272px; height: 184px; border-radius: 16px; overflow: hidden; pointer-events: auto; cursor: default;
  background: linear-gradient(180deg, #fff, #f2f2f0); color: #18181b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 .5px rgba(0,0,0,.1), 0 10px 26px -8px rgba(10,12,20,.28);
  transform-origin: 50% 100%;
  transform: translate(calc(var(--jx) + var(--slot) * var(--spread)), calc(var(--lift) + var(--depth) * var(--stack) * -1)) rotate(calc(var(--jr) + var(--slot) * var(--fan)));
  transition: transform .75s var(--spring) calc(var(--depth) * 40ms), box-shadow .4s var(--ease), translate .9s var(--ease), opacity .9s var(--ease);
}
.gf[data-open] .gf-sheet:hover { transform: translate(calc(var(--jx) + var(--slot) * var(--spread)), calc(var(--lift) + var(--depth) * var(--stack) * -1 - 18px)) rotate(calc(var(--slot) * var(--fan) * .6)); transition-delay: 0s; }
.gf-sheet-head { position: absolute; left: 14px; right: 14px; top: 11px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; white-space: nowrap; }
.gf-sheet-name { overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.gf-sheet-meta { flex: none; font-family: var(--f-mono); font-size: 10px; letter-spacing: .02em; opacity: .55; }
.gf-lines { position: absolute; left: 14px; right: 14px; top: 40px; display: flex; flex-direction: column; gap: 9px; }
.gf-lines i { display: block; height: 5px; border-radius: 3px; background: currentColor; opacity: .08; }
.gf-lines i:first-child { height: 9px; margin-bottom: 4px; opacity: .14; }
.gf-front {
  position: absolute; left: 0; top: 74px; width: 340px; height: 198px; z-index: 10;
  clip-path: path('M0 22A22 22 0 0 1 22 0L118 0C144 0 146 32 172 32L318 32A22 22 0 0 1 340 54L340 176A22 22 0 0 1 318 198L22 198A22 22 0 0 1 0 176Z');
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  transform-origin: 50% 100%; transform: perspective(760px) rotateX(var(--hinge));
  transition: transform .8s var(--spring), translate 1s var(--ease), opacity 1s var(--ease);
}
.gf-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.5) 42%, rgba(252,252,252,.93)); }
.gf-spec { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .9; background: radial-gradient(260px 200px at calc(50% + var(--px) * 46%) calc(30% + var(--py) * 40%), rgba(255,255,255,.5), rgba(255,255,255,0) 70%); }
.gf-rim { position: absolute; left: 0; top: 0; width: 340px; height: 198px; max-width: none !important; overflow: visible; fill: none; pointer-events: none; }
.gf-rim path { stroke-width: 2.4; }
.gf-hit { position: absolute; inset: 0; z-index: 1; cursor: pointer; background: none; border: 0; }
.gf-hit:focus-visible { outline: none; }
.gf-front:has(.gf-hit:focus-visible) .gf-rim path { stroke-width: 5; }
.gf-label { position: absolute; z-index: 2; left: 28px; bottom: 30px; display: flex; flex-direction: column; gap: 5px; max-width: 210px; pointer-events: none; color: var(--gf-ink); }
.gf-title { font-size: 21px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.gf-meta { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gf-soft); }
.gf-key { position: absolute; right: 22px; bottom: 22px; z-index: 12; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; pointer-events: none;
  color: #fff; background: radial-gradient(120% 90% at 50% 0%, #3a3a3f, #121214 55%, #050506);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -3px 8px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.75), 0 14px 22px -8px rgba(0,0,0,.55);
  transition: transform .5s var(--spring), opacity .6s var(--ease) .7s, scale .7s var(--spring) .7s; }
.gf-key svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; transition: transform .5s var(--spring); }
.gf[data-open] .gf-key svg { transform: rotate(45deg); }
/* entrata: la cartella si compone la prima volta che entra in vista */
.gf-person h3 { font-weight: 500; letter-spacing: -.04em; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; }
.gf-person .pq-mono { color: var(--mute); display: block; margin-top: 10px; }
.gf-person p { font-weight: 300; color: var(--mute); margin-top: 14px; max-width: 40ch; }
.gf-hint { color: var(--mute); text-align: center; margin-top: clamp(28px, 4vw, 48px); }

/* ==========================================================================
   Perspective Tunnel — si attraversa scorrendo la pagina (sticky, nessun
   blocco della rotella). Le carte arrivano dal fondo e passano oltre.
   ========================================================================== */
.pq-tun { position: relative; height: 340vh; border-top: 1px solid var(--line-2); }
.pq-tun-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; perspective: 1200px; }
@media (max-width: 767px) { .pq-tun-stage { perspective: 900px; } }
.pq-tun-grid { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(circle, var(--ink) .8px, transparent 1.1px) 0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%); }
.pq-tun-ring { position: absolute; border-radius: 50%; pointer-events: none; border: 1px solid var(--line-2); }
.pq-tun-ring.a { width: 48vmin; height: 48vmin; }
.pq-tun-ring.b { width: 76vmin; height: 76vmin; border-style: dashed; border-color: var(--line); opacity: .7; }
.pq-tun-copy { position: relative; z-index: 0; text-align: center; padding-inline: 24px; max-width: 760px; pointer-events: none; will-change: transform, opacity; }
.pq-tun-copy .pq-idx { justify-content: center; margin-bottom: 26px; }
.pq-tun-copy .pq-lead { margin: 22px auto 0; max-width: 38ch; }
.pq-tun-cards { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.pq-tun-card { position: absolute; left: 50%; top: 50%; width: clamp(130px, 18vw, 270px); aspect-ratio: 4 / 5; will-change: transform, opacity; opacity: 0;
  border: 1px solid var(--line); background: #f6f6f3; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); }
@media (max-width: 767px) { .pq-tun-card { width: clamp(130px, 38vw, 180px); } }
.pq-tun-card img { width: 100%; height: 100%; object-fit: cover; }
.pq-tun-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.78), transparent); }
.pq-tun-prompt { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mute); pointer-events: none; }
.pq-tun-prompt::after { content: ""; width: 1px; height: 26px; background: linear-gradient(var(--ink), transparent); }
html.pq-reduce .pq-tun { height: auto; }
html.pq-reduce .pq-tun-stage { position: relative; height: 100svh; }

/* ==========================================================================
   Pagina Chi siamo — storia
   ========================================================================== */
.pq-story { display: grid; gap: clamp(32px, 5vw, 80px); }
@media (min-width: 900px) { .pq-story { grid-template-columns: 1fr 1.5fr; } }
.pq-story-text p { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.6; font-weight: 300; color: var(--mute); max-width: 58ch; }
.pq-story-text p + p { margin-top: 1.1em; }
.pq-story-text p strong { color: var(--ink); font-weight: 400; }
.pq-story-text .pq-serif { color: var(--ink); font-size: 1.15em; }
.pq-napkin { border: 1px dashed var(--line); padding: 22px; font-family: var(--f-mono); font-size: 12px; line-height: 1.9; color: var(--mute); white-space: pre; overflow-x: auto; transform: rotate(-1.5deg); background: var(--bg-2); }
.pq-napkin b { color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .gf *, .gf-tilt { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* ==========================================================================
   Effetti di scroll — CSS nativo (animation-timeline), zero JS, solo
   transform/opacity sul compositor. Dove non supportato resta il reveal .rv.
   ========================================================================== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* hero: zoom-out mentre esce dallo schermo */
    .pq-hero > .pq-wrap, .pq-phero > .pq-wrap { transform-origin: 50% 0; animation: pq-zoom-out linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
    @keyframes pq-zoom-out { to { transform: scale(.9) translateY(-6%); opacity: .15; } }
    /* titoli di sezione: zoom-in mentre entrano */
    .pq-sec-head .pq-h2, .pq-split .pq-h2 { transform-origin: 0 60%; animation: pq-zoom-in linear both; animation-timeline: view(); animation-range: entry 0% cover 32%; }
    @keyframes pq-zoom-in { from { transform: scale(.88); opacity: .15; } to { transform: none; opacity: 1; } }
    /* CTA finale: lo zoom fa da reveal */
    .pq-cta .pq-display { transform-origin: 0 50%; animation: pq-zoom-cta linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; transition: none; }
    @keyframes pq-zoom-cta { from { transform: scale(.78); opacity: 0; } to { transform: none; opacity: 1; } }
    /* parallasse leggero su terminali, tovagliolo e retino */
    .pq-term, .pq-napkin { animation: pq-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes pq-drift { from { translate: 0 36px; } to { translate: 0 -36px; } }
    .pq-halfbg { animation: pq-dots linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    @keyframes pq-dots { to { transform: scale(1.25) rotate(8deg); opacity: .2; } }
    /* wordmark del footer: emerge mentre arrivi in fondo */
    .pq-ht canvas { animation: pq-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    @keyframes pq-rise { from { transform: translateY(14%) scale(.96); opacity: .3; } to { transform: none; opacity: 1; } }
  }
}

/* Hover: risposte brevi e precise, solo su dispositivi con puntatore */
@media (hover: hover) and (pointer: fine) {
  .pq-cell { transition: background .25s, transform .35s cubic-bezier(.2, .8, .2, 1); }
  .pq-tool { transition: background .25s, color .25s, transform .35s cubic-bezier(.2, .8, .2, 1); }
  .pq-tool:hover { transform: translateY(-4px); }
  .pq-step { transition: background .25s; }
  .pq-step:hover { background: var(--bg-2); }
  .pq-step:hover .dots i { opacity: 1; }
  .pq-step .dots i { transition: opacity .3s; transition-delay: calc(var(--j, 0) * 40ms); }
  .pq-faq summary { transition: padding .3s cubic-bezier(.2, .8, .2, 1); }
  .pq-faq summary:hover { padding-left: 12px; }
  .pq-foot li a { display: inline-block; transition: opacity .2s, transform .25s; }
  .pq-foot li a:hover { transform: translateX(4px); }
}

/* Mobile: niente sticky alto 340vh sotto i 600px di altezza (landscape), cartelle centrate */
@media (max-width: 759px) {
  .gf-card { align-items: center; text-align: center; }
  .gf-person p { margin-inline: auto; }
  .pq-tun { height: 260vh; }
  .pq-tun-copy .pq-h2 { font-size: clamp(32px, 9vw, 44px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .pq-tun { height: auto; }
  .pq-tun-stage { position: relative; }
}
.gf { text-align: left; }
@media (max-width: 559px) {
  .pq-hero-cta { flex-direction: column; }
  .pq-hero-cta .pq-btn { width: 100%; justify-content: space-between; }
}
@media (max-width: 759px) { .tg-caption { display: none; } }
.pq-tun-copy { z-index: 2; padding-block: 28px; }
.pq-tun-copy::before { content: ""; position: absolute; inset: -12% -8%; z-index: -1; background: radial-gradient(closest-side, var(--bg) 55%, color-mix(in srgb, var(--bg) 70%, transparent) 75%, transparent); }
@media (max-width: 759px) { .pq-tun-copy::before { inset: -20% -14%; } }

/* ==========================================================================
   Orb — scultura generativa 3D (nastri + sabbia attorno a una sfera di vetro)
   ========================================================================== */
.pq-orb { position: relative; margin: 0; aspect-ratio: 1 / 1; width: 100%; max-width: 640px; justify-self: center; border: 1px solid rgba(128,128,128,.22); background: radial-gradient(circle at 50% 50%, #141414 0, #0b0b0b 70%); overflow: hidden; }
.pq-orb::before, .pq-orb::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid rgba(240,240,237,.35); pointer-events: none; z-index: 1; }
.pq-orb::before { left: 10px; top: 10px; border-right: 0; border-bottom: 0; }
.pq-orb::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }
.pq-orb-cv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.pq-orb-cv:active { cursor: grabbing; }
.pq-orb-ui { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; gap: 12px; color: #85857f; pointer-events: none; font-size: 10.5px; }
@media (max-width: 559px) { .pq-orb-ui span:first-child { max-width: 60%; } }

/* ==========================================================================
   Dashboard bento — grafici interattivi in SVG/HTML, monocromatici
   ========================================================================== */
.db-bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .db-bento { grid-template-columns: 1fr 1fr; } .db-roi, .db-fc, .db-infra { grid-column: 1 / -1; } }
@media (min-width: 1100px) {
  .db-bento { grid-template-columns: repeat(12, 1fr); }
  .db-roi { grid-column: span 7; grid-row: span 2; }
  .db-fc { grid-column: span 5; }
  .db-auto { grid-column: span 5; }
  .db-sec { grid-column: span 6; }
  .db-infra { grid-column: span 6; }
}
.db-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: clamp(18px, 2vw, 26px); background: #f7f7f4; border: 1px solid var(--line); min-width: 0; transition: border-color .25s, box-shadow .35s; }
@media (hover: hover) and (pointer: fine) { .db-card:hover { border-color: var(--ink); box-shadow: 0 24px 50px -30px rgba(0,0,0,.35); } }
.db-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.db-head > .pq-mono:first-child { color: var(--ink); }
.db-tag { border: 1px solid var(--line); padding: 3px 8px; color: var(--mute); font-size: 9.5px; white-space: nowrap; }
.db-live { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); font-size: 9.5px; }
.db-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: pq-pulse 1.6s ease-in-out infinite; }
.db-note { color: var(--dim); font-size: 9.5px; margin-top: auto; }
/* ROI */
.db-roi-grid { display: grid; gap: 24px; }
@media (min-width: 560px) { .db-roi-grid { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.db-sliders { display: flex; flex-direction: column; gap: 18px; }
.db-sl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; font-size: 13.5px; font-weight: 300; color: var(--mute); }
.db-sl output { font-family: var(--f-mono); font-size: 13px; color: var(--ink); }
.db-sl input { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
.db-sl input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--ink) var(--p, 50%), var(--line) var(--p, 50%)); }
.db-sl input::-moz-range-track { height: 2px; background: var(--line); }
.db-sl input::-moz-range-progress { height: 2px; background: var(--ink); }
.db-sl input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--ink); border: 3px solid #f7f7f4; box-shadow: 0 0 0 1px var(--ink); transition: transform .15s; }
.db-sl input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid #f7f7f4; box-shadow: 0 0 0 1px var(--ink); }
.db-sl input:active::-webkit-slider-thumb { transform: scale(1.2); }
.db-sl input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.db-roi-out { display: flex; flex-direction: column; gap: 18px; }
.db-kpi { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.db-kpi b { font-weight: 500; letter-spacing: -.055em; line-height: .95; font-size: clamp(40px, 5vw, 70px); font-variant-numeric: tabular-nums; }
.db-kpi--s b { font-size: clamp(26px, 2.6vw, 36px); }
.db-kpi span, .db-auto > .pq-mono { color: var(--mute); }
/* grafici */
.db-chart { position: relative; height: 190px; touch-action: pan-y; }
.db-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.db-roi-chart { height: 170px; margin-top: 4px; }
.db-axis { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--dim); margin-top: 6px; }
.db-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: var(--bg); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .04em; line-height: 1.5; padding: 6px 9px; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity .15s; }
.db-tip.on { opacity: 1; }
.db-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #f7f7f4; pointer-events: none; opacity: 0; transition: opacity .15s; }
.db-dot.on { opacity: 1; }
.db-tabs { display: inline-flex; border: 1px solid var(--line); align-self: flex-start; }
.db-tabs button { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px; color: var(--mute); transition: background .2s, color .2s; }
.db-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.db-tabs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.db-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--mute); font-size: 9.5px; }
.db-legend i { display: inline-block; width: 16px; height: 0; margin-right: 8px; vertical-align: middle; border-top: 2px solid var(--ink); }
.db-legend .l-fc { border-top-style: dashed; }
.db-legend .l-band { height: 8px; border: 0; background: rgba(11,11,11,.12); }
.db-big { font-weight: 500; letter-spacing: -.055em; line-height: 1; font-size: clamp(44px, 5vw, 68px); font-variant-numeric: tabular-nums; }
.db-bars { height: 120px; }
.db-donut-wrap { display: grid; grid-template-columns: minmax(140px, 180px) 1fr; gap: 22px; align-items: center; }
@media (max-width: 420px) { .db-donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.db-donut { height: auto; aspect-ratio: 1; width: 100%; }
.db-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.db-donut-c b { font-weight: 500; letter-spacing: -.05em; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.db-donut-c span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-top: 6px; max-width: 12ch; }
.db-donut-legend { display: flex; flex-direction: column; width: 100%; }
.db-donut-legend button { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 13px; font-weight: 300; color: var(--mute); transition: color .2s, padding .25s; }
.db-donut-legend button i { width: 10px; height: 10px; background: var(--ink); }
.db-donut-legend button b { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; color: var(--ink); }
.db-donut-legend button.on { color: var(--ink); padding-left: 6px; }
.db-cost { height: auto; display: flex; flex-direction: column; gap: 10px; }
.db-cost-row { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 70px; gap: 12px; align-items: center; font-size: 13px; font-weight: 300; color: var(--mute); }
.db-cost-row .bar { height: 10px; background: var(--line-2); position: relative; overflow: hidden; }
.db-cost-row .bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); width: 0; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.db-cost-row b { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.db-cost-tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.db-cost-tot b { font-weight: 500; letter-spacing: -.05em; font-size: 30px; font-variant-numeric: tabular-nums; }
.db-up { display: flex; flex-direction: column; gap: 10px; }
.db-uptime { position: relative; display: grid; grid-template-columns: repeat(45, 1fr); gap: 3px; }
.db-uptime i { display: block; height: 16px; background: var(--ink); opacity: .85; transition: opacity .15s, transform .15s; }
.db-uptime i.w { opacity: .3; }
.db-uptime i:hover { opacity: 1; transform: scaleY(1.25); }

/* Palla a puntini (pagine interne): diventa canvas interattivo */
.pq-halfbg.is-live { background: none; -webkit-mask-image: none; mask-image: none; }
.pq-halfbg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Terminale dentro sezioni scure: sempre leggibile */
.pq-inv .pq-term { background: #141414; border-color: rgba(240,240,237,.16); }
.pq-inv .pq-term-body { color: var(--inv-ink); }
.pq-inv .pq-term-body .c { color: #6f6f6a; }
.pq-inv .pq-term-body .m, .pq-inv .pq-term-bar { color: #9a9a95; }

/* LED di stato (unico punto di colore: indica "attivo") */
.db-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1fbf5b; box-shadow: 0 0 0 0 rgba(31,191,91,.55); animation: db-led 1.6s ease-in-out infinite; flex: none; }
.db-live i.db-led { width: 7px; height: 7px; background: #1fbf5b; }
@keyframes db-led { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(31,191,91,.5); } 50% { opacity: .45; box-shadow: 0 0 0 6px rgba(31,191,91,0); } }

/* Card "pipeline live" nel bento */
@media (min-width: 760px) { .db-log { grid-column: 1 / -1; } }
.db-log { padding: 0; border: 0; background: none; }
.pq-term--live { background: #0f0f0f; color: #ececea; border: 1px solid #0b0b0b; min-height: 330px; box-shadow: 0 30px 60px -36px rgba(0,0,0,.5); }
.pq-term--live .pq-term-bar { color: #9a9a95; border-color: rgba(240,240,237,.12); gap: 10px; }
.pq-term--live .pq-term-bar i { display: none; }
.db-led-t { font-size: 10px; letter-spacing: .16em; color: #1fbf5b; }
.pq-term--live .pq-term-body { color: #ececea; font-size: 13px; line-height: 1.95; white-space: pre-wrap; }
.pq-term--live .pq-term-body .c { color: #7a7a75; }
.pq-term--live .pq-term-body .m { color: #9a9a95; }
.pq-term--live .pq-term-body .ok::before { color: #1fbf5b; }
html.js [data-typer] > span { display: block; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; }
html.js [data-typer] > span.in { opacity: 1; transform: none; }
[data-typer] .caret::after { content: "▍"; animation: pq-pulse 1s steps(2) infinite; margin-left: 2px; }
html.pq-reduce [data-typer] > span { opacity: 1; transform: none; }
.pq-term--live .pq-term-body { white-space: normal; }
[data-typer] > span { white-space: pre-wrap; }
.pq-term--live .pq-term-bar span { margin-left: 0; }
.pq-term--live .pq-term-bar span:last-child { margin-left: auto; }
.pq-term--live { min-height: 0; }
.pq-term--live .pq-term-body { min-height: 268px; }

/* iOS/Safari edge-to-edge: l'header copre anche la zona della barra di stato e resta quasi opaco */
.pq-nav { background: color-mix(in srgb, var(--bg) 94%, transparent); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .pq-nav { background: rgba(240, 240, 237, .95); } }
html { scroll-padding-top: var(--nav-full); }
.pq-wrap, .pq-nav-in { padding-left: max(var(--pad), env(safe-area-inset-left, 0px)); padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }
body.pq-legacy { padding-top: var(--safe-t); }

/* ==========================================================================
   FX — componenti interattivi delle pagine interne
   ========================================================================== */
.fx-run { border: 1px solid var(--ink); padding: 7px 12px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: transparent; transition: background .2s, color .2s; white-space: nowrap; }
.fx-run:hover, .fx-run[aria-busy="true"] { background: var(--ink); color: var(--bg); }
.fx-run:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fx-log { font-size: 11px; line-height: 1.8; color: var(--mute); min-height: 5.4em; border-top: 1px solid var(--line-2); padding-top: 10px; letter-spacing: .02em; text-transform: none; }
.fx-log div { animation: fx-in .35s ease both; }
.fx-log div b { color: var(--ink); font-weight: 500; }
@keyframes fx-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Border beam: un bagliore che gira sul bordo delle card al passaggio */
@property --bb { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@media (hover: hover) and (pointer: fine) {
  .db-card::after { content: ""; position: absolute; inset: -1px; pointer-events: none; padding: 1px; opacity: 0; transition: opacity .4s;
    background: conic-gradient(from var(--bb), transparent 0 70%, var(--ink) 85%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
  .db-card:hover::after { opacity: 1; animation: fx-beam 2.6s linear infinite; }
  .db-log::after { display: none; }
}
@keyframes fx-beam { to { --bb: 360deg; } }

/* Software: componi il gestionale */
.fx-builder { display: grid; gap: 18px; }
@media (min-width: 960px) { .fx-builder { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); align-items: start; } .fx-builder .db-note { grid-column: 1 / -1; } }
.fx-mods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-mod { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; text-align: left; padding: 14px; border: 1px solid var(--line); background: #f7f7f4; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.fx-mod > span { grid-row: span 2; color: var(--dim); font-size: 10px; }
.fx-mod b { font-weight: 500; font-size: 15px; letter-spacing: -.02em; }
.fx-mod small { color: var(--mute); font-size: 9.5px; }
.fx-mod[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fx-mod[aria-pressed="true"] small, .fx-mod[aria-pressed="true"] > span { color: rgba(240,240,237,.6); }
.fx-mod:active { transform: scale(.97); }
.fx-mod:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fx-app { border: 1px solid var(--ink); background: #fbfbf9; box-shadow: 0 40px 70px -40px rgba(0,0,0,.4); overflow: hidden; }
.fx-app-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #efefeb; }
.fx-app-bar i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--mute); }
.fx-app-bar span { margin-left: auto; color: var(--mute); font-size: 9.5px; text-transform: none; letter-spacing: .04em; }
.fx-app-body { display: grid; grid-template-columns: 150px 1fr; min-height: 340px; }
@media (max-width: 559px) { .fx-app-body { grid-template-columns: 1fr; } .fx-app-nav { display: flex; flex-wrap: wrap; gap: 4px; border-right: 0 !important; border-bottom: 1px solid var(--line); } }
.fx-app-nav { border-right: 1px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.fx-app-nav span { font-size: 12.5px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; animation: fx-in .35s ease both; }
.fx-app-nav span::before { content: ""; width: 6px; height: 6px; background: var(--ink); opacity: .35; }
.fx-app-nav span:first-child { background: var(--ink); color: var(--bg); }
.fx-app-nav span:first-child::before { background: var(--bg); opacity: 1; }
.fx-app-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fx-app-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fx-app-kpis div { border: 1px solid var(--line-2); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fx-app-kpis span { font-size: 8.5px; color: var(--mute); }
.fx-app-kpis b { font-weight: 500; letter-spacing: -.04em; font-size: clamp(22px, 2.4vw, 32px); line-height: 1; font-variant-numeric: tabular-nums; }
.fx-app-title { color: var(--ink); font-size: 10px; }
.fx-app-rows { display: flex; flex-direction: column; }
.fx-app-rows div { display: grid; grid-template-columns: 18px 1.4fr 1fr 60px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); animation: fx-in .4s ease both; }
.fx-app-rows i { height: 6px; background: var(--ink); opacity: .14; border-radius: 3px; }
.fx-app-rows i:first-child { width: 10px; height: 10px; border-radius: 2px; opacity: .5; }
.fx-app-rows em { font-style: normal; font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; text-align: right; color: var(--mute); }

/* AI: flusso + orbita + documento */
.fx-flow-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .fx-flow-grid { grid-template-columns: 1.6fr 1fr; } .fx-doc { grid-column: 1 / -1; } }
.fx-flow { position: relative; height: 320px; }
@media (max-width: 719px) { .fx-flow { height: 440px; } }
.fx-flow svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-flow .base { fill: none; stroke: var(--line); stroke-width: 1.5; }
.fx-flow .beam { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 26 600; animation: fx-dash 3.2s linear infinite; opacity: .55; }
@keyframes fx-dash { from { stroke-dashoffset: 626; } to { stroke-dashoffset: 0; } }
.fx-node { position: absolute; transform: translate(-50%, -50%); background: #fbfbf9; border: 1px solid var(--ink); padding: 10px 12px; min-width: 128px; max-width: 42%; display: flex; flex-direction: column; gap: 3px; z-index: 1; transition: background .25s, color .25s, transform .25s; }
.fx-node b { font-weight: 500; font-size: 13px; letter-spacing: -.01em; line-height: 1.2; }
.fx-node span { font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.fx-node.ai { background: var(--ink); color: var(--bg); }
.fx-node.ai span { color: rgba(240,240,237,.6); }
.fx-node.hit { background: var(--ink); color: var(--bg); transform: translate(-50%, -50%) scale(1.06); }
.fx-node.hit span { color: rgba(240,240,237,.7); }
.fx-node.ai.hit { box-shadow: 0 0 0 6px rgba(11,11,11,.12); }
@media (max-width: 719px) { .fx-node { min-width: 0; padding: 8px 9px; } .fx-node b { font-size: 11.5px; } }
.fx-packet { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px rgba(11,11,11,.12); z-index: 2; pointer-events: none; }
.fx-orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 360px; margin: 6px auto; }
.fx-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line); animation: fx-spin 60s linear infinite; }
.fx-ring.r1 { inset: 22%; animation-duration: 38s; animation-direction: reverse; border-style: solid; border-color: var(--line-2); }
.fx-lab { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))); }
.fx-orbit { container-type: inline-size; }
.r2 .fx-lab { --r: 50cqw; } .r1 .fx-lab { --r: 28cqw; }
.fx-lab i { display: block; font-style: normal; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: #f7f7f4; border: 1px solid var(--line); padding: 4px 7px; position: absolute; left: 0; top: 0; translate: -50% -50%; animation: fx-spin 60s linear infinite reverse; }
.r1 .fx-lab i { animation-duration: 38s; animation-direction: normal; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fx-core { position: absolute; inset: 38%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a4a4a, #0b0b0b 70%); display: grid; place-items: center; color: #f0f0ed; box-shadow: 0 0 0 10px rgba(11,11,11,.06), 0 0 0 22px rgba(11,11,11,.03); animation: fx-breathe 3s ease-in-out infinite; }
.fx-core span { font-size: 13px; letter-spacing: .2em; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-breathe { 50% { box-shadow: 0 0 0 16px rgba(11,11,11,.05), 0 0 0 34px rgba(11,11,11,.02); } }
.fx-doc-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .fx-doc-grid { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.fx-paper { position: relative; background: #fff; border: 1px solid var(--line); padding: 22px; font-size: 13px; overflow: hidden; box-shadow: 0 18px 40px -26px rgba(0,0,0,.35); transform: rotate(-.6deg); }
.fx-paper b { font-weight: 500; transition: background .3s, box-shadow .3s; }
.fx-paper b.hl { background: rgba(11,11,11,.1); box-shadow: 0 0 0 2px rgba(11,11,11,.85); }
.fx-p-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; margin-bottom: 10px; }
.fx-p-head span, .fx-p-meta, .fx-p-foot { color: var(--mute); font-size: 12px; }
.fx-p-meta, .fx-p-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fx-p-rows { margin: 12px 0; }
.fx-p-rows div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-2); color: var(--mute); }
.fx-p-rows b { color: var(--ink); font-family: var(--f-mono); font-size: 12px; font-weight: 400; }
.fx-p-tot { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 12px; font-size: 14px; }
.fx-p-tot b { font-size: 18px; letter-spacing: -.02em; }
.fx-scanline { position: absolute; left: 0; right: 0; height: 40px; top: -40px; background: linear-gradient(to bottom, transparent, rgba(11,11,11,.07), transparent); border-bottom: 1px solid rgba(11,11,11,.4); pointer-events: none; }
.fx-doc-grid.run .fx-scanline { animation: fx-scan 2.6s cubic-bezier(.4,0,.2,1) both; }
@keyframes fx-scan { to { top: 100%; } }
.fx-out { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 0; }
.fx-out div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.fx-out dt { color: var(--mute); font-size: 9.5px; }
.fx-out dd { margin: 0; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink); }
.fx-out dd.new { animation: fx-in .35s ease both; }

/* Infrastruttura: cluster */
.fx-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.fx-kpis div { padding: 14px 12px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.fx-kpis b { font-weight: 500; letter-spacing: -.05em; font-size: clamp(28px, 4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; transition: color .3s; }
.fx-kpis span { color: var(--mute); font-size: 9.5px; }
.fx-nodes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .fx-nodes { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .fx-nodes { grid-template-columns: repeat(6, 1fr); } }
.fx-srv { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px; border: 1px solid var(--line); background: #fbfbf9; transition: background .25s, color .25s, opacity .25s, border-color .25s; position: relative; }
.fx-srv:hover { border-color: var(--ink); }
.fx-srv:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fx-srv .h { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.fx-srv .h i { width: 7px; height: 7px; border-radius: 50%; background: #1fbf5b; animation: db-led 1.6s ease-in-out infinite; }
.fx-srv .v { font-weight: 500; letter-spacing: -.04em; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-srv svg { width: 100%; height: 26px; display: block; }
.fx-srv polyline { fill: none; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.fx-srv .bar { height: 3px; background: var(--line-2); position: relative; }
.fx-srv .bar b { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width .8s ease; }
.fx-srv.off { background: repeating-linear-gradient(-45deg, #f2f2ef 0 8px, #e7e7e3 8px 16px); color: var(--dim); }
.fx-srv.off .h i { background: #c0392b; animation: none; }
.fx-srv.off .bar b { width: 0 !important; }
.fx-srv.hot .v { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Sicurezza: radar + scansione */
.fx-sec-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .fx-sec-grid { grid-template-columns: 1fr 1fr; } }
.fx-radarcard { background: #0f0f0f; color: #ececea; border-color: #0f0f0f; }
.fx-radarcard .db-head > .pq-mono:first-child { color: #ececea; }
.fx-radarcard .db-live { color: #9a9a95; }
.fx-radar { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; margin: 0 auto; }
.fx-radar canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.fx-radar-foot { display: flex; justify-content: space-between; gap: 12px; color: #9a9a95; font-size: 10px; }
.fx-radar-foot b { color: #ececea; font-weight: 400; font-variant-numeric: tabular-nums; }
.fx-checks { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fx-checks li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; font-weight: 300; color: var(--mute); transition: color .2s; }
.fx-checks li::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 50%; }
.fx-checks li.run { color: var(--ink); }
.fx-checks li.run::before { border-color: var(--ink); border-top-color: transparent; animation: fx-spin .7s linear infinite; }
.fx-checks li.done { color: var(--ink); }
.fx-checks li.done::before { background: var(--ink); border-color: var(--ink); }
.fx-checks em { font-style: normal; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line); opacity: 0; transition: opacity .25s; }
.fx-checks li.done em { opacity: 1; }
.fx-checks em.s-ok { color: var(--mute); }
.fx-checks em.s-low { border-color: var(--ink); }
.fx-checks em.s-mid { border-color: var(--ink); background: rgba(11,11,11,.12); }
.fx-checks em.s-high { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.fx-scan-sum { font-size: 10.5px; color: var(--mute); text-transform: none; letter-spacing: .04em; }

/* Siti web: gauge */
.fx-gauge-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fx-gauge-row { grid-template-columns: repeat(3, 1fr); } }
.fx-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.fx-gauge-svg { width: 100%; max-width: 240px; aspect-ratio: 2 / 1.15; position: relative; }
.fx-gauge-svg svg { width: 100%; height: 100%; overflow: visible; }
.fx-gauge b { font-weight: 500; letter-spacing: -.05em; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; margin-top: -10px; font-variant-numeric: tabular-nums; }
.fx-gauge span { color: var(--mute); font-size: 10px; }
.fx-gauge em { font-style: normal; font-size: 9.5px; padding: 3px 8px; border: 1px solid var(--ink); margin-top: 6px; transition: background .3s, color .3s; }
.fx-gauge em.good { background: var(--ink); color: var(--bg); }

/* Chi siamo: radar competenze + esperienze */
.fx-skills-chart { position: relative; width: 100%; max-width: 540px; margin: 0 auto; aspect-ratio: 370 / 316; }
.fx-skills-chart svg { width: 100%; height: 100%; overflow: visible; }
.fx-skills-chart text { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; fill: var(--mute); }
.fx-exp { display: grid; gap: 18px; padding-block: clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line-2); }
@media (min-width: 900px) { .fx-exp { grid-template-columns: 1fr 2.4fr; align-items: center; } }
.fx-exp ul { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 560px) { .fx-exp ul { grid-template-columns: 1fr 1fr; } }
.fx-exp li { font-family: var(--f-disp); font-weight: 500; letter-spacing: -.04em; font-size: clamp(22px, 2.8vw, 38px); line-height: 1; padding: clamp(18px, 2.2vw, 28px) clamp(18px, 2.4vw, 32px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .25s, color .25s; }
@media (hover: hover) { .fx-exp li:hover { background: var(--ink); color: var(--bg); } }
#team .fx-exp { margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line-2); }
@media (prefers-reduced-motion: reduce) { .fx-ring, .fx-lab i, .fx-core, .fx-flow .beam { animation: none; } }
@media (max-width: 719px) {
  .fx-node.leaf { width: 30%; max-width: 30%; min-width: 0; padding: 8px; }
  .fx-node.leaf span { display: none; }
  .fx-node.leaf b { font-size: 11px; }
  .r2 .fx-lab { --r: 43cqw; }
  .fx-lab i { font-size: 8.5px; padding: 3px 5px; }
}
.db-head { flex-wrap: wrap; row-gap: 12px; }
@media (max-width: 559px) {
  .db-head > .db-tabs { width: 100%; display: flex; }
  .db-head > .db-tabs button { flex: 1; padding: 8px 4px; letter-spacing: .06em; font-size: 10px; }
}

/* Mappa (internet-offline): tile OpenStreetMap rese scure */
.pq-dark-tiles { filter: invert(1) hue-rotate(180deg) grayscale(.75) brightness(.78) contrast(1.05); }

/* Footer: su smartphone i link vanno in orizzontale */
@media (max-width: 899px) {
  .pq-foot-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .pq-foot-brand { grid-column: 1 / -1; }
  .pq-foot-top > div:not(.pq-foot-brand) { grid-column: 1 / -1; }
  .pq-foot ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .pq-foot li { margin: 0; }
  .pq-foot h4 { margin-bottom: 12px; }
}

/* Palla a puntini: su mobile scende sotto il testo, niente sovrapposizioni */
@media (max-width: 759px) {
  .pq-phero { display: flex; flex-direction: column; padding-bottom: 24px; }
  .pq-phero .pq-halfbg { position: relative; order: 2; right: auto; top: auto; width: 100%; aspect-ratio: auto; height: 300px; margin-top: 18px; opacity: 1; animation: none; }
}

/* Newsletter */
.nl-card { background: #141414; border: 1px solid rgba(240,240,237,.16); padding: clamp(20px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 22px; }
.nl-card .db-head > .pq-mono:first-child { color: var(--inv-ink); }
.nl-card .db-live { color: #9a9a95; }
.nl-form { display: flex; flex-direction: column; gap: 12px; }
.nl-form label { color: #9a9a95; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-row { display: flex; gap: 0; border: 1px solid rgba(240,240,237,.35); transition: border-color .2s; }
.nl-row:focus-within { border-color: var(--inv-ink); }
.nl-row input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--inv-ink); font: inherit; font-size: 16px; font-weight: 300; padding: 16px 18px; outline: none; }
.nl-row input::placeholder { color: #6f6f6a; }
.nl-row .pq-btn { border: 0; flex: none; }
@media (max-width: 479px) { .nl-row { flex-direction: column; } .nl-row .pq-btn { justify-content: space-between; } }
.nl-msg { font-size: 11px; text-transform: none; letter-spacing: .04em; padding: 12px 14px; border: 1px solid rgba(240,240,237,.2); color: var(--inv-ink); }
.nl-msg[data-state="ok"] { border-color: #1fbf5b; }
.nl-msg[data-state="ok"]::before { content: "✓ "; color: #1fbf5b; }
.nl-msg[data-state="err"] { border-color: #c0392b; }
.nl-legal { font-size: 12.5px; font-weight: 300; color: #85857f; }
.nl-legal a { color: var(--inv-ink); text-decoration: underline; text-underline-offset: 3px; }
.nl-mail { border: 1px solid var(--ink); background: #fbfbf9; max-width: 860px; margin: 0 auto; box-shadow: 0 40px 70px -40px rgba(0,0,0,.4); }
.nl-mail-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #efefeb; font-size: 10px; }
.nl-mail-body { padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; }
.nl-mail-head { display: flex; align-items: center; gap: 14px; }
.nl-mail-head b { display: block; font-weight: 600; font-size: 20px; letter-spacing: -.04em; }
.nl-mail-head .pq-mono { font-size: 9.5px; }
.nl-mark { display: grid; grid-template-columns: repeat(3, 7px); gap: 3px; }
.nl-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.nl-pane { display: flex; flex-direction: column; gap: 12px; animation: fx-in .35s ease both; }
.nl-pane[hidden] { display: none; }
.nl-pane h3 { font-weight: 500; letter-spacing: -.04em; font-size: clamp(24px, 3vw, 36px); line-height: 1.05; }
.nl-pane ul { border-top: 1px solid var(--line); }
.nl-pane li { padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line-2); position: relative; font-weight: 300; color: var(--mute); }
.nl-pane li::before { content: "→"; position: absolute; left: 0; font-family: var(--f-mono); color: var(--ink); }
.nl-soon { opacity: .45; }
.nl-mail-body .pq-link { align-self: flex-start; }

/* ==========================================================================
   Accenti semantici: verde = attivo / a posto / risparmio, rosso = rischio / problema / "prima".
   Mai su bottoni o titoli: il sito resta monocromatico, il colore porta un significato.
   ========================================================================== */
:root { --ok: #1fbf5b; --bad: #e5484d; }
.pq-hero-top .dot { background: var(--ok); }
.db-led, .db-live i.db-led { background: var(--ok); }
/* calcolatore e metriche */
.db-kpi:first-child b { color: var(--ink); }
.db-kpi:first-child span::before { content: "▲ "; color: var(--ok); }
/* costi ricorrenti: prima in rosso, dopo in verde */
.db-cost[data-mode="0"] .bar i { background: var(--bad); }
.db-cost[data-mode="1"] .bar i { background: var(--ok); }
.db-cost[data-mode="1"] .db-cost-tot b { color: var(--ok); }
.db-uptime i.w { background: var(--bad); opacity: .85; }
/* flusso AI e documento */
.fx-packet { background: var(--ok); box-shadow: 0 0 0 4px rgba(31,191,91,.18); }
.fx-node.hit:not(.ai) { box-shadow: 0 0 0 3px rgba(31,191,91,.35); }
.fx-out dd.ok { color: var(--ok); }
/* cluster */
.fx-srv.hot .v { color: var(--bad); text-decoration: none; }
.fx-srv.off .h i { background: var(--bad); }
/* scansione */
.fx-checks em.s-ok { color: var(--ok); border-color: rgba(31,191,91,.5); }
.fx-checks em.s-mid { border-color: var(--bad); background: rgba(229,72,77,.1); color: var(--bad); }
.fx-checks em.s-high { border-color: var(--bad); background: var(--bad); color: #fff; }
/* gauge */
.fx-gauge em.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.fx-gauge em.poor { border-color: var(--bad); color: var(--bad); }
/* builder: ore risparmiate sui moduli attivi */
.fx-mod[aria-pressed="true"] small { color: var(--ok); }
/* newsletter / form */
.nl-msg[data-state="err"] { border-color: var(--bad); color: #ffb3b5; }
/* righe servizi: freccia verde al passaggio */
@media (hover: hover) and (pointer: fine) { .pq-row:hover .go { color: var(--ok); } }
/* lista con frecce nelle sezioni scure */
.pq-inv .pq-list li::before { color: var(--ok); }
.pq-term-body .warn::before { content: "!  "; color: var(--bad); font-weight: 500; }
.db-legend .l-fc { border-top-color: var(--ok); }
.db-legend .l-band { background: rgba(31,191,91,.18); }
.fx-exp-sec { padding-block: clamp(40px, 6vw, 80px); }
.fx-exp-sec .fx-exp { padding-block: 0; border-bottom: 0; }
/* Orb senza cornice: la scultura galleggia sul nero della sezione */
.pq-orb { border: 0; background: none; overflow: visible; }
.pq-orb::before, .pq-orb::after { display: none; }
@media (min-width: 900px) { .pq-stats--3 { grid-template-columns: repeat(3, 1fr); } }
