/* =========================================================================
   Sclerodermia e Ipertensione Arteriosa Polmonare 2026 — prototipo statico
   Foglio di stile unico. Mobile-first. Nessuna dipendenza esterna.
   ========================================================================= */

/* -------------------------------------------------------------------------
   0. Font self-hosted — NON ANCORA DISPONIBILI (asset mancanti in questa fase)
   Quando i file woff2 saranno forniti, scommentare e collegare qui i due
   pesi principali. Percorso previsto: assets/fonts/ (accanto a css/ e js/).
   ------------------------------------------------------------------------- */
/*
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
*/

/* -------------------------------------------------------------------------
   1. Token di design
   ------------------------------------------------------------------------- */
:root {
  /* Colori — design system 05 */
  --navy: #00245A;
  --blue: #0064BC;
  --blue-iwsf: #0077BE;
  --blue-100: #DCEBF7;
  --tint: #F4F8FC;
  --bg: #FFFFFF;
  --text: #1A2B49;
  --text-soft: #4A5B78;
  --border: #D5E4F2;
  --jj-red: #D72813; /* SOLO logo J&J, mai come colore UI */

  /* Variazioni di tinta per tappa — tutte entro la palette blu */
  --stage-1: #0055A4;
  --stage-2: #0064BC;
  --stage-3: #0072C6;
  --stage-4: #0077BE;
  --stage-5: #1C86D6;
  --stage-6: #2E7DBC;
  --stage-7: #145DA0;
  --stage-8: #003D7A;

  /* Tipografia */
  --font-title: "Archivo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.125rem, 1.7rem + 2vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.4rem + 1vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --fs-eyebrow: clamp(0.8125rem, 0.78rem + 0.1vw, 0.875rem);

  /* Spaziatura base 4px */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Forme */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(0, 36, 90, 0.06), 0 4px 16px rgba(0, 36, 90, 0.06);
  --max-width: 1200px;
}

/* -------------------------------------------------------------------------
   2. Reset essenziale
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* Garantisce che l'attributo nativo "hidden" nasconda sempre l'elemento,
   anche quando una classe più specifica imposta un proprio "display"
   (es. .eyebrow { display:block }) che altrimenti vincerebbe sulla
   regola [hidden] dello user-agent. */
[hidden] { display: none !important; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--navy); line-height: 1.2; margin: 0 0 var(--sp-4); }
p { margin: 0 0 var(--sp-4); max-width: 65ch; }
a { color: var(--blue); }
button { font-family: inherit; }

/* Scroll-behavior fluido solo se l'utente non ha richiesto meno movimento */
@media (prefers-reduced-motion: no-preference) {
  html.js-smooth-scroll { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   3. Focus visibile e accessibilità
   ------------------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  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(--sp-4);
  top: -60px;
  background: var(--navy);
  color: #fff;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
  font-weight: 600;
}
.skip-link:focus {
  top: var(--sp-4);
}

/* -------------------------------------------------------------------------
   4. Layout generico
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: var(--sp-3);
}

.rule {
  width: 40px;
  height: 3px;
  background: var(--blue);
  border: 0;
  margin: var(--sp-4) 0 var(--sp-6);
}

.section {
  padding-block: var(--sp-16);
}
.section--tint {
  background: var(--tint);
}
.section-head {
  max-width: 70ch;
  margin-bottom: var(--sp-8);
}

/* -------------------------------------------------------------------------
   5. Bottoni
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--navy); }
.btn-primary:visited { color: #fff; }

.btn-secondary {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-secondary:hover { background: var(--blue-100); }

/* -------------------------------------------------------------------------
   6. Header
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand-logo {
  height: 40px;
  width: auto;
}

.main-nav {
  display: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--blue); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  background: #fff;
  z-index: 200;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mobile-nav.is-open {
  transform: translateX(0);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.mobile-nav-close svg { width: 24px; height: 24px; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.mobile-nav a {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
}
@media (min-width: 1025px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* -------------------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------------------- */
/* Mobile (<641px): foto ritagliata (più bassa di prima), con eyebrow + h1
   sovrapposti insieme nel cielo, centrati verticalmente nella colonna di
   sinistra (position:absolute su .hero-heading). Sottotitolo e azioni
   scorrono in flusso normale sotto la foto. Da 641px in su (vedi media
   query) il layout desktop originale è invariato: card unica con tutto il
   testo sovrapposta all'immagine. */
.hero {
  position: relative;
  --hero-img-h: clamp(460px, 72vh, 580px);
}
.hero-media {
  overflow: hidden;
}
.hero-media picture {
  display: block;
}
.hero-media img {
  width: 100%;
  height: var(--hero-img-h);
  object-fit: cover;
  object-position: 75% 10%;
  display: block;
}
.hero > .container {
  padding-inline: var(--sp-6);
  padding-block: var(--sp-12) var(--sp-12);
  margin-inline: 0;
}
.hero-content {
  width: 100%;
}
.hero-heading {
  position: absolute;
  top: calc(var(--hero-img-h) * 0.32);
  left: var(--sp-6);
  max-width: 65%;
  transform: translateY(-50%);
  z-index: 1;
  margin: 0;
}
.hero-heading .eyebrow {
  font-size: 0.9rem;
}
.hero-content h1 {
  margin: 0;
  max-width: 12ch;
  color: var(--navy);
  font-size: clamp(1.75rem, 1.3rem + 4vw, 2.375rem);
  font-weight: 800;
  line-height: 1.1;
}
.hero-details {
  margin-top: var(--sp-4);
}
.hero-subtitle {
  color: var(--text-soft);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.hero-actions .btn { width: 100%; justify-content: center; }
.hero-signature {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--navy);
  background: var(--blue-100);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill);
}

@media (min-width: 641px) {
  .hero {
    display: grid;
  }
  .hero-media,
  .hero > .container {
    grid-area: 1 / 1;
  }
  .hero-media picture {
    height: auto;
  }
  .hero-media img {
    height: clamp(530px, 62vh, 600px);
    object-fit: cover;
    object-position: 72% 40%;
  }
  .hero-heading {
    position: static;
    max-width: none;
    transform: none;
  }
  .hero-heading .eyebrow {
    font-size: var(--fs-eyebrow);
  }
  .hero-content h1 {
    max-width: none;
    color: var(--navy);
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.2;
  }
  .hero > .container {
    position: relative;
    z-index: 1;
    padding-inline: var(--sp-6);
    padding-block: var(--sp-6);
  }
  .hero-content {
    max-width: 32rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--sp-6);
  }
  .hero-details {
    margin-top: 0;
  }
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hero-actions .btn { width: auto; flex-shrink: 0; }
  .hero-signature { flex-shrink: 0; }
}

@media (min-width: 1025px) {
  .hero-media img { height: clamp(668px, 64vh, 750px); object-position: 70% 45%; }
  .hero-content { padding: var(--sp-6); }
}

/* -------------------------------------------------------------------------
   8. Sezione "Il progetto"
   ------------------------------------------------------------------------- */
.progetto-intro {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}
.progetto-figure {
  order: -1;
}
.progetto-body {
  min-width: 0;
}
.progetto-body p:last-child {
  margin-bottom: 0;
}
.progetto-figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: var(--tint);
}
.progetto-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.definition-cards {
  display: grid;
  gap: var(--sp-6);
  margin-block: var(--sp-8);
}
.definition-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
}
.definition-card h3 {
  font-size: var(--fs-h3);
}

.actions-band {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}
.action-item {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.action-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-icon svg {
  width: 26px;
  height: 26px;
  color: var(--blue);
}
.action-item h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-1);
}
.action-item p {
  color: var(--text-soft);
  margin: 0;
}

@media (min-width: 641px) {
  .definition-cards { grid-template-columns: 1fr 1fr; }
  .progetto-figure { order: 0; }
}
@media (min-width: 1025px) {
  .actions-band { grid-template-columns: repeat(3, 1fr); }
  .progetto-intro {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
    gap: var(--sp-8);
  }
  .progetto-figure {
    max-width: 360px;
    width: 100%;
    justify-self: end;
  }
}

/* -------------------------------------------------------------------------
   9. Percorso — timeline
   ------------------------------------------------------------------------- */
.percorso-intro {
  max-width: 70ch;
}

/* Indice cliccabile delle tappe, raggruppato per fase */
.path-index {
  margin: var(--sp-8) 0 var(--sp-4);
}
.path-index-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}
.path-index-flow {
  display: none;
  pointer-events: none;
}
.path-phase {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-6);
}
.path-phase-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.path-phase-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.8rem;
}
.path-phase-label {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}
.path-phase-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.path-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-4);
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.path-card:hover,
.path-card:focus-visible {
  border-color: var(--blue);
  background: var(--tint);
}
.path-card-number {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.9rem;
}
.path-card-title {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* Avviso "in arrivo altre tappe": inserito via script.js quando
   data-released-stages su <body> è inferiore a 8 (percorso non ancora
   completo). Box compatto e centrato, non a piena larghezza: con poche
   fasi sbloccate l'indice è già più stretto, un avviso edge-to-edge
   sembrerebbe "rotto" invece che intenzionale. */
.path-teaser {
  max-width: 480px;
  margin: var(--sp-6) auto 0;
  padding: var(--sp-4) var(--sp-6);
  background: var(--tint);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
}

/* Filo di connessione tra le 3 card di fase: riprende il motivo del
   "flusso" già presente nelle foto hero, qui in versione CSS/SVG.
   Passa a metà altezza dietro le card (z-index negativo): visibile
   negli spazi tra una card e l'altra, "sparisce" dietro il loro sfondo
   bianco esattamente come nelle foto hero passa dietro le persone.
   Solo desktop (vedi media query sotto) — su mobile/tablet le fasi
   sono impilate e l'ordine è già chiaro senza bisogno di un connettore. */
.path-index-flow-stop-edge {
  stop-color: var(--blue);
  stop-opacity: 0;
}
.path-index-flow-stop-mid {
  stop-color: var(--blue);
  stop-opacity: 0.55;
}
.path-index-flow-glow {
  fill: none;
  stroke: var(--blue-iwsf);
  stroke-width: 14;
  stroke-linecap: round;
  opacity: 0.14;
  filter: blur(7px);
}
.path-index-flow-line {
  fill: none;
  stroke: url(#pathFlowGradient);
  stroke-width: 2.5;
  stroke-linecap: round;
}

@media (min-width: 641px) {
  .path-phase-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .path-index-row { position: relative; flex-direction: row; align-items: flex-start; justify-content: center; gap: var(--sp-6); }
  .path-index-flow {
    display: block;
    position: absolute;
    z-index: -1;
    top: -48px;
    left: 0;
    width: 100%;
    height: calc(100% + 96px);
  }
  /* flex-grow a 0: con il percorso sbloccato progressivamente può
     essere visibile una sola fase (o due) alla volta — senza grow le
     card mantengono una larghezza sensata invece di stirarsi a
     riempire tutta la riga come farebbe con flex:1. flex-shrink resta
     1 così, con tutte e 3 le fasi visibili, si adattano comunque alla
     larghezza del container. */
  .path-phase { flex: 0 1 300px; min-width: 0; }
  .path-phase-list { grid-template-columns: 1fr; }
  /* La fase "Agire" ha 4 tappe contro le 2 delle altre fasi: doppia
     larghezza e griglia 2x2 così l'altezza resta allineata alle
     colonne vicine invece di impilare 4 card in un'unica colonna. */
  .path-phase--split { flex: 0 1 624px; }
  .path-phase--split .path-phase-list { grid-template-columns: repeat(2, 1fr); }
}

.timeline {
  position: relative;
  margin-top: var(--sp-12);
  list-style: none;
  padding: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--border);
}

.stage {
  position: relative;
  padding-left: 56px;
  margin-bottom: var(--sp-12);
  scroll-margin-top: 88px;
}
.stage:last-child { margin-bottom: 0; }

.stage-node {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--stage-color, var(--blue));
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--stage-color, var(--blue));
}

/* Avviso "in arrivo altre tappe" in fondo alla timeline: inserito via
   script.js quando data-released-stages su <body> è inferiore a 8. */
.stage-teaser {
  position: relative;
  padding-left: 56px;
}
.stage-teaser-node {
  position: absolute;
  left: 13px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px dashed var(--border);
}
.stage-teaser-card {
  background: var(--tint);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.stage-teaser-text {
  color: var(--text-soft);
  margin: 0;
  text-align: center;
}

/* Divisore di fase (Conoscere / Riconoscere / Agire) dentro la timeline */
.phase-marker {
  position: relative;
  padding-left: 56px;
  margin: var(--sp-16) 0 var(--sp-8);
}
.timeline > .phase-marker:first-child {
  margin-top: 0;
}
.phase-marker-node {
  position: absolute;
  left: 4px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}
.phase-marker-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: var(--sp-1);
}
.phase-marker-content h3 {
  margin-bottom: var(--sp-2);
}
.phase-marker-content p:last-child {
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 0;
}

.stage-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Zona abbinata: badge + titolo + summary accanto all'immagine, stessa altezza indicativa */
.stage-header {
  display: flex;
  flex-direction: column;
}

.stage-intro {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stage-progress {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin: 0 0 var(--sp-2);
}

.stage-number {
  display: block;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--stage-color, var(--blue));
  margin-bottom: var(--sp-3);
}

.stage-intro h3 {
  font-size: var(--fs-h3);
}

.stage-summary {
  color: var(--text-soft);
  margin: 0;
  padding: 0 var(--sp-6) var(--sp-6);
}

.stage-figure {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--tint);
  margin: 0 var(--sp-6) var(--sp-6);
  border-radius: var(--radius-sm);
}
.stage-figure picture {
  display: block;
  width: 100%;
  height: 100%;
}
.stage-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Zona di approfondimento: .stage-more (<details>) ha sempre l'attributo
   "open" in HTML, quindi senza JS il contenuto resta sempre visibile
   ovunque (nessuna regressione di accessibilità). Con JS (script.js) lo
   chiudiamo di default sotto i 1025px per una lettura più scremabile su
   mobile/tablet; da 1025px in su resta sempre aperto e il summary/toggle
   è nascosto via CSS, quindi il desktop appare identico a prima. */
.stage-details {
  padding: var(--sp-6);
  border-top: 1px solid var(--border);
}

.stage-more {
  margin: 0 0 var(--sp-4);
}
.stage-more-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  min-height: 44px;
  padding: var(--sp-2) 0;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stage-more-summary::-webkit-details-marker {
  display: none;
}
.stage-more-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.stage-more[open] .stage-more-summary::after {
  transform: rotate(-135deg);
}
.stage-more[open] .stage-more-summary {
  margin-bottom: var(--sp-2);
}

.stage-more-close {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 44px;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stage-more-close::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-135deg);
}

.stage-body p {
  max-width: none;
}
.stage-body p:last-child {
  margin-bottom: 0;
}

.stage-callout {
  background: var(--blue-100);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  margin-top: var(--sp-4);
}
.stage-callout svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--navy);
  margin-top: 2px;
}
.stage-callout h4 {
  margin: 0 0 var(--sp-2);
  color: var(--navy);
  font-family: var(--font-title);
  font-size: 1rem;
}
.stage-callout p {
  margin: 0;
  max-width: none;
}

.stage-faq {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
}
.stage-faq-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: var(--sp-3);
}
.stage-faq-item h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: var(--sp-1);
}
.stage-faq-item p {
  color: var(--text);
  margin: 0;
}
.stage-faq-item + .stage-faq-item {
  margin-top: var(--sp-4);
}

.stage-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.stage-pagination a {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-decoration: none;
}
.stage-pagination-next {
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}
.stage-pagination-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.stage-pagination-title {
  color: var(--blue);
  font-weight: 700;
}
.stage-pagination a:hover .stage-pagination-title,
.stage-pagination a:focus-visible .stage-pagination-title {
  text-decoration: underline;
}

@media (min-width: 1025px) {
  .stage-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "intro figure" "summary figure";
    align-items: start;
    gap: var(--sp-8);
    padding: var(--sp-8);
  }
  .stage-intro {
    grid-area: intro;
    padding: 0;
    justify-content: flex-start;
  }
  .stage-summary {
    grid-area: summary;
    padding: 0;
  }
  .stage-figure {
    grid-area: figure;
    aspect-ratio: 16 / 9;
    max-width: 460px;
    width: 100%;
    justify-self: end;
    margin: 0;
  }
  /* Alternanza: sulle tappe pari l'immagine passa a sinistra del testo.
     Classe esplicita .is-alt (non :nth-child) perché i marker di fase
     inseriti nella timeline spostano la posizione delle tappe fra i figli.
     Le aree nominate si invertono semplicemente scambiando le colonne. */
  .stage.is-alt .stage-header {
    grid-template-areas: "figure intro" "figure summary";
  }
  .stage.is-alt .stage-figure {
    justify-self: start;
  }
  .stage-details {
    padding: var(--sp-8);
  }
  .stage-progress {
    display: none;
  }
  .stage-more {
    margin: 0;
  }
  .stage-more-summary {
    display: none;
  }
  .stage-more-close {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   10. Conclusione
   ------------------------------------------------------------------------- */
.conclusion-body {
  max-width: 70ch;
}
.conclusion-actions {
  margin-top: var(--sp-6);
}

/* -------------------------------------------------------------------------
   11. Informazioni
   ------------------------------------------------------------------------- */
.info-grid {
  display: grid;
  gap: var(--sp-6);
}
.info-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
}
.info-box svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--blue);
}
.info-box-body p {
  max-width: none;
  color: var(--text-soft);
}
@media (min-width: 1025px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding-block: var(--sp-12);
}
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}
.footer-logo-panel {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  display: inline-flex;
  align-items: center;
}
.footer-logo-panel img {
  height: 36px;
  width: auto;
}
.footer-contribution {
  font-size: 0.9rem;
  color: #DCEBF7;
}
.footer-project-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--sp-4);
}
.footer-company {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}
.footer-company p {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: #DCEBF7;
  font-size: 0.9rem;
  margin: 0;
}
.footer-company svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #fff;
}
.footer-company a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}
.footer-legal p,
.footer-ai-note p {
  color: #DCEBF7;
  font-size: 0.9rem;
  max-width: 70ch;
}
.footer-legal + .footer-ai-note {
  margin-top: var(--sp-6);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-links a {
  color: #DCEBF7;
  font-size: 0.9rem;
  text-decoration: underline;
}
.footer-links a:hover,
.footer-links a:focus-visible { color: #fff; }

/* -------------------------------------------------------------------------
   13. Utilità di stampa/contenuto lungo, immagini decorative
   ------------------------------------------------------------------------- */
.section-head p { color: var(--text-soft); }

/* -------------------------------------------------------------------------
   14. Pagine legali (bozza) — banner di stato e testo lungo
   ------------------------------------------------------------------------- */
.draft-banner {
  background: #FFF3CD;
  border-bottom: 1px solid #F0D98A;
  color: #664D03;
  padding: var(--sp-4) 0;
  font-size: 0.9375rem;
}
.draft-banner .container { max-width: 80ch; }
.draft-banner strong { display: block; margin-bottom: var(--sp-1); }
.draft-banner p { margin: 0; max-width: none; }

.legal-back {
  display: inline-block;
  margin-bottom: var(--sp-6);
  font-weight: 600;
}

.legal-content { max-width: 70ch; }
.legal-content h2 { margin-top: var(--sp-12); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: var(--fs-body);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--blue);
  margin-top: var(--sp-8);
}
.legal-content p, .legal-content li { color: var(--text-soft); }
.legal-content .legal-meta { color: var(--text); font-weight: 600; }

.legal-todo {
  background: #FFF3CD;
  color: #664D03;
  padding: 0 0.3em;
  border-radius: 4px;
  font-weight: 600;
  white-space: normal;
}
