:root {
  --red: #d7141a;
  --red-dark: #a50f14;
  --ink: #23201e;
  --muted: #6b635d;
  --bg: #ffffff;
  --tint: #faf5ef;
  --line: #ece4da;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 32, 30, .06), 0 8px 24px rgba(35, 32, 30, .08);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: .18em; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.prose > * { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Avviso archivio */
.notice { background: var(--ink); color: #f3ede6; font-size: .86rem; text-align: center; padding: 8px 0; }
@media (max-width: 600px) { .notice { font-size: .78rem; line-height: 1.4; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo img { width: clamp(210px, 32vw, 330px); height: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; }
.nav a:hover { background: var(--tint); color: var(--red); }
.nav a[aria-current="page"] { background: var(--red); color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--tint); cursor: pointer; }
  .nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .2s; }
  .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span:first-child::before { top: -6px; }
  .nav-toggle span:first-child::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
  .nav-toggle[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .nav a { padding: 12px 14px; }
}

/* Hero */
.hero { position: relative; min-height: min(78vh, 640px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.72) 100%); }
.hero__text { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 56px; }
.hero__text h1 { max-width: 14em; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.hero__text p { max-width: 36em; font-size: 1.12rem; opacity: .95; }

.page-head { background: var(--tint); border-bottom: 1px solid var(--line); padding: 44px 0 30px; }
.page-head h1 { margin: 0; }

/* Sezioni */
.section { padding: 56px 0; }
.section--tint { background: var(--tint); }
.section > .container + .container { margin-top: 28px; }
.lead { font-size: 1.16rem; }
.eyebrow { color: var(--red); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5em; }
.signature { font-style: italic; color: var(--muted); }
.note { background: var(--tint); border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: .95rem; }
.button { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.button:hover { background: var(--red-dark); color: #fff; }
.button--light { background: #fff; color: var(--red); }
.button--light:hover { background: var(--tint); color: var(--red-dark); }
.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 34px; font-weight: 600; font-size: 1.08rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .22em; width: 22px; height: 22px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Numeri */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.stats li { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-align: center; }
.stats strong { display: block; font-size: 2rem; color: var(--red); line-height: 1.1; }
.stats span { color: var(--muted); font-size: .95rem; }

/* Card */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .2s; }
.card:hover { transform: translateY(-3px); color: inherit; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body { padding: 18px 20px 20px; }
.card__body h3 { color: var(--red); margin-bottom: .3em; }
.card__body p { margin: 0; color: var(--muted); font-size: .96rem; }

/* Galleria */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s, opacity .2s; }
.gallery a:hover img { transform: scale(1.04); opacity: .92; }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; } }

.video { margin: 0 0 20px; }
.video video { width: 100%; max-width: 640px; border-radius: var(--radius); background: #000; }

/* Notizie */
.news { padding: 48px 0; border-bottom: 1px solid var(--line); }
.news:nth-child(even) { background: var(--tint); }
.news h2 a { color: inherit; text-decoration: none; }
.news h2 a:hover { color: var(--red); }
.news__body > p { max-width: 760px; }
.news__body > .gallery { margin-top: 8px; }

/* Collaboratori */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.partner { display: flex; align-items: center; gap: 20px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; transition: box-shadow .2s; }
.partner:hover { box-shadow: var(--shadow); color: inherit; }
.partner img { width: 110px; flex: none; }
.partner h3 { margin-bottom: .2em; }
.partner p { margin: 0 0 .3em; color: var(--muted); font-style: italic; }
.partner__url { color: var(--red); font-weight: 600; font-size: .92rem; }

/* Footer */
.site-footer { background: var(--ink); color: #d9d1c8; padding: 40px 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .3em; }
.site-footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 40px; }
.site-footer__name { color: #fff; font-weight: 700; }
.site-footer__links { align-self: end; }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(15, 12, 10, .96); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); width: auto; border-radius: 6px; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: .9rem; opacity: .8; }
@media (max-width: 600px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 8px; transform: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
