/* La Memoria Viva — stile del sito pubblico */

@font-face { font-family: "Fraunces"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/fraunces-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/fraunces-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/fraunces-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: italic; font-display: swap; src: url(../fonts/fraunces-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700-normal.woff2) format("woff2"); }

:root {
  --paper: #faf6ee;
  --paper-2: #f2ebdd;
  --card: #fffdf8;
  --ink: #1d2433;
  --ink-2: #3a4254;
  --muted: #5d6474;
  --line: #e3dac8;
  --war: #262a31;
  --link: #2f4fb5;
  --p1: #6b3fa0; --p2: #2f4fb5; --p3: #3aa0dc; --p4: #3fa34d; --p5: #f4c430; --p6: #f08a24; --p7: #e0322b;
  --rainbow: linear-gradient(90deg, var(--p1) 0 14.29%, var(--p2) 0 28.57%, var(--p3) 0 42.86%, var(--p4) 0 57.14%, var(--p5) 0 71.43%, var(--p6) 0 85.71%, var(--p7) 0);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,36,51,.06), 0 8px 28px rgba(29,36,51,.08);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3, .h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--p3); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.hp { position: absolute; left: -9999px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(740px, 100% - 40px); margin-inline: auto; }
.wrap-wide { width: min(1000px, 100% - 40px); margin-inline: auto; }

.kicker { font: 600 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; display: flex; align-items: center; gap: .6em; }
.kicker::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--rainbow); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); }
.meta { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.meta a { color: inherit; text-decoration: none; font-weight: 600; }
.meta a:hover { color: var(--ink); }
.rainbow { height: 6px; background: var(--rainbow); }
.empty { color: var(--muted); font-style: italic; padding: 40px 0; text-align: center; }

/* Pulsanti */
.btn { --bg: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .5em; background: var(--bg); color: #fff; border: 2px solid var(--bg); border-radius: 999px; padding: .78em 1.45em; font: 600 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rainbow); transform: translateY(100%); transition: transform .25s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(29,36,51,.18); }
.btn:hover::after { transform: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { padding: .55em 1.05em; font-size: .92rem; }
.link-arrow { font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; gap: .45em; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after, a:hover .link-arrow::after { transform: translateX(4px); }

/* Intestazione */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,246,238,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(29,36,51,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand img { height: 58px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.site-nav ul { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: .5em .7em; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .97rem; border-radius: 8px; position: relative; white-space: nowrap; }
.site-nav ul a::after { content: ""; position: absolute; left: .7em; right: .7em; bottom: .2em; height: 3px; border-radius: 2px; background: var(--rainbow); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.site-nav ul a:hover::after, .site-nav ul a[aria-current]::after { transform: scaleX(1); }
.nav-search { display: none; }
.nav-search-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); border: 1px solid var(--line); background: var(--card); }
.nav-search-link:hover { border-color: var(--ink); }
.nav-search-link svg, .nav-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .header-inner { min-height: 70px; }
  .brand img { height: 48px; }
  .nav-toggle { display: grid; gap: 5px; place-content: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
  .nav-toggle span:not(.sr) { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, 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: fixed; inset: 70px 0 auto 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 20px 26px; gap: 14px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(29,36,51,.12); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .25s; max-height: calc(100vh - 70px); overflow: auto; }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { font-size: 1.15rem; padding: .7em .4em; border-bottom: 1px solid var(--line); border-radius: 0; white-space: normal; }
  .site-nav ul a::after { left: .4em; right: auto; width: 40px; }
  .nav-search-link { display: none; }
  .nav-search { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 14px; }
  .nav-search input { flex: 1; border: 0 !important; box-shadow: none !important; background: transparent; padding: .6em 0; }
  .nav-search button { border: 0; background: none; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
}

/* Avvisi */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 14px 44px 14px 18px; border-radius: 12px; box-shadow: var(--shadow); position: relative; border-left: 6px solid var(--p4); animation: toast-in .35s ease; }
.toast-error { border-left-color: var(--p7); }
.toast button { position: absolute; right: 8px; top: 8px; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
.preview-bar { background: var(--p5); color: var(--ink); text-align: center; padding: 8px; font-weight: 600; }

/* Hero con cursore guerra/pace */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.compare { --pos: 50%; position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(29,36,51,.35); background: var(--war); isolation: isolate; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.compare-war { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-photo .compare-war img { filter: grayscale(1) contrast(1.08) brightness(.82); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 0 1px rgba(29,36,51,.15); pointer-events: none; z-index: 2; }
.compare-handle span { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s; }
.compare-handle svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare:hover .compare-handle span, .compare.is-dragging .compare-handle span { transform: scale(1.08); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.compare input[type=range]:focus-visible + .compare-hint { opacity: 1; }
.compare:has(input:focus-visible) { outline: 3px solid var(--p3); outline-offset: 4px; }
.compare-label { position: absolute; top: 16px; z-index: 2; font: 600 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: .55em .9em; border-radius: 999px; pointer-events: none; transition: opacity .25s; }
.compare-l { left: 16px; background: rgba(38,42,49,.82); color: #fff; }
.compare-r { right: 16px; background: rgba(255,255,255,.88); color: var(--ink); }
.compare-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(29,36,51,.75); color: #fff; font-size: .8rem; padding: .4em .9em; border-radius: 999px; pointer-events: none; transition: opacity .4s; }
.compare.was-used .compare-hint { opacity: 0; }

/* Numeri */
.stats { background: var(--ink); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding-block: clamp(36px, 5vw, 56px); }
.stat strong { display: block; font: 600 clamp(2.6rem, 5vw, 3.6rem)/1 var(--serif); margin-bottom: .3em; font-variant-numeric: tabular-nums; }
.stat span { color: #c9cfdb; font-size: 1.02rem; }
.stat { border-left: 3px solid; padding-left: 18px; }
.stat:nth-child(7n+1) { border-color: var(--p5); } .stat:nth-child(7n+2) { border-color: var(--p3); } .stat:nth-child(7n+3) { border-color: var(--p7); } .stat:nth-child(7n+4) { border-color: var(--p4); }

/* Sezioni */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tight { padding-block: clamp(32px, 5vw, 64px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 32px; }
.section-head .kicker { flex-basis: 100%; margin-bottom: 0; }
.section-head h2 { margin: 0; }
.section-dark { background: var(--war); color: #e9ebef; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .kicker { color: #b9bfcb; }
.section-dark .link-arrow { color: #fff; }
.section-dark p { color: #c4c9d3; }

.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-symbol img { width: 100%; max-width: 440px; margin-inline: auto; filter: drop-shadow(0 24px 40px rgba(29,36,51,.18)); }
.values { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.values li { padding: 14px 18px; background: var(--card); border-radius: 12px; border: 1px solid var(--line); color: var(--ink-2); }
.values strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects .grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.news-grid .post-card-big { grid-column: span 2; grid-row: span 2; }
.news-grid .post-card-big h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

/* Schede */
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; color: inherit; text-decoration: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.post-card-big .card-media { aspect-ratio: auto; flex: 1; min-height: 280px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 4px; }
.card-body h3 { margin: 0 0 .35em; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body p { color: var(--muted); margin: 0; }
.project-card .link-arrow { margin-top: 14px; }
.badge-video { position: absolute; left: 12px; top: 12px; background: rgba(29,36,51,.85); color: #fff; font-size: .78rem; font-weight: 600; padding: .35em .75em; border-radius: 999px; }

/* Copertina segnaposto quando manca l'immagine */
.cover-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; background: linear-gradient(100deg, #3a3f47 0%, #8d9098 32%, #e9e4d8 62%, #f8f1e1 100%); overflow: hidden; }
.cover-ph::before { content: ""; position: absolute; width: 150%; aspect-ratio: 1; right: -75%; top: 30%; border-radius: 50%; background: radial-gradient(circle, transparent 0 46%, var(--p7) 46% 50%, var(--p6) 50% 54%, var(--p5) 54% 58%, var(--p4) 58% 62%, var(--p3) 62% 66%, var(--p2) 66% 70%, var(--p1) 70% 74%, transparent 74%); opacity: .9; }
.cover-ph span { position: relative; font: 600 1.25rem/1.15 var(--serif); color: #fff; background: rgba(29,36,51,.72); padding: .35em .6em; border-radius: 8px; max-width: 85%; }
.cover-ph-1 { background: linear-gradient(120deg, #2e3239 0%, #7d828b 30%, #dcebf3 66%, #eef6fb 100%); }
.cover-ph-2 { background: linear-gradient(80deg, #262a31 0%, #6f747d 36%, #efe6d2 70%, #fdf3dc 100%); }

/* Video */
.video { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; color: #fff; text-decoration: none; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.video img, .video .video-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .3s; }
.video-ph { background: linear-gradient(100deg, #2a2f38 0%, #4a5060 45%, #3c4c74 100%); }
.video-ph::after { content: ""; position: absolute; inset: 0; background: url(../img/lmv-simbolo-bianco.svg) center / 34% no-repeat; opacity: .16; }
.video:hover img { transform: scale(1.03); filter: brightness(.88); }
.video-btn { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: transform .2s; }
.video-btn svg { width: 30px; height: 30px; fill: var(--ink); margin-left: 4px; }
.video:hover .video-btn, .video-play:focus-visible .video-btn { transform: scale(1.1); }
.video-play:focus-visible { outline: 3px solid var(--p3); outline-offset: -3px; }
.video-note { position: absolute; left: 12px; bottom: 12px; font-size: .78rem; background: rgba(0,0,0,.6); padding: .3em .7em; border-radius: 999px; }
.video-card h3, .video-card .h3 { margin: 16px 0 6px; font-size: 1.25rem; }
.video-card p { margin: 0; color: var(--muted); }
.section-dark .video-card p { color: #c4c9d3; }
.video-card .meta { margin: 14px 0 0; }
.video-card[hidden] { display: none; }

/* Testate di pagina */
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(8px, 2vw, 20px); }
.page-head h1 { max-width: 18ch; }
.page-head .lead { max-width: 60ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { font: 500 .92rem/1 var(--sans); padding: .6em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.chip small { color: var(--muted); margin-left: .2em; }
.chip[aria-current], .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-current] small, .chip[aria-pressed="true"] small { color: #c9cfdb; }

/* Articoli e pagine */
.article { padding: clamp(36px, 6vw, 72px) 0 24px; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.byline { color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }
.article-media { margin-block: 0 40px; }
.article-media img { width: 100%; border-radius: 16px; }
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: 1.75rem; margin: 1.8em 0 .2em; }
.prose h3 { font-size: 1.35rem; margin: 1.6em 0 .2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--p2); }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid; border-image: linear-gradient(var(--p1), var(--p2), var(--p3), var(--p4), var(--p5), var(--p6), var(--p7)) 1; font: italic 400 1.4rem/1.5 var(--serif); color: var(--ink-2); }
.prose img { border-radius: 12px; margin-inline: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: .6em; }
.prose hr { border: 0; height: 4px; width: 80px; background: var(--rainbow); border-radius: 2px; margin: 2.2em auto; }
.prose .video { margin: 1.6em 0; }
.article-foot { margin-top: 48px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share span { font-weight: 600; margin-right: 6px; }
.share a, .share button { font: 500 .9rem/1 var(--sans); padding: .55em .9em; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--ink); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.prevnext a { display: block; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; }
.prevnext a small { display: block; font: 500 .8rem var(--sans); color: var(--muted); margin-bottom: 4px; }
.prevnext .next { text-align: right; grid-column: 2; }
.siblings { margin-top: 48px; padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.siblings ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.siblings a { display: block; padding: .5em .9em; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.siblings a[aria-current] { background: var(--ink); color: #fff; }

/* Moduli */
.form { display: grid; gap: 16px; }
.form label, .nl-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=search], textarea { width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .8em 1em; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { outline: none; border-color: var(--p2); box-shadow: 0 0 0 4px rgba(47,79,181,.15); }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: .9rem !important; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-form { background: var(--card); padding: clamp(22px, 3vw, 36px); border-radius: 18px; border: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-info dl { display: grid; gap: 4px; margin: 0 0 24px; }
.contact-info dt { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.contact-info dd { margin: 0; font-size: 1.1rem; }
.contact-symbol { width: 160px; opacity: .95; }
.search-big { display: flex; gap: 10px; margin-top: 24px; max-width: 620px; }
.search-big input { flex: 1; }
.result { display: block; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.result small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.result strong { display: block; font: 600 1.35rem/1.25 var(--serif); margin: 4px 0; }
.result span { color: var(--muted); }
.result:hover strong { text-decoration: underline; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { font-weight: 600; color: var(--ink); }

.message-page { padding: clamp(60px, 10vw, 140px) 0; text-align: center; }
.message-page img { margin: 0 auto 28px; width: 140px; }
.message-page .search-big { margin: 28px auto; }

/* Newsletter */
.newsletter { background: var(--paper-2); border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 88px); }
.newsletter-inner { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.newsletter h2 { margin-bottom: .35em; }
.nl-fields { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; }
.nl-form { display: grid; gap: 14px; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-msg.ok { color: #2e7d32; }
.form-msg.err { color: #b3261e; }

/* Piè di pagina */
.site-footer { background: var(--ink); color: #c9cfdb; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.footer-brand img { height: 74px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 44ch; }
.footer-h { font: 600 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #e9ebef; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.socials { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: block; padding: .4em .8em; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; font-size: .88rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px 28px; font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* Comparsa allo scorrimento */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 920px) {
  .hero-grid, .about-grid, .newsletter-inner, .contact-grid { grid-template-columns: 1fr; }
  .hero-text { order: 1; }
  .compare { order: 2; }
  .about-symbol img { max-width: 300px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-grid .post-card-big { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .news-grid { grid-template-columns: 1fr; }
  .news-grid .post-card-big { grid-column: auto; }
  .post-card-big .card-media { min-height: 0; aspect-ratio: 16/10; }
  .nl-fields, .row-2 { grid-template-columns: 1fr; }
  .compare { aspect-ratio: 4 / 3.4; border-radius: 16px; }
  .compare-label { font-size: .66rem; top: 10px; }
  .compare-l { left: 10px; } .compare-r { right: 10px; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-big { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .newsletter, .site-footer, .share, .prevnext { display: none; }
}
