/* Analitica – pagina temporanea. Solo font di sistema, nessuna risorsa esterna. */
:root {
  --ink: #14212B;
  --ink-2: #3F4D59;      /* 8.6:1 su bianco */
  --paper: #FFFFFF;
  --paper-2: #F3F6F8;
  --line: #D9E1E7;
  --brand: #0B679B;      /* 6.0:1 su bianco */
  --brand-strong: #084E76;
  --brand-soft: #E3F1F9;
  --night: #0E1E2A;
  --night-2: #16293A;
  --trace: #5CC8F5;
  --night-ink: #E8F0F5;
  --night-ink-2: #A9BCCB; /* 8:1 su --night */
  --focus: #F2B705;
  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", "Noto Sans", "Ubuntu", "Cantarell", sans-serif;
  --display: "Charter", "Bitstream Charter", "Iowan Old Style", "Sitka Text", "Cambria", "Noto Serif", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem; border-radius: 6px;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header */
.top { background: var(--night); color: var(--night-ink); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--night-ink); text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { width: 2.25rem; height: 2.25rem; }
.brand__name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: .005em; }
.top__cta {
  font-family: var(--mono); font-size: .875rem; color: var(--night-ink); text-decoration: none;
  padding: .45rem .8rem; border: 1px solid #36506A; border-radius: 999px; white-space: nowrap;
}
.top__cta:hover { color: #fff; border-color: var(--trace); }
.top .brand:focus-visible, .top__cta:focus-visible { outline-color: var(--focus); }

/* Hero */
.hero {
  background:
    radial-gradient(55rem 32rem at 80% 55%, #17344A 0%, transparent 65%),
    var(--night);
  color: var(--night-ink);
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 6.5rem);
}
.hero__in { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .hero__in { grid-template-columns: 1.1fr 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--trace); margin-bottom: 1.1rem;
}
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--trace); box-shadow: 0 0 0 0 rgba(92,200,245,.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(92,200,245,.55); } 70%, 100% { box-shadow: 0 0 0 .55rem rgba(92,200,245,0); } }

h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem); letter-spacing: -.01em;
  color: #fff; max-width: 20ch; text-wrap: balance;
}
.lead { margin-top: 1.25rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--night-ink-2); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: .7rem 1.25rem; border-radius: 8px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--trace); color: var(--night); }
.btn--primary:hover { background: #8AD8FA; color: var(--night); }
.btn--ghost { color: var(--night-ink); border-color: #3B5670; overflow-wrap: anywhere; }
.btn--ghost:hover { color: #fff; border-color: var(--trace); }

/* Strumento / cromatogramma */
.scope {
  margin: 0; background: var(--night-2); border: 1px solid #23394C; border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.scope__bar {
  display: flex; align-items: center; gap: .65rem; padding: .65rem 1rem;
  border-bottom: 1px solid #23394C; font-family: var(--mono); font-size: .75rem;
  color: var(--night-ink-2); letter-spacing: .04em;
}
.scope__led { width: .5rem; height: .5rem; border-radius: 50%; background: #3DDC97; }
.scope__status { margin-left: auto; text-transform: uppercase; }
.chroma { width: 100%; height: auto; padding: .5rem .5rem .25rem; }
.grid path { stroke: #22384B; stroke-width: 1; fill: none; }
.axis { stroke: #4B6578; stroke-width: 1.5; fill: none; }
.ticks text { fill: #8FA6B8; font-family: var(--mono); font-size: 12px; text-anchor: middle; }
.ticks .unit { text-anchor: end; }
.trace { fill: none; stroke: var(--trace); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.lbl { fill: var(--night-ink); font-family: var(--mono); font-size: 13px; text-anchor: middle; }
@media (max-width: 40rem) {
  .ticks text { font-size: 19px; }
  .lbl { font-size: 20px; }
  .trace { stroke-width: 3; }
}

/* Animazione: la traccia si disegna, poi l'area e le etichette compaiono. Ciclo di 9 s. */
@media (prefers-reduced-motion: no-preference) {
  .trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 9s cubic-bezier(.45,.05,.55,.95) infinite; }
  .trace-area { animation: area 9s ease infinite; }
  .lbl { animation: lbl 9s ease infinite; }
  .lbl--1 { animation-name: lbl1; }
  .lbl--2 { animation-name: lbl2; }
  .lbl--3 { animation-name: lbl3; }
  .lbl--4 { animation-name: lbl4; }
  .scope__led { animation: blink 1.2s steps(2, jump-none) infinite; }
}
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes area { 0%, 50% { opacity: 0; } 62%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lbl1 { 0%, 15% { opacity: 0; } 20%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lbl2 { 0%, 29% { opacity: 0; } 34%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lbl3 { 0%, 40% { opacity: 0; } 45%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lbl4 { 0%, 47% { opacity: 0; } 52%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .35; } }
/* Acquisizione dal vivo (assets/cromatogramma.js) */
.is-live .trace, .is-live .trace-area, .is-live .labels { display: none; }
.live-trace { fill: none; stroke: var(--trace); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(92,200,245,.45)); }
.live-cursor { stroke: var(--trace); stroke-width: 1; stroke-dasharray: 3 4; opacity: .55; transition: opacity .3s; }
.live-cursor.off { opacity: 0; }
.live-lbl { opacity: 0; transition: opacity .4s; }
.live-lbl.on { opacity: 1; }
.live { transition: opacity .6s; }
.live.fade { opacity: 0; }
@media (max-width: 40rem) { .live-trace { stroke-width: 3; } .scope__bar > span:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Chi siamo */
.about { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
h2 {
  font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); margin-bottom: 1.1rem;
  color: var(--ink);
}
.about__text { max-width: 44rem; }
.about__text p + p { margin-top: 1rem; }
.about__text p { color: var(--ink-2); }
.facts { margin: clamp(2rem, 5vw, 3rem) 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { background: var(--paper); padding: 1.4rem 1.5rem 1.5rem; position: relative; }
.fact::before { content: ""; position: absolute; left: 1.5rem; top: 0; width: 2.5rem; height: 3px; background: var(--brand); }
.fact__k { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: .35rem 0 .6rem; }
.fact__v { margin: 0; font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.fact__big { font-size: 2.6rem; color: var(--brand); margin-right: .1em; }
.fact__d { margin: .45rem 0 0; color: var(--ink-2); font-size: .975rem; line-height: 1.45; }

/* Partner */
.partners { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.partners__title { font-size: clamp(1.25rem, 1rem + .8vw, 1.5rem); margin-bottom: 1.25rem; }
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.marquee__track { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(2.5rem, 6vw, 4.5rem); width: max-content; }
.marquee__item { flex: none; display: flex; align-items: center; height: 56px; }
.marquee__item img { max-height: 56px; max-width: 150px; width: auto; height: auto; filter: grayscale(1); opacity: .7; mix-blend-mode: multiply; transition: filter .3s, opacity .3s; }
.marquee__item img:hover { filter: none; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .marquee__track { animation: scorri 38s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@keyframes scorri { to { transform: translateX(calc(-50% - clamp(2.5rem, 6vw, 4.5rem) / 2)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { width: auto; flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
  .marquee__item[aria-hidden="true"] { display: none; }
}

/* Contatti */
.contacts { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--paper-2); border-top: 1px solid var(--line); }
.contacts h2 { margin-bottom: 1.5rem; }
.contact-list { margin: 0; display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .contact-list { grid-template-columns: auto auto 1fr; gap: 3rem; } }
.contact-list dt { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .3rem; }
.contact-list dd { margin: 0; font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-list address { font-style: normal; font-weight: 500; }

/* Footer */
.foot { background: var(--night); color: var(--night-ink-2); font-size: .9rem; padding: 2.5rem 0; }
.foot__in { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .foot__in { grid-template-columns: 1fr auto; align-items: end; } }
.foot p + p { margin-top: .25rem; }
.foot__name { color: var(--night-ink); font-weight: 600; }
.foot a { color: var(--night-ink); }
.foot a:hover { color: #fff; }
.foot__meta { text-align: left; }
@media (min-width: 48rem) { .foot__meta { text-align: right; } }

/* Pagina privacy */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.doc .wrap { max-width: 48rem; }
.doc h1 { color: var(--ink); max-width: none; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
.doc .updated { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); margin: .75rem 0 2rem; }
.doc h2 { font-size: 1.35rem; margin: 2.25rem 0 .6rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: .8rem; }
.doc ul { padding-left: 1.2rem; margin: .6rem 0 0; }
.doc li + li { margin-top: .35rem; }
.doc address { font-style: normal; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; margin-top: .6rem; }
.back { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }

@media (max-width: 22rem) {
  .fact { grid-template-columns: 4.75rem 1fr; gap: .75rem; padding: .9rem 1rem; }
  .top__cta { font-size: .8rem; padding: .4rem .65rem; }
  .brand__name { font-size: 1.35rem; }
}
