/* =========================================================================
   Un bambino per amico ODV — sistema di stili
   Palette: verde-fiume + giallo-sole + corallo, su carta calda
   Type: Fraunces (display) + Mulish (testo) + monospace (dati)
   ========================================================================= */

:root {
  /* colore */
  --paper:      #FCFAF5;
  --paper-2:    #F4EEE1;
  --paper-3:    #ECE3D2;
  --ink:        #21302C;
  --ink-soft:   #55635D;
  --teal:       #0E5A54;
  --teal-700:   #0A423E;
  --teal-900:   #06302C;
  --teal-100:   #DBEAE4;
  --sun:        #EFA733;
  --sun-deep:   #D98A1C;
  --coral:      #E0573C;
  --coral-deep: #C8402A;
  --line:       rgba(33,48,44,.14);
  --line-soft:  rgba(33,48,44,.08);

  /* tipografia */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    ui-monospace, "SFMono-Regular", "Cascadia Code", "Consolas", monospace;

  /* misura */
  --wrap: 1140px;
  --wrap-narrow: 760px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(33,48,44,.05), 0 14px 40px -22px rgba(33,48,44,.35);
  --shadow-lift: 0 2px 4px rgba(33,48,44,.06), 0 26px 60px -28px rgba(33,48,44,.45);
}

/* ---------- reset di base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-700); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 0;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.6rem, var(--wrap-narrow)); margin-inline: auto; }

section { padding-block: clamp(3.4rem, 2rem + 6vw, 6.5rem); }

.eyebrow {
  font-family: var(--body);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--sun);
  display: inline-block;
}

.lead { font-size: clamp(1.16rem, 1.05rem + 0.5vw, 1.42rem); color: var(--ink-soft); line-height: 1.5; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--teal);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  padding: .95rem 1.4rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn-donate { --btn-bg: var(--coral-deep); }
.btn-donate:hover { background: #A93123; }
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--teal);
  border-color: var(--teal);
}
.btn-ghost:hover { --btn-fg: #fff; background: var(--teal); }
.btn-lg { padding: 1.1rem 1.7rem; font-size: 1.05rem; }

.link-arrow {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .75rem;
}
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-logo { height: 68px; width: auto; display: block; flex: none; }
/* logo su targhetta chiara (footer, sfondo scuro) */
.brand-logo-chip {
  display: inline-block;
  background: #fff;
  padding: .8rem 1.1rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.brand-logo-chip img { height: 66px; width: auto; display: block; }
.brand-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.06rem;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 40, "SOFT" 50;
}
.brand-text em {
  display: block;
  font-style: normal;
  font-family: var(--body);
  font-weight: 700;
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: .35rem;
}
@media (max-width: 900px) { .brand-logo { height: 58px; } }
@media (max-width: 460px) { .brand-logo { height: 50px; } }

.brand { margin-right: auto; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex: none;
}
.lang-switch a {
  font-family: var(--body);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .04em;
  line-height: 1;
  padding: .34rem .56rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.lang-switch a[aria-current="true"] { background: var(--teal); color: #fff; }
.lang-switch a:hover:not([aria-current="true"]) { color: var(--teal); }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav > a:not(.btn) {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  padding: .5rem .7rem;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.site-nav > a:not(.btn):hover { background: var(--paper-2); color: var(--teal); }
.site-nav > a:not(.btn)[aria-current="page"] { color: var(--teal); }
.site-nav > a:not(.btn)[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--sun); border-radius: 2px;
}
.site-nav .btn { margin-left: .5rem; }

/* ---------- voce con sottomenu ("Cosa facciamo") ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  padding: .5rem .7rem;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.nav-item > a:hover { background: var(--paper-2); color: var(--teal); }
.nav-item > a[aria-current="page"] { color: var(--teal); }
.nav-item > a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--sun); border-radius: 2px;
}
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-left: -.35rem;
  padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: transform .2s ease, color .15s ease, background .15s ease;
}
.sub-toggle:hover { color: var(--teal); background: var(--paper-2); }
.nav-item.open > .sub-toggle { transform: rotate(180deg); color: var(--teal); }

.sub-menu {
  position: absolute;
  top: calc(100% + .45rem);
  left: 0;
  z-index: 60;
  min-width: 16rem;
  margin: 0;
  padding: .5rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-item:hover > .sub-menu,
.nav-item:focus-within > .sub-menu,
.nav-item.open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block;
  padding: .55rem .7rem;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.sub-menu a:hover { background: var(--paper-2); color: var(--teal); }
.sub-menu a[aria-current="page"] { color: var(--teal); background: var(--paper-2); }
@media (prefers-reduced-motion: reduce) { .sub-menu { transition: none; } }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px; height: 46px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; margin-inline: auto; background: var(--ink); transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    background: var(--paper);
    padding: 1rem 1.3rem 1.6rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-140%);
    transition: transform .28s ease;
    max-height: 80vh;
    overflow-y: auto;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav > a:not(.btn) { padding: .85rem .6rem; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .site-nav .btn { margin: .9rem 0 0; justify-content: center; }

  /* sottomenu: su telefono diventa un elenco rientrato, aperto dal pulsante */
  .nav-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .nav-item > a {
    flex: 1;
    padding: .85rem .6rem; font-size: 1.05rem; border-radius: 0;
  }
  .nav-item, .site-nav > a:not(.btn) { border-bottom: 1px solid var(--line-soft); }
  .nav-item > a { border-bottom: 0; }
  .sub-toggle { width: 44px; height: 44px; margin: 0; border-radius: 10px; }
  .sub-menu {
    position: static;
    order: 3;
    flex-basis: 100%;
    min-width: 0;
    margin: 0 0 .5rem;
    padding: .2rem 0 .2rem .6rem;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  /* Su schermo stretto il sottomenu si apre SOLO con il pulsante: niente hover
     né focus-within, che sul telefono restano attaccati dopo il tocco e — avendo
     specificità più alta — tenevano la tendina chiusa anche da aperta. */
  .nav-item.open > .sub-menu { display: block; }
  .sub-menu a { padding: .6rem .6rem; font-size: 1rem; white-space: normal; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  padding-block: clamp(3rem, 1rem + 8vw, 6rem) clamp(3.5rem, 2rem + 6vw, 6.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(239,167,51,.20), transparent 55%),
    radial-gradient(90% 80% at -10% 110%, rgba(14,90,84,.10), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.8rem);
  font-weight: 540;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  margin-bottom: .35em;
}
.hero h1 em {
  font-style: italic;
  color: var(--teal);
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
}
.hero .lead { max-width: 34ch; margin-bottom: 2rem; }
.hero-motto {
  max-width: 45ch;
  margin: -1rem 0 1.7rem;
  color: var(--teal);
  font-family: var(--display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.45;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-since {
  margin-top: 2.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.hero-since b {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  font-variation-settings: "opsz" 60, "SOFT" 50;
}

/* firma: illustrazione a filo continuo */
.hero-art { position: relative; }
.thread-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #fff, var(--paper-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  display: grid;
  place-items: center;
}
.thread-card svg { width: 100%; height: auto; overflow: visible; }
.thread-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thread-node { fill: var(--sun); }
.thread-heart { fill: var(--coral); }
.thread-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  fill: var(--ink-soft);
  text-transform: uppercase;
}

/* animazione di disegno */
.draw { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.is-ready .draw { animation: draw 2.4s cubic-bezier(.6,.05,.2,1) forwards; }
.is-ready .pop { animation: pop .5s ease forwards; opacity: 0; }
.pop { opacity: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .draw { stroke-dashoffset: 0; }
  .pop { opacity: 1; }
  .is-ready .draw, .is-ready .pop { animation: none; }
  .is-ready .pop { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; margin: 1.4rem auto 0; }
  .hero .lead { max-width: none; }
}

/* =========================================================================
   BANDS & SEZIONI
   ========================================================================= */
/* foto in evidenza (home) */
.photo-feature { margin: 0; }
.photo-feature img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
}
.photo-feature figcaption {
  margin: 1rem auto 0;
  max-width: 68ch;
  text-align: center;
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.photo-feature figcaption strong { color: var(--ink); }

/* ---------- foto: griglia, coppie, affiancate al testo ---------- */
/* griglia di foto con didascalia sotto */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(1rem, .6rem + 1.4vw, 1.8rem);
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  /* senza height:auto gli attributi width/height dell'HTML vincono sull'aspect-ratio
     e la foto viene renderizzata alta quanto l'originale (es. 1600px) */
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper-2);
  transition: transform .35s ease, box-shadow .35s ease;
}
.gallery figure:hover img { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.gallery figcaption {
  margin-top: .7rem;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.gallery figcaption strong { display: block; color: var(--ink); font-weight: 700; }
/* foto verticali: la griglia le tiene alte senza tagliarle troppo */
.gallery figure.tall img { aspect-ratio: 3 / 4; }
/* foto che occupa due colonne */
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 16 / 9; }
@media (max-width: 620px) {
  .gallery figure.wide { grid-column: auto; }
  .gallery figure.wide img { aspect-ratio: 4 / 3; }
}

/* Galleria editoriale: formati originali su desktop, carosello su mobile */
.gallery-page .page-hero { padding-bottom: clamp(2rem, 4vw, 3.2rem); }
.gallery-page .page-hero .lead { max-width: 68ch; }
.gallery-jump {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1.6rem;
}
.gallery-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .62rem 1rem;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal-deep);
  background: rgba(255,255,255,.58);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.gallery-jump a:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }
.gallery-collection { scroll-margin-top: 100px; }
.gallery-page .gallery {
  display: block;
  columns: 3 280px;
  column-gap: clamp(1rem, 2vw, 1.4rem);
}
.gallery-page .gallery figure,
.gallery-page .gallery figure.wide,
.gallery-page .gallery figure.tall {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(1rem, 2vw, 1.4rem);
  overflow: hidden;
  break-inside: avoid;
  grid-column: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  vertical-align: top;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-page .gallery figure::after {
  content: "+";
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  background: rgba(6,48,44,.78);
  color: #fff;
  font: 700 1.25rem/1 var(--body);
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(6,48,44,.2);
}
.gallery-page .gallery figure:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.gallery-page .gallery img,
.gallery-page .gallery figure.wide img,
.gallery-page .gallery figure.tall img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: var(--paper-2);
  box-shadow: none;
  transition: transform .35s ease;
}
.gallery-page .gallery figure:hover img { transform: scale(1.018); box-shadow: none; }
.gallery-page .gallery figcaption {
  position: relative;
  margin: 0;
  padding: .9rem 1rem 1rem;
  color: var(--ink-soft);
  background: #fff;
  font-size: .86rem;
  line-height: 1.45;
}
.gallery-page .gallery figcaption strong {
  display: block;
  margin-bottom: .2rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.2;
}
.gallery-page .gallery img:focus-visible {
  outline: 4px solid var(--sun);
  outline-offset: -5px;
}

@media (max-width: 700px) {
  .gallery-page .page-hero { padding-bottom: 1.5rem; }
  .gallery-page .page-hero h1 { font-size: clamp(2.35rem, 12vw, 3.15rem); }
  .gallery-jump {
    flex-wrap: nowrap;
    margin-inline: -1.3rem;
    padding: 0 1.3rem .45rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .gallery-jump a { flex: 0 0 auto; scroll-snap-align: start; }
  .gallery-page .gallery {
    display: flex;
    gap: 1rem;
    margin-inline: -1.3rem;
    padding: .15rem 1.3rem 1rem;
    overflow-x: auto;
    columns: auto;
    scroll-padding-inline: 1.3rem;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--teal) var(--paper-2);
    -webkit-overflow-scrolling: touch;
  }
  .gallery-page .gallery figure,
  .gallery-page .gallery figure.wide,
  .gallery-page .gallery figure.tall {
    flex: 0 0 min(84vw, 370px);
    margin: 0;
    scroll-snap-align: center;
  }
  .gallery-page .gallery img,
  .gallery-page .gallery figure.wide img,
  .gallery-page .gallery figure.tall img {
    height: clamp(250px, 68vw, 315px);
    object-fit: contain;
  }
  .gallery-page .section-head { margin-bottom: 1.25rem; }
  .gallery-page .section-head h2 { font-size: clamp(1.8rem, 9vw, 2.45rem); }
  .gallery-page .section-head .lead { font-size: 1rem; }
  .gallery-page .gallery-collection { padding-block: 3.1rem; }
  .gallery-page .gallery-collection[style] { padding-top: 0 !important; }
}

/* coppia di foto affiancate dentro una sezione di testo */
.photo-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
}
.photo-pair figure { margin: 0; }
.photo-pair img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.photo-pair figcaption { margin-top: .6rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }

/* foto singola dentro il testo, angoli e ombra coerenti */
.photo-inline { margin: 1.8rem 0; }
.photo-inline img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.photo-inline figcaption { margin-top: .7rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.photo-inline figcaption strong { color: var(--ink); }

/* immagine nella colonna media di .split */
.media-frame { margin: 0; }
.media-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.media-frame figcaption { margin-top: .8rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }

/* nota sulle immagini (crediti / tutela) */
.photo-note {
  margin-top: 1.6rem;
  font-size: .86rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--sun);
  padding-left: .9rem;
}

/* ---------- lightbox (ingrandisci la foto al clic) ---------- */
.gallery img, .photo-pair img, .photo-inline img, .photo-feature img, .media-frame img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 3rem);
  background: rgba(6,48,44,.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: .9rem; }
.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
  cursor: default;
  touch-action: pan-y;
}
.lightbox figcaption { color: #DCE9E5; font-size: .95rem; text-align: center; line-height: 1.5; }
.lightbox figcaption strong { color: #fff; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0 0 .15rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: 400 2.3rem/1 var(--body);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.lightbox-prev { left: clamp(.6rem, 2vw, 2rem); }
.lightbox-next { right: clamp(.6rem, 2vw, 2rem); }
.lightbox-nav:hover, .lightbox-nav:focus-visible { background: rgba(255,255,255,.24); }
.lightbox-counter {
  position: absolute;
  top: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  color: #fff;
  font: 700 .8rem/1 var(--body);
  letter-spacing: .08em;
}
@media (max-width: 700px) {
  .lightbox { padding: 3.8rem .65rem 1.2rem; }
  .lightbox img { max-height: 68vh; }
  .lightbox figure { gap: .6rem; }
  .lightbox figcaption { padding-inline: 3rem; font-size: .82rem; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 2rem; }
  .lightbox-prev { left: .5rem; }
  .lightbox-next { right: .5rem; }
}

/* link social nel footer */
.footer-social { margin-top: 1.1rem; }
.footer-social a { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .92rem; }
.footer-social svg { width: 18px; height: 18px; flex: none; }

.band-sand { background: var(--paper-2); }
.band-teal {
  background: var(--teal-900);
  color: #EAF3F0;
  background-image: radial-gradient(80% 120% at 100% 0%, rgba(239,167,51,.14), transparent 55%);
}
.band-teal h1, .band-teal h2, .band-teal h3 { color: #fff; }
.band-teal .eyebrow { color: #F6C56F; }
.band-teal .lead { color: #C3D8D2; }
.band-teal a:not(.btn) { color: var(--sun); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 1rem + 3vw, 3.2rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }

/* =========================================================================
   CARD — cosa facciamo
   ========================================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--teal-100);
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.32rem; margin-bottom: .4rem; }
.card p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1.1rem; }
.card .link-arrow { margin-top: auto; }
.card.accent .card-icon { background: color-mix(in srgb, var(--sun) 26%, transparent); color: var(--sun-deep); }
.card.coral .card-icon  { background: color-mix(in srgb, var(--coral) 20%, transparent); color: var(--coral-deep); }

/* =========================================================================
   STORIA / SPLIT
   ========================================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
.split.narrow-media { grid-template-columns: 1.15fr .85fr; }
@media (max-width: 820px) { .split, .split.narrow-media { grid-template-columns: 1fr; } }

.quote-panel {
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 1rem + 3vw, 3rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.quote-panel::after {
  content: "“";
  position: absolute;
  top: -.3em; right: .1em;
  font-family: var(--display);
  font-size: 12rem;
  line-height: 1;
  color: rgba(255,255,255,.10);
}
.quote-panel h3 { color: #fff; }
.quote-panel blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  font-weight: 400;
  line-height: 1.32;
  font-variation-settings: "opsz" 60, "SOFT" 60, "WONK" 1;
}
.quote-panel cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--body);
  font-style: normal;
  font-weight: 700;
  font-size: .92rem;
  color: var(--sun);
}

/* =========================================================================
   STAT ROW
   ========================================================================= */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-top: 2.4rem;
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.2rem);
  font-weight: 580;
  line-height: 1;
  color: var(--teal);
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.band-teal .stat b { color: var(--sun); }
.stat span { display: block; margin-top: .5rem; font-size: .92rem; color: var(--ink-soft); }
.band-teal .stat span { color: #A9C4BD; }

/* =========================================================================
   TIMELINE — spina a filo
   ========================================================================= */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--sun), var(--teal));
  border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 2rem 3.2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 4px; top: 5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--teal);
}
.tl-item.hot::before { border-color: var(--coral); background: var(--coral); }
.tl-year {
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--sun-deep);
  margin-bottom: .2rem;
}
.tl-item h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.tl-item p { color: var(--ink-soft); margin: 0; }
.band-teal .tl-item::before { background: var(--teal-900); }
.band-teal .tl-year { color: var(--sun); }
.band-teal .tl-item p { color: #B9D0CB; }

/* =========================================================================
   ADOZIONI — piani
   ========================================================================= */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.3rem;
  align-items: stretch;
}
.tier {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tier.featured { border-color: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent), var(--shadow); }
.tier-badge {
  align-self: flex-start;
  font-family: var(--body);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sun-deep);
  background: color-mix(in srgb, var(--sun) 22%, transparent);
  padding: .3rem .6rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.tier h3 { font-size: 1.28rem; margin-bottom: .6rem; }
.tier .price {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.tier .price small { font-family: var(--body); font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.tier ul { list-style: none; margin: 1.3rem 0 1.6rem; padding: 0; display: grid; gap: .6rem; }
.tier li { position: relative; padding-left: 1.7rem; font-size: .98rem; color: var(--ink-soft); }
.tier li::before {
  content: "";
  position: absolute; left: 0; top: .35em;
  width: 12px; height: 12px;
  background: var(--teal);
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}
.tier .btn { margin-top: auto; justify-content: center; }

/* =========================================================================
   FORM
   ========================================================================= */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1rem + 2vw, 2.6rem);
  box-shadow: var(--shadow);
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .84rem; color: var(--ink-soft); margin-top: 1rem; }
.consent-field label { display: flex; align-items: flex-start; gap: .65rem; font-weight: 500; line-height: 1.5; }
.consent-field input { width: 1.15rem; height: 1.15rem; flex: none; margin-top: .18rem; padding: 0; accent-color: var(--teal); }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   DATI / BOX INFO (contatti, IBAN)
   ========================================================================= */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.info-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.info-card p { margin: 0 0 .3rem; color: var(--ink-soft); }
.data { font-family: var(--mono); font-size: .95rem; color: var(--ink); letter-spacing: .01em; word-break: break-word; }
.data-block {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-top: .8rem;
}
.copy-row { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: .9rem; }
.copy-row .btn { white-space: normal; }
.copy-feedback { min-height: 1.4em; color: var(--teal); font-weight: 700; font-size: .86rem; }
.copy-feedback[hidden] { display: none; }

.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.trust-item { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.trust-item h3 { font-size: 1.15rem; }
.document-list { display: grid; gap: .8rem; margin-top: 1.2rem; }
.document-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.document-item p { margin: 0; }
.map-card { padding: clamp(1.6rem, 1rem + 2vw, 2.6rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper-2); box-shadow: var(--shadow); }
.status-note { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.status-note::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--sun-deep); }

/* people / direttivo */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.person {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
}
.person .avatar {
  width: 64px; height: 64px; margin: 0 auto .8rem;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}
.person b { display: block; font-size: 1.05rem; }
.person span { font-size: .86rem; color: var(--ink-soft); }

/* =========================================================================
   TABELLA TRASPARENZA
   ========================================================================= */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.report { width: 100%; border-collapse: collapse; background: var(--paper); min-width: 520px; }
table.report caption {
  text-align: left;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 560;
  padding: 1.1rem 1.2rem;
  color: var(--ink);
}
table.report th, table.report td { padding: .8rem 1.2rem; text-align: left; border-top: 1px solid var(--line-soft); }
table.report thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); background: var(--paper-2); }
table.report td.num, table.report th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
table.report tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
table.report tfoot .num { color: var(--teal); }

.year-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.year-nav a {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .9rem;
  padding: .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}
.year-nav a:hover { border-color: var(--teal); color: var(--teal); }

/* =========================================================================
   NOTIZIE
   ========================================================================= */
.news-list { display: grid; gap: 1.2rem; }
.news-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.news-date {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--sun-deep);
  font-weight: 600;
  white-space: nowrap;
  padding-top: .2rem;
}
.news-item h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.news-item p { color: var(--ink-soft); margin: 0; }
@media (max-width: 560px) { .news-item { grid-template-columns: 1fr; gap: .4rem; } }

/* =========================================================================
   CTA finale
   ========================================================================= */
.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); max-width: 18ch; margin-inline: auto; }
.cta-final .lead { max-width: 52ch; margin: 0 auto 2rem; }
.cta-final .hero-cta { justify-content: center; }

/* =========================================================================
   PAGE HERO (interne)
   ========================================================================= */
.page-hero { padding-block: clamp(2.6rem, 1.5rem + 4vw, 4.6rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.page-hero h1 { font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.8rem); font-variation-settings: "opsz" 120, "SOFT" 30; }
.page-hero .lead { max-width: 60ch; margin-top: .6rem; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--teal); }

/* prose */
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-top: 2.2rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6rem; }
.prose > *:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
main p a:not(.btn):not(.link-arrow), main li a:not(.btn):not(.link-arrow) {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--teal-900);
  color: #C3D8D2;
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
}
.site-footer h4 { color: #fff; font-family: var(--body); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #C3D8D2; }
.site-footer a:hover { color: var(--sun); }
.footer-brand .brand-text { color: #fff; }
.footer-brand .brand-text em { color: var(--sun); }
.footer-brand p { margin-top: 1rem; font-size: .92rem; max-width: 34ch; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-data { font-family: var(--mono); font-size: .82rem; line-height: 1.7; color: #9FBBB4; }
.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  justify-content: space-between;
  font-size: .82rem;
  color: #8FAAA3;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   FOCUS / A11y
   ========================================================================= */
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--teal); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 10px 10px;
  z-index: 100; transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* reveal on scroll */
.reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
