/* ==========================================================================
   Museo Scientifico Sanguineti Leonardini — foglio di stile unico
   Nessun font o file esterno: tutto viene servito dal sito stesso.
   Colori presi dal logo: grafite #1a1e1d e giallo #eed444.
   ========================================================================== */

:root {
  --ink: #1a1e1d;
  --ink-2: #3a3a3a;
  --muted: #565b59;
  --paper: #fbf8f1;
  --paper-2: #f2ecdd;
  --white: #fff;
  --line: #e4dcc7;
  --brand: #eed444;
  --brand-soft: #f7ecaa;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(26, 30, 29, 0.06), 0 10px 28px rgba(26, 30, 29, 0.09);
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--brand); border-radius: 6px; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }
p.center { margin-top: 2.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px; text-decoration: none; font-weight: 700; transition: top 0.2s; }
.skip-link:focus { top: 1rem; }

.icon { display: inline-block; vertical-align: -0.22em; width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 2px solid var(--ink);
  font: inherit; font-weight: 700; line-height: 1.15; text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn small { font-weight: 500; opacity: 0.75; }
.btn--primary { background: var(--brand); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 rgba(26, 30, 29, 0.35); }
.btn--dark:hover { box-shadow: 5px 5px 0 rgba(26, 30, 29, 0.35); }
.btn--light { background: #fff; color: var(--ink); }
.btn--ghost, .btn--ghost-dark { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost:hover, .btn--ghost-dark:hover { background: var(--ink); color: #fff; box-shadow: none; transform: none; }

.badge-free {
  display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1.1rem;
  padding: 0.4rem 0.95rem 0.4rem 0.7rem; border-radius: 999px;
  background: var(--brand); color: var(--ink); font-weight: 800; font-size: 0.92rem; letter-spacing: 0.02em;
}
.badge-free--footer { margin: 1rem 0 0; }

.eyebrow { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.8rem; }
.eyebrow--light { color: var(--brand); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.lead--light { color: #d9d9d3; }
.textlink { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--brand); }
.textlink:hover { text-decoration-color: var(--ink); }
.linklike { font: inherit; background: none; border: 0; padding: 0.3rem 0; color: var(--ink); font-weight: 700; display: inline-flex; gap: 0.5rem; align-items: center; cursor: pointer; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.linklike[hidden] { display: none; }
.linklike.is-done { color: #14602b; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); transition: box-shadow 0.25s; }
/* Lo sfondo sfocato sta in un pseudo-elemento: backdrop-filter sull'header stesso renderebbe il menu mobile (position: fixed) prigioniero dell'header. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(251, 248, 241, 0.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(26, 30, 29, 0.1); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { height: 62px; width: auto; }

.nav__list { display: flex; align-items: center; gap: 0.2rem; list-style: none; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.65rem 1rem; border-radius: 999px;
  font: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.nav-link:hover, .has-dropdown.is-open > .nav-link { background: var(--paper-2); }
.nav-link[aria-current="page"], .has-dropdown.is-current > .nav-link { box-shadow: inset 0 -3px 0 var(--brand); border-radius: 12px 12px 6px 6px; }
.nav-link--cta { background: var(--brand); border: 2px solid var(--ink); padding: 0.5rem 1.2rem; margin-left: 0.4rem; box-shadow: 2px 2px 0 var(--ink); }
.nav-link--cta:hover { background: var(--brand); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.nav-link--cta[aria-current="page"] { box-shadow: 2px 2px 0 var(--ink); border-radius: 999px; }
.nav-link__chev { width: 1em; height: 1em; transition: transform 0.2s var(--ease); }
.has-dropdown.is-open > .nav-link .nav-link__chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; list-style: none; padding: 0.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: none;
}
.dropdown::before { content: ""; position: absolute; inset: -10px 0 auto 0; height: 10px; }
.has-dropdown.is-open > .dropdown { display: block; animation: pop 0.18s var(--ease); }
.dropdown a { display: block; padding: 0.7rem 0.9rem; border-radius: 10px; text-decoration: none; font-weight: 600; }
.dropdown a:hover { background: var(--brand-soft); }
.dropdown a[aria-current="page"] { background: var(--brand); }

.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* Senza JavaScript i menu a tendina si aprono al passaggio/focus */
html:not(.js) .has-dropdown:hover > .dropdown,
html:not(.js) .has-dropdown:focus-within > .dropdown { display: block; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(26, 30, 29, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 30, 29, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__copy h1 { margin-bottom: 0.45em; }
.hl { background: linear-gradient(transparent 60%, var(--brand) 60% 90%, transparent 90%); padding-inline: 0.06em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 2rem; }
.hero__facts { list-style: none; display: grid; gap: 0.6rem; }
.hero__facts li { display: flex; align-items: center; gap: 0.7rem; font-weight: 600; color: var(--ink-2); }
.hero__facts .icon { color: var(--ink); background: var(--brand); border-radius: 50%; padding: 0.38rem; width: 2.1rem; height: 2.1rem; box-sizing: border-box; }
.hero__media { position: relative; margin: 0; isolation: isolate; }
.hero__media::before { content: ""; position: absolute; inset: 20px -20px -20px 20px; background: var(--brand); border-radius: 26px; z-index: -1; }
.hero__media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 24px; border: 2px solid var(--ink); }
.hero__trace { position: absolute; left: 2px; right: 2px; bottom: 2px; height: 38%; border-radius: 0 0 22px 22px; overflow: hidden; background: linear-gradient(to top, rgba(26, 30, 29, 0.82), rgba(26, 30, 29, 0)); }
.hero__trace .seismo { position: absolute; inset: 0; }

.hero__copy > * { animation: rise 0.8s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.08s; }
.hero__copy > :nth-child(3) { animation-delay: 0.16s; }
.hero__copy > :nth-child(4) { animation-delay: 0.24s; }
.hero__copy > :nth-child(5) { animation-delay: 0.32s; }
.hero__media { animation: rise 0.9s 0.2s var(--ease) both; }

/* ------------------------------------------------------------- sismografo */
.seismo { width: 100%; height: 100%; display: block; }
.seismo__base { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 6; }
.seismo__line { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 9s ease-in-out infinite; }

/* --------------------------------------------------------------- sezioni */
.section { padding-block: clamp(3.2rem, 7vw, 6rem); }
.section--tight { padding-block: 2rem; }
.section--tinted { background: var(--paper-2); }
.section-head { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3.2rem); text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head .lead { margin-inline: auto; }
.section-head--left .lead { margin-inline: 0; }

/* ------------------------------------------------------------------ card */
.cards { display: grid; gap: 1.4rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column; padding: 1.8rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 1px 2px rgba(26, 30, 29, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--ink); }
.card p { color: var(--ink-2); flex: 1; }
.card__icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: var(--ink); margin-bottom: 1.1rem; flex: none; }
.card__icon .icon { width: 28px; height: 28px; }
.card__link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; text-decoration: none; margin-top: 0.4rem; }
.card__link .icon { transition: transform 0.2s var(--ease); }
.card:hover .card__link .icon { transform: translateX(5px); }
.card__link:hover { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card--featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.card--featured p { color: #d9d9d3; }
.card--featured h3 { color: #fff; }
.card--featured:hover { border-color: var(--brand); }
.card__tag { position: absolute; top: -0.85rem; left: 1.4rem; background: var(--brand); color: var(--ink); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.3rem 0.8rem; border-radius: 999px; border: 2px solid var(--ink); }

/* ---------------------------------------------------------- banda scuole */
.school-band { background: var(--ink); color: #fff; padding-block: clamp(3rem, 6vw, 5rem); }
.school-band__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.school-band h2 { color: #fff; }
.school-band p { color: #d9d9d3; font-size: 1.12rem; }
.school-band strong { color: var(--brand); }
.school-band .btn { margin-top: 0.6rem; }
.school-band__media { margin: 0; }
.school-band__media img { width: 100%; border-radius: var(--radius); border: 2px solid var(--brand); box-shadow: 10px 10px 0 var(--brand); }

/* ------------------------------------------------------------- timeline */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; counter-reset: t; margin-bottom: 2.6rem; }
.timeline__item { position: relative; padding-top: 1.6rem; border-top: 3px solid var(--ink); }
.timeline__item::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); border: 3px solid var(--ink); }
.timeline__year { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; margin-bottom: 0.6rem; font-variant-numeric: tabular-nums; }
.timeline__item h3 { font-size: 1.15rem; }
.timeline__item p { color: var(--ink-2); font-size: 0.98rem; }

/* ------------------------------------------------------- testi e passaggi */
.prose { font-size: 1.14rem; line-height: 1.8; }
.prose p { margin-bottom: 1.2em; }
.steps { list-style: none; display: grid; gap: 1.2rem; margin-bottom: 2rem; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.steps__n { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--brand); border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.steps h3 { margin: 0 0 0.2em; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--ink-2); }

/* -------------------------------------------------------------- cta band */
.cta-band { background: var(--brand); border-block: 2px solid var(--ink); padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.cta-band__inner { display: flex; flex-wrap: wrap; gap: 1.6rem 3rem; align-items: center; justify-content: space-between; }
.cta-band h2 { margin-bottom: 0.3em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { margin: 0; font-size: 1.1rem; max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ----------------------------------------------------------- hero interno */
.page-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding-block: clamp(2.4rem, 5vw, 4rem); }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to right, transparent, #000 90%); -webkit-mask-image: linear-gradient(to right, transparent, #000 90%); }
.page-hero__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.page-hero h1 { color: #fff; margin-bottom: 0.4em; }
.page-hero .lead { margin-bottom: 0; }
.page-hero .badge-free { margin: 1.4rem 0 0; }
.page-hero__visual { flex: none; width: clamp(150px, 22vw, 260px); color: var(--brand); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 1.2rem; color: #bdbdb5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #fff; }
.crumbs__sep { opacity: 0.5; }

.vis { width: 100%; height: auto; }
.vis__orbits, .vis__sun { transform-box: fill-box; transform-origin: center; animation: spin 30s linear infinite; }
.vis__cloud { animation: drift 5s ease-in-out infinite alternate; }
.seismo--vis { height: auto; aspect-ratio: 3 / 1; }
.seismo--vis .seismo__line { stroke-width: 2.4; }

/* ---------------------------------------------------- stati vuoti, elenchi */
.empty { max-width: 640px; margin-inline: auto; text-align: center; padding: clamp(2rem, 5vw, 3.2rem) 1.6rem; border: 2px dashed #cfc5a8; border-radius: var(--radius); background: rgba(255, 255, 255, 0.55); }
.empty__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand); margin-bottom: 1rem; }
.empty__icon .icon { width: 32px; height: 32px; }
.empty h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.empty p { color: var(--ink-2); }
.empty__cta { margin-top: 1.4rem; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.4rem; }
.items--stack { grid-template-columns: 1fr; }
.item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.item__body { padding: 1.4rem 1.5rem; }
.item__body p { color: var(--ink-2); }
.item audio, .item video { width: 100%; margin-top: 0.4rem; border-radius: 10px; }
.item--file { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.5rem; flex-wrap: wrap; }
.item--file .card__icon { margin: 0; }
.item--file .item__body { flex: 1; padding: 0; min-width: 200px; }
.item--file .item__body h3, .item--file .item__body p { margin: 0; }
.group { margin-bottom: 3rem; }
.group__title { display: flex; align-items: center; gap: 0.7rem; font-size: 1.6rem; }
.group__title .icon { width: 1.4em; height: 1.4em; background: var(--brand); border-radius: 50%; padding: 0.3em; box-sizing: border-box; }
.rooms-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; justify-content: center; margin-top: 2.4rem; }
.rooms-links p { margin: 0 0.4rem 0 0; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1.1rem; border-radius: 999px; border: 2px solid var(--ink); text-decoration: none; font-weight: 700; background: #fff; transition: background 0.15s; }
.chip:hover { background: var(--brand); }

.news { display: grid; gap: 1.6rem; }
.news__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.news__date { display: inline-block; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--brand); padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem; }
.news__item h2 { font-size: 1.6rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pager__link { display: flex; flex-direction: column; text-decoration: none; padding: 0.9rem 1.3rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; min-width: 200px; transition: background 0.15s; }
.pager__link:hover { background: var(--brand); }
.pager__link--next { text-align: right; margin-left: auto; }
.pager__dir { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.pager__name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }

/* --------------------------------------------------------------- contatti */
.contact { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__main p { font-size: 1.1rem; color: var(--ink-2); max-width: 56ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 1rem; }
.contact__card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.6rem; box-shadow: 8px 8px 0 var(--brand); }
.facts { list-style: none; display: grid; gap: 1.3rem; }
.facts li { display: flex; gap: 1rem; }
.facts li > div { min-width: 0; }
.facts p, .facts a, .site-footer a { overflow-wrap: anywhere; }
.facts > li > .icon { width: 2.5rem; height: 2.5rem; padding: 0.6rem; background: var(--brand); border-radius: 50%; box-sizing: border-box; }
.facts h3 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.2rem; }
.facts p { margin: 0 0 0.3rem; }
.notfound { min-height: 50vh; display: grid; align-items: center; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #cfcfc8; padding-top: clamp(2.6rem, 5vw, 4rem); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 4px; }
.site-footer__grid { display: grid; grid-template-columns: 1.25fr 0.8fr 0.95fr 1.6fr; gap: 2rem; padding-bottom: 2.6rem; }
.site-footer__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--brand); margin: 0 0 0.8rem; }
.site-footer ul { list-style: none; display: grid; gap: 0.45rem; }
.site-footer__contacts li a { display: inline-flex; align-items: center; gap: 0.5rem; }
.site-footer address { margin-bottom: 0.8rem; }
.site-footer [aria-current="page"] { color: #fff; font-weight: 700; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-block: 1.3rem; font-size: 0.92rem; }
.site-footer__bottom p { margin: 0; }

/* --------------------------------------------------------- comparsa (JS) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.cards > .reveal:nth-child(2), .timeline > .reveal:nth-child(2) { transition-delay: 0.09s; }
.cards > .reveal:nth-child(3), .timeline > .reveal:nth-child(3) { transition-delay: 0.18s; }
.timeline > .reveal:nth-child(4) { transition-delay: 0.27s; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes trace { 0% { stroke-dashoffset: 1; opacity: 1; } 60% { stroke-dashoffset: 0; opacity: 1; } 88% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-5px); } to { transform: translateX(5px); } }

/* -------------------------------------------------------------- schermi piccoli */
@media (max-width: 960px) {
  .hero__grid, .school-band__grid, .contact { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; margin-right: 20px; }
  .cards--3 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .school-band__media { order: -1; }
}

@media (max-width: 880px) {
  :root { --header-h: 72px; }
  .brand img { height: 52px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper); padding: 1rem 1.25rem 2rem; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .nav-link { width: 100%; justify-content: space-between; font-size: 1.15rem; padding: 0.95rem 1rem; border-radius: 14px; }
  .nav-link--cta { margin: 0.8rem 0 0; justify-content: center; }
  .dropdown { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0.4rem 1rem; min-width: 0; }
  .dropdown::before { display: none; }
  .dropdown a { font-size: 1.05rem; padding: 0.8rem 1rem; }
  html.nav-open { overflow: hidden; }
  html:not(.js) .nav { position: static; opacity: 1; visibility: visible; transform: none; padding: 0; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-header__bar { height: auto; flex-wrap: wrap; padding-block: 0.5rem; }
  html:not(.js) .dropdown { display: block; }
  .page-hero__visual { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  .timeline { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__cta .btn, .contact__actions .btn, .cta-band__actions .btn { width: 100%; }
  .pager__link { width: 100%; }
  .item--file .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .seismo__line { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .cta-band, .skip-link, .nav-toggle { display: none; }
  body { background: #fff; }
}
