/* fondazione march – archivio 2007–2015
   Identità: nero, verde Pantone 375, carattere "march" a palette, DIN (qui Barlow come alternativa libera). */

@font-face {
  font-family: 'march';
  src: url('/fonts/march.woff2') format('woff2');
  font-display: block;
}

:root {
  --ink: #111;
  --paper: #fff;
  --green: #8cc63f;
  --green-dark: #5f8f22;
  --grey: #f3f3f1;
  --line: #dcdcd8;
  --muted: #6b6b66;
  --sans: 'Barlow', 'DIN Next', 'DIN', 'Helvetica Neue', Arial, sans-serif;
  --cond: 'Barlow Condensed', 'Barlow', 'DIN Condensed', Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--sans);
  font-feature-settings: 'tnum' 0;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 500; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 84px); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: 22px; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.lead { font-size: clamp(21px, 2.2vw, 28px); line-height: 1.35; font-weight: 300; max-width: 34em; }
.eyebrow { font: 500 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.h-small { font: 600 13px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .1em; margin: 2em 0 .8em; }

/* ───────── palette (carattere "march") */
.flap { font-family: 'march', var(--cond); font-weight: normal; line-height: 1; white-space: nowrap; display: inline-block; letter-spacing: 0; color: var(--ink); }
.flap__chars { display: inline-block; }
.flap--brand { font-size: 26px; }
.flap--hero { font-size: clamp(34px, 10.4vw, 168px); margin: 0; }
.flap--small { font-size: 26px; }
.flap--mini { font-size: 15px; }
.flap--stamp { font-size: 13px; position: absolute; right: 10px; top: 10px; color: #fff; mix-blend-mode: normal; opacity: 0; transition: opacity .2s; }
.flap .is-flipping { display: inline-block; animation: flip .09s linear; }
@keyframes flip { 0% { transform: scaleY(1); } 50% { transform: scaleY(.15); } 100% { transform: scaleY(1); } }

/* ───────── cartellini colorati (come i "bolloni" del vecchio sito) */
.tag {
  display: inline;
  background: var(--tag, var(--green));
  color: var(--ink-on, #111);
  padding: .12em .45em .16em;
  border-radius: var(--radius);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 400;
  line-height: 1.5;
}
.tag--xl { font-size: clamp(34px, 5.4vw, 74px); line-height: 1.22; padding: .04em .28em .1em; letter-spacing: -0.015em; }

/* ───────── header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand__sub { font-size: 14px; line-height: 1.15; color: var(--muted); max-width: 13em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 24px; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 17px; }
.site-nav a:hover, .site-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--green); }
.lang { font-size: 14px !important; border: 1px solid var(--ink); border-radius: 99px; padding: 3px 12px; }
.lang:hover { background: var(--ink); color: #fff; box-shadow: none !important; }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .brand__sub { display: none; }
  .menu-toggle { display: grid; gap: 6px; width: 44px; height: 44px; place-content: center; background: none; border: 0; cursor: pointer; }
  .menu-toggle > span:not(.sr) { width: 26px; height: 2px; background: var(--ink); transition: transform .2s; }
  .menu-toggle[aria-expanded='true'] > span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] > span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 69px 0 auto 0; background: #fff; flex-direction: column; align-items: flex-start; padding: 16px var(--gutter) 28px; border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 14px; }
  .site-nav a { font-size: 26px; }
}

/* ───────── hero */
.hero { padding: clamp(48px, 9vw, 120px) var(--gutter) clamp(40px, 6vw, 80px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__board { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.hero__kicker { font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); margin-bottom: .6em; }
.hero__sub { font-size: clamp(18px, 2vw, 26px); font-weight: 300; margin: .5em 0 0; display: flex; flex-wrap: wrap; gap: 0 1em; }
.hero__sub span { color: var(--muted); }
.hero--404 { padding-bottom: 80px; }

/* ───────── blocchi generici */
.intro { padding-block: clamp(48px, 7vw, 96px); }
.cols { columns: 2 22em; column-gap: 48px; max-width: 64em; }
.arrow { font-weight: 500; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; border-bottom: 2px solid var(--green); padding-bottom: 2px; }
.arrow::after { content: '→'; transition: transform .2s; }
.arrow:hover::after { transform: translateX(4px); }
.arrow--light { color: #fff; }
.block { padding-block: clamp(40px, 6vw, 80px); }
.block + .block { border-top: 1px solid var(--line); }
.block__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 48px; align-items: start; margin-bottom: 32px; }
.block__head p { margin: 0; max-width: 40em; }
@media (max-width: 800px) { .block__head { grid-template-columns: 1fr; } }

.page-head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(24px, 4vw, 48px); }
.page-head h1.tagged { display: inline-block; background: var(--tag); color: var(--ink-on, #fff); padding: 0 .25em .06em; border-radius: var(--radius); }

.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 8px 56px; padding-bottom: clamp(24px, 4vw, 48px); }
.prose-grid h2 { font-size: 26px; margin-top: .6em; }
.prose-grid .span-2 { grid-column: 1 / -1; }
.wide { margin: 0 0 clamp(32px, 5vw, 64px); }
.wide img { width: 100%; max-height: 78vh; object-fit: cover; }
.list { list-style: none; border-top: 1px solid var(--line); margin: .4em 0 1.4em; }
.list li { border-bottom: 1px solid var(--line); padding: 10px 0; }

.credits { margin: 0 0 1.2em; display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 16px; }
.credits div { display: grid; grid-template-columns: minmax(8em, 1fr) 2.2fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
@media (max-width: 560px) { .credits div { grid-template-columns: 1fr; gap: 2px; } }

/* ───────── feature identità (nero + verde) */
.feature-identity { background: var(--ink); color: #fff; padding-block: clamp(48px, 7vw, 100px); }
.feature-identity h2 { color: var(--green); font-size: clamp(32px, 4vw, 56px); }
.feature-identity__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: center; }
.feature-identity__text { max-width: 42em; }
.feature-identity__strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.feature-identity__strip img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; }
@media (max-width: 900px) { .feature-identity__inner { grid-template-columns: 1fr; } .feature-identity__strip { grid-template-columns: repeat(3, 1fr); } }

/* ───────── sezioni */
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 28px; }
.section-tile { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.section-tile__media { aspect-ratio: 4 / 3; background: var(--tag); overflow: hidden; border-radius: var(--radius); position: relative; }
.section-tile__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; transition: filter .35s, transform .5s; }
.section-tile:hover .section-tile__media img { filter: none; mix-blend-mode: normal; transform: scale(1.03); }
.section-tile h3 { margin: 6px 0 0; font-size: 26px; }
.section-tile p { margin: 0; font-size: 16px; color: var(--muted); }
.section-tile__count { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

/* ───────── griglia progetti / card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 40px 28px; padding-bottom: clamp(40px, 6vw, 80px); }
.grid--featured { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--featured .card--big { grid-column: span 2; }
@media (max-width: 1000px) { .grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid--featured { grid-template-columns: 1fr; } .grid--featured .card--big { grid-column: auto; } }
.card a { text-decoration: none; display: block; position: relative; }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--grey); border-radius: var(--radius); margin-bottom: 12px; }
.card--big .card__media { aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card a:hover .card__media img { transform: scale(1.04); }
.card a:hover .flap--stamp, .card a:focus-visible .flap--stamp { opacity: 1; }
.card__media--empty { background: var(--tag); display: grid; place-items: center; }
.card__media--empty .flap { font-size: clamp(18px, 2.4vw, 30px); color: var(--ink-on, #fff); }
.card .tag { font-size: 22px; line-height: 1.45; }
.card--big .tag { font-size: 30px; }
.card__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin: 10px 0 0; text-transform: uppercase; letter-spacing: .06em; }
.card[hidden] { display: none; }
.empty { padding: 40px 0; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters a { text-decoration: none; border: 1px solid var(--ink); border-radius: 99px; padding: 6px 14px; font-size: 15px; font-weight: 500; }
.filters a:hover { background: var(--grey); }
.filters a[aria-current] { background: var(--ink); color: #fff; }
.filters a[aria-current][style] { background: var(--tag); border-color: var(--tag); color: var(--ink-on, #fff); }
.years { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 36px; }
.years button { background: none; border: 0; padding: 4px 8px; cursor: pointer; font-size: 15px; color: var(--muted); border-radius: var(--radius); }
.years button[aria-pressed='true'] { color: var(--ink); background: var(--grey); font-weight: 600; }

/* ───────── progetto */
.project__head { padding-top: clamp(36px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 48px; }
.project__head > :not(.project__name) { grid-column: 1; }
.project__head h1 { margin: .1em 0 .3em; }
.project__name { grid-column: 2; grid-row: 1 / span 4; align-self: start; text-align: right; border-left: 1px solid var(--line); padding-left: 24px; font-size: 14px; color: var(--muted); max-width: 18em; }
.project__name p { margin: 0 0 8px; }
.project__name .flap { color: var(--ink); }
.project__facts { font-size: 17px; }
.project__facts p { margin: 0 0 4px; }
@media (max-width: 900px) {
  .project__head { grid-template-columns: 1fr; }
  .project__name { grid-column: 1; grid-row: auto; text-align: left; border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; margin-top: 12px; }
}
.project__cover { margin-block: clamp(24px, 4vw, 48px); }
.project__cover img { width: 100%; max-height: 82vh; object-fit: contain; background: var(--grey); border-radius: var(--radius); }
.project__body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; padding-bottom: clamp(24px, 4vw, 48px); }
.project__body .prose { font-size: 19px; max-width: 38em; }
.project__body aside .h-small:first-child { margin-top: 0; }
@media (max-width: 900px) { .project__body { grid-template-columns: 1fr; gap: 16px; } }
.toc { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; text-decoration: none; border: 1px solid var(--ink); border-radius: 99px; padding: 4px 12px; font-size: 15px; }
.toc a:hover { background: var(--tag); color: var(--ink-on, #fff); border-color: var(--tag); }

.editions { padding-block: clamp(32px, 5vw, 64px); }
.editions > h2 { font-size: clamp(30px, 4vw, 52px); }
.edition { border-top: 2px solid var(--ink); padding: 28px 0 40px; scroll-margin-top: 90px; }
.edition__head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 32px; align-items: baseline; }
.edition__head h3, .edition__head .meta { grid-column: 2; margin: 0; }
.edition__head h3 { font-size: clamp(22px, 2.4vw, 30px); }
.edition__head .meta { color: var(--muted); font-size: 16px; margin-top: 6px; }
.edition__year { grid-row: 1 / span 2; font: 600 clamp(22px, 2.4vw, 30px)/1.2 var(--cond); color: var(--ink); border-left: 8px solid var(--tag); padding-left: 12px; }
.edition__text { margin: 20px 0 0 252px; max-width: 46em; }
.edition .gallery { margin-top: 24px; }
@media (max-width: 800px) { .edition__head { grid-template-columns: 1fr; } .edition__head h3, .edition__head .meta, .edition__year { grid-column: 1; grid-row: auto; } .edition__text { margin-left: 0; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-block: 40px 80px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: flex; flex-direction: column; gap: 10px; font-size: 22px; }
.pager a span:first-child { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pager a[rel='next'] { text-align: right; align-items: flex-end; }

/* ───────── gallerie */
.gallery { columns: 3 260px; column-gap: 14px; }
.gallery__item { display: block; break-inside: avoid; margin-bottom: 14px; cursor: zoom-in; background: var(--grey); border-radius: var(--radius); overflow: hidden; }
.gallery__item img { width: 100%; transition: opacity .2s; }
.gallery__item:hover img { opacity: .88; }
.gallery--pages { columns: 4 200px; }
.gallery--pages .gallery__item { box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); }

.lightbox { border: 0; padding: 0; background: rgba(10, 10, 10, .96); width: 100vw; height: 100vh; max-width: none; max-height: none; color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox img { max-width: 100%; max-height: 90vh; margin: auto; object-fit: contain; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 44px; cursor: pointer; height: 100%; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lightbox__close { position: absolute; top: 8px; right: 16px; height: auto !important; z-index: 2; }
.lightbox__count { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 14px; opacity: .7; margin: 0; }
@media (max-width: 600px) { .lightbox[open] { grid-template-columns: 40px minmax(0, 1fr) 40px; } }

/* ───────── identità */
.logo-stage { background: var(--green); padding: clamp(40px, 7vw, 96px) var(--gutter); display: grid; justify-items: center; gap: 28px; }
.logo-stage__logo { display: grid; gap: 10px; }
.logo-stage__sub { margin: 0; font-weight: 300; font-size: clamp(16px, 2.4vw, 32px); padding-left: .25em; }
.logo-stage__picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.logo-stage__picker button { background: transparent; border: 1px solid var(--ink); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.logo-stage__picker button[aria-pressed='true'], .logo-stage__picker button:hover { background: var(--ink); color: var(--green); }

.letters { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; margin-top: 20px; }
.letter { font: 14px/1.5 'Courier New', Courier, monospace; background: var(--grey); padding: 18px 20px; border-radius: var(--radius); border-left: 4px solid var(--line); }
.letter--jm { border-left-color: var(--green); background: #f4f9ec; }
.letter__head { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.letter__head time { margin-left: auto; }
.letter__body { margin: 0; }

.logos12 { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 36px 28px; }
.logos12 li { display: grid; gap: 6px; }
.logos12 .flap { font-size: clamp(24px, 3vw, 34px); }
.logos12 span:not(.flap):not(.flap__chars) { font-size: 13px; font-weight: 300; padding-left: .3em; }
.logos12 li:nth-child(3n + 2) .flap { color: var(--green-dark); }

.tester { display: block; }
.tester input { width: 100%; font: 300 22px/1.3 var(--sans); padding: 10px 0; border: 0; border-bottom: 2px solid var(--ink); background: none; text-transform: uppercase; }
.tester__out { font-family: 'march'; font-size: clamp(26px, 6vw, 76px); line-height: 1.15; margin: 24px 0; word-break: break-all; }
.alphabet { font-family: 'march'; font-size: clamp(20px, 3vw, 36px); line-height: 1.25; color: var(--green-dark); word-break: break-all; }

.swatches { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 16px; }
.swatches li { display: grid; gap: 2px; font-size: 14px; }
.swatches li::before { content: ''; aspect-ratio: 1; background: var(--c); border-radius: var(--radius); margin-bottom: 8px; }
.swatches code { color: var(--muted); font-size: 13px; }

.billboard-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 32px; }
.billboard-wall a { position: relative; display: block; text-decoration: none; cursor: zoom-in; }
.billboard-wall img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; }
.billboard-wall span { display: block; font-size: 12px; letter-spacing: .1em; margin-top: 6px; color: #aaa; }
@media (max-width: 800px) { .billboard-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.book { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: center; }
.book img { box-shadow: 0 20px 50px rgba(0, 0, 0, .15); }
@media (max-width: 700px) { .book { grid-template-columns: 1fr; } }

/* ───────── cronologia */
.timeline { padding-bottom: 80px; }
.timeline__year { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; border-top: 2px solid var(--ink); padding: 22px 0 30px; }
.timeline__year h2 { font: 600 clamp(36px, 5vw, 64px)/1 var(--cond); margin: 0; }
.timeline__year ol { list-style: none; display: grid; gap: 12px; }
.timeline__year a { display: flex; gap: 16px; align-items: baseline; text-decoration: none; font-size: 20px; }
.timeline__year .flap--mini { flex: 0 0 auto; width: 9.2em; font-size: 14px; }
.timeline__year a:hover .tag { filter: brightness(.92); }
@media (max-width: 700px) { .timeline__year { grid-template-columns: 1fr; } .timeline__year a { flex-direction: column; gap: 6px; } }

/* ───────── chiusura e footer */
.closing { background: var(--green); padding-block: clamp(48px, 7vw, 100px); }
.closing h2 { font: 600 clamp(48px, 9vw, 140px)/0.9 var(--cond); letter-spacing: -0.02em; }
.closing p { font-size: clamp(20px, 2.2vw, 28px); font-weight: 300; max-width: 30em; }
.closing__fig { margin: 32px 0 0; max-width: 760px; }

.site-footer { background: var(--ink); color: #fff; padding: 56px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; font-size: 15px; }
.site-footer .flap { color: #fff; font-size: 24px; }
.site-footer__logo { display: grid; gap: 6px; align-content: start; }
.site-footer__logo span:not(.flap):not(.flap__chars) { color: #bbb; font-weight: 300; }
.site-footer .muted { color: #999; }
.site-footer__nav { display: grid; gap: 6px; align-content: start; }
.site-footer__nav a { text-decoration: none; color: #ddd; }
.site-footer__nav a:hover { color: var(--green); }
@media (max-width: 900px) { .site-footer { grid-template-columns: 1fr; } }
