/* PubliCompute — sito pubblico. Mobile prima di tutto; nessun font o script di terze parti (GDPR). */
:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: #26262b;
  --text: #f2efe8;
  --dim: #8d8a84;
  --accent: #c6ff3d;
  --accent-ink: #0b0b0c;
  --warm: #ff6a3d;
  --radius: 14px;
  --pad: clamp(18px, 5vw, 64px);
  --sans: "Helvetica Neue", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 17px; line-height: 1.55; overflow-x: hidden;
  padding-bottom: 76px; /* barra fissa su mobile */
}
a { color: inherit; }
.mono { font-family: var(--mono); letter-spacing: -0.01em; }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px var(--pad); background: rgba(11, 11, 12, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.logo b { color: var(--accent); font-weight: 800; }
.logo svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2; }
.links { display: none; gap: 28px; font-size: 15px; }
.links a { text-decoration: none; color: var(--dim); transition: color .2s; }
.links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang {
  font: 600 13px var(--mono); color: var(--text); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
}
.lang:hover { border-color: var(--dim); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink); font: 700 16px var(--sans); letter-spacing: -0.01em;
  text-decoration: none; border: 0; border-radius: 999px; cursor: pointer; transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); background: #d4ff6b; }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--text); background: transparent; }
.btn-small { display: none; min-height: 40px; padding: 0 18px; font-size: 14px; }

/* HERO */
.hero { padding: clamp(48px, 12vw, 140px) var(--pad) 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 90vw; height: 90vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(198, 255, 61, .14), transparent 70%); pointer-events: none;
}
.kicker { color: var(--dim); font-size: 13px; margin: 0 0 22px; }
h1 {
  font-size: clamp(46px, 13vw, 148px); line-height: .92; letter-spacing: -0.055em; margin: 0 0 26px; font-weight: 800;
}
.lead { font-size: clamp(18px, 2.4vw, 24px); max-width: 640px; color: #d9d5cc; margin: 0 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }
.hero-cta .btn { flex: 1 1 220px; }

.chain-viz { display: flex; align-items: center; gap: 0; max-width: 980px; }
.node {
  flex: 1 1 0; min-width: 0; padding: 14px 12px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px;
}
.node span { font-size: clamp(11px, 2.6vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node small { color: var(--dim); font: 11px var(--mono); }
.wire { flex: 0 0 clamp(14px, 6vw, 70px); height: 2px; background: var(--line); position: relative; overflow: hidden; }
.wire i { position: absolute; top: 0; left: -40%; width: 40%; height: 2px; background: var(--accent); animation: flow 1.4s linear infinite; }
.wire + .node + .wire i { animation-delay: .7s; }
@keyframes flow { to { left: 100%; } }
.viz-caption { color: var(--dim); font-size: 12px; margin: 14px 0 0; }

/* BAND OF NUMBERS */
.band {
  display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 26px var(--pad); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: clamp(38px, 9vw, 64px); line-height: 1; color: var(--accent); font-weight: 700; }
.stat span { color: #cfcbc2; max-width: 34ch; }
.note { font-size: 12px; color: var(--dim); padding: 16px var(--pad); margin: 0; }

/* SECTIONS */
.section { padding: clamp(64px, 11vw, 140px) var(--pad); }
.section.dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(36px, 8.5vw, 92px); line-height: .95; letter-spacing: -0.045em; margin: 0 0 36px; font-weight: 800; }
h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 10px; }
.sub { color: var(--dim); font-size: 18px; max-width: 620px; margin: -18px 0 36px; }
.big { font-size: clamp(24px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 22px; }
.split { display: grid; grid-template-columns: 1fr; gap: 32px; }
.split p { color: #d6d2c9; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.num { color: var(--accent); font-size: 14px; display: block; margin-bottom: 18px; }
.steps p { color: #cfcbc2; margin: 0; }

.spec { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec li:last-child { border-bottom: 0; }
.spec span { color: var(--dim); }
.spec b { font-weight: 500; text-align: right; }

.cards3 { display: grid; gap: 14px; }
.card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.card p { color: #cfcbc2; margin: 0; }

/* MODELS RAIL: scorrimento orizzontale col dito su mobile */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 18px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.model {
  scroll-snap-align: start; padding: 28px 24px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg); display: flex; flex-direction: column; min-height: 360px; text-decoration: none;
}
.model h3 { font-size: clamp(28px, 6vw, 36px); line-height: 1; letter-spacing: -0.04em; margin-bottom: 16px; }
.model p { color: #cfcbc2; margin: 0 0 18px; }
.model dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: auto 0 0; font-size: 13px; }
.model dt { color: var(--dim); }
.model dd { margin: 0; text-align: right; }
.tier { color: var(--dim); font-size: 12px; letter-spacing: .08em; margin-bottom: 26px !important; }
.model.top { border-color: var(--accent); background: linear-gradient(160deg, rgba(198, 255, 61, .08), transparent 60%), var(--bg); }
.model.top .tier { color: var(--accent); }
.fine { font-size: 12px; color: var(--dim) !important; margin-top: 14px !important; margin-bottom: 0 !important; }
.model.ask { border-style: dashed; justify-content: center; }
.model.ask:hover { border-color: var(--accent); }

.term {
  background: #050506; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 13px;
  overflow-x: auto; color: var(--text); margin: 22px 0 0; white-space: pre;
}

/* FORMS */
.form { display: grid; gap: 16px; max-width: 760px; }
.form.grid { grid-template-columns: 1fr; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--dim); }
.form input:not([type=checkbox]), .form select, .form textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; font: 16px var(--sans); appearance: none; -webkit-appearance: none;
}
.section:not(.dark) .form input:not([type=checkbox]), .section:not(.dark) .form select, .section:not(.dark) .form textarea { background: var(--bg-2); }
.form select { background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; display: grid; gap: 4px; }
.form legend { padding: 0 6px; color: var(--dim); font-size: 14px; }
.chk { flex-direction: row !important; align-items: flex-start; gap: 12px !important; color: var(--text) !important; font-size: 15px !important; cursor: pointer; padding: 8px 0; }
.chk input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.hint { font-size: 13px; color: var(--dim); margin: 0; }
.msg { min-height: 1.4em; margin: 0; font-size: 15px; }
.msg.ok { color: var(--accent); }
.msg.err { color: var(--warm); }
.form .btn { justify-self: start; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 20px 0; max-width: 820px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 24px var(--mono); color: var(--accent); line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: #cfcbc2; margin: 14px 0 0; }

/* FOOTER */
.foot { padding: 48px var(--pad); display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--line); }
.foot p { margin: 8px 0 0; font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.foot nav a { color: var(--dim); text-decoration: none; }
.foot nav a:hover { color: var(--text); }

/* STICKY CTA (mobile, alla Burton) */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  min-height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; letter-spacing: -0.01em;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55); transition: transform .25s, opacity .25s;
}
.sticky-cta.hide { transform: translateY(140%); opacity: 0; }

/* Apparizione allo scorrimento */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* TABLET E DESKTOP */
@media (min-width: 720px) {
  .band { grid-template-columns: repeat(3, 1fr); }
  .stat { border-bottom: 0; border-right: 1px solid var(--line); }
  .stat:nth-child(3) { border-right: 0; }
  .note { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .steps, .cards3 { grid-template-columns: repeat(3, 1fr); }
  .rail { grid-auto-columns: calc((100% - 28px) / 2.3); }
  .form.grid { grid-template-columns: 1fr 1fr; }
  .form .full { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .links, .btn-small { display: inline-flex; }
  .sticky-cta { display: none; }
  .split { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
  .rail { grid-auto-columns: calc((100% - 42px) / 4); overflow: visible; margin: 0; padding: 0; }
  .model { min-height: 420px; }
  .hero-cta .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wire i { animation: none; left: 0; width: 100%; opacity: .5; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
