/* ============================================================
   FONDAZIONE PER VARESE — Ente Filantropico · Onepage
   Palette brand: Blu #074E79 · Rosso #EE3136 · Bianco
   Type: Figtree (display, umanista) + Hanken Grotesk (testo)
   3 "look" commutabili via [data-theme] (Tweaks)
   ============================================================ */

:root {
  --navy: #074E79;
  --navy-700: #063E61;
  --navy-900: #042D46;
  --orange: #EE3136;          /* sovrascritto da --accent (Tweaks) */
  --accent: var(--orange);
  /* Rosso per i TESTI piccoli (kicker, occhielli, tag).
     Il rosso pieno del marchio su fondo chiaro sta a 4.10:1, sotto la
     soglia WCAG AA di 4.50:1: per i testi si usa una versione piu scura.
     --accent resta il rosso del marchio per riempimenti, badge e bottoni. */
  --accent-testo: #BE1B22;
  --ink: #16202e;
  --muted: #5b6b7e;
  --line: #e4e8ee;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;

  --type-scale: 1;
  --radius: 4px;

  --maxw: 1180px;
  --pad-x: clamp(20px, 5vw, 64px);

  /* Altezza della navbar a scrollTop 0 (logo 58px + 19px di padding x2).
     Se cambia il padding o il logo della navbar, aggiornare qui:
     l'hero a piena finestra ci si aggancia. */
  --nav-h: 96px;

  --ff-display: "Figtree", system-ui, sans-serif;
  --ff-body: "Hanken Grotesk", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(4,45,70,.06), 0 2px 8px rgba(4,45,70,.05);
  --shadow-md: 0 8px 30px rgba(4,45,70,.10);
}

/* ---------- Testi accento su fondo scuro ----------
   Sul blu il rosso pieno crolla a 2.16:1. Per i testi piccoli si usa
   una tinta chiara della stessa famiglia (5.15:1 sul blu). */
.section--navy,
.footer,
.testi,
.support-card.feature,
[data-theme="b"] .hero-copy { --accent-testo: #FFB3A3; }

/* ---------- LOOK B — Brochure (energico, color-blocking) ---------- */
[data-theme="b"] {
  --surface-alt: #f4f7fb;
  --radius: 0px;
}

/* ---------- LOOK C — Caldo (carta calda, magazine) ---------- */
[data-theme="c"] {
  --paper: #faf7f2;
  --surface: #fffefb;
  --surface-alt: #f1ece2;
  --line: #e7e0d3;
  --radius: 16px;
}

/* ---------- radius override (Tweaks) ---------- */
[data-radius="square"] { --radius: 0px; }
[data-radius="soft"]   { --radius: 16px; }

/* ============================================================ Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--paper);
  font-size: calc(17px * var(--type-scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* photo B/N toggle (Tweaks) */
[data-photo-bw="on"] .bw { filter: grayscale(1) contrast(1.02); }

/* ============================================================ Type */
h1,h2,h3,h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 0;
  color: var(--navy);
}
[data-caps="on"] .kicker,
[data-caps="on"] .sec-title,
[data-caps="on"] .hero-title { text-transform: uppercase; }

.kicker {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: calc(14px * var(--type-scale));
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-testo);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px; height: 3px;
  background: var(--accent-testo);
  display: inline-block;
}

.sec-title {
  font-size: clamp(30px, 4.4vw, 54px);
  letter-spacing: .005em;
}
.lead { font-size: calc(20px * var(--type-scale)); color: var(--muted); max-width: 60ch; }

/* ============================================================ Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); }
.section { padding-block: clamp(64px, 8vw, 120px); }
.section--alt { background: var(--surface-alt); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head .sec-title { margin-top: 14px; }
.sec-head .lead { margin-top: 18px; }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: calc(15px * var(--type-scale));
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-900); }
.btn-ghost { border-color: currentColor; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================ Navbar */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 19px var(--pad-x);
  /* in cima alla pagina: bianco pieno. Da scrollata: semitrasparente. */
  background: #fff;
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, padding .3s ease, background .5s ease-in;
}
.nav.scrolled {
  background: rgba(255,255,255,.86);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
  padding-block: 10px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-brand img { height: 38px; width: auto; transition: height .3s ease; }
.nav.scrolled .nav-brand img { height: 32px; }
.nav-brand .wm { display: flex; flex-direction: column; line-height: 1; }
.nav-brand .wm b {
  font-family: var(--ff-display); font-weight: 700; color: var(--navy);
  font-size: 18px; letter-spacing: .02em; text-transform: uppercase;
}
.nav-brand .wm span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--ff-display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .07em; font-size: 15px; color: var(--navy);
  padding: 6px 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; border: 0; }
.nav-burger span { width: 24px; height: 2px; background: var(--navy); display: block; }

/* ============================================================ Hero */
.hero { position: relative; padding-top: var(--nav-h); overflow: clip; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; min-height: min(86vh, 760px);
  padding-block: clamp(28px, 5vw, 64px);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .14em;
  font-size: 14px; color: var(--accent-testo); font-weight: 600; margin-bottom: 22px;
}
.hero-eyebrow .dot { width: 8px; height: 8px; background: var(--accent-testo); border-radius: 50%; }
.hero-title {
  font-size: clamp(38px, 6vw, 76px);
  line-height: .98; color: var(--navy); letter-spacing: .002em;
  text-wrap: balance;
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub { margin-top: 26px; font-size: calc(20px * var(--type-scale)); color: var(--muted); max-width: 48ch; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-figure {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3.1; background: var(--navy-900);
  box-shadow: var(--shadow-md);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--navy); color: #fff;
  font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .12em;
  font-size: 13px; font-weight: 500; padding: 12px 18px;
}
.hero-tag b { color: var(--accent); }

/* ---------- Hero: illustrazione a tutta larghezza (LOOK A, default) ---------- */
.hero--bg { position: relative; }
.hero--bg .hero-bg-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero--bg .hero-grid {
  position: relative; z-index: 1;
  grid-template-columns: minmax(0, 600px);
  /* Piena finestra meno la navbar, esatta: col titolo limitato a 58px
     e i margini interni compattati, il testo ci sta fino ai laptop bassi. */
  height: calc(100vh - var(--nav-h));
  min-height: 520px;
}
.hero--bg .hero-copy {
  /* riquadro bianco semitrasparente: opacita regolabile dal pannello (campo hero_velo) */
  background: rgba(255,255,255, var(--hero-velo, .5));
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius);
}
/* Titolo piu contenuto qui che nel layout classico, per stare in 100vh */
.hero--bg .hero-title { font-size: clamp(34px, 4.6vw, 58px); }
.hero--bg .hero-sub { margin-top: 20px; }
.hero--bg .hero-actions { margin-top: 28px; }

/* Finestre basse (laptop ~720-820px): il testo dell'hero e' al limite.
   Si ancora il riquadro in alto invece di centrarlo e si comprimono i
   margini, cosi resta dentro i 100vh senza debordare sulla sezione sotto. */
@media (min-width: 981px) and (max-height: 860px) {
  .hero--bg .hero-grid { align-items: start; }
  .hero--bg .hero-copy { padding: clamp(20px, 2.4vw, 30px); }
  .hero--bg .hero-title { font-size: clamp(30px, 3.4vw, 46px); }
  .hero--bg .hero-sub { margin-top: 16px; }
  .hero--bg .hero-actions { margin-top: 22px; }
}
@media (max-width: 980px) {
  .hero--bg .hero-grid { grid-template-columns: 1fr; }
}

/* LOOK B hero — overlay knockout */
[data-theme="b"] .hero-grid { grid-template-columns: 1fr; min-height: min(90vh, 820px); }
[data-theme="b"] .hero-figure {
  position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto;
  z-index: 0; box-shadow: none;
}
[data-theme="b"] .hero-figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(4,45,70,.92) 0%, rgba(4,45,70,.7) 42%, rgba(4,45,70,.2) 100%);
}
[data-theme="b"] .hero-copy { position: relative; z-index: 1; max-width: 720px; padding-block: 40px; }
[data-theme="b"] .hero-title { color: #fff; font-size: clamp(42px, 7vw, 92px); }
[data-theme="b"] .hero-title em { color: var(--accent); }
[data-theme="b"] .hero-sub { color: rgba(255,255,255,.86); }
[data-theme="b"] .hero-tag { display: none; }

/* LOOK C hero — warm, full image card */
[data-theme="c"] .hero-figure { aspect-ratio: 4 / 3.4; }
[data-theme="c"] .hero-title { color: var(--navy); }

/* ============================================================ Numeri
   Sezione chiara: sta subito sotto l'hero, che ha gia' un'immagine
   a tutta larghezza. Il blocco scuro e' spostato su "Chi siamo".
   ============================================================ */
.numbers { background: var(--paper); color: var(--ink); }
.numbers .sec-title { color: var(--navy); }
.num-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.num-cell { background: var(--surface); padding: 30px clamp(20px,3vw,34px); }
.num-val {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(40px, 5.4vw, 66px); line-height: 1; color: var(--navy);
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px;
}
.num-val .suffix { color: var(--accent); font-size: .5em; }
.num-label { margin-top: 12px; font-size: 15px; color: var(--muted); letter-spacing: .01em; }
.num-foot { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.num-foot .chip { display: flex; align-items: baseline; gap: 10px; }
.num-foot .chip b { font-family: var(--ff-display); font-weight: 700; font-size: 30px; color: var(--accent); }
.num-foot .chip span { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================ Chi siamo */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-body p { margin: 0 0 18px; }
.about-body p:first-child { font-size: calc(20px * var(--type-scale)); color: var(--ink); }
.tagline-band {
  margin-top: 30px; padding: 22px 26px; border-left: 4px solid var(--accent);
  background: var(--surface-alt); border-radius: 0 var(--radius) var(--radius) 0;
}
.tagline-band b { font-family: var(--ff-display); letter-spacing: .01em; color: var(--navy); font-size: 18px; }
.tagline-band p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; gap: 12px; }
.gallery .ph:nth-child(1) { grid-row: span 2; }
.gallery .ph:nth-child(4) { grid-column: span 2; }

/* Riquadro logo (segnaposto in attesa delle foto) */
.gallery-logo {
  display: grid; place-items: center;
  min-height: clamp(280px, 34vw, 380px);
  padding: clamp(30px, 5vw, 56px);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.gallery-logo img { width: min(340px, 78%); height: auto; }

/* documenti */
.docs { margin-top: 46px; }
.docs h3 { font-size: 22px; letter-spacing: .01em; margin-bottom: 18px; color: var(--navy); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.doc-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.doc-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.doc-ico {
  flex: none; width: 38px; height: 46px; border-radius: 3px; position: relative;
  background: var(--navy); display: grid; place-items: center;
}
.doc-ico::after { content: "PDF"; font-family: var(--ff-display); font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.doc-card b { font-family: var(--ff-display); font-weight: 600; letter-spacing: .01em; color: var(--navy); font-size: 16px; line-height: 1.15; }
.doc-card span { display: block; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
.doc-card .dl { margin-left: auto; color: var(--muted); transition: color .2s, transform .2s; }
.doc-card:hover .dl { color: var(--accent); transform: translateY(2px); }

/* ============================================================ Progetti */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 26px); }
.proj-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.proj-card.is-wide { grid-column: span 2; }
.proj-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.proj-card.is-wide .proj-media { aspect-ratio: 21/7; }
.proj-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.proj-card:hover .proj-media img { transform: scale(1.04); }
.proj-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--accent); color: #fff;
  font-family: var(--ff-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; font-size: 12px; padding: 6px 12px; border-radius: 2px;
}
.proj-body { padding: 24px clamp(20px,2.4vw,30px) 26px; display: flex; flex-direction: column; flex: 1; }
.proj-body h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .005em; }
.proj-body p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.proj-stat { margin-top: 16px; display: flex; gap: 26px; }
.proj-stat .s b { font-family: var(--ff-display); font-weight: 700; font-size: 28px; color: var(--navy); display: block; line-height: 1; }
.proj-stat .s span { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.proj-link {
  margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; font-size: 14px; color: var(--navy);
}
.proj-link .arrow { color: var(--accent); }
.proj-link:hover { color: var(--accent); }
.proj-todo {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 13px; color: var(--muted); font-family: var(--ff-display);
  text-transform: uppercase; letter-spacing: .06em;
}
.proj-todo::before { content: "▣"; color: var(--accent); }

/* ============================================================ Testimonianza */
.testi { background: var(--navy); color: #fff; overflow: hidden; }
.testi-stage { position: relative; }
.testi-track { display: flex; transition: transform .55s cubic-bezier(.6,.02,.1,1); }
.testi-slide { min-width: 100%; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px,4vw,56px); align-items: center; }
.testi-photo { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow-md); }
.testi-photo img { width:100%; height:100%; object-fit: cover; }
.testi-quote { font-family: var(--ff-display); font-weight: 300; line-height: 1.18; font-size: clamp(26px, 3.6vw, 46px); color: #fff; letter-spacing: .005em; }
.testi-quote .mark { color: var(--accent); font-size: 1.4em; line-height: 0; }
.testi-by { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.testi-by .ln { width: 40px; height: 2px; background: var(--accent); }
.testi-by b { font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .05em; color: #fff; font-size: 18px; }
.testi-by span { color: rgba(255,255,255,.7); font-size: 14px; }
.testi-nav { margin-top: 38px; display: flex; align-items: center; gap: 16px; }
.testi-dots { display: flex; gap: 9px; }
.testi-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); padding: 0; transition: background .2s, width .2s; }
.testi-dots button.active { background: var(--accent); width: 26px; border-radius: 5px; }
.testi-arrows { margin-left: auto; display: flex; gap: 10px; }
.testi-arrows button {
  width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.32);
  background: transparent; color: #fff; display: grid; place-items: center; transition: background .2s, border-color .2s, color .2s;
}
.testi-arrows button:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ============================================================ In evidenza */
.evid-stage { position: relative; }
.evid-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
.evid-track::-webkit-scrollbar { display: none; }
.evid-card {
  scroll-snap-align: start; flex: 0 0 min(440px, 82%);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.evid-media { aspect-ratio: 3 / 2; position: relative; overflow: hidden; }
.evid-media img { width: 100%; height: 100%; object-fit: cover; }
.evid-media .proj-badge { background: var(--navy); color: #fff; }
.evid-body { padding: 24px 26px 28px; }
.evid-body h3 { font-size: 26px; }
.evid-body p { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; }
.evid-controls { margin-top: 30px; display: flex; align-items: center; gap: 14px; }
.evid-controls .bar { flex: 1; height: 3px; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.evid-controls .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; transition: left .4s ease, width .4s ease; }
.evid-controls button {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--navy); display: grid; place-items: center; transition: .2s;
}
.evid-controls button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ============================================================ Sostenerci */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px,2vw,24px); }
.support-card {
  padding: 30px clamp(22px,2.4vw,30px) 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .25s;
}
.support-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.support-card.feature { background: var(--navy); border-color: var(--navy); color: #fff; }
.support-card .tag { font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--accent-testo); font-weight: 600; }
.support-card h3 { margin-top: 12px; font-size: 28px; }
.support-card.feature h3 { color: #fff; }
.support-card p { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; }
.support-card.feature p { color: rgba(255,255,255,.82); }
.iban {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.34);
  font-family: var(--ff-display); letter-spacing: .04em; font-size: 17px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; word-break: break-all;
}
.iban button { background: var(--accent); color: #fff; border: 0; border-radius: 3px; padding: 7px 12px; font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; flex: none; white-space: nowrap; }
.iban { flex-wrap: wrap; }
.support-card .btn { margin-top: auto; align-self: flex-start; }
.support-card .support-link { margin-top: 18px; }

/* ============================================================ 5x1000 */
.cinque {
  background: var(--accent); color: var(--navy-900); position: relative; overflow: hidden;
}
.cinque::before {
  content: "5×1000"; position: absolute; right: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--ff-display); font-weight: 700; font-size: clamp(180px, 30vw, 460px);
  color: rgba(4,45,70,.06); line-height: .8; pointer-events: none; white-space: nowrap;
}
.cinque .wrap { position: relative; z-index: 1; }
.cinque-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.cinque .kicker { color: var(--navy-900); }
.cinque .kicker::before { background: var(--navy-900); }
.cinque h2 { color: var(--navy-900); font-size: clamp(34px, 5vw, 60px); text-transform: uppercase; line-height: .98; margin-top: 14px; }
.cinque p.s { margin-top: 16px; font-size: 19px; max-width: 44ch; color: var(--navy-700); }
.cf-box { text-align: right; }
.cf-box .cf-lab { font-family: var(--ff-display); text-transform: uppercase; letter-spacing: .18em; font-size: 15px; color: var(--navy-700); }
.cf-box .cf-num {
  font-family: var(--ff-display); font-weight: 700; line-height: .9;
  font-size: clamp(44px, 7vw, 96px); color: var(--navy-900); letter-spacing: .01em;
  font-variant-numeric: tabular-nums; margin-top: 6px;
}
.cf-box .cf-foot { margin-top: 12px; font-size: 15px; color: var(--navy-700); font-weight: 600; }

/* ============================================================ Footer */
.footer { background: var(--navy-900); color: #fff; padding-block: clamp(48px, 6vw, 72px) 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-brand img { height: 54px; margin-bottom: 18px; }
.foot-brand p { color: rgba(255,255,255,.7); font-size: 15px; max-width: 36ch; }
.foot-col h4 { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.foot-col a, .foot-col p { display: block; color: rgba(255,255,255,.72); font-size: 15px; margin-bottom: 10px; transition: color .2s; }
.foot-col a:hover { color: var(--accent-testo); }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 13.5px; color: rgba(255,255,255,.6);
}
.foot-bottom .links { display: flex; gap: 22px; }
.foot-bottom a:hover { color: #fff; }

/* ============================================================ Placeholder */
.ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(7,78,121,.05) 0 10px, rgba(7,78,121,.09) 10px 20px),
    var(--surface-alt);
  display: grid; place-items: center; color: var(--navy);
  border: 1px solid var(--line);
}
.ph::after {
  content: attr(data-label);
  font-family: "Hanken Grotesk", monospace; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(7,78,121,.55); text-align: center;
  padding: 8px 14px; border: 1px solid rgba(7,78,121,.22); border-radius: 100px;
  background: rgba(255,255,255,.6);
}
.ph.fill { width: 100%; height: 100%; }
.proj-media.ph, .evid-media.ph, .testi-photo.ph, .hero-figure.ph { border-radius: 0; }

/* ============================================================ Reveal anim */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================ Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; aspect-ratio: 16/10; }
  [data-theme="b"] .hero-figure { order: 0; }
  .about-grid, .testi-slide { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: repeat(2, 1fr); }
  .cinque-grid { grid-template-columns: 1fr; }
  .cf-box { text-align: left; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: span 2; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-burger { display: flex; }
  .proj-grid, .support-grid { grid-template-columns: 1fr; }
  .proj-card.is-wide { grid-column: auto; }
  .proj-card.is-wide .proj-media { aspect-ratio: 16/9; }
  .num-grid { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 110px; }
  .testi-photo { aspect-ratio: 16/10; }
}




/* ============================================================ Sezione su fondo blu
   Modificatore riusabile: .section.section--navy
   Oggi applicato a "Chi siamo" (Origini e legame con il territorio).
   ============================================================ */
.section--navy { background: var(--navy); color: #fff; }
.section--navy .sec-title { color: #fff; }
.section--navy .lead { color: rgba(255,255,255,.8); }

/* corpo del testo */
.section--navy .about-body p { color: rgba(255,255,255,.82); }
.section--navy .about-body p:first-child { color: #fff; }

/* riquadro evidenziato */
.section--navy .tagline-band {
  background: rgba(255,255,255,.08);
  border-left-color: var(--accent);
}
.section--navy .tagline-band b { color: #fff; }
.section--navy .tagline-band p { color: rgba(255,255,255,.78); }

/* documenti scaricabili */
.section--navy .docs h3 { color: #fff; }
.section--navy .doc-card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}
.section--navy .doc-card:hover {
  border-color: var(--accent);
  background: rgba(255,255,255,.11);
  box-shadow: none;
}
.section--navy .doc-card b { color: #fff; }
.section--navy .doc-card span { color: rgba(255,255,255,.7); }
.section--navy .doc-card .dl { color: rgba(255,255,255,.7); }
.section--navy .doc-card:hover .dl { color: #fff; }
.section--navy .doc-card.is-disabled { opacity: .7; }
.section--navy .doc-card.is-disabled:hover {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
}
.section--navy .doc-ico { background: var(--accent); }

/* colonna laterale: il riquadro resta chiaro, il logo ha il testo blu */
.section--navy .gallery-logo {
  background: #fff;
  border-color: rgba(255,255,255,.22);
}
.section--navy .about-figure { border-color: rgba(255,255,255,.22); }

/* segnaposto foto, se usati dentro una sezione scura */
.section--navy .ph {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 10px, rgba(255,255,255,.11) 10px 20px),
    rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
}
.section--navy .ph::after {
  color: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
}

/* ============================================================ Logo (lockup 3 righe) */
.nav-brand .nav-logo { height: 58px; width: auto; transition: height .3s ease; }
.nav.scrolled .nav-brand .nav-logo { height: 50px; }
.foot-brand .foot-logo { height: 66px; width: auto; margin-bottom: 18px; }
@media (max-width: 560px) { .nav-brand .nav-logo { height: 40px; } }

/* ============================================================ Consiglio */
.board-intro { max-width: 62ch; }
.board-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-top: clamp(30px, 4vw, 46px);
}
.board-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.board-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.board-avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 600; font-size: 17px; letter-spacing: .02em;
}
.board-card.is-president .board-avatar { background: var(--accent); color: #fff; }
/* Con foto: riempie il cerchietto (ripiego iniziali se assente, stile rubrica) */
.board-avatar--foto { background: var(--surface-alt); }
.board-avatar--foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-meta b {
  font-family: var(--ff-display); font-weight: 600;
  letter-spacing: .005em; color: var(--navy); font-size: 16px; line-height: 1.12; display: block;
}
.board-meta span { font-size: 13px; color: var(--muted); letter-spacing: .03em; }
@media (max-width: 900px) { .board-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .board-grid { grid-template-columns: 1fr; } }

/* Footer: indirizzi e PEC */
.foot-addr { line-height: 1.5; }
.foot-col .foot-pec { word-break: break-word; }

/* ============================================================ Aggiunte tema WordPress */

/* Accessibilita: link di salto al contenuto */
.screen-reader-text {
  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:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 20px; background: var(--navy); color: #fff;
  font-family: var(--ff-display); font-weight: 600; border-radius: var(--radius);
}

/* Immagine laterale di "Chi siamo" quando caricata dal pannello */
.about-figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.about-figure img { width: 100%; height: auto; display: block; }

/* Documento senza file allegato: visibile ma non cliccabile */
.doc-card.is-disabled { opacity: .55; }
.doc-card.is-disabled:hover { border-color: var(--line); transform: none; box-shadow: none; }

/* Menu mobile */
@media (max-width: 760px) {
  .nav[data-menu="open"] .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 22px var(--pad-x) 26px;
    background: rgba(255,255,255,.97);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav[data-menu="open"] .nav-links a { font-size: 17px; }
  .nav-burger span { transition: transform .2s ease, opacity .2s ease; }
  .nav[data-menu="open"] .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-menu="open"] .nav-burger span:nth-child(2) { opacity: 0; }
  .nav[data-menu="open"] .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Barra admin di WordPress: evita che copra la navbar fissa */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
