/* Font serviti dal dominio: nessuna richiesta a Google (SIL Open Font License) */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Design tokens ===== */
:root {
  --bg: #070a12;
  --bg-alt: #0c1120;
  --surface: #10172a;
  --surface-2: #141d33;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --text-muted: #9aa5bd;
  --text-dim: #7d8799;
  --accent: #22e0c9;
  --accent-2: #6c8cff;
  --accent-soft: rgba(34, 224, 201, 0.12);
  --danger-ink: #ff8a65;
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --max-width: 1160px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Il vincolo orizzontale sta su html: messo sul body ne fa un contenitore di
   scorrimento annidato, con due aree scorrevoli sovrapposte. */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* subtle grain overlay for texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* La barra si accorcia con scaleX invece che con width: la larghezza fa
   ricalcolare il layout a ogni scatto di rotella, la scala no. */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 1000;
  will-change: transform;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 18px 0;
  background: transparent;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.brand-mark.small { width: 28px; height: 28px; font-size: 0.7rem; margin-right: 8px; border-radius: 8px; }

.brand-text { font-size: 1.05rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.94rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a:not(.nav-cta):after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.main-nav a:not(.nav-cta):hover { color: var(--text); }
.main-nav a:not(.nav-cta):hover:after { width: 100%; }

.nav-cta {
  padding: 9px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
  background-image: radial-gradient(58% 52% at 84% 6%,
    rgba(108, 140, 255, 0.15) 0%,
    rgba(108, 140, 255, 0.085) 30%,
    rgba(108, 140, 255, 0.035) 52%,
    rgba(108, 140, 255, 0.01) 72%,
    transparent 88%);
}

/* La griglia e ferma. Facendola scorrere, le sue linee da un pixel e quelle
   del livello rivelato cadevano su frazioni di pixel diverse a ogni frame e
   l'antialiasing dei due strati batteva, con l'effetto di un lampeggio. */
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 224, 201, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 224, 201, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 10%, transparent 75%);
}

/* Un solo livello per tutta la pagina. Essendo fisso vive nelle coordinate
   della finestra, quindi segue il cursore senza mai interrogare il layout.
   Due livelli mossi con la sola transform: la maschera non cambia mai, il
   disegno avviene una volta sola e ogni frame e pura composizione. La griglia
   interna si sposta in senso opposto per restare ancorata al documento; lo
   scostamento e preso modulo 48px, il passo della maglia, perche a quella
   distanza il disegno si ripete identico. */
.page-spot {
  position: fixed;
  top: 0;
  left: 0;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.7s ease;
  will-change: transform;
  -webkit-mask-image: radial-gradient(circle closest-side,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.62) 22%,
    rgba(0, 0, 0, 0.34) 42%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05) 77%,
    rgba(0, 0, 0, 0.012) 90%,
    transparent 100%);
  mask-image: radial-gradient(circle closest-side,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.62) 22%,
    rgba(0, 0, 0, 0.34) 42%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05) 77%,
    rgba(0, 0, 0, 0.012) 90%,
    transparent 100%);
}

body.is-lit .page-spot { opacity: 1; }

.page-spot-grid {
  position: absolute;
  inset: -48px;
  background-image:
    linear-gradient(rgba(34, 224, 201, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 224, 201, 0.17) 1px, transparent 1px);
  background-size: 48px 48px;
  will-change: translate;
}

/* Il riflettore passa sopra gli sfondi delle sezioni ma resta sotto i
   contenuti, che vengono sollevati dal loro contenitore comune. */
.container { position: relative; z-index: 2; }

/* Il bagliore e dipinto come sfondo dell'intestazione, non come elemento
   sovrapposto: un elemento sporgente veniva ritagliato dal contenitore con
   un bordo netto, e la sfocatura ne marcava ulteriormente il contorno. */

.hero-inner { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 224, 201, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

/* Senza flex-shrink il pallino viene schiacciato a ovale quando il testo
   va a capo; il margine lo centra sulla prima riga, non sull'intero blocco. */
.eyebrow .dot {
  position: relative;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: calc((1.65em - 7px) / 2);
  border-radius: 50%;
  background: var(--accent);
}

/* L'alone pulsa con transform e opacity, non con box-shadow: quest'ultimo
   obbliga a ridisegnare l'elemento a ogni frame, di continuo. */
.eyebrow .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease-out infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(3.3); opacity: 0; }
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
  max-width: 16ch;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin-top: 26px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04101a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(34, 224, 201, 0.5); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-full { width: 100%; margin-top: 6px; }

.hero-stats {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 620px;
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== Sections ===== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-contact { padding-bottom: 130px; }

.section-head { max-width: 700px; margin-bottom: 56px; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p { color: var(--text-muted); margin-bottom: 18px; }
.about-text strong { color: var(--text); }

.checklist { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.checklist li {
  padding-left: 28px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.96rem;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
}

.id-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.id-card-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.id-card-row:last-of-type { border-bottom: none; }
.id-card-row span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.id-card-row strong { font-size: 0.98rem; font-weight: 500; }

.id-card { transition: border-color 0.6s ease; }
.id-card:hover { border-color: rgba(34, 224, 201, 0.13); }

.id-card-row { position: relative; z-index: 1; }

/* ===== Credenziali ===== */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cred-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.cred-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.cred-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.cred-card h3 { font-size: 1.02rem; margin-bottom: 8px; line-height: 1.35; }
.cred-card p { color: var(--text-dim); font-size: 0.88rem; }

/* ===== Associazioni ===== */
.memberships {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.memberships h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.memberships p { color: var(--text-muted); font-size: 0.94rem; margin-bottom: 12px; }
.memberships ul { list-style: none; display: grid; gap: 10px; }
.memberships li {
  color: var(--text-muted);
  font-size: 0.94rem;
  padding-left: 16px;
  position: relative;
}
.memberships li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.memberships strong { color: var(--text); }

/* ===== Incarichi ===== */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.role-card:hover { transform: translateY(-6px); border-color: rgba(34, 224, 201, 0.35); }

.role-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.role-card h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.35; }
.role-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ===== Servizi ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 224, 201, 0.35);
  background: var(--surface-2);
}

.service-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border: 1px solid rgba(34, 224, 201, 0.22);
  border-radius: 12px;
  margin-bottom: 18px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.service-icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.service-card:hover .service-icon {
  background: rgba(34, 224, 201, 0.18);
  border-color: rgba(34, 224, 201, 0.45);
}

.btn-icon { width: 19px; height: 19px; stroke: currentColor; }

.service-card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
  display: grid;
  gap: 42px;
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
}

.timeline-content h3 { font-size: 1.12rem; margin-bottom: 4px; }
.timeline-org {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.timeline-content p:last-child { color: var(--text-muted); max-width: 70ch; }

/* ===== Progetti ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.project-card-static { cursor: default; }
.project-card-static:hover { transform: none; }

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-2);
  background: rgba(108, 140, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--text-dim);
  transition: transform 0.25s ease, stroke 0.25s ease;
}
.project-card:hover .project-arrow { transform: translate(3px, -3px); stroke: var(--accent); }

.project-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.project-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }
.project-link { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim); }

/* ===== Contatti ===== */
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.btn-lg { padding: 17px 32px; font-size: 1.02rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-line {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact-line:hover { border-color: var(--accent); transform: translateX(4px); }

.contact-icon { display: flex; align-items: center; }
.contact-icon svg { width: 21px; height: 21px; stroke: var(--accent); }
.contact-line strong { display: block; font-size: 0.85rem; color: var(--text-dim); font-weight: 500; margin-bottom: 2px; }
.contact-line span span { color: var(--text); font-size: 0.98rem; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-inner > div:first-child { display: flex; align-items: center; color: var(--text-muted); }

/* ===== Pagina informativa ===== */
.legal { padding: 140px 0 90px; }
.legal-inner { max-width: 760px; }

.legal h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin: 12px 0 18px;
}

.legal-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.legal section { margin-top: 40px; }

.legal h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.legal p { color: var(--text-muted); margin-bottom: 14px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal em { color: var(--text); font-style: italic; }

.legal ul { margin: 0 0 14px 20px; }
.legal li { color: var(--text-muted); margin-bottom: 7px; }

.legal a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 24px;
}

.legal-back { margin-top: 50px; }

.site-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: var(--accent); }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .cred-grid, .services-grid, .projects-grid, .roles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(7, 10, 18, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 10px; text-align: center; border-bottom: 1px solid var(--border-strong) !important; }
  .nav-toggle { display: flex; }

  .cred-grid, .services-grid, .projects-grid, .roles-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 22px; margin-top: 48px; }
  /* su due righe la forma a pillola diventa un lozzenga sgraziata */
  .eyebrow { border-radius: 14px; font-size: 0.74rem; padding: 8px 14px; }
  .contact-cta .btn { width: 100%; }
  .section { padding: 76px 0; }
  .hero { padding-top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
