/* MCF Technology · homepage
   Token e regole: vedi DESIGN.md. Tutti i colori passano da variabili. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #F1F2EF;
  --surface: #FAFAF8;
  --surface-alt: #E5E8E3;
  --surface-hover: #E9ECE7;
  --border: #D2D6D0;
  --border-hover: #A9AFAA;
  --border-field: #7A8287;   /* bordo dei campi: 3,5:1 su --bg, 3,7:1 su --surface (WCAG 1.4.11) */
  --border-strong: #15181A;
  --text: #15181A;
  --text-secondary: #454C51;
  --text-tertiary: #5F676C;
  --accent: #06B4E9;
  --accent-hover: #0AA2D2;
  --accent-ink: #00668C;
  --on-accent: #0B1215;
  --on-media: #F4F6F5;
  --on-media-secondary: #D3DADD;
  --on-media-ink: #0B1215;
  --sge-blue: #011F91;       /* blu del logo SGE */
  --on-media-line: rgb(244 246 245 / .4);
  --scrim: 11 18 21;
  --bg-rgb: 241, 242, 239;
  --text-rgb: 21, 24, 26;
  --accent-rgb: 6, 180, 233;
  --success: #1D6E46;
  --warning: #8A5800;
  --error: #A8251C;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --maxw: 1320px;
  --pad: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2.4vw, 32px);
  --section: clamp(64px, 8vw, 116px);
  --header-h: 68px;

  /* z-index: unica scala della pagina */
  --z-base: 1;
  --z-nav: 50;
  --z-menu: 60;
  --z-skip: 100;
}

/* tema scuro solo a schermo: in stampa la carta è bianca e i token restano quelli chiari */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101315;
    --surface: #171B1E;
    --surface-alt: #1D2226;
    --surface-hover: #22282C;
    --border: #2B3236;
    --border-hover: #4A5358;
    --border-field: #6B757A;
    --border-strong: #E8EAE9;
    --text: #E8EAE9;
    --text-secondary: #AFB6BA;
    --text-tertiary: #8E979C;
    --accent: #22BDEC;
    --accent-hover: #4CCAF0;
    --accent-ink: #62D0F2;
    --on-accent: #061015;
    --bg-rgb: 16, 19, 21;
    --text-rgb: 232, 234, 233;
    --accent-rgb: 34, 189, 236;
    --success: #5CC892;
    --warning: #E2B04A;
    --error: #F08A80;
    --sge-blue: #8EA2F2;
  }
}
@media screen {
:root[data-theme="dark"] {
  --bg: #101315; --surface: #171B1E; --surface-alt: #1D2226; --surface-hover: #22282C;
  --border: #2B3236; --border-hover: #4A5358; --border-field: #6B757A; --border-strong: #E8EAE9;
  --text: #E8EAE9; --text-secondary: #AFB6BA; --text-tertiary: #8E979C;
  --accent: #22BDEC; --accent-hover: #4CCAF0; --accent-ink: #62D0F2; --on-accent: #061015;
  --bg-rgb: 16, 19, 21; --text-rgb: 232, 234, 233; --accent-rgb: 34, 189, 236;
  --success: #5CC892; --warning: #E2B04A; --error: #F08A80;
  --sge-blue: #8EA2F2;
}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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;
}
.skip-link {
  position: absolute; left: var(--pad); top: -100px; z-index: var(--z-skip);
  background: var(--text); color: var(--bg); padding: .75rem 1rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.section { padding-block: var(--section); }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Type ---------- */
h2, .h2 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 640;
  font-stretch: 106%;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h3, .h3 {
  font-size: 1.25rem;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.lead {
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--text-secondary);
  max-width: 58ch;
  text-wrap: pretty;
}
.eyebrow {
  font-size: .9375rem;
  font-weight: 620;
  color: var(--accent-ink);
  margin-bottom: 1rem;
}
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(40px, 5vw, 72px); max-width: 920px; }
.section-foot { margin-top: clamp(28px, 3vw, 44px); }

/* ---------- Links & buttons ---------- */
.link {
  color: var(--accent-ink);
  font-weight: 580;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: text-decoration-thickness .2s var(--ease), text-underline-offset .2s var(--ease);
}
.link:hover { text-decoration-thickness: 2px; text-underline-offset: .3em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.3rem;
  font-family: var(--font); font-size: 1rem; font-weight: 620; font-stretch: 104%; line-height: 1;
  border: 1px solid transparent; border-radius: 0;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { min-height: 40px; padding: .65rem 1rem; font-size: .9375rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  background: transparent; color: var(--text);
  border: 1px solid var(--border-hover); border-radius: 0; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-alt); border-color: var(--border-strong); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn[disabled] { opacity: .35; cursor: default; background: transparent; border-color: var(--border); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(var(--bg-rgb), .94);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; flex: none; }
.brand-mcf { height: 40px; width: auto; aspect-ratio: 1075 / 510; }
.brand-sge { height: 30px; width: auto; aspect-ratio: 790 / 375; }
.brand-sep { width: 1px; height: 32px; background: var(--border-hover); }
.nav { margin-left: auto; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav-link {
  display: inline-block; padding: .5rem .1rem;
  color: var(--text-secondary); font-size: .9688rem; font-weight: 520; text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 2px;
  transition: color .2s var(--ease), background-size .3s var(--ease);
}
.nav-link:hover { color: var(--text); background-size: 100% 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }

.mobile-menu {
  position: absolute; inset: var(--header-h) 0 auto 0; z-index: var(--z-menu);
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding-block: 8px 24px;
}
/* solo le voci di primo livello: sottovoci e codici lingua hanno regole proprie più sotto */
.mobile-menu > ul > li:not(.mobile-menu-langs) > a:not(.btn) {
  display: flex; align-items: center; min-height: 52px;
  font-size: 1.25rem; font-weight: 580; font-stretch: 104%; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-cta { padding-top: 20px; }
.mobile-menu-cta .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(36px, 6vh, 72px); }
.header-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; }
.hero-copy { display: grid; gap: clamp(18px, 2.4vh, 28px); }
.hero-title {
  font-size: clamp(2.6rem, 6.6vw, 5.75rem);
  font-weight: 660;
  font-stretch: 112%;
  line-height: .98;
  letter-spacing: -0.032em;
}
.line-mask { display: block; }
.line-mask > span { display: block; }
.hero-sub {
  max-width: 46ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media {
  position: relative;
  margin-top: clamp(32px, 5vh, 56px);
  height: clamp(300px, 54vh, 680px);
  overflow: hidden;
  background: var(--surface-alt);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }

/* ---------- Facts ---------- */
.facts { padding-block: clamp(44px, 6vw, 80px); border-bottom: 1px solid var(--border); }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.facts-grid li { display: grid; gap: .75rem; align-content: start; padding-top: 18px; border-top: 2px solid var(--border-strong); }
.fact-num {
  font-size: clamp(2.5rem, 4.4vw, 3.9rem);
  font-weight: 680;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.fact-label { color: var(--text-secondary); max-width: 24ch; font-size: 1rem; line-height: 1.45; }

/* ---------- Thesis ---------- */
.statement {
  grid-column: 1 / span 11;
  font-size: clamp(1.6rem, 3.05vw, 2.7rem);
  font-weight: 480;
  line-height: 1.2;
  letter-spacing: -0.016em;
  text-wrap: pretty;
}
.statement strong { font-weight: 700; }
.thesis-partner {
  grid-column: 7 / span 6;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: start;
  color: var(--text-secondary); font-size: 1rem;
}
.thesis-sge { width: 92px; height: auto; aspect-ratio: 790 / 375; }

/* ---------- Stations ---------- */
.stations-section { background: var(--surface); border-block: 1px solid var(--border); }
.stations { align-items: start; }
.stations-media {
  grid-column: 1 / span 6;
  position: sticky; top: calc(var(--header-h) + 24px);
  height: calc(100dvh - var(--header-h) - 48px);
  max-height: 860px; min-height: 420px;
  display: flex; flex-direction: column; gap: 14px;
}
.stations-frame { position: relative; flex: 1; overflow: hidden; background: var(--surface-alt); }
.stations-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .6s var(--ease), transform 1.4s var(--ease);
}
.stations-frame img.is-active { opacity: 1; transform: none; }
.stations-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; }
.stations-name { font-weight: 620; font-stretch: 104%; }
.stations-rail { display: flex; gap: 4px; }
.stations-rail i { display: block; width: 22px; height: 3px; background: var(--border); transition: background-color .4s var(--ease); }
.stations-rail i.is-on { background: var(--accent); }

.stations-list { grid-column: 8 / span 5; counter-reset: none; }
.station {
  min-height: 74vh;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding-block: 32px;
}
.station:first-child { min-height: 60vh; justify-content: flex-start; padding-top: 12vh; }
.station:last-child { min-height: 64vh; }
.station h3 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 640; font-stretch: 106%; line-height: 1.08; letter-spacing: -0.018em; }
.station p { color: var(--text-secondary); max-width: 42ch; }
.station-kit { font-size: .9375rem; padding-top: 12px; border-top: 1px solid var(--border); }
.station-kit span { display: block; font-weight: 620; color: var(--text); margin-bottom: 2px; }
.station-figure { display: none; }
/* stazioni non attive attenuate col colore, non con l'opacità: il testo resta leggibile
   (--text-tertiary: 5,5:1 su --surface in chiaro, 5,8:1 in scuro). Sotto 768px tutte le stazioni sono piene. */
@media (min-width: 768px) {
  .motion .station:not(.is-active) :is(h3, p, .station-kit span) { color: var(--text-tertiary); }
}
.motion .station :is(h3, p, .station-kit span) { transition: color .5s var(--ease); }

/* ---------- Filiere carousel ---------- */
.filiere-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(32px, 4vw, 56px); }
.filiere-head > div { display: grid; gap: 1.25rem; max-width: 62ch; }
.carousel-controls { display: flex; gap: 8px; flex: none; }
.filiere-track {
  --inset: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  display: flex; gap: clamp(14px, 1.6vw, 22px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-inline: var(--inset);
  scroll-padding-inline: var(--inset);
  padding-block: 8px; margin-top: -8px; /* spazio per l'indicatore di focus, che il contenitore scorrevole taglierebbe */
  scrollbar-width: none;
}
.filiere-track::-webkit-scrollbar { display: none; }
.filiere-track > li { flex: 0 0 clamp(250px, 23vw, 320px); scroll-snap-align: start; }
.card { display: grid; gap: .5rem; color: var(--text); text-decoration: none; }
.card-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-alt); margin-bottom: .55rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.card-title { font-size: 1.1875rem; font-weight: 620; font-stretch: 104%; line-height: 1.2; text-underline-offset: .2em; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.card-text { color: var(--text-secondary); font-size: .9688rem; line-height: 1.45; }
.card:focus-visible { outline-offset: 4px; }

/* ---------- Metodo ---------- */
.metodo .grid { align-items: start; }
.metodo-media { grid-column: 1 / span 5; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-alt); }
.metodo-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.metodo-body { grid-column: 7 / span 6; display: grid; gap: 1.25rem; padding-top: clamp(0px, 3vw, 40px); }
.phases {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) var(--gap);
  margin-top: clamp(20px, 3vw, 40px);
}
.phases li { display: grid; gap: .5rem; align-content: start; padding-top: 16px; border-top: 2px solid var(--border-strong); }
.phases h3 { font-stretch: 104%; }
.phases p { color: var(--text-secondary); font-size: 1rem; }

/* ---------- Confronto ---------- */
.confronto { background: var(--surface); border-block: 1px solid var(--border); }
.compare-wrap { border-top: 2px solid var(--border-strong); }
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 20px; }
.compare thead th { font-size: .9375rem; font-weight: 620; color: var(--text-secondary); padding-block: 14px; border-bottom: 1px solid var(--border); }
.compare thead th:last-child { color: var(--text); }
.compare tbody tr:nth-child(even) { background: var(--bg); }
.compare tbody th { width: 26%; font-weight: 620; }
.compare td { color: var(--text-tertiary); width: 34%; }
.compare td:last-child { color: var(--text); font-weight: 560; width: 40%; box-shadow: inset 3px 0 0 var(--accent); }
.compare thead th:last-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Piano / calcolatore ---------- */
.piano .grid { align-items: start; }
.piano-copy { grid-column: 1 / span 5; display: grid; gap: 1.25rem; }
.piano-copy > p:not(.lead):not(.eyebrow):not(.section-foot) { color: var(--text-secondary); max-width: 52ch; }
.piano-copy .eyebrow { margin-bottom: -.25rem; }
.calc {
  grid-column: 7 / span 6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: clamp(22px, 3vw, 40px);
  display: grid; gap: 24px;
}
.calc-title { font-size: 1.375rem; font-stretch: 104%; }
.calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: .45rem; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9375rem; }
.field output { font-weight: 700; font-variant-numeric: tabular-nums; }
.field .help { font-size: .8438rem; color: var(--text-tertiary); display: flex; justify-content: space-between; gap: 12px; }
.input-unit { position: relative; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; font-weight: 500; }
.input {
  width: 100%; min-height: 48px; padding: .6rem 2.4rem .6rem .8rem;
  border: 1px solid var(--border-field); border-radius: 0;
  background: var(--bg); color: var(--text);
  font-size: 1.0625rem; font-weight: 520; font-variant-numeric: tabular-nums;
  transition: border-color .2s var(--ease);
}
.input:hover { border-color: var(--text-tertiary); }
.input::placeholder { color: var(--text-tertiary); opacity: 1; }
.input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 0; border-color: var(--accent-ink); }
.input[aria-invalid="true"] { border-color: var(--error); }
.error-text { color: var(--error); font-size: .8438rem; font-weight: 520; }
.range { width: 100%; height: 44px; accent-color: var(--accent-ink); cursor: pointer; margin: 0; }
.range:focus-visible { outline-offset: 2px; }
.calc-out {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.calc-out dt { font-size: .875rem; color: var(--text-secondary); font-weight: 520; }
.calc-out dd {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 680; font-stretch: 110%;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px;
  overflow-wrap: anywhere;
}
.status { display: inline-flex; align-items: center; gap: .55rem; font-weight: 620; font-size: .9688rem; }
.status::before { content: ""; width: .7rem; height: .7rem; background: currentColor; flex: none; }
.status[data-state="ok"] { color: var(--success); }
.status[data-state="warn"] { color: var(--warning); }
.status[data-state="bad"] { color: var(--error); }
.status[data-state="none"] { color: var(--text-tertiary); }
.calc-note { font-size: .8438rem; color: var(--text-tertiary); max-width: 62ch; }

/* ---------- F2P ---------- */
.f2p {
  position: relative; isolation: isolate;
  min-height: min(100dvh, 940px);
  display: grid; align-items: end;
  padding-block: clamp(120px, 16vw, 200px) clamp(48px, 6vw, 80px);
  color: var(--on-media);
}
.f2p-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.f2p-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.f2p-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(var(--scrim) / .92) 0%, rgb(var(--scrim) / .78) 45%, rgb(var(--scrim) / .28) 100%);
}
.f2p-content { display: grid; gap: 1.25rem; }
.f2p h2 { font-size: clamp(2.2rem, 5vw, 4.25rem); font-stretch: 110%; max-width: 16ch; }
.eyebrow-media { color: var(--on-media); opacity: .9; margin-bottom: 0; }
.f2p-lead { max-width: 56ch; color: var(--on-media-secondary); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }
.gates {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap);
  margin-block: clamp(24px, 4vw, 48px) clamp(12px, 2vw, 24px);
}
.gates li { display: grid; gap: .35rem; align-content: start; padding-top: 14px; border-top: 1px solid var(--on-media-line); }
.gates h3 { font-size: 1.0625rem; font-stretch: 104%; }
.gates p { font-size: .9375rem; color: var(--on-media-secondary); line-height: 1.45; }
.btn-media { justify-self: start; background: var(--on-media); color: var(--on-media-ink); }
.btn-media:hover { background: var(--accent); color: var(--on-accent); }
.btn-media:focus-visible { outline-color: var(--on-media); }

/* ---------- Colture marquee ---------- */
.colture { padding-block: clamp(48px, 6vw, 80px) var(--section); }
.colture-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.colture-head .h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-stretch: 104%; }
.colture-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.marquee-toggle[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.marquee {
  overflow: hidden;
  padding-block: 6px; margin-block: -6px; /* l'indicatore di focus dei link non viene tagliato */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.marquee-track { display: flex; gap: 16px; width: max-content; padding-inline: 8px; }
.marquee-track a { display: grid; gap: 10px; width: clamp(150px, 15vw, 200px); text-decoration: none; color: var(--text); }
.marquee-track img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-alt); transition: filter .4s var(--ease); }
.marquee-track span { font-size: .9688rem; font-weight: 560; }
.marquee-track a:hover span { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.motion .marquee-track { animation: marquee 80s linear infinite; }
.motion .marquee:hover .marquee-track,
.motion .marquee:focus-within .marquee-track,
.motion .marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.no-motion .marquee, html:not(.js) .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scroll-snap-type: x mandatory; scroll-padding-inline: 8px; /* margine per l'indicatore di focus */ }
.no-motion .marquee-track li, html:not(.js) .marquee-track li { scroll-snap-align: start; }

/* ---------- Azienda ---------- */
.azienda { border-top: 1px solid var(--border); }
.azienda .grid { align-items: start; }
.azienda-copy { grid-column: 1 / span 5; display: grid; gap: 1.25rem; }
.azienda-contacts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.sedi { grid-column: 7 / span 6; display: grid; }
.sedi li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px var(--gap);
  padding-block: 22px; border-top: 1px solid var(--border);
}
.sedi li:first-child { border-top: 2px solid var(--border-strong); }
.sedi h3 { grid-row: span 2; font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-stretch: 106%; }
.sede-role { color: var(--text); font-weight: 520; }
.sedi address { color: var(--text-secondary); }

/* ---------- FAQ ---------- */
.faq { background: var(--surface); border-top: 1px solid var(--border); }
.faq-list { max-width: 920px; border-top: 2px solid var(--border-strong); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px; padding-block: 18px; cursor: pointer; list-style: none;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem); font-weight: 600; font-stretch: 102%; line-height: 1.35;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq-a { padding-bottom: 22px; }
.faq-a p { color: var(--text-secondary); max-width: 68ch; }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .motion .faq details::details-content { height: 0; overflow: clip; transition: height .35s var(--ease), content-visibility .35s allow-discrete; }
  .motion .faq details[open]::details-content { height: auto; }
}

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: var(--on-accent); padding-block: clamp(72px, 9vw, 128px); }
.cta-inner { display: grid; gap: 1.5rem; }
.cta h2 { font-size: clamp(2.2rem, 5.2vw, 4.5rem); font-stretch: 110%; max-width: 18ch; line-height: 1.02; }
.cta-lead { font-size: clamp(1.125rem, 1.6vw, 1.375rem); max-width: 48ch; font-weight: 450; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: .75rem; }
.cta-actions p { max-width: 52ch; font-size: 1rem; }
.cta-actions a:not(.btn) { color: var(--on-accent); font-weight: 650; text-underline-offset: .2em; }
.cta-actions a:not(.btn):hover { text-decoration-thickness: 2px; }
.cta :focus-visible { outline-color: var(--on-accent); }
.btn-cta { background: var(--on-accent); color: var(--accent); min-height: 54px; padding-inline: 1.5rem; font-size: 1.0625rem; }
.btn-cta:hover { background: var(--bg); color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { padding-block: clamp(56px, 7vw, 96px) 32px; font-size: .9688rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px var(--gap); }
.footer-brand { display: grid; gap: 20px; align-content: start; }
.footer-brand p { color: var(--text-secondary); max-width: 40ch; }
.footer-title { font-size: .9688rem; font-weight: 650; font-stretch: 100%; letter-spacing: 0; margin-bottom: 14px; }
.footer-col li + li { margin-top: 6px; }
.footer-col a, .footer-legal a { color: var(--text-secondary); text-decoration: none; transition: color .2s var(--ease); }
.footer-col a:hover, .footer-legal a:hover { color: var(--text); text-decoration: underline; text-underline-offset: .2em; }
.footer-col a { display: inline-block; padding-block: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--text-tertiary); font-size: .875rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- Motion ---------- */
.motion .line-mask { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.motion .line-mask > span { transform: translateY(108%); animation: lineUp 1s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 120ms); }
@keyframes lineUp { to { transform: translateY(0); } }
.motion .hero-fade { opacity: 0; transform: translateY(14px); animation: fadeUp .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 160ms); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.motion .hero-media img { animation: heroIn 1.6s var(--ease) both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1.03); } }

.motion [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }

.motion [data-split] .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.motion [data-split] .word > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--w, 0) * 45ms); }
.motion [data-split].is-in .word > span { transform: none; }

@supports (animation-timeline: view()) {
  .motion .hero-media img {
    animation: heroIn 1.6s var(--ease) both, heroDrift linear both;
    animation-timeline: auto, view();
    animation-range: normal, exit 0% exit 100%;
  }
  @keyframes heroDrift { from { translate: 0 0; } to { translate: 0 7%; } }

  /* .55: anche le parole non ancora "accese" restano sopra 3:1 (testo grande) */
  .motion .statement .w { opacity: .55; animation: wordOn linear both; animation-timeline: view(); animation-range: entry 90% cover 42%; }
  @keyframes wordOn { to { opacity: 1; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .nav-link { font-size: .9375rem; }
}
@media (max-width: 1023px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .statement { grid-column: 1 / -1; }
  .thesis-partner { grid-column: 5 / -1; }
  .stations-media { grid-column: 1 / span 6; }
  .stations-list { grid-column: 7 / span 6; }
  .metodo-media { grid-column: 1 / span 5; }
  .metodo-body { grid-column: 6 / span 7; }
  .piano-copy { grid-column: 1 / -1; margin-bottom: 40px; }
  .calc { grid-column: 1 / -1; }
  .azienda-copy { grid-column: 1 / span 6; }
  .sedi { grid-column: 7 / span 6; }
  .sedi li { grid-template-columns: 1fr; }
  .sedi h3 { grid-row: auto; }
  .gates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  :root { --header-h: 60px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; }
  .header-cta { display: none; }
  .brand-mcf { height: 28px; }
  .brand-sge { height: 22px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .hero-media { height: clamp(240px, 42vh, 420px); }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .thesis-partner { grid-template-columns: 72px 1fr; }
  .thesis-sge { width: 72px; }

  .stations-media { display: none; }
  .station, .station:first-child, .station:last-child { min-height: 0; padding-block: 0 48px; justify-content: flex-start; }
  .station-figure { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); margin-bottom: 6px; }
  .station-figure img { width: 100%; height: 100%; object-fit: cover; }

  .filiere-head { flex-direction: column; align-items: flex-start; }
  .carousel-controls { display: none; }
  .filiere-track > li { flex-basis: 78%; }

  .metodo-media { aspect-ratio: 4 / 3; margin-bottom: 40px; }
  .phases { grid-template-columns: 1fr; }

  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto !important; }
  .compare tbody tr { padding: 18px 0; border-bottom: 1px solid var(--border); }
  .compare tbody tr:nth-child(even) { background: transparent; }
  .compare th, .compare td { padding: 0; }
  .compare tbody th { font-size: 1.0625rem; margin-bottom: 10px; }
  .compare td { padding: 6px 0 6px 14px; }
  .compare td::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 600; color: var(--text-tertiary); }
  .compare td:first-of-type { box-shadow: inset 3px 0 0 var(--border); }

  .calc-fields { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; gap: 12px; }
  .calc-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

  .gates { grid-template-columns: 1fr 1fr; }
  .gates li:last-child { grid-column: 1 / -1; }
  .colture-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .azienda-copy { margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-split] .word > span, .line-mask > span, .hero-fade { opacity: 1 !important; transform: none !important; }
  .station { opacity: 1 !important; }
}

/* =====================================================================
   Pagine interne e navigazione del sito completo.
   Stessi token, stessi componenti della homepage: filetti al posto delle
   schede, un solo accento (ciano MCF), angoli vivi.
   ===================================================================== */

:lang(ar) { --font: "Archivo", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif; }
:lang(ar) body { line-height: 1.75; }
:lang(ru) { --font: "Archivo", "Helvetica Neue", Arial, sans-serif; }
[dir="rtl"] .arrow, [dir="rtl"] .icon-btn .icon { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* ---------- Header: menu a tendina, lingua ---------- */
.nav-item { display: flex; align-items: center; height: var(--header-h); }
.nav-link[aria-current] { color: var(--text); background-size: 100% 2px; }
.nav-panel {
  display: none;
  position: absolute; inset-inline: 0; top: var(--header-h);
  background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border-strong); /* filetto al posto dell'ombra (DESIGN.md § 6) */
}
/* pannello: aperto dal pulsante (.is-open) o al passaggio del mouse, salvo dopo Esc (.is-closed).
   Da chiuso è display: none, quindi i suoi link non sono nell'ordine di Tab. */
.nav-item.has-panel:hover:not(.is-closed) > .nav-panel,
.nav-item.has-panel.is-open > .nav-panel { display: block; }
.nav-item.has-panel:hover:not(.is-closed) > .nav-link,
.nav-item.has-panel.is-open > .nav-link { color: var(--text); background-size: 100% 2px; }
/* la voce con pannello è un pulsante con l'aspetto del link del menu, più una freccia */
.nav-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
.nav-btn::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease);
}
.nav-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.nav-panel-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding-block: 28px 36px; max-width: 980px; margin-inline-start: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad))); margin-inline-end: auto; }
.nav-group-title { font-size: .875rem; font-weight: 620; color: var(--text-tertiary); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 2px solid var(--border-strong); }
.nav-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.nav-group a { display: block; padding: 7px 0; color: var(--text-secondary); text-decoration: none; font-size: .9688rem; border-bottom: 1px solid var(--border); transition: color .2s var(--ease); }
.nav-group a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .22em; }

.lang { position: relative; }
.lang-btn {
  display: inline-grid; place-items: center; min-width: 48px; height: 40px; padding-inline: 10px;
  list-style: none; cursor: pointer; font-weight: 620; font-size: .9375rem; color: var(--text-secondary);
  border: 1px solid var(--border-hover);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.lang-btn::-webkit-details-marker { display: none; }
.lang-btn:hover, .lang[open] .lang-btn { color: var(--text); border-color: var(--border-strong); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: var(--z-menu);
  min-width: 180px; background: var(--bg); border: 1px solid var(--border-strong); padding: 6px 0;
}
.lang-menu a { display: block; padding: 8px 16px; text-decoration: none; color: var(--text-secondary); font-size: .9688rem; }
.lang-menu a:hover { background: var(--surface-alt); color: var(--text); }
.lang-menu a[aria-current] { color: var(--text); font-weight: 620; box-shadow: inset 3px 0 0 var(--accent); }

.mobile-menu { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
/* menu mobile aperto: la pagina sotto (inert) non scorre */
html.menu-open { overflow: hidden; }
.mobile-menu details summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; list-style: none;
  font-size: 1.25rem; font-weight: 580; font-stretch: 104%; border-bottom: 1px solid var(--border);
}
.mobile-menu details summary::-webkit-details-marker { display: none; }
.mobile-menu details summary::after { content: ""; width: 10px; height: 10px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); }
.mobile-menu details[open] summary::after { transform: rotate(-135deg); }
.mobile-menu details ul { padding: 6px 0 14px; }
.mobile-menu details li a { display: block; padding: 8px 0; color: var(--text-secondary); text-decoration: none; font-size: 1rem; }
.mobile-menu-langs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 18px; }
.mobile-menu-langs a { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; border: 1px solid var(--border-hover); text-decoration: none; font-weight: 600; font-size: .875rem; }
.mobile-menu-langs a[aria-current] { border-color: var(--border-strong); background: var(--surface-alt); }

/* ---------- Testata delle pagine ---------- */
.page-hero { position: relative; padding-block: clamp(28px, 4.5vw, 56px) clamp(48px, 6vw, 88px); }
.page-hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.page-hero-copy { grid-column: 1 / span 10; display: grid; gap: clamp(16px, 2vw, 24px); }
.page-hero.has-side .page-hero-copy { grid-column: 1 / span 7; align-self: center; }
.page-title {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 660; font-stretch: 112%; line-height: 1.02; letter-spacing: -0.03em;
  text-wrap: balance; max-width: 22ch;
}
.page-hero .eyebrow { margin-bottom: 0; }
.page-hero .hero-sub { max-width: 60ch; }
.page-hero .hero-sub-2 { font-size: 1.0625rem; color: var(--text-tertiary); }
.page-hero-side { grid-column: 9 / span 4; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-alt); }
.page-hero-side img, .page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-media { margin-top: clamp(32px, 5vw, 56px); height: clamp(240px, 44vh, 540px); overflow: hidden; background: var(--surface-alt); }
.page-hero + .section:not(.alt), .page-hero + .faq { border-top: 1px solid var(--border); }
.motion .page-hero-media img, .motion .page-hero-side img { animation: heroIn 1.6s var(--ease) both; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .875rem; color: var(--text-tertiary); }
.crumbs li { display: inline-flex; gap: 8px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--border-hover); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: .2em; }
.crumbs [aria-current] { color: var(--text-tertiary); }

/* ---------- Sezioni ---------- */
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section.alt + .section.alt, .section.alt + .faq { border-top: 0; }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.split > .section-head { grid-column: 1 / span 5; margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 28px); padding-inline-end: clamp(0px, 2vw, 32px); }
.split > .section-body { grid-column: 7 / span 6; }
.section-head .eyebrow { margin-bottom: -.25rem; }
.section-body { display: grid; gap: clamp(28px, 3.4vw, 48px); min-width: 0; }
.section-body > :where(.prose, .ticks, .numbered) { max-width: 72ch; }
.stack { display: grid; gap: clamp(22px, 2.6vw, 36px); min-width: 0; }

.prose { display: grid; gap: .9em; }
.prose p, .prose address, .prose pre { color: var(--text-secondary); max-width: 68ch; text-wrap: pretty; }
.prose strong { color: var(--text); font-weight: 640; }
.prose a, .ticks > li > a, .numbered a, .deflist a, .data-table a, .faq-a a, .item a:not(.btn):not(.tile):not(.card), .stats a {
  color: var(--accent-ink); font-weight: 560; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
}
.prose a:hover, .ticks > li > a:hover, .numbered a:hover, .deflist a:hover, .data-table a:hover, .faq-a a:hover, .item a:not(.btn):hover { text-decoration-thickness: 2px; }
.prose blockquote { margin: 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--accent); font-size: 1.125rem; color: var(--text); }
.prose pre { white-space: pre-wrap; font: inherit; }
.note { font-size: .875rem; color: var(--text-tertiary); max-width: 72ch; }
.prose .note { color: var(--text-tertiary); }
.label { font-size: .875rem; font-weight: 620; color: var(--accent-ink); }
.big-line { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 660; font-stretch: 110%; letter-spacing: -0.02em; line-height: 1.1; }
.sub-title { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 630; font-stretch: 104%; line-height: 1.2; letter-spacing: -0.01em; padding-top: 18px; border-top: 1px solid var(--border); }
.section-body > .sub-title:first-child, .stack > .sub-title:first-child { border-top: 0; padding-top: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* nelle colonne strette i pulsanti vanno a capo invece di uscire dalla colonna (white-space: nowrap di .btn) */
.item .btn, .actions .btn { white-space: normal; text-align: start; line-height: 1.25; }

/* elementi a filetto, come le quattro fasi della homepage */
.items { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 48px) var(--gap); }
.item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; align-content: start; padding-top: 16px; border-top: 2px solid var(--border-strong); min-width: 0; }
.item-title { font-size: 1.1875rem; font-weight: 620; font-stretch: 104%; line-height: 1.25; }
.item-title a { color: var(--text) !important; text-decoration: none !important; }
.item-title a:hover { text-decoration: underline !important; text-decoration-color: var(--accent) !important; text-decoration-thickness: 2px !important; }
.item .prose p, .item > p { font-size: 1rem; }
.item .stack, .item .section-body { gap: 14px; }
.item .ticks li { font-size: .9688rem; }
.item .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item .stats dd { font-size: 1.35rem; }
.item .actions .btn { min-height: 42px; padding: .6rem 1rem; font-size: .9375rem; }
.item-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-alt); margin-bottom: 6px; }
.item-media img { width: 100%; height: 100%; object-fit: cover; }

/* numeri chiave */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: clamp(24px, 3vw, 40px) var(--gap); }
.stats > div { display: grid; gap: .5rem; align-content: start; padding-top: 16px; border-top: 2px solid var(--border-strong); }
.stats dt { order: 2; color: var(--text-secondary); font-size: .9688rem; line-height: 1.45; }
.stats dd {
  order: 1; margin: 0; font-size: clamp(1.75rem, 3vw, 2.6rem); font-weight: 680; font-stretch: 114%;
  letter-spacing: -0.028em; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.stats dd.stat-note { order: 3; font-size: .875rem; font-weight: 450; font-stretch: 100%; letter-spacing: 0; color: var(--text-tertiary); }

/* righe etichetta / valore, come le sedi in homepage */
.deflist { border-top: 2px solid var(--border-strong); }
.deflist > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 6px var(--gap); padding-block: 14px; border-bottom: 1px solid var(--border); }
.deflist dt { font-weight: 620; }
.deflist dd { margin: 0; color: var(--text-secondary); }
/* parole lunghe (tedesco, russo): vanno a capo dentro la propria colonna invece di coprire quella accanto.
   La sillabazione solo su titoli ed etichette; nel testo corrente basta spezzare la parola che non entra. */
.item, .deflist dt, .deflist dd, .index-list .il-title, .tile-title { overflow-wrap: anywhere; }
.item-title, .deflist dt, .deflist dd, .index-list .il-title, .tile-title { hyphens: auto; }
.item .deflist > div { grid-template-columns: minmax(0, 1fr); }

/* elenchi */
.ticks { display: grid; gap: .55rem; }
.ticks > li { position: relative; padding-inline-start: 1.35rem; color: var(--text-secondary); }
.ticks > li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: .5rem; height: .5rem; background: var(--accent); }
.ticks.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.ticks.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ticks.chips > li { padding: .35rem .75rem; border: 1px solid var(--border-hover); color: var(--text); font-size: .9375rem; font-weight: 520; }
.ticks.chips > li::before { content: none; }
.ticks .prose, .ticks .stack { gap: .4rem; }
.numbered { display: grid; gap: .6rem; padding-inline-start: 1.6rem; list-style: decimal; color: var(--text-secondary); }
.numbered li::marker { color: var(--accent-ink); font-weight: 650; }

/* indice di link: righe con freccia */
.index-list { border-top: 2px solid var(--border-strong); }
.index-list.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.index-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: center;
  min-height: 58px; padding-block: 14px; border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: color .2s var(--ease);
}
.index-list .il-title { font-weight: 600; font-stretch: 102%; line-height: 1.3; }
.index-list .il-desc { grid-column: 1; color: var(--text-secondary); font-size: .9375rem; line-height: 1.45; margin-top: 2px; }
.index-list .arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--accent-ink); transition: transform .25s var(--ease); }
.index-list a:hover .il-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.index-list a:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .index-list a:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* collegamenti a riquadro (senza foto) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0; border-top: 2px solid var(--border-strong); border-inline-start: 1px solid var(--border); }
.tile {
  display: grid; gap: .45rem; align-content: start; height: 100%; padding: 20px 22px 24px;
  border-inline-end: 1px solid var(--border); border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: background-color .2s var(--ease);
}
.tile:hover { background: var(--surface-alt); }
.tile-label { font-size: .8438rem; font-weight: 620; color: var(--accent-ink); }
.tile-title { font-size: 1.0938rem; font-weight: 620; font-stretch: 104%; line-height: 1.3; }
.tile-text { color: var(--text-secondary); font-size: .9375rem; line-height: 1.45; }
.tile .arrow { margin-top: 6px; color: var(--accent-ink); transition: transform .25s var(--ease); }
.tile:hover .arrow { transform: translateX(4px); }
.section.alt .tile:hover { background: var(--bg); }

/* schede con foto: stesso modulo del carosello filiere */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: clamp(24px, 3vw, 40px) clamp(14px, 1.6vw, 22px); }
.cards .card-media { aspect-ratio: 3 / 2; }

/* tabelle */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--border-strong); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9688rem; }
.data-table caption { text-align: start; font-size: .875rem; color: var(--text-tertiary); padding: 10px 0; caption-side: bottom; }
.data-table th, .data-table td { text-align: start; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); min-width: 120px; }
.data-table thead th { font-size: .875rem; font-weight: 620; color: var(--text-secondary); padding-block: 12px; white-space: nowrap; }
.data-table tbody th { font-weight: 620; color: var(--text); }
.data-table td { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.data-table tbody tr:nth-child(even) { background: var(--bg); }
.section.alt .data-table tbody tr:nth-child(even), .faq .data-table tbody tr:nth-child(even) { background: var(--surface-alt); }
.section:not(.alt) .data-table tbody tr:nth-child(even) { background: var(--surface); }

/* FAQ anche fuori dalle sezioni FAQ */
.faq-list { max-width: 920px; border-top: 2px solid var(--border-strong); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 60px; padding-block: 16px; cursor: pointer; list-style: none;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); font-weight: 600; font-stretch: 102%; line-height: 1.35;
  transition: color .2s var(--ease);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--accent-ink); }
.faq-list .faq-a { padding-bottom: 22px; display: grid; gap: 16px; }
.faq-list .faq-a p { color: var(--text-secondary); max-width: 68ch; }

/* fascia finale ciano: sul ciano reggono il contrasto solo i colori "on-accent" (7,8:1 chiaro, 8,8:1 scuro).
   Dentro la fascia i token del testo secondario, dei link e dei filetti diventano --on-accent,
   così occhielli, link, etichette, indirizzi e note seguono senza regole caso per caso.
   --text resta com'è (lo usano i pulsanti al passaggio del mouse): chi lo usa è elencato sotto. */
.cta {
  --text-secondary: var(--on-accent); --text-tertiary: var(--on-accent); --accent-ink: var(--on-accent);
  --border-strong: var(--on-accent); --border: rgb(var(--scrim) / .25);
}
.cta :is(.prose strong, .ticks > li, .deflist dt, .deflist dd, .stats dd, .data-table tbody th) { color: var(--on-accent); }
.cta .item-title a { color: var(--on-accent) !important; }
.cta .ticks > li::before { background: var(--on-accent); }
.cta-body { display: grid; gap: 18px; }
.cta-body .prose p, .cta-body .note { color: var(--on-accent); }
.cta-body .actions { margin-top: .5rem; gap: 14px 24px; align-items: center; }
.btn-cta-ghost { background: transparent; color: var(--on-accent); border-color: var(--on-accent); min-height: 54px; padding-inline: 1.4rem; font-size: 1.0625rem; }
.btn-cta-ghost:hover { background: var(--on-accent); color: var(--accent); }
.cta .index-list { border-top-color: var(--on-accent); }
.cta .index-list a, .cta .index-list .il-desc, .cta .index-list .arrow { color: var(--on-accent); border-bottom-color: rgb(11 18 21 / .25); }
.cta-lead { color: var(--on-accent); }

/* immagini nei contenuti */
.figure { overflow: hidden; background: var(--surface-alt); }
.figure img { width: 100%; height: auto; }
.figure.is-brochure { max-width: 340px; border: 1px solid var(--border); background: var(--surface); }
.figure.is-logo { max-width: 220px; background: transparent; }
.figure.is-logo img { mix-blend-mode: multiply; }
/* tema scuro: il file del logo ha il fondo bianco; con "multiply" sul fondo scuro il marchio sparirebbe,
   quindi si mostra così com'è, su un riquadro bianco (i colori del marchio restano quelli originali) */
@media screen and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .figure.is-logo img { mix-blend-mode: normal; } }
@media screen { :root[data-theme="dark"] .figure.is-logo img { mix-blend-mode: normal; } }

/* moduli */
.form { display: grid; gap: 24px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); padding: clamp(22px, 3vw, 40px); }
.section.alt .form { background: var(--bg); }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.form legend { font-weight: 600; font-size: .9375rem; margin-bottom: 4px; }
select.input { padding-inline-end: 2.4rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] select.input { background-position: 20px 52%, 15px 52%; }
textarea.input { min-height: 140px; resize: vertical; padding-top: .7rem; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; color: var(--text-secondary); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-ink); flex: none; }
.form-foot { display: grid; gap: 12px; justify-items: start; }
.form-intro { display: grid; gap: 12px; }
.form[data-static-form] .form-fields { opacity: .9; }

.footer-contacts { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-contacts a { color: var(--text); font-weight: 560; text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--accent); }

/* ---------- Responsive pagine interne ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
}
@media (max-width: 1023px) {
  .page-hero-copy, .page-hero.has-side .page-hero-copy { grid-column: 1 / -1; }
  .page-hero-side { grid-column: 1 / -1; aspect-ratio: 16 / 9; margin-top: 32px; }
  .split > .section-head { grid-column: 1 / -1; position: static; margin-bottom: clamp(28px, 4vw, 44px); }
  .split > .section-body { grid-column: 1 / -1; }
  .items { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
  .nav-panel { display: none !important; }
}
@media (max-width: 767px) {
  .lang { display: none; }
  .page-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .items, .ticks.cols-2, .index-list.cols-2, .form-fields, .item .stats { grid-template-columns: minmax(0, 1fr); }
  .deflist > div { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-table th, .data-table td { padding: 12px; min-width: 110px; }
  .figure.is-brochure { max-width: 100%; }
  .cta-body .actions .btn { width: 100%; }
}
.deflist > .dl-full { grid-template-columns: 1fr; }
.deflist > .dl-full dd { color: var(--text); font-weight: 560; }
textarea, select { font: inherit; color: inherit; }
.item-sub { margin-top: -.35rem; font-size: .9375rem; color: var(--text-tertiary); font-style: italic; }
h1, h2, h3, .page-title, .hero-title { overflow-wrap: break-word; }
@media (max-width: 767px) { h1, h2, .page-title { hyphens: auto; } }
@media (max-width: 767px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
  .cta h2 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
}
.figure:not(.is-brochure):not(.is-logo) img { max-height: min(72vh, 760px); object-fit: cover; }
.figure figcaption { padding: 10px 0 0; font-size: .875rem; color: var(--text-tertiary); background: var(--bg); }
.section.alt .figure figcaption { background: var(--surface); }
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); align-items: start; }
.gallery .figure img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.gallery .figure.is-brochure { max-width: none; }
.gallery .figure.is-brochure img { aspect-ratio: auto; object-fit: contain; }
@media (max-width: 767px) { .gallery { grid-template-columns: 1fr 1fr; } }
[hidden] { display: none !important; }
.page-search { display: grid; gap: 12px; max-width: 920px; }
.page-search-field { display: flex; gap: 8px; }
.page-search-field .input { padding-inline-end: .8rem; }
.page-search [data-search-results]:empty { display: none; }

/* ---------- Stampa ---------- */
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --text: #000; --text-secondary: #222; --text-tertiary: #444; }
  .site-header, .site-footer, .skip-link, .mobile-menu, .nav-panel, .lang, .cta, .page-hero-media, .page-hero-side, .page-search, .carousel-controls { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .section, .page-hero { padding-block: 16pt; }
  .section.alt, .faq { background: #fff; border: 0; }
  .split > .section-head { position: static; }
  [data-reveal], [data-split] .word > span, .line-mask > span, .hero-fade { opacity: 1 !important; transform: none !important; }
  .faq-list details > *:not(summary) { display: block; }
  a { color: inherit; }
  h2, h3 { break-after: avoid; }
  .item, .stats > div, .deflist > div, tr { break-inside: avoid; }
}

/* "In breve": risposta diretta in apertura delle pagine pilastro (motori di ricerca AI e lettori frettolosi) */
.in-breve-sez { padding-block: 0 clamp(8px, 2vw, 16px); }
.in-breve { border-inline-start: 4px solid var(--accent); padding: 16px 20px; background: var(--surface); }
.in-breve .eyebrow { margin: 0 0 6px; font-size: 13px; }
.in-breve .lead { margin: 0; max-width: 72ch; }
.in-breve .note { margin: 8px 0 0; font-size: 13px; color: var(--text-tertiary); }
