/* F3 Management — layout stile dev-startup, grafica tutta ASCII. */

/* Geist e Geist Mono (SIL OFL 1.1, vedi assets/fonts/OFL-Geist.txt), ospitati in locale:
   niente richieste a server terzi, quindi nessun IP del visitatore inviato a Google. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000;
  --bg-1: #0a0a0a;
  --bg-2: #111;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .13);
  --fg: #ededed;
  --gray: #a1a1a1;
  --gray-2: #707070;
  --gray-3: #2e2e2e;
  --blue: #2f5bff;
  --blue-hi: #7b98ff;
  --flash: #0a2bd8; /* luminanza relativa ~0.07: il flash resta sotto la soglia WCAG 2.3.1 */
  --sans: "Geist", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 12px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* vince anche su display: flex/grid dei componenti */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-booting { overflow: hidden; }
::selection { background: var(--blue); color: #fff; }
a { color: inherit; }
canvas { display: block; }
pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 920px; }
.sr-only, .js .brand-list {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip { position: absolute; left: 8px; top: -48px; z-index: 200; padding: 8px 12px; border-radius: 8px; background: #fff; color: #000; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- intro ---------- */
#boot { display: none; }
.js #boot {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  clip-path: inset(0 0 0 0);
  transition: clip-path .7s cubic-bezier(.7, 0, .2, 1);
  animation: boot-failsafe .01s 8s forwards; /* se il JS muore, l'intro non blocca il sito */
}
#boot.flash { background: var(--flash); }
#boot.out { clip-path: inset(0 0 100% 0); }
@keyframes boot-failsafe { to { visibility: hidden; opacity: 0; pointer-events: none; } }
.boot-ascii { position: absolute; inset: 0; }
.boot-log { position: absolute; left: var(--gutter); top: 20px; margin: 0; font-size: 11px; line-height: 1.6; color: var(--gray-2); }
#boot.flash .boot-log, #boot.flash .boot-meta { color: rgba(255, 255, 255, .75); }
.boot-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.bw { font: 700 clamp(36px, 8.6vw, 150px)/1 var(--sans); letter-spacing: -.055em; white-space: nowrap; color: #fff; opacity: 0; }
.bw span { color: var(--blue); }
.bw.strip { position: absolute; inset: 0; will-change: transform; }
#boot.flash .bw span { color: #fff; }
#boot.flash .strip { text-shadow: -5px 0 rgba(0, 200, 255, .85), 5px 0 rgba(123, 152, 255, .9); }
.boot-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 18px;
  display: flex; justify-content: space-between; gap: 12px;
  font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gray-2);
}

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s; }
.nav.scrolled { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--line); }
.nav::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue));
  transform-origin: 0 50%;
  transform: scaleX(var(--sp, 0));
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 16px/1 var(--sans); letter-spacing: -.02em; }
.logo-mark { display: block; height: 18px; width: auto; fill: currentColor; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--gray); text-decoration: none; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.region { padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 6px; font: 500 11px/1 var(--mono); color: var(--gray-2); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  font: 500 15px/1 var(--sans);
  text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #dcdcdc; box-shadow: 0 0 0 4px rgba(47, 91, 255, .25); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn .mono { color: var(--blue-hi); }

/* ---------- elementi comuni ---------- */
.eyebrow { margin: 0 0 16px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--blue-hi); }
.grad, .sec h2 {
  background: linear-gradient(180deg, #fff 30%, #9a9a9a 115%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.reveal { transition: opacity .9s, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }

.window {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  overflow: hidden;
  box-shadow: 0 30px 90px -30px rgba(47, 91, 255, .22);
}
.window-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--gray-2); white-space: nowrap; overflow: hidden; }
.dots { display: flex; gap: 6px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-3); }
.live { margin-left: auto; color: var(--blue-hi); overflow: hidden; text-overflow: ellipsis; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding: 128px 0 0; overflow: hidden; text-align: center; }
.hero::before {
  content: "";
  position: absolute; z-index: -3; left: 50%; top: -320px;
  width: 1300px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47, 91, 255, .28), transparent);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 25%, transparent 75%);
}
.hero-net {
  position: absolute; inset: 0; z-index: -1;
  width: 100% !important; height: 100% !important;
  -webkit-mask-image: radial-gradient(ellipse 55% 45% at 50% 32%, transparent 40%, #000 85%);
  mask-image: radial-gradient(ellipse 55% 45% at 50% 32%, transparent 40%, #000 85%);
  opacity: .8;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: 13px; color: var(--gray);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.pill:hover { color: var(--fg); border-color: rgba(255, 255, 255, .25); }
.pill-dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(47, 91, 255, .18); }
.pill-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-hi); box-shadow: 0 0 10px var(--blue); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pill-arrow { color: var(--gray-2); }
.hero-title { margin: 28px auto 0; font: 600 clamp(38px, 6.4vw, 80px)/1.02 var(--sans); letter-spacing: -.055em; }
.hero-title .line {
  display: block;
  padding-bottom: .06em;
  background: linear-gradient(180deg, #fff 35%, #a8a8a8 120%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-title .accent { background-image: linear-gradient(90deg, #a9baff, #2f5bff 55%, #7b98ff); }
.hero-sub { max-width: 640px; margin: 24px auto 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--gray); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.hero-object { position: relative; width: min(100%, 900px); margin: clamp(24px, 3.5vw, 44px) auto 0; }
.hero-object .glow { position: absolute; inset: 12% 18%; z-index: -1; background: radial-gradient(closest-side, rgba(47, 91, 255, .45), transparent); filter: blur(30px); }
.logo3d {
  width: max-content; max-width: 100%;
  margin: 0 auto;
  font-size: 11px; line-height: 1.2;
  white-space: pre; text-align: left;
  background: linear-gradient(180deg, #fff 15%, #9db1ff 50%, #2f5bff 88%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  user-select: none;
}

/* ---------- trusted by ---------- */
.trusted { padding: 56px 0 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trusted-label { margin: 0 0 30px; text-align: center; font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gray-2); }
.brand-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 0; padding: 0 var(--gutter); list-style: none; color: var(--gray); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-track { display: flex; align-items: center; width: max-content; animation: mq 60s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq-item { flex: none; margin-right: 64px; font: 600 22px/1 var(--sans); letter-spacing: -.035em; color: #7d7d7d; white-space: nowrap; transition: color .2s; }
.mq-item.m { font: 500 17px/1 var(--mono); letter-spacing: -.01em; }
.mq-item:hover { color: #fff; }
.mq-logo { display: inline-flex; align-items: center; }
.mq-logo img { display: block; height: 28px; width: auto; filter: grayscale(1) brightness(1.35); opacity: .75; transition: filter .2s, opacity .2s; }
.mq-logo:hover img { filter: none; opacity: 1; }
.mq-lock { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.03em; }
.mq-lock img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.mq-lock:hover img { filter: none; opacity: 1; }
.mq-lock b { font-weight: 600; color: inherit; transition: color .2s; }
.mq-lock:hover b { color: #32b3a4; }
.mq-word { gap: 0; }
.mq-item i { font-style: normal; color: var(--blue); }

/* ---------- sezioni ---------- */
.sec { position: relative; padding: clamp(96px, 12vw, 150px) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { max-width: 780px; margin: 0 0 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec h2 { margin: 0; padding-bottom: .05em; font: 600 clamp(32px, 4.6vw, 56px)/1.06 var(--sans); letter-spacing: -.045em; }
.sec-sub { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--gray); }
.sec-head.center .sec-sub { max-width: 620px; margin-left: auto; margin-right: auto; }

.thesis-text { max-width: 30ch; margin: 0; font: 500 clamp(28px, 3.6vw, 48px)/1.2 var(--sans); letter-spacing: -.035em; }
.thesis-text em { font-style: normal; color: var(--blue-hi); }
.js .thesis-text.split .w { color: #2a2a2a; transition: color .35s; }
.js .thesis-text.split .w.on { color: var(--fg); }
.js .thesis-text.split .w.hl.on { color: var(--blue-hi); }

/* pipeline */
.pipe-wrap { padding: clamp(20px, 3vw, 36px); overflow: hidden; }
.pipe { width: max-content; max-width: 100%; margin: 0 auto; font-size: 14px; line-height: 1.3; color: var(--gray); }
.pipe .p { color: #3a3f55; }
.pipe .k { color: #fff; text-shadow: 0 0 8px var(--blue); }
.pipe .on { color: var(--blue-hi); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.bento > *, .code-grid > *, .stats > * { min-width: 0; }
.cell { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); overflow: hidden; transition: border-color .2s; }
.cell:hover { border-color: rgba(123, 152, 255, .45); }
.cell-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 0; font: 500 12px/1 var(--mono); color: var(--gray-2); }
.cell-head .st { color: var(--blue-hi); }
.cell h3 { margin: 16px 24px 8px; font: 600 22px/1.2 var(--sans); letter-spacing: -.03em; }
.cell p { margin: 0 24px 24px; font-size: 15px; line-height: 1.6; color: var(--gray); }
.cell-media, .dash-media, .net-media { margin-top: auto; border-top: 1px solid var(--line); background: #000; }
.cell-media canvas, .dash-media canvas, .net-media canvas { width: 100% !important; height: auto !important; cursor: crosshair; }
.net-media { border-top: 0; }
.net-media canvas { cursor: default; }

/* codice */
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.code-window, .dash-window { display: flex; flex-direction: column; }
.tabs { display: flex; gap: 2px; }
.tabs button { padding: 6px 10px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--gray-2); cursor: pointer; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .07); color: var(--fg); }
.bar-note { margin-left: auto; font-size: 11px; color: #555; }
.code { flex: 1; margin: 0; padding: 22px 24px; overflow: auto; font-size: 13px; line-height: 1.75; color: #c9c9c9; tab-size: 2; }
.code .c { color: #5d5d5d; }
.code .k { color: var(--blue-hi); }
.code .s { color: #e3e9ff; }
.code .n { color: #fff; }
.code .f { color: #9db1ff; }
.code .fn { color: #fff; }
.dash-media { display: grid; place-items: center; flex: 1; }

/* principi */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); overflow: hidden; }
.stat { padding: 28px 24px 30px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .spin { margin: 0 0 22px; font-size: 8px; line-height: 1.2; white-space: pre; color: var(--blue-hi); user-select: none; overflow: hidden; }
.stat b { display: block; font: 600 46px/1 var(--sans); letter-spacing: -.045em; color: #fff; }
.stat span { display: block; margin: 12px 0 8px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue-hi); }
.stat p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--gray); }

/* terminale */
.term-body { margin: 0; padding: clamp(18px, 3vw, 28px); font-size: clamp(12px, 1.3vw, 14px); line-height: 1.8; white-space: pre-wrap; color: var(--gray); }
.term-body .p { color: var(--blue); }
.term-body [data-l="cmd"], .term-body .c { color: var(--fg); }
.term-body .h { color: var(--blue-hi); }
.cur { color: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* accesso */
.access { overflow: hidden; text-align: center; }
.access::before {
  content: "";
  position: absolute; left: 50%; bottom: -420px;
  width: 1200px; height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47, 91, 255, .3), transparent);
  pointer-events: none;
}
.access .wrap { position: relative; }
.access h2 { font-size: clamp(42px, 7vw, 92px); }
.access .sec-sub { max-width: 560px; margin-left: auto; margin-right: auto; }
.fine { margin: 26px 0 0; font: 400 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gray-2); }

/* footer */
.foot { padding: 64px 0 32px; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-tag { margin: 16px 0 0; font: 500 13px/1 var(--mono); color: var(--gray); }
.sys { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; line-height: 1; color: var(--gray); }
.sys i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-hi); box-shadow: 0 0 10px var(--blue); }
.foot-col h4 { margin: 4px 0 16px; font-size: 14px; font-weight: 500; color: var(--fg); }
.foot-col a, .foot-col span { display: block; margin: 0 0 10px; font-size: 14px; color: var(--gray-2); text-decoration: none; }
.foot-col a:hover { color: var(--fg); }
.foot-mark {
  margin: 56px 0 28px;
  overflow: hidden;
  font-size: 10px; line-height: 1.2;
  white-space: pre;
  background: linear-gradient(180deg, #2f5bff 0%, rgba(47, 91, 255, .15) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  user-select: none;
}
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--gray-2); }

/* team */
.team-title { margin: 0; padding-bottom: .05em; font: 600 clamp(40px, 6vw, 76px)/1.04 var(--sans); letter-spacing: -.05em; background: linear-gradient(180deg, #fff 30%, #9a9a9a 115%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.team-hero { padding-top: 140px; }
.role-group { margin-top: 64px; scroll-margin-top: 90px; }
.role-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.role-group-head .eyebrow { margin: 0; }
.role-group-head p { margin: 0; font-size: 14px; color: var(--gray-2); }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); transition: border-color .2s; }
.role:hover { border-color: rgba(123, 152, 255, .45); }
.role.is-open { border-color: rgba(123, 152, 255, .5); background: linear-gradient(180deg, rgba(47, 91, 255, .1), var(--bg-1) 60%); }
.role .st { color: var(--gray-2); }
.role .st.open { color: var(--blue-hi); }
.avatar-media { margin: 18px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #000; }
.avatar-media canvas { width: 100% !important; height: auto !important; }
.role h3 { margin: 18px 24px 8px; font: 600 20px/1.2 var(--sans); letter-spacing: -.03em; }
.role p { margin: 0 24px 24px; font-size: 14px; line-height: 1.6; color: var(--gray); }
.role .btn { align-self: flex-start; margin: auto 24px 24px; }
@media (max-width: 1000px) { .roles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .roles { grid-template-columns: 1fr; } .role-group-head { flex-direction: column; gap: 6px; } }

#trail { position: fixed; inset: 0; z-index: 80; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .code-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) { /* sotto questa larghezza le 7 voci non stanno accanto a logo e bottone */
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .bento, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .region { display: none; }
  .boot-meta span:first-child { display: none; }
  .foot-top { grid-template-columns: 1fr; }
  .hero { padding-top: 104px; }
  .btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq-track { animation-duration: 400s; }
  .cur, .pill-dot::after { animation: none; }
  .reveal { transition: none; }
}
.sec .role-group-head h2 { max-width: none; padding: 0; font: 500 12px/1 var(--mono); letter-spacing: .08em; background: none; color: var(--blue-hi); }

/* ---------- calcolatore (calcolatore.html) ---------- */
.calc-hero { padding-top: 140px; }
.calc { max-width: 880px; margin: 0 auto; }
.calc-form { padding: clamp(20px, 4vw, 32px); }
.calc-label { display: block; margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gray-2); }
.opt { text-transform: none; letter-spacing: 0; color: var(--gray-2); font-weight: 400; }
.calc-row { display: flex; gap: 10px; }
.calc-input { flex: 1; display: flex; align-items: center; gap: 2px; height: 50px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 999px; background: #000; transition: border-color .15s, box-shadow .15s; }
.calc-input:focus-within { border-color: rgba(123, 152, 255, .6); box-shadow: 0 0 0 4px rgba(47, 91, 255, .18); }
.calc-input span { font: 500 17px/1 var(--mono); color: var(--gray-2); }
.calc-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 17px/1 var(--mono); color: var(--fg); }
.calc-input input::placeholder { color: #4a4a4a; }
.calc-manual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 0; padding: 0; border: 0; }
.calc-manual label { display: flex; flex-direction: column; gap: 8px; font: 500 12px/1.3 var(--mono); color: var(--gray); }
.calc-manual input { height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; outline: 0; background: #000; font: 500 16px/1 var(--mono); color: var(--fg); }
.calc-manual input:focus { border-color: rgba(123, 152, 255, .6); box-shadow: 0 0 0 4px rgba(47, 91, 255, .18); }
.calc-alt { margin: 16px 0 0; font-size: 14px; }
.link { padding: 0; border: 0; background: none; font: inherit; color: var(--gray); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--fg); }
.calc-log { margin: 0; padding: 0 clamp(20px, 4vw, 32px) clamp(18px, 3vw, 24px); }
.calc-log:empty { display: none; }
.calc-log .o { color: var(--gray); }
.btn:disabled { opacity: .5; cursor: progress; }

.calc-result { padding: clamp(24px, 5vw, 44px) clamp(20px, 4vw, 32px); border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.calc-head { text-align: center; }
.calc-head .eyebrow { margin-bottom: 14px; }
.calc-y { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; margin: 0; }
.calc-y span { font: 600 clamp(48px, 9vw, 92px)/1 var(--sans); letter-spacing: -.05em; color: #fff; font-variant-numeric: tabular-nums; }
.calc-y small { font: 500 14px/1 var(--mono); color: var(--blue-hi); }
.calc-year { margin: 14px 0 0; font-size: 15px; color: var(--gray); }

.calc-funnel { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: 620px; margin: 36px auto 0; }
.fb { width: calc(var(--w) * 100%); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 18px; border: 1px solid rgba(123, 152, 255, .35); border-radius: 8px; background: linear-gradient(90deg, rgba(47, 91, 255, .14), rgba(47, 91, 255, .42)); }
.fb b { font: 600 24px/1 var(--sans); letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.fb span { font: 500 12px/1.3 var(--mono); color: #cfd9ff; }

.calc-ctrl { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 28px; margin: 34px 0 0; }
.seg-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.seg-label { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gray-2); }
.seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: #000; }
.seg button { padding: 8px 14px; border: 0; border-radius: 999px; background: none; font: 500 13px/1 var(--mono); color: var(--gray); cursor: pointer; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: #fff; }

.calc-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 34px 0 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.calc-data div { padding: 16px 18px; border-right: 1px solid var(--line); }
.calc-data div:last-child { border-right: 0; }
.calc-data dt { margin: 0 0 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gray-2); }
.calc-data dd { margin: 0; font: 500 16px/1.3 var(--sans); color: var(--fg); }

.calc-cta { margin: 44px 0 0; text-align: center; }
.calc-cta h2 { margin: 0; font: 600 clamp(28px, 4vw, 40px)/1.1 var(--sans); letter-spacing: -.04em; }
.calc-cta p { max-width: 520px; margin: 14px auto 0; font-size: 16px; line-height: 1.6; color: var(--gray); }
.calc-cta .cta-row { margin-top: 24px; }

.calc-method { max-width: 880px; margin: 22px auto 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); }
.calc-method summary { cursor: pointer; font: 500 13px/1.4 var(--mono); color: var(--gray); }
.calc-method summary:hover { color: var(--fg); }
.calc-method .code { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #000; white-space: pre-wrap; }
.calc-method ul { margin: 16px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--gray); }
.calc-method b { color: var(--fg); font-weight: 600; }

@media (max-width: 640px) {
  .calc-hero { padding-top: 110px; }
  .calc-row { flex-direction: column; }
  .calc-input { flex: none; }
  .calc-row .btn { width: 100%; }
  .calc-manual { grid-template-columns: 1fr; }
  .calc-data { grid-template-columns: 1fr 1fr; }
  .calc-data div { border-bottom: 1px solid var(--line); }
  .fb { padding: 12px 14px; }
  .fb b { font-size: 20px; }
}
