/* ============================================================
   Marimeo — TEST STILE BRUTALISTA
   Titoli: Dimbo · Palette: blu #2F4798, nero, azzurro #A6DDF4, giallo #FFF203
   ============================================================ */

@font-face {
  font-family: "Dimbo";
  src: url("../assets/fonts/Dimbo-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #2F4798;
  --black: #000000;
  --cyan: #A6DDF4;
  --yellow: #FFF203;
  --white: #FFFFFF;
  --green: #CAFF61;
  /* Inchiostro del verde: sul lime il nero puro vibra, questo blu profondo no. */
  --ink: #1F3C4C;

  --border: 3px solid var(--black);
  /* Ombra netta = affordance di click. Solo su CTA ed elementi interattivi. */
  --shadow: 6px 6px 0 var(--black);
  --shadow-sm: 4px 4px 0 var(--black);

  /* Stacco delle barre flottanti (navbar e tab bar) dai bordi dello schermo. */
  --bn-gap: 16px;
  /* Altezza della navbar: min-height di .header-inner + i 3px di bordo per lato.
     Serve a hero e scroll-padding, che devono sapere quanto spazio occupa. */
  --header-h: 78px;

  --font-head: "Dimbo", "Arial Black", system-ui, sans-serif;
  --font-body: "Nunito", "Helvetica Neue", Arial, system-ui, sans-serif;

  --container: 1160px;
  --space: clamp(3.5rem, 8vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
/* Le ancore devono fermarsi sotto la navbar flottante, non dietro. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bn-gap) + var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Skip link: fuori vista finché non riceve il focus da tastiera. */
.skip-link {
  position: fixed; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 100; background: var(--black); color: var(--white);
  font-family: var(--font-body); font-weight: 800; text-decoration: none;
  padding: 0.6rem 1.1rem; border-radius: 0 0 10px 10px;
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translate(-50%, 0); outline: 3px solid var(--yellow); outline-offset: 2px; }
/* Il focus programmatico dallo skip link non deve lasciare un contorno sul main. */
main:focus { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: normal;
  line-height: 1.02;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

/* ---------- Layout ---------- */
/* .container e' l'unica griglia della pagina: fissa la colonna e i suoi margini,
   cosi' ogni sezione parte dalla stessa verticale. Chi vuole righe piu' corte
   NON restringe il container (lo ricentrerebbe, spostando il bordo sinistro):
   limita la misura del contenuto, che resta a filo. */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container.narrow { --measure: 780px; }
.container.narrow > * { max-width: var(--measure); }
/* Eccezione voluta: la colonna stretta si stacca dalla griglia e si ricentra.
   Da usare solo dove il blocco e' un'isola autoconclusa (la FAQ), mai su
   sezioni che devono leggersi in continuita' con quelle sopra e sotto. */
.container.narrow.centered { width: min(100% - 2.5rem, var(--measure)); }
.section { padding-block: var(--space); }
/* Prima sezione di una sottopagina senza hero: compensa la navbar fissa
   con lo stesso offset di .hero e .legal-hero (altrimenti il contenuto ci
   finisce sotto). Stesso stacco della pagina privacy: header + 2rem. */
.section-top { padding-top: calc(var(--bn-gap) + var(--header-h) + 2rem); }
.section-cyan { background: var(--cyan); }
.section-blue { background: var(--blue); color: var(--white); }
.section-yellow { background: var(--yellow); }
.section-green { background: var(--green); color: var(--ink); }

.section-eyebrow, .eyebrow {
  display: inline-block; background: var(--black); color: var(--white);
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; padding: 0.3rem 0.7rem; margin: 0 0 1rem;
}
.section-title { font-size: clamp(2.4rem, 6vw, 4rem); max-width: 20ch; }
/* Nelle sezioni strette il titolo usa tutta la misura, non i 20ch di default. */
.container.narrow > .section-title { max-width: var(--measure); }
/* Titolo "Come associarsi": più lungo, va tenuto su due righe. */
#come-associarsi .section-title { max-width: 28ch; text-wrap: balance; }
.section-intro { font-size: 1.2rem; max-width: 58ch; margin-bottom: 2.5rem; font-weight: 500; }
/* Testo generico del corpo (+10%) */
.card p, .card-list li, .step p, .faq-a p, .price-note, .enroll-option p { font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--yellow); color: var(--black);
  font-family: var(--font-head); font-size: 1.32rem; text-decoration: none;
  padding: 0.65rem 1.4rem; border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
/* Primario: all'hover solo il movimento dell'ombra, nessun cambio di colore */
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--black); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-lg { font-size: 1.56rem; padding: 0.85rem 1.9rem; }
.btn-sm { font-size: 1.14rem; padding: 0.45rem 1rem; box-shadow: 3px 3px 0 var(--black); }

/* Secondario: bianco, all'hover solo il movimento dell'ombra */
.btn-ghost { background: var(--white); }

/* Terziario: solo testo/link blu con underline animato */
.btn-tertiary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-head); font-size: 1.32rem; line-height: 1.2;
  color: var(--blue); background: none; border: none; padding: 0;
  text-decoration: none; cursor: pointer; position: relative;
}
.btn-tertiary::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 3px; background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.btn-tertiary:hover::after { transform: scaleX(1); }
.btn-tertiary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Icone (Material Symbols Sharp, filled) ---------- */
.ico {
  display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em;
  fill: currentColor; stroke: none;
  flex-shrink: 0;
}
.bn-item .ico { width: 24px; height: 24px; }
.card-ico .ico { width: 30px; height: 30px; }
.enroll-ico .ico { width: 26px; height: 26px; }
.hero-badges .ico, .tag-list .ico { width: 1.25em; height: 1.25em; }

/* ---------- Header ---------- */
/* Navbar flottante: fixed e non sticky, altrimenti occuperebbe il flusso e
   l'hero partirebbe sotto di lei, scoprendo il bianco del body attorno alla
   pillola. Niente ombra: l'ombra netta e' l'affordance di click, e la barra
   non e' un elemento cliccabile (lo sono i bottoni al suo interno). */
.site-header {
  position: fixed; top: var(--bn-gap); left: 0; right: 0; z-index: 50;
  width: min(100% - var(--bn-gap) * 2, var(--container));
  margin-inline: auto;
  background: var(--white); border: var(--border); border-radius: 16px;
}
/* Il .container aggiungerebbe il suo margine a quello della barra: lo neutralizzo. */
.site-header .container { width: auto; margin-inline: 0; padding-inline: 1rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
/* Rigidi entrambi: da flex item comprimibili, il wordmark (altezza fissa,
   max-width 100%) veniva schiacciato in orizzontale e si deformava. */
.brand, .header-right { flex: 0 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--black); }
/* Logo fluido: larghezza proporzionale allo schermo (32vw), con un minimo che ne
   preserva la leggibilita' e un massimo pari alla dimensione desktop.
   Dimensiono la larghezza e lascio l'altezza automatica: gli attributi width/height
   dell'<img> danno l'aspect-ratio, quindi non si deforma. */
/* Piccolo offset verticale: l'immagine ha spazio bianco interno che la fa
   sembrare leggermente alta rispetto al resto della navbar. */
.brand-wordmark { width: clamp(100px, 32vw, 213px); height: auto; max-width: none; display: block; transform: translateY(3px); }
.header-right { display: flex; align-items: center; gap: 1.1rem; }

/* ---------- Lang switch (dropdown) ---------- */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-head); font-size: 0.95rem; color: var(--black);
  background: var(--white); border: var(--border); border-radius: 10px;
  padding: 0 0.8rem; cursor: pointer; box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
/* Stessa altezza per il pulsante lingua e il CTA "Diventa socio" */
.lang-trigger, .header-cta, .header-donate { height: 46px; }
/* Hover da secondario: solo movimento dell'ombra, resta bianco */
.lang-trigger:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }
.lang-trigger:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
.lang-caret { font-family: var(--font-body); font-size: 0.75rem; transition: transform 0.15s ease; }
.lang-trigger[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  list-style: none; margin: 0; padding: 0; min-width: 150px;
  background: var(--white); border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; display: none;
}
.lang-menu.open { display: block; }
.lang-btn {
  display: block; width: 100%; text-align: left;
  font-family: var(--font-head); font-size: 1rem; color: var(--black);
  background: var(--white); border: none; border-bottom: 2px solid var(--black);
  padding: 0.6rem 0.9rem; cursor: pointer;
}
.lang-menu li:last-child .lang-btn { border-bottom: none; }
.lang-btn:hover { background: var(--cyan); }
.lang-btn.is-active { background: var(--yellow); }

/* ---------- Nav ---------- */
.nav-menu { display: flex; align-items: center; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
/* Senza questi, quando lo spazio stringe i link si comprimono e "Chi siamo"
   va a capo dentro la barra. Meglio che la nav resti rigida. */
.nav-menu li { flex: 0 0 auto; }
.nav-menu a {
  text-decoration: none; font-family: var(--font-head); font-size: 1.26rem; color: var(--black);
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 3px; }
.nav-menu .btn { color: var(--black); }

/* ---------- Hero ---------- */
/* L'hero parte da y=0, dietro la navbar flottante: il padding-top gli restituisce
   lo spazio che l'header non occupa piu' nel flusso. Lo stacco sotto la navbar
   cresce meno del padding di fondo: su desktop i ~94px di offset dell'header
   danno gia' aria al titolo, un secondo clamp a 5.5rem lo spingerebbe troppo giu'. */
.hero {
  /* Il cyan resta il fondo: l'SVG dei personaggi ha lo sfondo trasparente, quindi
     l'azzurro traspare dove l'illustrazione non copre. L'arte e' ancorata in basso
     a tutta larghezza (1440px il disegno nativo), cosi' i personaggi poggiano sul
     bordo inferiore della sezione mentre il testo resta in alto. */
  background:
    var(--cyan)
    url("../assets/img/hero-personaggi-marimeo.svg")
    center bottom / 100% auto
    no-repeat;
  border-bottom: var(--border);
  padding-block: calc(var(--bn-gap) + var(--header-h) + 2rem) clamp(3rem, 8vw, 5.5rem);
  /* La hero occupa sempre il 95% dell'altezza visibile: cosi' l'illustrazione dei
     personaggi ha spazio a fondo sezione anche se il testo e' corto. dvh tiene conto
     delle barre del browser su mobile. */
  min-height: 95dvh;
  /* Testo e CTA centrati verticalmente nell'area disponibile (tra il padding-top
     che li tiene sotto la navbar e il padding-bottom). */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Il contenuto e' centrato: cosi' resta in colonna sopra l'illustrazione dei
   personaggi (ancorata in basso) senza finirci sopra ai lati. */
.hero-inner { text-align: center; }
/* Margine laterale piu' stretto del .container globale (2.5rem): sul responsive
   la colonna di testo/CTA guadagna larghezza e va a capo meno spesso. Su desktop
   il cap var(--container) prevale, quindi nulla cambia. */
.hero .hero-inner { width: min(100% - 1.5rem, var(--container)); }
/* Stesso principio del .narrow: la hero sta sulla griglia, sono i suoi blocchi
   a fermarsi a 900px; auto sui margini li tiene in asse. */
.hero-inner > * { max-width: 900px; margin-inline: auto; }
/* I pulsanti stanno su una riga flex: senza justify si accumulerebbero a sinistra. */
.hero-actions { justify-content: center; }
/* Il claim e' una frase intera, non tre parole: a 6.6rem occupava mezza pagina.
   Il minimo del clamp e' basso (1.35rem) di proposito: se restasse a 2.35rem, sotto
   ~587px il font smetterebbe di rimpicciolirsi mentre lo schermo continua a stringersi,
   e la frase andrebbe a capo su 4-5 righe. Con un minimo basso e' il termine 6.4vw a
   guidare: font e viewport scalano insieme, quindi le righe restano ~3 fin sui telefoni. */
.hero h1 { font-size: clamp(1.35rem, 6.4vw, 4.5rem); }
/* L'eyebrow vive dentro l'h1 (le keyword devono stare nel titolo), quindi va
   sottratto all'ereditarieta' di font-size/line-height del titolo stesso. */
.hero-title .eyebrow { line-height: 1.4; }
/* Misura in ch: la larghezza scala col font (a differenza di px/%), quindi il
   numero di righe resta stabile su qualunque schermo. 34ch lasciava spazio a 2 righe
   sui desktop piu' stretti; a 28ch la frase (~86 caratteri) non entra piu' in due e
   resta sempre di almeno tre righe. balance le distribuisce in modo uniforme, cosi'
   il blocco non cresce troppo in altezza e non scende sopra l'illustrazione. */
.hero-claim {
  display: block; margin: 0 auto 2rem;
  max-width: 28ch; text-wrap: balance;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; margin: 2.2rem 0 0; padding: 0; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--white); border: var(--border); border-radius: 999px;
  padding: 0.45rem 1rem; font-family: var(--font-head); font-size: 1rem;
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--yellow); border-bottom: var(--border); }
.marquee-track { display: flex; width: max-content; animation: marquee 20s linear infinite; }
/* All'hover la striscia rallenta (non si ferma) */
.marquee:hover .marquee-track { animation-duration: 60s; }
.marquee-track span { font-family: var(--font-head); font-size: 1.85rem; padding: 0.5rem 0; white-space: nowrap; }
.marquee-sep { font-style: normal; display: inline-block; padding-inline: 0.5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-text p { font-size: 1.32rem; margin-bottom: 1.1rem; }
.about-text p:first-child { font-family: var(--font-head); font-size: 1.65rem; line-height: 1.25; }
/* Bottone "Scopri di più" del teaser in home, sotto l'intro. */
.about-cta { margin: 2rem 0 0; }

/* Missione & Visione: due blocchi affiancati, stessa grammatica delle .card. */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
/* Sezione M/V verde: sulla pagina segue l'intro (anch'essa verde) senza stacco
   in cima, cosi' le due bande verdi si leggono come un blocco continuo. */
.about-mv { padding-top: 0; }
.mv-card {
  background: var(--white); color: var(--black); border: var(--border);
  border-radius: 14px; padding: 1.9rem;
}
.mv-card h3 { font-size: 1.9rem; margin: 0.2rem 0 0.6rem; }
.mv-card p { font-size: 1.18rem; font-weight: 500; margin: 0; }

/* Comitato direttivo */
.people-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.6rem; list-style: none; margin: 0; padding: 0;
}
.person-card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--white); color: var(--black); border: var(--border);
  border-radius: 14px; padding: 1.6rem;
}
/* Avatar segnaposto: quadrato brutalista con le iniziali (in attesa delle foto). */
.person-avatar {
  display: inline-grid; place-items: center; width: 68px; height: 68px;
  background: var(--blue); color: var(--white);
  border: var(--border); border-radius: 12px; box-shadow: var(--shadow-sm);
  font-family: var(--font-head); font-size: 1.7rem; letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.person-badge {
  background: var(--yellow); color: var(--black); border: 2px solid var(--black);
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.7rem; padding: 0.22rem 0.55rem;
  border-radius: 6px; margin-bottom: 0.7rem;
}
.person-name { font-family: var(--font-head); font-size: 1.55rem; line-height: 1.05; margin: auto 0 0.25rem; }
.person-role { font-weight: 700; margin: 0; }

/* ---------- Stat / cards shared box ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; }
.stat {
  background: var(--white); color: var(--black); border: var(--border); border-radius: 14px;
  padding: 2rem 1.4rem; text-align: center;
}
.stat-num { font-family: var(--font-head); font-size: clamp(3.1rem, 7.7vw, 4.4rem); color: var(--blue); line-height: 1; }
.stat-label { margin: 0.6rem 0 0; font-weight: 700; }
.stat-note { margin-top: 1.6rem; font-weight: 700; }
.section-blue .stat-note { color: var(--white); }

/* ---------- Cosa facciamo: i progetti ---------- */
/* Le due card stanno una sotto l'altra, a tutta colonna: niente scroll
   orizzontale, niente contenuto nascosto. */
.projects-track {
  display: grid; gap: 1.6rem;
  list-style: none; margin: 0; padding: 0;
}

/* Bordo nero a delimitare la card sulla pagina bianca.
   La casetta prende il celeste, i progetti futuri il verde. */
.project-card {
  min-width: 0;
  display: flex; flex-direction: column;
  background: var(--cyan); color: var(--black);
  border: var(--border); border-radius: 14px; padding: 1.8rem;
}

.project-status {
  align-self: flex-start;
  background: var(--black); color: var(--white);
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; padding: 0.3rem 0.7rem; margin: 0 0 1rem;
}
.project-name { font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 22ch; }
.project-desc { font-size: 1.15rem; font-weight: 500; max-width: 62ch; margin: 0 0 1.8rem; }

.project-next { background: var(--green); color: var(--ink); }
.project-next .project-status { background: var(--ink); color: var(--green); }
.project-cta { align-self: flex-start; }
/* I due bottoni della card (associarsi + donazione) affiancati, a sinistra. */
.project-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-self: flex-start; }
.project-next .tag-list { margin-bottom: 1.8rem; }

/* Le chip spostate qui dall'hero: spinte in fondo alla card, con un filo di
   stacco dal contenuto sopra. Sul celeste della card diventano blu piene
   (senza bordo) con testo e icone bianchi. */
.project-badges { margin-top: auto; padding-top: 1.8rem; }
.project-badges li { background: var(--blue); color: var(--white); border: none; }

/* ---------- Casetta ---------- */
.water-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.8rem; align-items: stretch; }
.map-card, .price-card {
  background: var(--white); border: var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.map-card-title { font-size: 1.75rem; padding: 1.6rem 1.6rem 0; margin: 0 0 1rem; }
.map-embed-wrap { position: relative; display: flex; flex: 1 1 auto; }
.map-embed { width: 100%; height: 220px; border: 0; border-top: var(--border); border-bottom: var(--border); flex: 1 1 auto; }
.map-embed-guard { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.map-embed-wrap.is-active .map-embed-guard { pointer-events: none; }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; }
.map-foot > div { display: flex; flex-direction: column; }
.map-foot .btn { white-space: nowrap; flex-shrink: 0; }
#casetta [data-i18n="water_where_value"] { white-space: pre-line; }
.price-card { padding: 1.6rem; }
.price-card h4 { font-size: 1.75rem; }
/* Link terziario "Analisi acqua": largo quanto il testo e allineato a destra */
.price-card .btn-tertiary { align-self: flex-end; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.price-table th, .price-table td { text-align: left; padding: 0.7rem 0.6rem; border-bottom: 2px solid var(--black); }
.price-table thead th { font-family: var(--font-head); font-size: 1.2rem; background: var(--blue); color: var(--white); }
.price-table thead th:first-child { border-top-left-radius: 6px; }
.price-table thead th:last-child { border-top-right-radius: 6px; }
.price-table td:first-child { font-weight: 700; }
/* Evidenzia la colonna "Associati" nel corpo tabella. Sull'intestazione non si
   applica: .price-table thead th ha specificita' maggiore e vince. */
.price-hl { background: var(--yellow); font-weight: 800; }
.price-note { margin-top: 1rem; font-weight: 600; }

/* ---------- Cards (perché associarsi) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.card {
  background: var(--white); color: var(--black); border: var(--border); border-radius: 14px;
  padding: 1.7rem;
}
.card-ico {
  display: inline-grid; place-items: center; width: 54px; height: 54px;
  border: var(--border); border-radius: 12px; background: transparent; font-size: 1.6rem; margin-bottom: 1rem;
}
.card h3 { font-size: 1.65rem; }
.card p { margin: 0; font-weight: 500; }
.card-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.card-list li { position: relative; padding-left: 1.9rem; font-weight: 500; }
.card-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  font-family: var(--font-head); color: var(--white); background: var(--blue);
  width: 1.35rem; height: 1.35rem; border-radius: 5px; display: grid; place-items: center;
  font-size: 0.85rem; border: 2px solid var(--black);
}
.card p + .card-list { margin-top: 0.9rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.step { background: var(--cyan); border: var(--border); border-radius: 14px; padding: 1.8rem; }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: var(--yellow); border: var(--border); border-radius: 50%;
  font-family: var(--font-head); font-size: 1.25rem; flex: none;
}
.step-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.3rem; }
.step-head h3 { font-size: 1.85rem; margin: 0; }
.step-content { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.step-body { min-width: 0; flex: 1 1 260px; }
.step-body p { margin: 0; font-weight: 500; }
.step-note { margin-top: 0.8rem; font-size: 1rem; font-weight: 500; opacity: 0.85; }
.step-tessera-img { flex: 0 1 300px; width: 300px; max-width: 100%; height: auto; }

/* ---------- Come iscriverti ---------- */
.enroll { margin-top: 2.5rem; background: var(--cyan); border: var(--border); border-radius: 14px; padding: 1.8rem; }
.enroll-intro { margin-bottom: 1.3rem; font-weight: 500; }
.enroll + .steps { margin-top: 1.2rem; }
.enroll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.enroll-option { display: flex; flex-direction: column; align-items: flex-start; background: var(--white); border: var(--border); border-radius: 12px; padding: 1.3rem; min-width: 0; overflow-wrap: anywhere; }
.enroll-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border: var(--border); border-radius: 10px; background: transparent; font-size: 1.5rem; margin-bottom: 0.7rem; }
.enroll-option h4 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.enroll-option p { font-weight: 500; margin: 0 0 1rem; }
.enroll-option p a { color: var(--blue); font-weight: 700; }
.enroll-option .btn { margin-top: auto; }

/* ---------- Timeline "Come associarsi" (scroll-trigger) ---------- */
.timeline { position: relative; }

/* Blocchi che compaiono allo scroll */
.timeline--js .timeline-node {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline--js .timeline-node.is-visible { opacity: 1; transform: none; }

/* Badge numerati: si "accendono" quando il riempimento li raggiunge */
.timeline--js .step-num {
  position: relative; z-index: 1; background: var(--white);
  transition: background 0.25s ease;
}
.timeline--js .step-num.is-active { background: var(--yellow); animation: stepPop 0.4s ease; }

@keyframes stepPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; margin: 0; padding: 0; }
.tag-list li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--ink); color: var(--green); border-radius: 999px;
  padding: 0.5rem 1.1rem; font-family: var(--font-head); font-size: 1.05rem;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 1rem; }
.faq-item { background: var(--white); border: var(--border); border-radius: 12px; padding: 0 1.4rem; box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.2rem 1.1rem 0; position: relative;
  font-family: var(--font-head); font-size: 1.4rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--font-head); font-size: 2rem; color: var(--black);
}
.faq-item[open] summary::after { content: "−"; }
/* Il padding sta sul figlio: con box-sizing:border-box l'altezza di .faq-a
   non potrebbe scendere sotto il proprio padding, e il collasso salterebbe a 0. */
.faq-a { padding: 0; font-weight: 500; overflow: hidden; transition: height 0.22s ease-out; }
.faq-a p { margin: 0; padding-bottom: 1.3rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: var(--white); padding-block: clamp(3rem, 7vw, 5rem); }
.cta-inner { text-align: center; max-width: 680px; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-band h2 { font-size: clamp(2.4rem, 6.6vw, 4rem); }
.cta-band p:not(.eyebrow) { font-size: 1.32rem; margin-bottom: 1.8rem; font-weight: 600; }
.cta-note { font-weight: 700; margin: 1rem 0 0; }

/* ---------- Funding strip ---------- */
/* I loghi del sostegno stanno dentro una card bordata (stile brutalista),
   dimensioni +20% rispetto alla vecchia striscia. */
.funding-strip { background: var(--white); padding-block: 2.5rem; }
/* Card contenitore, non un tasto: bordo si', ombra netta no. */
.funding-card {
  background: var(--white); border: var(--border); border-radius: 14px;
  padding: 1.9rem 2.4rem;
}
.funding-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.6rem; }
.funding-group { display: flex; align-items: center; gap: 1.1rem; }
.funding-cap { font-family: var(--font-head); font-size: 0.96rem; color: var(--black); white-space: nowrap; }
.funding-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.55rem; }
.funding-logo { height: 52px; width: auto; }
.funding-sep { width: 3px; align-self: stretch; min-height: 52px; background: var(--black); }

/* ---------- Pagina 404 ---------- */
/* Contenuto centrato, con la sezione che riempie lo schermo cosi' la 404 non
   lascia footer "appeso" a meta' viewport. */
.notfound-section { display: flex; align-items: center; min-height: calc(100dvh - var(--header-h)); }
.notfound-section .centered { text-align: center; margin-inline: auto; }
.notfound-section .section-eyebrow { justify-content: center; }
.notfound-section .section-title { max-width: 18ch; margin-inline: auto; }
.notfound-text { font-size: 1.32rem; font-weight: 500; max-width: 52ch; margin: 1.4rem auto 0; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.2rem; }

/* ---------- Utility ---------- */
/* Sprite SVG delle icone: le definizioni non si vedono, solo <use> le mostra.
   Classe al posto di style="display:none" inline, cosi' la CSP puo' vietare
   gli stili inline (niente 'unsafe-inline' in style-src). */
.svg-sprite { display: none; }
.mt-1 { margin-top: 1rem; }

/* ---------- Pagine legali (privacy) ---------- */
/* Contenuto testuale a colonna stretta, leggibile. L'header e' fixed: lascio
   spazio in cima perche' non copra il titolo. */
.legal-hero { background: var(--cyan); border-bottom: var(--border); }
.legal-hero .container {
  padding-top: calc(var(--bn-gap) + var(--header-h) + 2rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.legal-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0; }
.legal-updated { font-weight: 700; margin: 0.8rem 0 0; }

.legal { max-width: 820px; }
.legal h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 2.6rem 0 0.8rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1.3rem; margin: 1.6rem 0 0.5rem; }
.legal p { font-size: 1.12rem; margin: 0 0 1rem; }
.legal ul { font-size: 1.12rem; margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { font-weight: 700; }
.legal .lead { font-size: 1.25rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding-block: 3rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; padding-bottom: 2rem; border-bottom: 3px solid var(--white); }
.footer-logo { height: 96px; width: auto; margin-bottom: 0.6rem; }
.footer-col h4 { font-family: var(--font-head); font-size: 1.45rem; color: var(--white); margin-bottom: 1rem; }
.footer-tagline { color: rgba(255, 255, 255, 0.8); font-weight: 500; margin-top: 0.8rem; max-width: 32ch; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-list a { color: var(--white); text-decoration: none; font-weight: 600; }
.footer-list a:hover { color: var(--yellow); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; }
.footer-copy { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }
/* Bottone su fondo nero: fondo nero, testo, bordo e ombra netta bianchi. */
.back-top {
  margin-left: auto;
  background: var(--black);
  color: var(--white);
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}
.back-top:hover { background: var(--black); box-shadow: 2px 2px 0 var(--white); }
.back-top:active { box-shadow: 0 0 0 var(--white); }
.back-top:focus-visible { outline-color: var(--white); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .water-layout, .enroll-grid, .cards, .stats, .mv-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 992px) { .funding-sep { display: none; } }

/* Sotto i 1000px la navbar flottante e' piu' stretta del vecchio header full-width
   (32px di stacco + 6px di bordo + padding interno): senza stringere qui, i link
   sfondano di ~36px contro il logo. */
@media (max-width: 1000px) and (min-width: 761px) {
  .nav-menu { gap: 0.85rem; }
  .nav-menu a { font-size: 1.05rem; }
  .header-right { gap: 0.7rem; }
}

/* ---------- Bottom nav (tab bar flottante, stile app mobile) ---------- */
.bottom-nav {
  display: none;
  /* Staccata di 16px dai lati e dal fondo; su iPhone la safe area si somma
     all'offset, altrimenti la barra finirebbe sotto l'home indicator. */
  position: fixed; z-index: 60;
  left: var(--bn-gap); right: var(--bn-gap);
  bottom: calc(var(--bn-gap) + env(safe-area-inset-bottom, 0px));
  justify-content: space-around; align-items: stretch;
  background: var(--white); border: var(--border); border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden; /* i separatori e lo stato :active non devono sbordare dagli angoli */
}
.bn-item {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--black);
  font-family: var(--font-head); font-size: 0.744rem; line-height: 1.05; text-align: center;
  padding: 0.5rem 0.15rem;
}
.bn-item + .bn-item { border-left: 2px solid var(--black); }
.bn-item:active { background: var(--cyan); }

@media (max-width: 760px) {
  .project-card { padding: 1.3rem; }
  .nav { display: none; }          /* i link vanno nella tab bar in basso */
  .bottom-nav { display: flex; }
  /* Lo spazio per la barra flottante lo riserva il footer, non il body: cosi' il
     nero del footer prosegue dietro la barra invece di lasciare una fascia bianca. */
  .site-footer { padding-bottom: calc(2rem + 62px + var(--bn-gap) * 2 + env(safe-area-inset-bottom, 0px)); }

  /* La navbar flottante e' gia' nel CSS di base: qui resta solo cio' che cambia.
     Barra piu' bassa (60 + 6 di bordo) e padding interno piu' stretto. */
  :root { --header-h: 66px; }
  .site-header .container { padding-inline: 0.7rem; }

  /* Header compatto: wordmark rimpicciolito, poi CTA e lingua.
     La donazione sparisce dall'header (resta in card, band e footer). */
  .header-right { gap: 0.5rem; }
  .header-donate { display: none; }
  .header-cta { font-size: 1.02rem; padding: 0 0.7rem; }
  .lang-trigger { padding: 0 0.55rem; }
  .header-inner { min-height: 60px; }
}
@media (max-width: 560px) {
  /* Su schermi stretti la card rimpicciolisce loghi e padding, e i gruppi/righe
     vanno a capo invece di sforare oltre il bordo. */
  .funding-card { padding: 1.4rem 1.1rem; }
  .funding-group { flex-direction: column; gap: 0.5rem; }
  .funding-row { gap: 1rem 1.2rem; }
  .funding-logo { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .btn { transition: none; }
  .btn-tertiary::after { transition: none; }
}

/* ============================================================
   Overlay "Chi siamo": modale centrato (desktop) / bottom sheet (mobile)
   ============================================================ */
.about-dialog {
  position: fixed; inset: 0; margin: auto;
  /* Stessa larghezza e stessa regola responsive fluida della navbar:
     max 1160px, 16px di margine per lato, centrata. */
  width: min(100% - var(--bn-gap) * 2, var(--container));
  max-height: min(88vh, 940px);
  padding: 0;
  background: var(--white); color: var(--black);
  border: var(--border); border-radius: 16px;
  /* Niente ombra netta: quella e' l'affordance di click dei bottoni, il modale
     non e' un tasto. Lo stacco dal fondo lo da' il backdrop scuro. */
  overflow: hidden;                 /* scrolla il body interno, non il dialog */
  flex-direction: column;
}
.about-dialog[open] { display: flex; }
.about-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
/* Blocca lo scroll di fondo mentre l'overlay e' aperto. */
body.has-modal { overflow: hidden; }

.about-dialog-grip { display: none; }

.about-dialog-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem; border-bottom: var(--border); background: var(--white);
}
.about-dialog-title { font-size: 1.7rem; margin: 0; }
/* Riceve il focus solo via script all'apertura (tabindex=-1): niente contorno. */
.about-dialog-title:focus { outline: none; }
.about-dialog-close {
  flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px;
  background: var(--white); border: var(--border); border-radius: 10px;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.about-dialog-close:hover { background: var(--cyan); }
.about-dialog-close:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--black); }
.about-dialog-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.about-dialog-close .ico { width: 24px; height: 24px; }

/* Padding a zero: le sezioni iniettate portano il proprio sfondo colorato
   e devono andare a filo, da un bordo all'altro del modale. */
.about-dialog-body { flex: 1 1 auto; overflow-y: auto; padding: 0; }
/* Le bande colorate dentro al modale sono piu' compatte che a tutta pagina. */
.about-dialog-body .section { padding-block: clamp(2rem, 4vw, 3rem); }
.about-dialog-body .section-title { font-size: clamp(1.8rem, 4.5vw, 2.4rem); }
.about-dialog-body .section-intro { margin-bottom: 1.6rem; }

/* ---- Bottom sheet su mobile: ancorata in basso, a tutta larghezza ---- */
@media (max-width: 760px) {
  .about-dialog {
    inset: auto 0 0 0; margin: 0;
    width: 100%; max-width: none; max-height: 90vh;
    border-radius: 20px 20px 0 0; border-bottom: none;
  }
  .about-dialog-grip {
    display: block; width: 44px; height: 5px; border-radius: 999px;
    background: var(--black); opacity: 0.35; margin: 10px auto 0;
  }
  .about-dialog-head { padding: 0.7rem 1.1rem 0.9rem; }
}

/* ---- Animazione di entrata/uscita (disattivata con reduced-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  .about-dialog {
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.22s ease, transform 0.22s ease,
                overlay 0.22s ease allow-discrete, display 0.22s ease allow-discrete;
  }
  .about-dialog[open] { opacity: 1; transform: translateY(0); }
  @starting-style { .about-dialog[open] { opacity: 0; transform: translateY(14px); } }

  .about-dialog::backdrop {
    opacity: 0;
    transition: opacity 0.22s ease, overlay 0.22s ease allow-discrete, display 0.22s ease allow-discrete;
  }
  .about-dialog[open]::backdrop { opacity: 1; }
  @starting-style { .about-dialog[open]::backdrop { opacity: 0; } }

  /* Su mobile entra scorrendo dal basso. */
  @media (max-width: 760px) {
    .about-dialog { transform: translateY(100%); }
    .about-dialog[open] { transform: translateY(0); }
    @starting-style { .about-dialog[open] { transform: translateY(100%); } }
  }
}
