@font-face {
  font-family: 'Jost';
  src: url('../assets/fonts/jost-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/ibm-plex-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #F9F9F8;
  --paper-2: #F2F3F5;
  --ink: #192029;
  --blue: #004F7C;
  --blue-deep: #12171E;
  --accent: #E25303;
  /* Varianti AA dell'arancio per testo piccolo: chiaro su --paper, scuro su --ink. --accent resta il colore di marca */
  --accent-text: #CD4000;
  --accent-text-invert: #EA580C;
  --line: #D7D9DA;
  --line-strong: #878E96;
  --muted: #646970;
  --muted-invert: #A8AEB6;

  --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --text-base: 1.0625rem;

  --margin: clamp(20px, 4vw, 64px);
  --gutter: 24px;

  --ease-wipe: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--blue); color: var(--paper); padding: 10px 16px; font-family: var(--mono);
}
.skip:focus { left: var(--margin); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- PAGE WIPE ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.8s var(--ease-wipe);
}
.wipe__brand {
  font-family: var(--sans); font-weight: 800; font-size: 21px;
  letter-spacing: 0.34em; color: var(--paper);
  opacity: 1; transition: opacity 0.3s ease;
}
.wipe.is-done { transform: translateY(-101%); }
.wipe.is-done .wipe__brand { opacity: 0; }
.wipe.is-gone { display: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(25, 32, 41, 0.82), rgba(25, 32, 41, 0));
  transition: background-color 0.35s ease;
  pointer-events: none;
}
.nav--solid { background-color: var(--ink); background-image: none; }
/* variante su pagina chiara: carta sfocata come la tavola */
.nav--paper {
  background-color: rgba(249, 249, 248, 0.92);
  background-image: none;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(25, 32, 41, 0.14);
}
.nav--paper .nav__brand { color: var(--ink); }
.nav--paper .nav__item { color: #3E4650; }
/* corrente: aria-current sulla pagina esatta, data-current-section sul padre
   quando la pagina attiva e' una sottovoce di tendina (batch m44) */
.nav__item[aria-current], .nav__item[data-current-section] {
  border-bottom: 2px solid var(--accent); padding-top: 3px; padding-bottom: 3px;
}
.nav--paper .nav__item[aria-current], .nav--paper .nav__item[data-current-section] { color: var(--ink); }
.nav__inner {
  height: var(--nav-h);
  padding: 0 var(--margin);
  display: flex; align-items: center; gap: 40px;
  pointer-events: auto;
}
.nav__brand {
  font-weight: 800; font-size: 21px; letter-spacing: 0.22em;
  color: var(--paper);
  /* tap target 44px senza cambiare --nav-h: il margin-block negativo
     annulla il padding, la barra resta della stessa altezza */
  display: inline-block; padding-block: 10px; margin-block: -10px;
}
.nav__brand img { display: block; height: 25px; width: auto; object-fit: contain; }
@media (min-width: 480px) { .nav__brand img { height: 32px; } }
@media (min-width: 640px) { .nav__brand img { height: 44px; } }
@media (min-width: 900px) { .nav__brand img { height: 56px; } }
@media (min-width: 1280px) { .nav__brand img { height: 64px; } }
.nav__menu { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav__item, .nav__chevron {
  font-family: var(--mono); font-size: 0.875rem; font-weight: 500;
  letter-spacing: 0.12em; color: rgba(249, 249, 248, 0.92);
  cursor: default;
}
a.nav__item { cursor: pointer; }
.nav--paper .nav__chevron { color: #3E4650; }
/* voci non ancora costruite: presenti e mute, mai nascoste (CONCEPT-CONSTITUTION §7) */
.nav__item--wip { color: var(--muted-invert); }
.nav--paper .nav__item--wip { color: var(--muted); }

/* ---------- NAV: tendine desktop a colonna tipografica (batch m44) ---------- */
.nav__group { position: relative; display: flex; align-items: center; gap: 8px; }

.nav__chevron {
  width: 24px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; letter-spacing: 0;
}
.nav__chevron svg { transition: transform 0.2s var(--ease-out); }
.nav__chevron[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav__panel {
  position: absolute;             /* MAI fixed: .nav--paper ha backdrop-filter,
                                      diventerebbe containing block e il pannello
                                      si risolverebbe dentro l'header */
  top: calc(100% + 18px);
  left: -22px;
  min-width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 0;
  opacity: 0; transform: translateY(-6px);
  z-index: 5;
}
.nav__panel::before {
  /* unica concessione grafica: quadratino d'angolo arancio, gia' nel linguaggio tavola */
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 6px; height: 6px; background: var(--accent);
}
.nav__panel--right { left: auto; right: -22px; min-width: 220px; }
.nav__panel[data-open] { opacity: 1; transform: none; }
.nav__panel:not([hidden]) { transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }

.nav__list { list-style: none; }
.nav__sub {
  display: flex; align-items: center; gap: 14px;
  min-height: 44px; padding: 0 22px;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  letter-spacing: 0.08em; color: var(--ink); white-space: nowrap;
}
a.nav__sub:hover, a.nav__sub:focus-visible { color: var(--blue); }
.nav__num { min-width: 26px; font-size: 14px; color: var(--muted); cursor: inherit; }
.nav__sub--wip { color: var(--muted); border-bottom: 1px dashed var(--line-strong); }
.nav__panelfoot {
  display: flex; align-items: center; min-height: 44px;
  margin-top: 10px; padding: 14px 22px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; color: var(--blue);
}

html:not(.js) .nav__panel { display: none; }
html:not(.js) .nav__group:hover .nav__panel,
html:not(.js) .nav__group:focus-within .nav__panel { display: block; opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  /* :not([hidden]) obbligatorio: senza, la specificita' piu' bassa di questa
     regola perde contro .nav__panel:not([hidden]) e la transizione resta attiva */
  .nav__panel:not([hidden]), .nav__chevron svg { transition: none; }
  .nav__panel { transform: none; }
}

.nav__cta,
.navm__cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--blue); color: var(--paper);
  padding: 12px 18px;
}
.nav__cta::before,
.navm__cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  clip-path: polygon(0 0, 0 0, -18% 100%, 0 100%);
  transition: clip-path 0.66s var(--ease-wipe);
}
.nav__cta:hover::before,
.navm__cta:hover::before { clip-path: polygon(0 0, 118% 0, 100% 100%, 0 100%); }
.navm__cta { display: none; }

/* ---------- NAV: menu mobile a pannello (sotto 1024px) ---------- */
.nav__toggle {
  display: none;
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  margin-left: 12px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
}
.nav__toggle span {
  position: absolute; left: 12px;
  width: 20px; height: 2px;
  background: var(--paper);
}
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.nav--paper .nav__toggle span { background: var(--ink); }
#navmenu {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0 0;   /* mai 84 scritto a mano: segue --nav-h */
  background: var(--ink);
  padding: 24px var(--margin) 32px;
  overflow-y: auto;
  overscroll-behavior: contain;                 /* rete di sicurezza, non tocca l'altezza calcolata */
  z-index: 99;
  pointer-events: auto;
}
#navmenu.is-open {
  display: grid;
  align-content: start;
  row-gap: 4px;
}
/* sopra 1024 il pannello resta nascosto anche se .is-open non e' ancora
   stata rimossa (resize rapido prima che il JS richiuda il pannello) */
@media (min-width: 1024px) {
  #navmenu.is-open { display: none; }
}

/* ---------- NAV: drawer mobile ad accordion esclusivo, riga divisa (batch m44) ---------- */
#navmenu > .navm__top,
.navm__row {
  border-bottom: 1px solid rgba(249, 249, 248, 0.14);
}
.navm__row { display: flex; align-items: center; justify-content: space-between; }
.navm__top {
  min-height: 56px; flex: 1;
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 24px; letter-spacing: 0.02em;
  color: var(--paper);
}
.navm__row .navm__top { border-bottom: 0; }
.navm__top--wip { color: rgba(249, 249, 248, 0.42); }
.navm__chevron {
  width: 44px; height: 56px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--paper);
}
.navm__chevron svg { transition: transform 0.2s var(--ease-out); }
.navm__chevron[aria-expanded="true"] svg { transform: rotate(180deg); }
.navm__list { list-style: none; }
.navm__sub {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding-left: 24px;
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.02em;
  color: rgba(249, 249, 248, 0.78);
}
.navm__sub .nav__num { color: var(--muted-invert); }   /* --muted e' illeggibile sul fondo scuro del drawer */
a.navm__sub:hover, a.navm__sub:focus-visible { color: var(--paper); }
.navm__sub--wip { color: rgba(249, 249, 248, 0.42); border-bottom: 1px dashed rgba(249, 249, 248, 0.3); }

html:not(.js) .navm__list { display: block; }

/* filetto arancio sui link */
[data-link] {
  position: relative; padding-bottom: 3px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: left bottom;
  transition: background-size 0.5s var(--ease-out);
}
[data-link]:hover { background-size: 100% 2px; }

/* ---------- BOTTONI (wipe poligonale) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; isolation: isolate;
  min-height: 52px; padding: 0 28px;
  font-family: var(--mono); font-size: 0.875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color 0.66s var(--ease-wipe);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  clip-path: polygon(0 0, 0 0, -18% 100%, 0 100%);
  transition: clip-path 0.66s var(--ease-wipe);
}
.btn:hover::before { clip-path: polygon(0 0, 118% 0, 100% 100%, 0 100%); }
.btn__label { transition: letter-spacing 0.66s var(--ease-wipe); }
.btn:hover .btn__label { letter-spacing: 0.16em; }

.btn--blue { background: var(--blue); color: var(--paper); }
.btn--blue::before { background: var(--accent); }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--paper); }
.btn--ghost::before { background: var(--accent); }
.btn--ghost:hover { border-color: var(--accent); }
/* telefono: una riga da 340; dove non ci sta, ultima parola e freccia (.nw) restano insieme */
.nw { white-space: nowrap; }
@media (max-width: 767px) {
  .btn { padding: 10px 16px; letter-spacing: 0.02em; text-align: center; }
  .footer__col a { text-wrap: balance; }
}
@media (max-width: 389px) {
  .btn { padding: 10px 6px; letter-spacing: 0; }
}
@media (hover: none) {
  .btn:hover .btn__label { letter-spacing: inherit; }
}


/* ---------- HERO (video full-bleed + 3D col motto allo scroll) ---------- */
.hero { height: 400vh; background: var(--ink); }
/* corsa desktop piu' lunga: 1 colpo di rotella deve muovere meno la scena 3D */
@media (min-width: 1024px) {
  .hero { height: 480vh; }
}
html:not(.motion-ready) .hero { height: 100vh; height: 100svh; }
html:not(.motion-ready) .nav:not(.nav--paper) { background: var(--ink); background-image: none; }
.hero__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

/* slot video full-bleed */
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__frame {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}
.hero__frame img, .hero__frame video { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  .hero__frame video { display: none; }
  .hero__frame { background-image: url("../assets/video/aluplant-hero-poster.webp?v=20260930"); background-size: cover; background-position: center; }
}
.hero__slot {
  position: absolute; right: var(--margin); bottom: 76px;
  color: var(--paper);
  background: rgba(18, 23, 30, 0.72);
  padding: 8px 14px;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, rgba(25,32,41,.94) 0%, rgba(25,32,41,.86) 38%, rgba(25,32,41,.52) 66%, rgba(25,32,41,.22) 100%);
}
.hero__topfade {
  position: absolute; left: 0; right: 0; top: 0; height: 150px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(25,32,41,.6), rgba(25,32,41,0));
}
.hero__dim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: #070A0E;
  opacity: 0;
}
.hero__grid {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(249, 249, 248, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 249, 248, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(249, 249, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 249, 248, 0.04) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 16px 16px, 16px 16px;
}
.hero__canvas {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  opacity: 0; visibility: hidden;
}

/* motto: unico titolo dell'hero, sopra video e scena 3D */
.hero__motto {
  position: absolute; left: var(--margin); top: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center;
  pointer-events: none;
}
.hero__mottotext {
  font-family: var(--sans);
  font-weight: 720;
  font-size: clamp(2.4rem, 5.35vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  color: var(--paper);
}
.hero__mottotext .line:nth-child(-n+2) .mline {
  color: rgba(249, 249, 248, 0.12);
  -webkit-text-stroke: 1px rgba(249, 249, 248, 0.58);
}
.hero__mottotext .line { display: block; overflow: hidden; }
.mline { display: inline-block; will-change: transform; }
html.motion-ready .mline { transform: translateY(115%) rotate(3deg); transform-origin: left top; }

/* sequenza WE DESIGN / WE BUILD / WE MAKE IT WORK */
.hero__statements {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1vh;
  pointer-events: none;
}
.hstmt {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 7.6vw, 112px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-shadow: 0 2px 28px rgba(18, 23, 30, 0.55), 0 0 4px rgba(18, 23, 30, 0.35);
  opacity: 0;
  will-change: transform, opacity;
}

/* beam arancio sul bordo sezione */
.beam {
  position: absolute; bottom: 0; left: 0;
  width: 240px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: beamRun 7s linear infinite;
  opacity: 0.9;
}
@keyframes beamRun {
  from { transform: translateX(-240px); }
  to { transform: translateX(100vw); }
}

.wrap { padding-left: var(--margin); padding-right: var(--margin); }

/* ---------- SEZIONE 2: PROCESS MANIFESTO ---------- */
.process-manifesto { position: relative; background: var(--paper); overflow: clip; }
.process-manifesto__intro {
  min-height: min(72vh, 760px);
  min-height: min(72svh, 760px);
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  align-items: end;
  gap: clamp(32px, 7vw, 120px);
  padding-top: clamp(6rem, 11vh, 9rem);
  padding-bottom: clamp(6rem, 12vh, 10rem);
}
.process-manifesto__intro h2 {
  max-width: 12ch;
  font-family: var(--sans);
  font-size: clamp(3.5rem, 7.4vw, 7.4rem);
  font-weight: 720;
  line-height: 0.88;
  letter-spacing: -0.072em;
  text-wrap: balance;
}
.process-manifesto__intro p {
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
  padding-bottom: 76px;
}
/* ---------- SEZIONE 3: PUNTI FERMI 2x2 ---------- */
.pillars {
  position: relative;
  background: var(--blue);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: clip;
}
.pillars .beam { bottom: auto; top: -1px; }
.pillars__cell {
  padding: 64px 56px;
  border-bottom: 1px solid rgba(249, 249, 248, 0.22);
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.pillars__cell:nth-child(odd) { border-right: 1px solid rgba(249, 249, 248, 0.22); }
.pillars__cell:hover { background: rgba(249, 249, 248, 0.07); }
.pillars__num {
  display: block;
  color: rgba(249, 249, 248, 0.62);
  letter-spacing: 0.14em;
  margin-bottom: 26px;
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.pillars__cell:hover .pillars__num { color: var(--paper); }
.pillars__cell h3 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 34px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.pillars__cell p {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(249, 249, 248, 0.78);
  max-width: 36ch;
}

/* ---------- SEZIONE 3b: I CLIENTI ---------- */
.clients {
  position: relative;
  background: var(--paper);
  padding: 96px 0 48px;
  overflow: hidden;
}
.clients .beam { bottom: auto; top: -1px; }
.clients__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 32px);
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 0 var(--margin);
}
.clients__title .line { display: block; overflow: hidden; }
.rline { display: inline-block; will-change: transform; }
html.motion-ready .rline { transform: translateY(115%) rotate(3deg); transform-origin: left top; }
.clients__marquee {
  display: flex;
  width: max-content;
  margin-top: 48px;
  will-change: transform;
}
.clients__marquee[hidden] { display: none; }
.clients__group { display: flex; gap: 2px; flex: 0 0 auto; padding-right: 2px; }
.clients__logo {
  flex: 0 0 216px;
  height: 104px;
  border: 1px solid rgba(25, 32, 41, 0.14);
  display: flex; align-items: center; justify-content: center;
  color: #6B727B;
  letter-spacing: 0.14em;
}

/* ---------- SEZIONE 4: COSA COSTRUIAMO (atlante) ---------- */
.systems-atlas { position: relative; overflow: clip; background: var(--ink); }
.systems-atlas__head { padding: clamp(4rem, 8vh, 6rem) var(--margin) clamp(2rem, 4vh, 3rem); }
.systems-atlas__head h2 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 3.8vw, 4rem);
  font-weight: 720;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--paper);
}
.systems-atlas__head h2 .line { display: block; overflow: hidden; }
.systems-atlas__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 720px;
  padding: calc(var(--nav-h) + 12px) 12px 42px;
  background: var(--ink);
}
.systems-atlas__stage.is-pinned .systems-panel { transition: none; }
.systems-atlas__rail { height: 100%; display: flex; gap: 2px; }
.systems-panel {
  --panel-reveal: 0;
  position: relative;
  min-width: 0;
  flex: 0.62 1 0;
  overflow: clip;
  isolation: isolate;
  color: var(--paper);
  background: #252a30;
  cursor: crosshair;
  transition: flex-grow 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
html:not(.motion-ready) .systems-atlas__stage { height: auto; min-height: 0; padding: 0; }
html:not(.motion-ready) .systems-atlas__rail { display: grid; gap: 1px; }
html:not(.motion-ready) .systems-panel { flex: 1 1 0; min-height: 46vh; min-height: 46svh; }
html:not(.motion-ready) .systems-panel__copy { opacity: 1; transform: none; min-width: 0; }
html:not(.motion-ready) .systems-atlas__meter { display: none; }
.systems-panel.is-active { --panel-reveal: 1; flex-grow: 5.02; }
.systems-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 13, 18, 0.06), rgba(8, 13, 18, 0.16) 38%, rgba(8, 13, 18, 0.94));
}
.systems-panel img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.12);
  transform: scale(calc(1.13 - var(--panel-reveal) * 0.07));
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
  will-change: transform;
}
.systems-panel.is-active img { filter: saturate(0.94) contrast(1.06); }
.systems-panel__copy {
  position: absolute;
  right: clamp(24px, 3vw, 48px);
  bottom: clamp(28px, 6vh, 70px);
  left: clamp(24px, 3vw, 48px);
  min-width: 430px;
  display: grid;
  gap: 18px;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 420ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.systems-panel.is-active .systems-panel__copy { opacity: 1; transform: translateY(0); }
.systems-panel__copy > span { letter-spacing: 0.04em; color: rgba(249, 249, 248, 0.7); }
.systems-panel h3 {
  max-width: 14ch;
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3.6vw, 4.2rem);
  font-weight: 720;
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.systems-panel a {
  width: max-content;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(249, 249, 248, 0.6);
  color: var(--paper);
}
.systems-panel a b { color: var(--paper); font-weight: 500; }
.systems-atlas__meter {
  position: absolute;
  right: 340px; bottom: 16px; left: 12px;
  height: 14px;
  display: flex;
  align-items: end;
  justify-content: flex-start;
  border-top: 1px solid rgba(249, 249, 248, 0.24);
  color: rgba(249, 249, 248, 0.55);
}
.systems-atlas__meter i {
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
@media (max-width: 1099px) {
  .systems-atlas__stage { height: auto; min-height: 0; padding: 0; }
  .systems-atlas__rail { display: grid; gap: 1px; }
  .systems-panel { min-height: 46vh; min-height: 46svh; }
  .systems-panel__copy { opacity: 1; transform: none; min-width: 0; }
  .systems-atlas__meter { display: none; }
}

/* ---------- SEZIONE 5: AEROSPACE ---------- */
.aero-invert {
  position: relative;
  display: grid;
  align-items: center;
  padding: clamp(5rem, 9vh, 7.5rem) 0;
  background: var(--ink);
  color: var(--paper);
  overflow: clip;
}
.aero-invert__gridbg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.5) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, rgba(0, 79, 124, 0.5) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to right, rgba(174, 182, 190, 0.09) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(to bottom, rgba(174, 182, 190, 0.09) 0 1px, transparent 1px 16px);
}
.aero-invert__corner {
  position: absolute; width: 26px; height: 26px; pointer-events: none;
  border-color: rgba(226, 83, 3, 0.85);
}
.aero-invert__corner--tl { left: 40px; top: 40px; border-left: 1px solid; border-top: 1px solid; }
.aero-invert__corner--tr { right: 40px; top: 40px; border-right: 1px solid; border-top: 1px solid; }
.aero-invert__corner--bl { left: 40px; bottom: 40px; border-left: 1px solid; border-bottom: 1px solid; }
.aero-invert__corner--br { right: 40px; bottom: 40px; border-right: 1px solid; border-bottom: 1px solid; }
.aero-invert__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: center;
}
.aero-invert__media {
  position: relative;
  grid-column: 1 / 7;
  grid-row: 1;
  min-height: min(54vh, 540px);
  min-height: min(54svh, 540px);
  border: 1px solid rgba(249, 249, 248, 0.34);
  overflow: clip;
}
.aero-invert__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(25, 32, 41, 0.34), transparent 48%);
  pointer-events: none;
}
.aero-invert__media img {
  width: 100%;
  height: 100%;
  min-height: min(54vh, 540px);
  min-height: min(54svh, 540px);
  object-fit: cover;
  filter: grayscale(1) contrast(1.18) brightness(0.72);
}
.aero-invert__reticle { position: absolute; inset: 18px; z-index: 2; pointer-events: none; }
.aero-invert__reticle i { position: absolute; width: 42px; height: 42px; border-color: rgba(249, 249, 248, 0.58); }
.aero-invert__reticle i:nth-child(1) { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.aero-invert__reticle i:nth-child(2) { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.aero-invert__reticle i:nth-child(3) { right: 0; bottom: 0; border-right: 1px solid; border-bottom: 1px solid; }
.aero-invert__reticle i:nth-child(4) { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.aero-invert__media figcaption {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 2;
  padding: 5px 9px;
  background: var(--ink);
  color: var(--paper);
}
.aero-invert__copy { grid-column: 8 / -1; grid-row: 1; z-index: 2; align-self: center; padding-bottom: 72px; min-width: 0; }
.aero-invert__bar {
  display: block;
  height: 2px; width: 96px;
  background: var(--accent);
  margin-bottom: 34px;
}
.aero-invert__eyebrow {
  display: block;
  margin-bottom: 28px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.aero-invert__title {
  font-family: var(--sans);
  font-size: var(--t-display);
  font-weight: 720;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--paper);
  margin-bottom: 26px;
}
.aero-invert__title .line { display: block; overflow: hidden; }
.aero-invert__statement {
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--t-sezione);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.aero-invert__statement .line { display: block; overflow: hidden; }
.aline { display: inline-block; will-change: transform; }
html.motion-ready .aline { transform: translateY(115%) rotate(3deg); transform-origin: left top; }
.aline--stroke {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--accent);
}
.aero-invert__prose {
  margin-top: 26px;
  max-width: 42ch;
  color: var(--muted-invert);
  line-height: 1.6;
}
.aero-invert__cta { margin-top: 34px; }
.aero-invert .aereo {
  position: relative;
  z-index: 1;
  width: min(880px, 66vw);
  margin: clamp(2.5rem, 5vh, 4rem) 0 0 auto;
  padding-right: var(--margin);
  opacity: 0.4;
  will-change: transform;
}
.aero-invert .aereo svg { display: block; width: 100%; height: auto; }
.aero-invert .aereo .draw { stroke: var(--paper); stroke-width: 1.5; fill: none; vector-effect: non-scaling-stroke; }
.aero-invert .aereo .draw--accent { stroke: var(--accent); }
@media (min-width: 1024px) {
  .aero-invert { padding-bottom: clamp(4rem, 7vh, 6rem); }
  .aero-invert__grid { column-gap: clamp(48px, 5vw, 88px); }
  .aero-invert__copy { grid-column: 7 / -1; }
  .aero-invert .aereo { margin-top: clamp(1.5rem, 3vh, 2.5rem); }
}
@media (min-width: 1024px) and (min-height: 700px) and (pointer: fine) {
  .aero-invert.is-cinematic .aero-invert__media,
  .aero-invert.is-cinematic .aero-invert__media img { will-change: transform, clip-path; }
}
@media (max-width: 1023px) {
  .aero-invert__media { grid-column: 1 / -1; grid-row: 1; min-height: 520px; }
  .aero-invert__copy { grid-column: 2 / -2; grid-row: 2; margin-top: 48px; }
}

/* ---------- SEZIONE 6: SELECTED PROJECTS ---------- */
.selected {
  position: relative;
  background: var(--paper);
  padding: 120px 0 104px;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  overflow: hidden;
}
.selected .beam { bottom: auto; top: -1px; }
.selected__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding: 0 var(--margin);
}
.selected__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 38px);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.selected__title .line { display: block; overflow: hidden; }
.selected__more { color: var(--blue); letter-spacing: 0.1em; white-space: nowrap; transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1); }
.selected__more:hover, .selected__more:focus-visible { color: var(--accent); }
.selected__marquee {
  display: flex;
  width: max-content;
  margin-top: 52px;
  will-change: transform;
}
.mq-ctrl { position: relative; z-index: 3; height: 0; }
.mq-pause {
  appearance: none;
  position: absolute;
  right: var(--margin);
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(249, 249, 248, 0.55);
  background: rgba(18, 23, 30, 0.78);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.mq-pause:hover { background: rgba(18, 23, 30, 0.92); border-color: var(--paper); }
.mq-pause:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; box-shadow: 0 0 0 4px var(--ink); }
.mq-pause .mq-pause__ico-play { display: none; }
.mq-pause[aria-pressed="true"] .mq-pause__ico-play { display: block; }
.mq-pause[aria-pressed="true"] .mq-pause__ico-pause { display: none; }
.selected__group { display: flex; gap: 2px; flex: 0 0 auto; padding-right: 2px; }
.selected__card { flex: 0 0 520px; height: 330px; overflow: hidden; }
.selected__card img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- BLOCCO FINALE: LA VALUTAZIONE ---------- */
.final-cta {
  position: relative;
  background: var(--paper);
  padding: 160px var(--margin) 144px;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  overflow: clip;
}
.final-cta .beam { bottom: auto; top: -1px; }
.final-cta__title {
  font-family: var(--sans);
  font-weight: 720;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: var(--ink);
}
.final-cta__title .line { display: block; overflow: hidden; }
.final-cta__stroke { color: var(--accent); }
.final-cta__grid {
  display: grid;
  grid-template-columns: minmax(0, calc((100% - 88px) * 0.575));
  align-items: start;
  margin-top: clamp(2.5rem, 5vh, 4rem);
}
.final-cta__lede {
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.6;
  color: #3E4650;
  max-width: 44ch;
}
.final-cta__btn { margin-top: 34px; min-height: 60px; padding: 0 34px; }

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--accent);
  overflow: clip;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr 0.8fr 1.2fr;
  gap: var(--gutter);
  padding: 72px var(--margin) 64px;
}
.footer__logo {
  display: block;
  line-height: 0;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.22em;
  color: var(--paper);
}
.footer__logo img { display: block; height: 52px; width: auto; }
@media (min-width: 640px) { .footer__logo img { height: 64px; } }
.footer__payoff {
  margin-top: 14px;
  max-width: 24ch;
  color: var(--muted-invert);
  font-size: var(--text-base);
  line-height: 1.5;
}
.footer__head {
  display: block;
  letter-spacing: 0.14em;
  color: var(--line-strong);
  margin-bottom: 18px;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 10px; font-size: 0.95rem; color: var(--paper); }
.footer__col li span { color: var(--muted-invert); cursor: default; }
.footer__contacts li { color: var(--muted-invert); line-height: 1.55; margin-bottom: 12px; }
.footer__contacts a { color: var(--paper); }
/* footer riallineato alla gerarchia della nav (batch m44): stessa marcatura wip,
   stessa numerazione 1.1-1.6, Projects promosso a testata propria in coda a Servizi */
.footer__head--sub { margin-top: 20px; }
.footer__num { font-family: var(--mono); margin-right: 8px; cursor: inherit; }
.footer__all { color: var(--accent-text-invert); }
.footer__row--more { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(249, 249, 248, 0.14); }
.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px var(--margin);
  border-top: 1px solid rgba(249, 249, 248, 0.16);
  color: var(--line-strong);
  letter-spacing: 0.08em;
}
.footer__base span { text-wrap: balance; }
.footer__mark {
  overflow: hidden;
  padding: 0 var(--margin);
}
.footer__mark span {
  display: block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3rem, 13.2vw, 196px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  color: rgba(249, 249, 248, 0.08);
  -webkit-text-stroke: 1px rgba(249, 249, 248, 0.34);
  transform: translateY(14%);
}

@media (max-width: 1023px) {
  .final-cta__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  /* tap target 44px: il margin-block negativo annulla il padding sulla riga del link,
     ma senza più spazio fra i li adiacenti le due aree cliccabili si sovrappongono */
  .footer a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .footer__col ul:not(.footer__contacts) li { margin-bottom: 26px; }
}

/* ---------- ANODIZZAZIONE: HERO MATERIA (schermate che scorrono sopra la scena, palette scura) ---------- */
.anod-hero { position: relative; background: var(--ink); color: var(--paper); overflow: clip; }
.anod-hero__stage {
  position: sticky; top: 0; z-index: 1;
  height: 100vh; height: 100dvh;
  margin-bottom: -100vh; margin-bottom: -100dvh;
  overflow: clip;
  pointer-events: none;
}
.anod-hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.5) 0 1px, transparent 1px calc((100% - 2 * var(--margin)) / 12)),
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.16) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to bottom, rgba(0, 79, 124, 0.16) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to right, rgba(174, 182, 190, 0.05) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, rgba(174, 182, 190, 0.05) 0 1px, transparent 1px 8px);
  background-position: var(--margin) 0, var(--margin) 0, 0 0, var(--margin) 0, 0 0;
  background-size: calc(100% - 2 * var(--margin)) 100%, auto, auto, auto, auto;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat;
}
.anod-hero__scena {
  position: absolute; z-index: 1;
  left: 50%; top: 52%;
  transform: translate(-50%, -50%);
  width: min(58vw, 900px);
  will-change: transform;
}
html.motion-ready .anod-hero__scena { transform: none; }
.anod-hero__scena canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
}
.anod-hero__scena > #anodFrames {
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 98%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 98%);
}
.anod-hero__ossido {
  position: absolute; z-index: 2;
  right: var(--margin); bottom: 84px;
  display: flex; flex-direction: column; align-items: flex-end;
  pointer-events: none;
}
.anod-hero__pct {
  font-family: var(--sans);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.anod-hero__pct i { font-style: normal; font-size: 0.45em; }
.anod-hero__meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px;
  letter-spacing: 0.12em;
  color: #8A9097;
}
.anod-hero__meta b { color: var(--paper); font-weight: 700; }
.anod-hero__bar {
  width: 120px; height: 2px;
  background: rgba(249, 249, 248, 0.2);
  position: relative; display: block;
}
.anod-hero__bar i {
  position: absolute; left: 0; top: 0; height: 2px; width: 0%;
  background: var(--accent);
  display: block;
}
/* le schermate scorrono sopra la scena, come nella tavola */
.anod-hero__flow { position: relative; z-index: 2; }
.anod-hero__screen {
  box-sizing: border-box;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
}
.anod-hero__screen--right { justify-content: flex-end; }
/* coda desktop piu' lunga: piu' scroll per frame nella sequenza materia, mobile invariato */
@media (min-width: 1024px) {
  .anod-hero__screen:last-child { min-height: 200vh; }
}
.anod-hero__intro h1 {
  font-family: var(--sans);
  font-weight: 720;
  font-size: clamp(2.6rem, 5.1vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: var(--paper);
  white-space: nowrap;
}
.anod-hero__intro h1 .line { display: block; overflow: hidden; }
.anod-hero__intro p {
  margin-top: 22px;
  font-size: 1.0625rem;
  line-height: 1.68;
  color: rgba(249, 249, 248, 0.78);
  max-width: 34ch;
}
.anod-hero__card {
  max-width: 46ch;
  background: rgba(18, 23, 30, 0.82);
  backdrop-filter: blur(5px);
  padding: 26px 30px;
  border-left: 2px solid var(--accent);
}
.anod-hero__claim {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.anod-hero__card p + p {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.68;
  color: rgba(249, 249, 248, 0.75);
}
html:not(.motion-ready) .anod-hero { margin-bottom: 0; }
html:not(.motion-ready) .anod-hero__stage { position: relative; margin-bottom: 0; height: auto; padding-top: var(--nav-h); }
html:not(.js) .anod-hero__ossido { display: none; }
@media (max-width: 1023px) {
  html:not(.motion-ready) .anod-hero__ossido { display: none; }
}
html:not(.motion-ready) .anod-hero__screen { min-height: 0; padding: 56px var(--margin); }
html:not(.motion-ready) .anod-hero__screen[aria-hidden] { display: none; }
html:not(.motion-ready) .anod-hero__scena { position: relative; left: auto; top: auto; transform: none; margin: 0 auto; }
/* senza JS il canvas resta vuoto: il frame finale fa da sfondo statico */
html:not(.motion-ready) .anod-hero__scena canvas {
  background-image: url("../assets/seq-dark/frame_191.webp?v=m21");
  background-size: cover;
}
@media (min-width: 1024px) {
  html:not(.motion-ready) .anod-hero__scena { width: min(58vw, 680px); }
}
@media (max-width: 1023px) {
  .anod-hero__scena { width: min(94vw, 640px); top: 44%; }
  .anod-hero__ossido { bottom: 64px; }
  .anod-hero__screen { min-height: 88vh; min-height: 88svh; }
  .anod-hero__screen--right { justify-content: flex-start; }
  .anod-hero__intro h1 { white-space: normal; font-size: clamp(2.4rem, 9.6vw, 4rem); }
  .anod-hero__card { max-width: 100%; }
}
/* ---------- ANODIZZAZIONE: IL PROGETTO ---------- */
.anod-intro {
  position: relative;
  background: var(--paper);
  padding: 150px 0 140px;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  overflow: clip;
}
.anod-intro .beam { bottom: auto; top: -1px; }
.anod-intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 84px;
  align-items: start;
}
.anod-intro h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.anod-intro h2 .line { display: block; overflow: hidden; }
.anod-intro__copy p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: 58ch;
}
.anod-intro__copy p + p { margin-top: 24px; color: #3E4650; }

@media (max-width: 1023px) {
  .anod-intro { padding: 96px 0 88px; }
  .anod-intro__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- ANODIZZAZIONE: I CRITERI ---------- */
.anod-criteri {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(96px, 11vh, 152px) 0 clamp(88px, 10vh, 136px);
  border-top: none;
  overflow: clip;
}
.anod-criteri .beam { bottom: auto; top: -1px; background: linear-gradient(90deg, transparent, rgba(25, 32, 41, 0.16), transparent); }
.anod-criteri__cella ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.anod-criteri__cella li {
  font-size: 15px;
  line-height: 1.7;
  color: #3E4650;
  padding-left: 14px;
  position: relative;
}
.anod-criteri__cella li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 1px;
  background: #8A9097;
}
.anod-criteri__chiusa {
  margin-top: 40px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #3E4650;
  max-width: 58ch;
}

@media (max-width: 1023px) {
  .anod-criteri { padding: 88px 0; }
}

/* ---------- ANODIZZAZIONE: UN IMPIANTO, UN UNICO SISTEMA ---------- */
.anod-system {
  position: relative;
  background: var(--paper);
  padding: 136px 0;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  overflow: clip;
}
.anod-system .beam { bottom: auto; top: -1px; }
.anod-system__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: start;
}
.anod-system__foto {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  overflow: hidden;
}
.anod-system__foto img {
  display: block;
  width: 100%;
  height: 78vh;
  max-height: 780px;
  object-fit: cover;
  transform-origin: 50% 100%;
}
.anod-system__segno {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.anod-system__segno b { color: var(--blue); font-weight: 700; }
.anod-system__copy h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.1vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.anod-system__copy h2 .line { display: block; overflow: hidden; }
.anod-system__lede {
  margin-top: 24px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 56ch;
}
.anod-system__prose {
  margin: 18px 0 40px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #3E4650;
  max-width: 56ch;
}
.anod-system__row {
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  padding: 26px 4px;
  display: grid;
  grid-template-columns: 52px 190px 1fr;
  gap: 32px;
  align-items: baseline;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.anod-system__row:last-child { border-bottom: 1px solid rgba(25, 32, 41, 0.14); }
.anod-system__row:hover { background: rgba(0, 79, 124, 0.045); box-shadow: -16px 0 0 rgba(0, 79, 124, 0.045); }
.anod-system__row.is-attiva { background: rgba(0, 79, 124, 0.045); box-shadow: -16px 0 0 rgba(0, 79, 124, 0.045); }
.anod-system__row > span:first-child { color: #6B727B; }
.anod-system__nome {
  letter-spacing: 0.09em;
  color: var(--ink);
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.anod-system__row:hover .anod-system__nome { color: var(--blue); }
.anod-system__row.is-attiva .anod-system__nome { color: var(--blue); }
.anod-system__desc { display: flex; flex-direction: column; }
.anod-system__voce { font-size: 15px; line-height: 1.7; color: #3E4650; }
.anod-system__voce + .anod-system__voce { margin-top: 8px; }
.anod-system__voce b { display: block; font-weight: 700; font-size: 15px; color: var(--ink); }
.anod-system__chiusawrap { margin-top: 56px; }
.anod-system__chiusa {
  margin: 0;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  padding-top: 24px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #3E4650;
  max-width: 58ch;
}

@media (max-width: 1023px) {
  .anod-system { padding: 88px 0; }
  .anod-system__grid { grid-template-columns: 1fr; gap: 48px; }
  .anod-system__foto { position: static; }
  .anod-system__foto img { height: clamp(360px, 55vh, 520px); height: clamp(360px, 55svh, 520px); max-height: none; }
  .anod-system__segno { display: none; }
  .anod-system__row { grid-template-columns: 44px 1fr; }
  .anod-system__desc { grid-column: 2; }
}
@media (max-width: 767px) {
  .anod-system__row { grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 12px; padding: 22px 0; }
  .anod-system__desc { grid-column: 1 / -1; }
  .anod-system__row:hover,
  .anod-system__row.is-attiva { background: transparent; box-shadow: none; }
}

/* ---------- ANODIZZAZIONE: AUTOMATION & SOFTWARE ---------- */
.anod-sw {
  position: relative;
  background: var(--paper);
  padding: 120px 0 128px;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
  overflow: clip;
}
.anod-sw .beam { bottom: auto; top: -1px; }
.anod-sw__head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 84px;
  align-items: end;
}
.anod-sw__eyebrow {
  display: block;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--blue);
  margin-bottom: 20px;
}
.anod-sw__head h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.anod-sw__head h2 .line { display: block; overflow: hidden; }
.anod-sw__lede {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #3E4650;
  max-width: 52ch;
}
.anod-sw__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 72px;
  background: rgba(25, 32, 41, 0.14);
  border: 1px solid rgba(25, 32, 41, 0.14);
}
.anod-sw__cella {
  position: relative;
  background: #F9F9F8;
  padding: 34px 32px 38px;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.anod-sw__cella::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width 520ms cubic-bezier(0.65, 0, 0.35, 1);
}
.anod-sw__cella:hover::before { width: 100%; transition-duration: 700ms; }
.anod-sw__cella h3 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.09em;
  color: var(--ink);
}
.anod-sw__cella p {
  font-size: 16px;
  line-height: 1.7;
  color: #3E4650;
  max-width: 62ch;
}

@media (max-width: 1023px) {
  .anod-sw { padding: 88px 0; }
  .anod-sw__head { grid-template-columns: 1fr; gap: 32px; align-items: start; }
}

/* ---------- ANODIZZAZIONE: I CRITERI, fondo carta con titolo display e sei card ---------- */
.anod-criteri__head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 5vw, 88px);
  align-items: end;
}
.anod-criteri__display {
  margin: 0;
  font-family: var(--sans);
  font-weight: 720;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5.2vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}
.anod-criteri__display .line { display: block; overflow: hidden; }
.anod-criteri__copy p {
  max-width: 62ch;
  color: #2B333D;
}
.anod-criteri__copy p + p {
  color: #3E4650;
}
.anod-criteri__grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  margin: clamp(40px, 5vw, 64px) 0 0;
}
.anod-criteri__cella {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 28px;
  border-left: 1px solid var(--line);
}
.anod-criteri__cella:first-child { border-left: 0; }
.anod-criteri__cella h3 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-bottom: 12px;
  position: relative;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: none;
}
.anod-criteri__cella h3::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 28px; height: 2px;
  background: var(--accent);
}
.anod-criteri__num {
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  color: var(--blue);
}
.anod-criteri__nome {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}
.anod-criteri__ico {
  display: block;
  margin: 20px 0 18px;
  color: var(--blue);
}
.anod-criteri__cella ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.anod-criteri__cella li {
  font-size: 15px;
  line-height: 1.55;
  color: #2B333D;
  padding-left: 14px;
  position: relative;
}
.anod-criteri__cella li + li { margin-top: 6px; }
.anod-criteri__cella li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
html.motion-ready .anod-criteri__cella { clip-path: inset(0 0 100% 0); }
@media (max-width: 1279px) {
  .anod-criteri__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .anod-criteri__cella:nth-child(4) { border-left: 0; }
  .anod-criteri__cella:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1023px) {
  .anod-criteri__head { grid-template-columns: 1fr; gap: 32px; }
  .anod-criteri__display { font-size: clamp(2.1rem, 8.4vw, 56px); }
}
@media (max-width: 767px) {
  .anod-criteri__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anod-criteri__cella { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .anod-criteri__cella:nth-child(-n+2) { border-top: 0; }
  .anod-criteri__cella:nth-child(odd) { border-left: 0; }
}
@media (max-width: 539px) {
  .anod-criteri__grid { grid-template-columns: 1fr; }
  .anod-criteri__cella { border-left: 0; }
  .anod-criteri__cella:nth-child(2) { border-top: 1px solid var(--line); }
}
/* ---------- ANODIZZAZIONE: SOFTWARE, registro legenda (m35) ---------- */
.anod-sw .anod-sw__grid {
  display: block;
  margin-top: 56px;
  background: none;
  border: none;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
}
.anod-sw .anod-sw__cella {
  display: grid;
  grid-template-columns: minmax(220px, 30ch) 1fr;
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  padding: 26px 0 28px;
  background: none;
  border-bottom: 1px solid rgba(25, 32, 41, 0.14);
}
.anod-sw .anod-sw__cella::before { height: 1px; }

@media (max-width: 1023px) {
  .anod-sw .anod-sw__cella { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- ANODIZZAZIONE: I CLIENTI, antracite con celle CAD (m35) ---------- */
.clients--cad { background: var(--ink); }
.clients--cad .beam { background: linear-gradient(90deg, transparent, rgba(249, 249, 248, 0.22), transparent); }
.clients--cad .clients__title { color: var(--paper); font-size: clamp(1.7rem, 2.9vw, 40px); }
.clients--cad .clients__group { gap: 0; padding-right: 0; }
.clients--cad .clients__logo {
  flex: 0 0 216px;
  height: 104px;
  margin-left: -1px;
  border: 1px dashed rgba(226, 83, 3, 0.55);
  background: transparent;
  color: rgba(249, 249, 248, 0.55);
  font-size: 14px;
  letter-spacing: 0.14em;
  position: relative;
}
.clients--cad .clients__logo::before {
  content: "";
  position: absolute;
  left: -1px; top: -1px;
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 210px 0 0 var(--accent), 0 98px 0 var(--accent), 210px 98px 0 var(--accent);
}

@media (max-width: 1023px) {
  .clients--cad .clients__logo { flex: 0 0 168px; height: 88px; }
  .clients--cad .clients__logo::before {
    box-shadow: 162px 0 0 var(--accent), 0 82px 0 var(--accent), 162px 82px 0 var(--accent);
  }
}

/* ---------- PRODUZIONE: HERO DIGITAL TWIN (tavola chiara, twin sulla foto) ---------- */
.prod-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  overflow: clip;
  isolation: isolate;
}
.prod-hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.11) 0 1px, transparent 1px calc((100% - 2 * var(--margin)) / 12)),
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to bottom, rgba(0, 79, 124, 0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(to right, rgba(0, 79, 124, 0.02) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, rgba(0, 79, 124, 0.02) 0 1px, transparent 1px 8px);
  background-position: var(--margin) 0, var(--margin) 0, 0 0, var(--margin) 0, 0 0;
  background-size: calc(100% - 2 * var(--margin)) 100%, auto, auto, auto, auto;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 46%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0, #000 46%, transparent 90%);
}
.prod-hero__inner {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: calc(var(--nav-h) + clamp(38px, 7vh, 76px));
  padding-bottom: 64px;
}
.prod-hero__head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: end;
  column-gap: 64px;
}
.prod-hero__head h1 {
  font-family: var(--sans);
  font-weight: 720;
  font-size: clamp(3rem, 9.5vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  white-space: nowrap;
}
.prod-hero__head h1 .line { display: block; overflow: hidden; }
.prod-hero__lead {
  align-self: end;
  padding-bottom: 12px;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  max-width: 30ch;
}
.prod-hero__media {
  position: relative;
  align-self: center;
  height: clamp(330px, 43vh, 430px);
  margin-top: 30px;
  margin-left: 8.333%;
  overflow: clip;
  background: #06131A;
  clip-path: polygon(5% 0, 100% 0, 100% 100%, 0 100%, 0 12%);
}
.prod-hero__media::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(18, 23, 30, 0.38), transparent 54%);
  pointer-events: none;
}
.prod-hero__media img {
  position: relative; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 54%;
  filter: saturate(0.86) contrast(1.06);
}
.prod-hero__webgl {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 4px rgba(0, 18, 28, 0.72));
  pointer-events: none;
}
.prod-hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(230px, 2fr);
  gap: 64px;
  align-items: end;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(25, 32, 41, 0.18);
}
.prod-hero__foot p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #3E4650;
  max-width: 58ch;
}
.prod-hero__foot a {
  justify-self: end;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue);
  border-bottom: 2px solid var(--accent);
  transition: border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.prod-hero__foot a:hover { border-color: var(--accent); }
.prod-hero .beam { bottom: 0; top: auto; }

/* ---------- PRODUZIONE: I REPARTI (griglia asimmetrica) ---------- */
.reparti {
  background: var(--paper);
  padding: 96px 0 120px;
}
.reparti__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
}
.reparto { position: relative; display: block; color: var(--ink); }
.reparto:nth-child(1) { grid-column: 1 / 8; }
.reparto:nth-child(2) { grid-column: 8 / 13; }
.reparto:nth-child(3) { grid-column: 1 / 6; }
.reparto:nth-child(4) { grid-column: 6 / 13; }
.reparto:nth-child(5) { grid-column: 1 / 13; margin-top: 2px; }
.reparto:nth-child(6) { grid-column: 1 / 13; margin-top: 2px; }
.reparto__fil {
  position: absolute; left: 0; top: 0; z-index: 4;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reparto--link:hover .reparto__fil,
.reparto--link:focus-visible .reparto__fil { width: 100%; }
.reparto--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reparto__media {
  display: block;
  position: relative;
  overflow: hidden;
  height: var(--reparto-h, 452px);
}
.reparto__media img {
  display: block;
  width: 100%;
  height: 114%;
  object-fit: cover;
  filter: saturate(0.62) contrast(1.04);
  will-change: transform;
}
.reparto--link .reparto__media img { filter: none; }
.reparto__brand {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: rgba(249, 249, 248, 0.92);
  text-shadow: 0 1px 10px rgba(25, 32, 41, 0.6);
}
.reparto__sigla {
  position: absolute; right: 0; bottom: 0; z-index: 2;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.12em;
  padding: 8px 12px;
}
.reparto__sigla--hot { background: var(--accent); }
.reparto__testo {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 20px 30px;
  border-top: 1px solid rgba(25, 32, 41, 0.14);
}
.reparto__num { font-size: 14px; color: #6B727B; }
.reparto--link .reparto__num { color: var(--blue); }
.reparto__nome { font-size: 17px; letter-spacing: 0.04em; color: var(--ink); }
.reparto__nome--off { font-size: 15px; color: #6B727B; }
.reparto__go {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--blue);
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.reparto--link:hover .reparto__go { transform: translateX(6px); }
.reparto--aero { background: var(--ink); color: var(--paper); }
.reparto--aero .reparto__media img { filter: brightness(0.82); }
.reparto__scan {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(105deg, transparent 42%, rgba(226, 83, 3, 0.16) 50%, transparent 58%);
  background-size: 260% 100%;
  background-position: 130% 0;
}
.reparto--aero .reparto__testo { border-top: 0; padding: 22px 22px 30px; }
.reparto--aero .reparto__num { color: rgba(249, 249, 248, 0.78); }
.reparto--aero .reparto__nome { color: var(--paper); }
.reparto__blocco { display: block; }
.reparto__sub {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.68;
  color: #AEB6BE;
  max-width: 52ch;
}

@media (max-width: 1023px) {
  .prod-hero__head { grid-template-columns: 1fr; row-gap: 18px; }
  .prod-hero__head h1 { white-space: normal; font-size: clamp(2.8rem, 12vw, 5rem); }
  .prod-hero__lead { padding-bottom: 0; }
  .prod-hero__media { margin-left: 0; height: clamp(280px, 38vh, 420px); }
  .prod-hero__foot { grid-template-columns: 1fr; gap: 18px; }
  .prod-hero__foot a { justify-self: start; }
  .reparti { padding: 72px 0 88px; }
  .reparto { grid-column: 1 / 13 !important; }
  .reparto__media { height: clamp(240px, 40vh, 400px) !important; height: clamp(240px, 40svh, 400px) !important; }
}
@media (max-width: 767px) {
  .prod-hero__webgl { display: none; }
  .prod-hero__foot a { display: inline-block; padding-block: 10px; margin-block: -10px; }
  .reparto__testo { grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 8px; padding: 16px 12px 24px; }
  .reparto__go { grid-column: 1 / -1; justify-self: start; }
  .reparto--link .reparto__sigla { display: none; }
  .reparto--link .reparto__cta { left: 0; right: 0; text-align: center; }
  .reparto--aero .reparto__testo { padding: 16px 12px 24px; }
  .reparto--aero .reparto__media { height: clamp(280px, 46vh, 440px) !important; height: clamp(280px, 46svh, 440px) !important; }
  .reparti__grid { row-gap: 44px; }
  .reparto:nth-child(5), .reparto:nth-child(6) { margin-top: 0; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .prod-hero__media { height: clamp(200px, 30vh, 260px); }
  .prod-hero__inner { padding-bottom: 40px; }
}

/* ---------- CTA SOLIDA SULLE CARD CLICCABILI ---------- */
.cta-card {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: var(--blue);
  padding: 12px 16px;
  min-width: 44px;
  text-align: center;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cta-card:hover, .cta-card:focus-visible { background: var(--accent); color: var(--paper); }
.reparto__cta { position: absolute; left: 0; bottom: 0; z-index: 3; }
.reparto--link:hover .reparto__cta { background: var(--accent); }
.systems-panel a.cta-card { padding: 12px 16px; border-bottom: 0; }

/* ---------- GRAIN ---------- */
.grain {
  position: fixed; inset: 0; z-index: 150;
  pointer-events: none;
  opacity: 0.05;
  background-image: 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='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .beam { animation: none; }
  html.motion-ready .mline { transform: none; }
  .wipe { display: none; }
}

/* ---------- RESPONSIVE BASE (rifinitura mobile a valle) ---------- */

/* con la voce ANODIZZAZIONE in piu' la fascia 1024-1240 va stretta:
   si comprimono gap e letter-spacing prima che scatti il wrap */
@media (min-width: 1024px) and (max-width: 1240px) {
  .nav__inner { gap: 22px; }
  .nav__menu { gap: 18px; }
  .nav__item { letter-spacing: 0.04em; }
  .nav__cta { padding: 12px 14px; }
  .nav__group { gap: 6px; }
}

@media (max-width: 1023px) {
  /* sotto 1024 il blur rende .nav containing block per #navmenu (fixed):
     il pannello si risolve sull'header invece che sul viewport */
  .nav--paper { backdrop-filter: none; background-color: rgb(249, 249, 248); }
  .nav__menu { display: none; }
  .nav__toggle { display: flex; }
  /* senza JS il pannello resta nel flusso, sempre visibile: il toggle non
     ha nulla da attivare e viene tolto di mezzo */
  html.js #navmenu:not(.is-open) { display: none; }
  html:not(.js) .nav {
    position: relative;
    pointer-events: auto;
  }
  html:not(.js) #navmenu {
    display: block;
    position: static;
    inset: auto;
    padding: 24px var(--margin) 32px;
  }
  html:not(.js) .nav__toggle { display: none; }
  .nav__inner { gap: 16px; }
  .nav__cta { margin-left: auto; white-space: nowrap; padding: 12px 14px; }
  .hero__motto { right: var(--margin); }
  .hero__mottotext { font-size: clamp(2.6rem, 11vw, 4rem); }
  .hstmt { font-size: clamp(2.2rem, 8.4vw, 5rem); }
  .pillars { grid-template-columns: 1fr; }
  .pillars__cell { padding: 40px var(--margin); }
  .pillars__cell:nth-child(odd) { border-right: 0; }
  .process-manifesto__intro {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 40px;
    min-height: 0;
    padding-top: clamp(5rem, 9vh, 7rem);
    padding-bottom: clamp(4rem, 8vh, 6rem);
  }
  .process-manifesto__intro p { padding-bottom: 0; }
  .systems-atlas__head { padding-top: clamp(4.5rem, 9vh, 6rem); }
  .aero-invert__corner { width: 20px; height: 20px; }
  .aero-invert__corner--tl { left: 16px; top: 16px; }
  .aero-invert__corner--tr { right: 16px; top: 16px; }
  .aero-invert__corner--bl { left: 16px; bottom: 16px; }
  .aero-invert__corner--br { right: 16px; bottom: 16px; }
  .aero-invert__media { min-height: 0; height: clamp(340px, 52vh, 520px); height: clamp(340px, 52svh, 520px); }
  .aero-invert__media img { min-height: 0; height: 100%; }
  .aero-invert__copy { grid-column: 1 / -1; padding-bottom: 0; }
  .aero-invert .aereo { width: min(560px, 86vw); opacity: 0.45; }
  .final-cta { padding: 110px var(--margin) 96px; }
}

@media (max-width: 767px) {
  .hero { height: 300vh; }
  .clients { padding: 80px 0 40px; }
  .clients__marquee { margin-top: 40px; }
  .selected { padding: 88px 0; }
  .selected__marquee { margin-top: 40px; }
  .selected__card { flex: 0 0 360px; height: 228px; }
  .pillars__cell { padding: 36px var(--margin); }
  .anod-hero__scena { top: 60%; }
  .anod-hero__screen:last-child { min-height: 150vh; min-height: 150svh; }
  html:not(.motion-ready) .anod-hero__scena canvas { background-image: url("../assets/seq-dark-m96/frame_095.webp"); }
  .anod-hero__intro h1 {
    font-size: clamp(2.5rem, 10.5vw, 4rem);
    text-shadow: 0 2px 24px rgba(11, 15, 20, 0.85);
  }
  .anod-hero__intro p { text-shadow: 0 1px 14px rgba(11, 15, 20, 0.85); }
  .anod-hero__meta { gap: 10px; letter-spacing: 0.08em; }
  .anod-hero__meta > span:last-child { display: none; }
  .anod-hero__bar { width: 72px; }
}

@media (max-width: 640px) {
  .selected__head { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 480px) {
  .nav__brand { font-size: 17px; letter-spacing: 0.16em; }
  /* a.nav__cta (0,1,1) e non .nav__cta (0,1,0): tipografia.css ridichiara
     .mono { letter-spacing: 0.08em } a valle nel cascade e con pari
     specificita' vinceva lui, il testo restava troncato nonostante questa
     regola. */
  a.nav__cta { padding: 10px 7px; letter-spacing: 0.02em; }
  .nav__inner { gap: 6px; }
  .nav__toggle { margin-left: 0; }
}

/* a 390 e sotto il testo "VALUTAZIONE TECNICA" (mono, quindi a larghezza
   fissa per carattere) tocca il limite anche a letter-spacing 0: serve
   riprendere spazio anche da padding del pulsante e margini della nav,
   non solo dal tracking. */
@media (max-width: 400px) {
  a.nav__cta { padding: 12px 8px; letter-spacing: 0; }
  .nav__inner { padding: 0 var(--margin); gap: 8px; }
}

/* sotto 380 anche col gutter di pagina (20px) e il padding minimo del CTA
   (8px) il bottone non ci sta piu' intero: si stringe prima gap e padding
   del bottone, il gutter resta comunque leggibile (16px). */
@media (max-width: 380px) {
  a.nav__cta { padding: 10px 4px; }
  .nav__inner { padding: 0 16px; gap: 6px; }
}

/* sotto 370, gap e padding del bottone sono gia' al minimo: l'ultimo
   spazio si riprende dal logo (.nav__brand), mai dal bottone. */
@media (max-width: 370px) {
  .nav__brand { font-size: 15px; letter-spacing: 0.10em; }
  .nav__inner { gap: 4px; }
}

/* il CTA resta a 14px (minimo di leggibilita'): da 345 a 374 lo spazio
   residuo basta, sotto 345 lo si recupera da gutter, gap e tracking del
   logo, mai dal font-size del bottone. */
@media (max-width: 374px) {
  .nav__brand img { height: 23px; }
  a.nav__cta { font-size: 14px; letter-spacing: 0; padding: 10px 3px; }
}
@media (max-width: 344px) {
  .nav__brand img { height: 20px; }
  .nav__inner { padding: 0 12px; gap: 2px; }
  .nav__brand { letter-spacing: 0.02em; }
  a.nav__cta { padding: 10px 2px; }
}

/* sotto 640 il logo e' piu' basso del vecchio (34px) perche' il bottone gli
   ruba spazio: il bottone passa in fondo al menu aperto, il logo cresce. */
@media (max-width: 639px) {
  a.nav__cta { display: none; }
  .nav__toggle { margin-left: auto; }
  .nav__brand img { height: 40px; }
  a.navm__cta {
    display: block; margin-top: 20px; padding: 16px 18px;
    text-align: center; font-size: 16px; letter-spacing: 0.02em;
  }
}

/* ANODIZZAZIONE e' larga 8 volte il corpo: sotto 360 il minimo di 2.5rem
   sfora il gutter, il corpo segue la larghezza utile. */
@media (max-width: 359px) {
  .anod-hero__intro h1 { font-size: calc((100vw - 41px) / 8); }
}

/* ---------- HERO 1.3 DECAPAGGIO (decap-apertura, direzione A') ---------- */
.decap-apertura {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.decap-apertura__foto {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 0);
}
.decap-apertura__foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
}
html.motion-ready .decap-apertura__foto {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
html.motion-ready .decap-apertura__foto.is-in {
  clip-path: inset(0 0 0 0);
}
.decap-apertura__velo {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(18, 23, 30, 0.85), transparent);
  pointer-events: none;
}
.decap-apertura__testata {
  position: absolute;
  left: 64px; right: 64px; bottom: 64px;
  z-index: 2;
}
.decap-apertura__title {
  margin: 0;
  font-size: var(--t-display);
  line-height: 0.96;
  font-weight: 720;
  letter-spacing: -0.045em;
  color: var(--paper);
  text-wrap: balance;
}
@media (max-width: 767px) {
  .decap-apertura__velo { height: 60%; }
  .decap-apertura__testata { left: 20px; right: 20px; bottom: 40px; }
}

/* ---------- HERO 1.4 TRATTAMENTO ACQUE (acq-apertura, direzione B) ---------- */
.acq-apertura {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.acq-apertura__stage {
  position: absolute;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  overflow: hidden;
}
.acq-apertura__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 0);
}
.acq-apertura__layer--velo {
  background: var(--paper-2);
  z-index: 1;
}
.acq-apertura__layer--foto {
  z-index: 2;
}
.acq-apertura__gradiente {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 520px;
  background: linear-gradient(to top, rgba(18, 23, 30, 0.78) 0%, rgba(18, 23, 30, 0.78) 85%, rgba(18, 23, 30, 0) 100%);
  pointer-events: none;
  z-index: 3;
}
.acq-apertura__testata {
  position: absolute;
  left: var(--margin); right: var(--margin);
  bottom: 108px;
  z-index: 4;
  max-width: 620px;
}
.acq-apertura__title {
  margin: 0 0 24px;
  font-size: var(--t-display);
  line-height: 0.96;
  font-weight: 720;
  letter-spacing: -0.045em;
  color: var(--paper);
  text-wrap: balance;
}
.acq-apertura__lede {
  margin: 0;
  font-size: 24px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--muted-invert);
}
.acq-apertura__strip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  height: 84px;
}
.acq-apertura__thumb {
  flex: 1 1 0;
  position: relative;
  border: 0;
  border-right: 2px solid rgba(249, 249, 248, 0.15);
  padding: 0;
  cursor: pointer;
  background: none;
}
.acq-apertura__thumb:last-child { border-right: 0; }
.acq-apertura__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.acq-apertura__thumb:hover img,
.acq-apertura__thumb:focus-visible img {
  opacity: 0.8;
}
.acq-apertura__thumb.is-active img {
  opacity: 1;
}
.acq-apertura__thumb.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--paper);
}
@media (max-width: 767px) {
  .acq-apertura__gradiente { height: 460px; }
  .acq-apertura__testata { bottom: 80px; }
  .acq-apertura__title { margin-bottom: 16px; }
  .acq-apertura__lede { font-size: 20px; }
  .acq-apertura__strip { height: 64px; }
}

/* ---------- HERO 1.5 AEROSPACE & DEFENCE (aero-apertura, direzione C') ---------- */
.aero-apertura {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.aero-apertura__foto {
  position: absolute;
  inset: 0;
}
.aero-apertura__foto picture {
  position: absolute;
  inset: 0;
  display: block;
}
.aero-apertura__img,
.aero-apertura__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  filter: grayscale(1) contrast(1.06) brightness(0.96);
}
.aero-apertura__canvas {
  opacity: 0;
}
.aero-apertura__bluvelo {
  position: absolute;
  inset: 0;
  background: var(--blue);
  mix-blend-mode: multiply;
  opacity: 0.62;
  pointer-events: none;
}
.aero-apertura__reticolo {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(249, 249, 248, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(249, 249, 248, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.aero-apertura__gradiente {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(18, 23, 30, 0.78), transparent);
  pointer-events: none;
}
.aero-apertura__testata {
  position: absolute;
  left: 64px; bottom: 64px;
  z-index: 5;
}
.aero-apertura__title {
  margin: 0 0 16px;
  font-size: var(--t-display);
  line-height: 0.96;
  font-weight: 720;
  letter-spacing: -0.045em;
  color: var(--paper);
  text-wrap: balance;
}
.aero-apertura__lede {
  margin: 0;
  font-size: 24px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--muted-invert);
  max-width: 600px;
}
@media (max-width: 767px) {
  .aero-apertura__testata { left: 20px; right: 20px; bottom: 40px; }
  .aero-apertura__lede { font-size: 20px; }
}
/* ---------- HOME: tavola v2 (impianto ritagliato, rapporto 1500:1225) ---------- */
.hero__tavola .tavola__fig { aspect-ratio: 1500 / 1225; }
@media (min-width: 1024px) {
  .hero__tavola .tavola__fig {
    --tw: min(58vw, 75vh, calc((100vw - 2 * var(--margin) - min(34vw, 560px) - 24px) / 1.03));
  }
  .hero__tavola .nota--handling { top: 34%; width: 30%; }
  .hero__tavola .nota__v--handling { display: none; }
  .hero__tavola .nota__x--handling { left: 31.4%; top: 34%; }
  .hero__tavola .nota--fumi { left: 55.5%; top: 2%; width: 30%; }
  .hero__tavola .nota__v--fumi { left: 85.6%; top: 2%; height: 17%; }
  .hero__tavola .nota__x--fumi { left: 85.6%; top: 19%; }
}
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .hero .hero__reg { top: 12%; }
  .hero .hero__statements .hstmt { top: 15%; }
  .hero .hero__statements .hstmt:nth-child(2) { top: 20%; }
  .hero .hero__statements .hstmt:nth-child(3) { top: 25%; }
}
