/* ==========================================================================
   Associazione Culturale Indaco — foglio di stile
   Palette derivata dal sito originale: inchiostro #1c222a, blu #219cd2
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 500 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Cifre di Archivo nel testo corrente: lo zero barrato di Atkinson
   resta solo dove serve leggibilità assoluta (dati bancari). */
@font-face {
  font-family: "Indaco Digits";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100%;
  unicode-range: U+0030-0039;
  font-display: swap;
}

:root {
  --ink: #1c222a;          /* header e footer del sito originale */
  --ink-2: #2a323d;
  --blue: #219cd2;         /* colore primario del sito originale */
  --blue-deep: #146e96;    /* variante per testo e link su bianco (AA) */
  --blue-pale: #e6f3fa;
  --paper: #ffffff;
  --mist: #f1f5f8;
  --text: #27303b;
  --muted: #56616e;
  --line: #d8e0e7;
  --on-ink: #e9eef2;
  --on-ink-muted: #a9b4bf;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Indaco Digits", "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.889rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.6vw, 5rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 72rem;
  --radius: 6px;
  --header-h: 4.5rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 64em) { body { font-size: 1.125rem; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 78%;
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; font-stretch: 72%; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); font-stretch: 85%; font-weight: 700; line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }
.measure { max-width: 38em; }
.lead { font-size: var(--step-1); line-height: 1.55; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 0.75rem 1rem; border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  font-family: var(--font-display); font-stretch: 90%; font-weight: 700; font-size: 1.0625rem;
  line-height: 1.1; text-decoration: none; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--blue); color: var(--ink); }
.btn--primary:hover { background: #4fb3df; }
.btn--ghost { border-color: currentColor; color: var(--on-ink); background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--outline { border-color: var(--blue-deep); color: var(--blue-deep); background: transparent; }
.btn--outline:hover { background: var(--blue-pale); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--sm { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header__bar {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: block; flex: 0 0 auto; padding-block: 0.6rem; }
.brand img { width: clamp(8.5rem, 22vw, 11.5rem); height: auto; }

.nav { margin-left: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav__list a {
  display: block; padding: 0.6rem 0.85rem;
  color: var(--on-ink); text-decoration: none;
  font-family: var(--font-display); font-stretch: 90%; font-weight: 600; font-size: 1.0625rem;
  border-radius: var(--radius);
}
.nav__list a:hover { background: rgba(255,255,255,.07); }
.nav__list a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--blue); border-radius: 0; }
.header-cta { flex: 0 0 auto; }

.menu-toggle {
  display: none;
  align-items: center; justify-content: center; gap: .5rem;
  min-width: 3rem; min-height: 3rem; padding: 0 .75rem;
  background: transparent; color: var(--on-ink);
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius);
  font: 600 1rem var(--font-body); cursor: pointer;
}
.menu-toggle__icon, .menu-toggle__icon::before, .menu-toggle__icon::after {
  display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle__icon { position: relative; }
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle__icon::before { top: -6px; }
.menu-toggle__icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 56em) {
  .menu-toggle { display: inline-flex; order: 3; }
  .header-cta { margin-left: auto; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 16px 32px rgba(0,0,0,.25);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1.25rem; }
  .nav__list a { padding: 0.95rem 0.25rem; font-size: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
  .nav__list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--blue); padding-left: 1rem; }
  /* senza JS il menu resta sempre visibile */
  .no-js .nav { position: static; display: block; box-shadow: none; }
  .no-js .menu-toggle { display: none; }
  .no-js .site-header__bar { flex-wrap: wrap; }
}
@media (max-width: 22em) {
  .menu-toggle__label { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem);
  overflow: hidden;
}
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 60em) { .hero__grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { color: #fff; margin-bottom: 0.35em; }
.hero h1 .hero__line { display: block; }
.hero h1 .hero__line--blue { color: var(--blue); }
.hero .lead { color: var(--on-ink); max-width: 32em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* collage foto: due immagini sovrapposte come stampe appoggiate */
.collage { position: relative; aspect-ratio: 5 / 4.4; max-width: 36rem; width: 100%; margin-inline: auto; }
.collage figure { margin: 0; position: absolute; overflow: hidden; border-radius: var(--radius); }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage__a { inset: 0 18% 26% 0; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.collage__b { inset: 38% 0 0 46%; border: 6px solid var(--ink); }
.collage__a img { object-position: 50% 35%; }

/* pennellata di colore: firma visiva tra hero e contenuto */
.stroke {
  display: block; height: 10px; width: 100%;
  background: linear-gradient(90deg,
    #e84d3d 0 14.28%, #f39c32 0 28.57%, #f6d04d 0 42.85%,
    #5dbb63 0 57.14%, var(--blue) 0 71.42%, #3f51b5 0 85.71%, #8e44ad 0);
}

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--mist { background: var(--mist); }
.section--blue { background: var(--blue); color: var(--ink); }
.section--blue h2 { color: var(--ink); }
.section__head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 40em; }
.section__head p { color: var(--muted); font-size: var(--step-1); margin: 0; }

.split { display: grid; gap: 2rem 4rem; }
@media (min-width: 52em) { .split { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }

.link-more { font-weight: 700; display: inline-block; margin-top: 0.5rem; }

/* ---------- Pagine interne ---------- */
.page-head {
  background: var(--ink); color: var(--on-ink);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
}
.page-head h1 { color: #fff; font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4rem); margin-bottom: 0.3em; }
.page-head p { color: var(--on-ink); margin: 0; max-width: 36em; font-size: var(--step-1); }
.breadcrumb { font-size: var(--step--1); margin-bottom: 1rem; color: var(--on-ink-muted); }
.breadcrumb a { color: var(--on-ink); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--on-ink-muted); }

.prose { max-width: 38em; }
.prose p:first-child { font-size: var(--step-1); line-height: 1.55; color: var(--ink); }

/* ---------- Progetti: timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 0.6rem; bottom: 0.6rem; left: 0.45rem;
  width: 2px; background: var(--line);
}
.timeline__item { position: relative; padding-left: 2.25rem; padding-bottom: 2.25rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 0; top: 0.45rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--blue);
}
.timeline__item--active::before { background: var(--blue); }
.timeline__when {
  font-family: var(--font-display); font-stretch: 85%; font-weight: 700;
  color: var(--blue-deep); font-size: 1rem; margin: 0 0 .25rem;
}
.timeline__item h3 { margin-bottom: 0.3em; }
.timeline__item p { margin: 0 0 .4rem; max-width: 40em; }
.timeline__place { color: var(--muted); font-size: var(--step--1); }
.badge {
  display: inline-block; margin-top: .5rem;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--blue-pale); color: var(--blue-deep);
  font-size: var(--step--1); font-weight: 700; line-height: 1.3;
}
@media (min-width: 48em) {
  .timeline::before { left: 7.45rem; }
  .timeline__item { display: grid; grid-template-columns: 6.25rem 1fr; gap: 0 3rem; padding-left: 0; }
  .timeline__item::before { left: 7rem; }
  .timeline__when { text-align: right; padding-top: .35rem; }
}

/* ---------- Donazione ---------- */
.donate-band { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52em) { .donate-band { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }
.donate-band p { font-size: var(--step-1); line-height: 1.5; }

.bank {
  background: var(--paper); color: var(--text);
  border-radius: calc(var(--radius) * 2);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(28,34,42,.08);
  border: 1px solid var(--line);
}
.bank h2, .bank h3 { font-size: var(--step-2); margin-bottom: 1rem; }
.bank dl { margin: 0; display: grid; gap: 0; }
.bank__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem;
  padding: .8rem 0; border-top: 1px solid var(--line);
}
.bank__row:first-child { border-top: 0; padding-top: 0; }
.bank dt { color: var(--muted); font-size: var(--step--1); flex: 1 0 100%; }
.bank dd { font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif; margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-btn {
  min-height: 2.25rem; padding: .3rem .8rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--mist); color: var(--blue-deep);
  font: 700 .9rem var(--font-body); cursor: pointer;
}
.copy-btn:hover { border-color: var(--blue-deep); }
.copy-btn[data-copied] { background: var(--blue-pale); }

.tax-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.tax-list li {
  background: var(--paper); border-left: 4px solid var(--blue);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.tax-list strong { color: var(--ink); }
.tax-list small { display: block; color: var(--muted); margin-top: .35rem; font-size: var(--step--1); }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 52em) { .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.contact-mail {
  display: inline-block; font-family: var(--font-display); font-stretch: 80%; font-weight: 760;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.5rem); line-height: 1.1; overflow-wrap: anywhere;
  color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 3px;
}
.contact-mail:hover { color: var(--blue-deep); }
.info-card { background: var(--mist); border-radius: calc(var(--radius) * 2); padding: clamp(1.25rem, 3vw, 2rem); }
.info-card h2 { font-size: var(--step-2); }
.info-card address { font-style: normal; margin-bottom: 1rem; }

/* ---------- Sponsor ---------- */
.sponsors__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
@media (max-width: 30em) {
  /* su telefono: due colonne compatte + la terza centrata, tutte sempre visibili */
  .sponsors__grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .sponsors__grid li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - .375rem); }
}
.sponsor { margin: 0; }
.sponsor__logo {
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
}
.sponsor__logo img { width: 100%; height: 100%; object-fit: cover; }
.sponsor figcaption { margin-top: .6rem; font-size: var(--step--1); line-height: 1.35; }
.sponsor figcaption strong { display: block; color: var(--ink); font-size: 1rem; }
.sponsor figcaption span { color: var(--muted); }
.sponsors__note { margin-top: 2rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding-block: 3.5rem 2rem; font-size: 1rem; }
.site-footer a { color: var(--on-ink); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 {
  color: #fff; font-size: 1.125rem; font-stretch: 90%; margin-bottom: .75rem;
}
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-logo { width: 11rem; margin-bottom: 1rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: var(--step--1);
}

/* ---------- Motion: un solo momento d'ingresso nell'hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero__text > *:nth-child(2) { animation-delay: .08s; }
  .hero__text > *:nth-child(3) { animation-delay: .16s; }
  .collage__a { animation: rise .9s .1s cubic-bezier(.2,.7,.2,1) both; }
  .collage__b { animation: rise .9s .25s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media print {
  .site-header, .hero__actions, .menu-toggle, .copy-btn { display: none !important; }
  .hero, .page-head, .site-footer { background: none; color: #000; }
}

.photo { margin: 0; max-width: 30rem; }
.photo img { border-radius: var(--radius); width: 100%; }
