/* Stili condivisi: barra di navigazione, pagine interne e sezioni del racconto della serata.
   La home ha in più i suoi stili in linea (apertura, fili, finale). */
:root {
  --red: #ee2c2c;
  --blue: #3b6fb6;
  --bg: #e9e9e9;
  --line: 3px;
  --col: min(1040px, calc(100% - 2 * clamp(34px, 11vw, 190px)));
  --nav: 54px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.sub {
  background: var(--bg); color: var(--blue);
  font-family: "Figtree", system-ui, sans-serif; font-weight: 600; line-height: 1.3;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.sub a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
body.sub a:hover { color: var(--red); }
.sub .label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.sub .red { color: var(--red); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra di navigazione ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--nav);
  background: var(--bg); border-bottom: var(--line) solid var(--red);
  transform: translateY(-110%); transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.topnav.on { transform: none; }
.topnav .in { width: var(--col); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.topnav .brand { color: var(--red); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.topnav ul { list-style: none; display: flex; gap: clamp(.6rem, 1.8vw, 1.6rem); overflow-x: auto; scrollbar-width: none; }
.topnav ul::-webkit-scrollbar { display: none; }
.topnav a { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; color: var(--blue); white-space: nowrap; padding: .4em 0; border-bottom: var(--line) solid transparent; }
.topnav a:hover { color: var(--red); }
.topnav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
@media (max-width: 700px) {
  :root { --col: calc(100% - 32px); }
  .topnav .in { gap: .8rem; }
  .topnav .brand { font-size: 1.05rem; }
  .topnav ul { gap: .9rem; mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 18px; }
  .topnav a { font-size: .7rem; }
}

/* ---------- Pagine interne ---------- */
.sub .panel {
  width: var(--col); margin: 0 auto; container-type: inline-size; background: var(--bg);
  border: var(--line) solid var(--red); border-left-color: var(--blue); border-right-color: var(--blue);
}
.page { padding: calc(var(--nav) + clamp(28px, 6vh, 64px)) 0 clamp(40px, 8vh, 90px); }
.page .panel + .panel { margin-top: clamp(40px, 8vh, 90px); }
.sub .cell { padding: clamp(18px, 3cqw, 34px); }
.sub .cell + .cell { border-top: var(--line) solid var(--red); }
.sub .cell.b { border-top-color: var(--blue); }
.sub .split { display: grid; grid-template-columns: 1fr 1fr; }
.sub .split > * + * { border-left: var(--line) solid var(--red); }
.band { height: clamp(60px, 9cqw, 110px); background: repeating-linear-gradient(180deg, var(--blue) 0 4px, transparent 4px 14px, var(--red) 14px 18px, transparent 18px 28px); }
.page-head h1 { color: var(--red); font-weight: 700; font-size: max(2.6rem, 10cqw); letter-spacing: -.04em; line-height: .92; }
.page-head .label + h1 { margin-top: .5rem; }
.page-head p { margin-top: 1.1rem; font-size: max(1.05rem, 2.2cqw); max-width: 38em; }
.sub .btn {
  display: inline-block; padding: .75em 1.1em; font-weight: 800; font-size: .88rem; text-transform: uppercase; text-decoration: none;
  border: var(--line) solid var(--blue); color: var(--blue); background: none; font-family: inherit; cursor: pointer; transition: background .15s, color .15s;
}
.sub .btn:hover { background: var(--blue); color: var(--bg); }
.sub .btn.solid { background: var(--red); border-color: var(--red); color: #fff; }
.sub .btn.solid:hover { background: var(--blue); border-color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.prose p { font-size: max(1.05rem, 2.1cqw); max-width: 40em; font-weight: 500; line-height: 1.45; }
.prose p + p { margin-top: .9em; }
.prose h3 { color: var(--red); font-size: max(1.3rem, 3cqw); font-weight: 800; line-height: 1.1; margin-bottom: .6rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts > div { padding: clamp(18px, 3cqw, 34px); }
.facts > div + div { border-left: var(--line) solid var(--red); }
.facts p { margin-top: .4rem; font-size: max(1rem, 1.9cqw); }

/* ---------- Sezioni del racconto (anche in home) ---------- */
.sec-head h2 { color: var(--red); font-size: max(2rem, 6cqw); font-weight: 700; letter-spacing: -.03em; line-height: .95; }
.sec-head p { margin-top: 1rem; font-size: max(1.05rem, 2cqw); max-width: 40em; }
.sec-head .label + h2 { margin-top: .6rem; }

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--line); background: var(--red); }
.gallery figure { position: relative; grid-column: span 2; aspect-ratio: 3 / 2; overflow: hidden; background: #111; }
.gallery figure.w3 { grid-column: span 3; }
.gallery figure.w6 { grid-column: span 6; aspect-ratio: 16 / 9; }
.gallery figure.tall { aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery a { display: block; height: 100%; cursor: zoom-in; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; pointer-events: none; }
.gallery figcaption span { display: inline; background: var(--bg); padding: .25em .5em; font-size: max(.72rem, 1.2cqw); font-weight: 700; line-height: 1.75; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.voices { display: grid; grid-template-columns: repeat(3, 1fr); }
.voices blockquote { padding: clamp(18px, 3cqw, 34px); display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; }
.voices blockquote + blockquote { border-left: var(--line) solid var(--red); }
.voices p { font-size: max(1.05rem, 2cqw); line-height: 1.35; }
.voices p::before { content: "“"; display: block; color: var(--red); font-size: 3.2em; line-height: .6; font-weight: 800; margin-bottom: .1em; }

.press ol { list-style: none; }
.press li { display: grid; grid-template-columns: 9rem 1fr; gap: .3rem 1.4rem; padding: 1.1em 0; border-top: 1px solid rgba(59,111,182,.3); }
.press li:last-child { border-bottom: 1px solid rgba(59,111,182,.3); }
.press .src { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1.3; }
.press .src small { display: block; font-size: .78rem; color: var(--red); }
.press .t { display: block; color: var(--red); font-weight: 800; font-size: max(1.1rem, 2.1cqw); line-height: 1.15; text-decoration: none; }
.press a.t:hover { text-decoration: underline; }
.press p { margin-top: .35em; font-size: .95rem; font-weight: 500; }
.press .go { margin-top: .5em; display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

.thanks .lead p { font-size: max(1.05rem, 2.1cqw); max-width: 40em; }
.thanks .lead p + p { margin-top: .85em; }
.thanks .lead p.big { color: var(--red); font-weight: 700; font-size: max(1.4rem, 3.4cqw); line-height: 1.1; letter-spacing: -.015em; }
.credits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem 2rem; }
.credits div p { margin-top: .4rem; font-size: .98rem; font-weight: 500; line-height: 1.35; }

/* Programma con le foto dei momenti */
.timeline { list-style: none; }
.timeline > li { display: grid; grid-template-columns: 5.5rem 1fr 38%; gap: 0; border-top: var(--line) solid var(--red); }
.timeline > li:first-child { border-top: 0; }
.timeline .t { padding: clamp(16px, 2.6cqw, 30px); font-weight: 800; font-size: max(1rem, 1.9cqw); }
.timeline .what { padding: clamp(16px, 2.6cqw, 30px) clamp(16px, 2.6cqw, 30px) clamp(16px, 2.6cqw, 30px) 0; }
.timeline .what b { display: block; color: var(--red); font-weight: 800; font-size: max(1.15rem, 2.5cqw); line-height: 1.1; }
.timeline .what span { display: block; margin-top: .35em; font-size: max(.95rem, 1.6cqw); font-weight: 500; line-height: 1.35; }
.timeline .ph { border-left: var(--line) solid var(--red); background: #111; min-height: 100%; }
.timeline .ph img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; }
.timeline .ph.empty { background: repeating-linear-gradient(180deg, var(--blue) 0 4px, transparent 4px 14px, var(--red) 14px 18px, transparent 18px 28px); }

/* Schede verso le pagine (in home) */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--line) solid var(--red); }
.cards a { display: flex; flex-direction: column; text-decoration: none; color: var(--blue); }
.cards a + a { border-left: var(--line) solid var(--red); }
.cards .img { aspect-ratio: 4 / 3; overflow: hidden; background: #111; border-bottom: var(--line) solid var(--red); }
.cards .img.stripes { background: repeating-linear-gradient(180deg, var(--blue) 0 4px, transparent 4px 14px, var(--red) 14px 18px, transparent 18px 28px) var(--bg); }
.cards img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cards a:hover img { transform: scale(1.04); }
.cards .txt { padding: clamp(14px, 2.2cqw, 24px); }
.cards b { display: block; color: var(--red); font-size: max(1.2rem, 2.6cqw); font-weight: 800; line-height: 1.05; }
.cards span { display: block; margin-top: .4em; font-size: .9rem; font-weight: 500; line-height: 1.3; }
.cards .go { margin-top: .8em; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cards a:hover b { text-decoration: underline; text-decoration-thickness: 2px; }

/* Proverbi della mostra */
.proverbs { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
.proverbs li { padding: clamp(16px, 2.6cqw, 30px); border-top: var(--line) solid var(--red); }
.proverbs li:nth-child(-n+2) { border-top: 0; }
.proverbs li:nth-child(even) { border-left: var(--line) solid var(--red); }
.proverbs q { display: block; color: var(--red); font-weight: 700; font-size: max(1.15rem, 2.4cqw); line-height: 1.15; quotes: "«" "»"; }
.proverbs span { display: block; margin-top: .5em; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

/* Lightbox delle foto */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(15,18,28,.94); display: none; place-items: center; padding: 56px 16px 80px; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border: var(--line) solid var(--bg); }
.lightbox p { position: fixed; left: 16px; right: 16px; bottom: 20px; text-align: center; color: #fff; font-weight: 700; font-size: .95rem; }
.lightbox button { position: fixed; background: var(--bg); color: var(--blue); border: 0; font: 800 .8rem "Figtree", sans-serif; text-transform: uppercase; letter-spacing: .05em; padding: .8em 1em; cursor: pointer; }
.lightbox button:hover { background: var(--red); color: #fff; }
.lightbox .x { top: 12px; right: 12px; }
.lightbox .prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Piè di pagina delle pagine interne */
.site-foot .links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.site-foot .links a { text-decoration: none; }
.site-foot .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 700px) {
  .sub .split, .facts, .voices, .credits, .proverbs, .cards { grid-template-columns: 1fr; }
  .sub .split > * + *, .facts > div + div, .voices blockquote + blockquote, .cards a + a { border-left: 0; border-top: var(--line) solid var(--red); }
  .proverbs li:nth-child(2) { border-top: var(--line) solid var(--red); }
  .proverbs li:nth-child(even) { border-left: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure, .gallery figure.w3 { grid-column: span 1; }
  .gallery figure.w6 { grid-column: span 2; aspect-ratio: 3 / 2; }
  .gallery figcaption { left: 6px; right: 6px; bottom: 6px; }
  .gallery figcaption span { font-size: .62rem; }
  .press li { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; }
  .timeline .t { padding-bottom: 0; }
  .timeline .what { padding-left: clamp(16px, 2.6cqw, 30px); }
  .timeline .ph { border-left: 0; border-top: var(--line) solid var(--red); }
  .timeline .ph.empty { display: none; }
}
