/* Plan B: quasi niente. Bianco sporco, nero, tanto vuoto. Le immagini sono le uniche protagoniste. */
:root {
  --paper: #f5f5f3;
  --ink: #000;
  --muted: #595959;
  --hairline: rgba(0, 0, 0, .35);
  --sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: 1rem;
  --space: clamp(5rem, 14vw, 11rem);
}
@media (min-width: 860px) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; transition: opacity .2s; }
img.is-loading { opacity: 0; }
a { color: inherit; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; transition: opacity .15s; }
a:hover { opacity: .55; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-size: 12px; font-weight: 500; line-height: 1.4; margin: 0 0 1.5em; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 1em; }
dl, dd { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -10000px; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .5rem 1rem; }
[hidden] { display: none !important; }

.container { width: 100%; padding-inline: var(--gutter); }
.narrow { max-width: calc(34rem + 2 * var(--gutter)); }
.section-end { padding-bottom: var(--space); }
.page-head { padding-block: var(--space) 3rem; }
.page-head h1 { margin: 0; }
.page-head p { margin-top: 1.5em; }

/* Logo e header */
.logo { display: inline-flex; align-items: center; gap: .5rem; }
.logo-icon { width: 22px; height: 22px; flex: none; }
.logo-icon * { vector-effect: non-scaling-stroke; stroke-width: .75px; }
.logo-text { font-weight: 500; font-size: 12px; letter-spacing: .14em; }
.site-header { position: relative; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 1.1rem var(--gutter); }
.brand { text-decoration: none; }
.nav-toggle {
  position: relative; z-index: 2; background: none; border: 0; padding: .4rem 0; color: inherit; cursor: pointer;
  font: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
.site-nav {
  position: fixed; inset: 0; z-index: 1; display: none; flex-direction: column; justify-content: center; gap: 1.5rem;
  padding-inline: var(--gutter); background: var(--paper);
}
.nav-open { overflow: hidden; }
.nav-open .site-nav { display: flex; }
.site-nav a, .link-list a, .site-footer a, .site-footer .link-button { text-decoration: none; }
.site-nav a { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.site-nav a:hover, .site-footer a:hover, .link-list a:hover { opacity: 1; text-decoration: underline; }
.site-nav a[aria-current], .link-list a[aria-current] { text-decoration: underline; }
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; flex-direction: row; gap: 2rem; padding: 0; background: none; }
}

/* Testi cliccabili e pulsanti */
.btn {
  display: inline-block; padding: 1rem 2.5rem; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 0;
  font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--paper); color: var(--ink); opacity: 1; }
.btn:disabled { opacity: .5; cursor: wait; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; transition: opacity .15s; }
.link-button:hover { opacity: .55; }
.text-link { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }

/* Home: una sola immagine a tutta pagina */
.feature { padding-inline: var(--gutter); text-align: center; }
.feature-link { display: inline-block; text-decoration: none; }
.feature-link:hover { opacity: 1; }
.feature img { height: calc(100svh - 8.5rem); min-height: 22rem; width: auto; margin-inline: auto; object-fit: contain; }
.feature-caption { padding-block: 1.1rem 0; }
.feature-caption h1 { margin: 0 0 .25em; }
@media (max-width: 620px) {
  .feature img { width: 100%; height: auto; min-height: 0; }
}
.home-grid { padding-block: var(--space); }

/* Griglia catalogo */
.grid-cards { display: grid; gap: 3.5rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5rem 2rem; } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid-cards[aria-busy] { opacity: .5; }
.card-link { display: block; text-decoration: none; }
.card-link:hover { opacity: 1; }
.card-link:hover img { opacity: .75; }
.card-media { aspect-ratio: 4 / 5; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-title { margin: .9rem 0 .2rem; }
.tag { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.5; }
.empty { grid-column: 1 / -1; color: var(--muted); margin: 0; }

/* Filtri: solo testo */
.filters { display: grid; gap: .9rem; margin-bottom: 4rem; }
.link-list { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin: 0; padding: 0; list-style: none; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.filter-search { display: flex; max-width: 16rem; margin-top: 1rem; }
.results-count { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 1.5rem; }

/* Dettaglio evento */
.event-detail { display: grid; gap: 2.5rem; padding-block: 1.5rem var(--space); }
.event-poster img { width: 100%; }
.event-info h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 400; letter-spacing: 0; line-height: 1.15; text-transform: none; margin: 0 0 .5em; }
.event-info .prose { margin-block: 2.5rem; max-width: 34rem; }
.facts { display: grid; gap: .55rem; max-width: 34rem; margin-bottom: 2.5rem; }
.facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; }
.facts dt { font-size: 11px; line-height: 1.7; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lineup-item small { display: block; font-size: 12px; color: var(--muted); }
.event-map { margin-top: 2.5rem; max-width: 34rem; }
.map { margin-top: .75rem; }
.map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; filter: grayscale(1); }
@media (min-width: 860px) {
  .event-detail { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--gutter) clamp(3rem, 8vw, 8rem); align-items: start; }
  .event-info { position: sticky; top: 2rem; }
}

/* Gallery */
.grid-photos { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .grid-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.photo:hover { opacity: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo:hover img { opacity: .75; }
.gallery-group { margin-bottom: var(--space); }
.gallery-group h2 { margin-bottom: .2em; }
.gallery-group .tag { margin-bottom: 1.5rem; }
.lightbox { background: var(--paper); border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; color: var(--ink); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: var(--paper); }
.lightbox figure { margin: 0; width: min(1100px, 100vw - 2 * var(--gutter)); text-align: center; }
.lightbox img { max-height: 80dvh; margin-inline: auto; width: auto; }
.lightbox figcaption { padding-top: .8rem; color: var(--muted); min-height: 2.6em; }
.lightbox button { position: absolute; padding: .4rem 0; background: none; border: 0; color: inherit; font: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.lightbox button:hover { text-decoration: underline; }
.lb-close { top: .7rem; right: var(--gutter); }
.lb-prev { left: var(--gutter); bottom: .8rem; }
.lb-next { right: var(--gutter); bottom: .8rem; }

/* Moduli: solo la linea inferiore */
.form { display: grid; gap: 2rem; }
.form-row { display: grid; gap: 2rem; }
@media (min-width: 620px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { min-width: 0; border: 0; padding: 0; margin: 0; }
label, legend { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; appearance: none; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0;
  padding: .45rem 0; font: inherit; color-scheme: light;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%, var(--ink) 55%, transparent 55%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%, var(--ink) 55%, transparent 55%); background-size: 5px 5px; background-position: calc(100% - 5px) 55%, 100% 55%; background-repeat: no-repeat; padding-right: 1.25rem !important; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field:has(.field-error) input, .field:has(.field-error) select, .field:has(.field-error) textarea { border-bottom-color: var(--ink); }
/* Sotto i 16px iOS ingrandisce la pagina quando si tocca un campo */
@media (pointer: coarse) { input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; } }
.field-error { font-size: 12px; margin: .4rem 0 0; }
.hint { color: var(--muted); font-size: 12px; margin: .4rem 0 0; min-height: 1.5em; }
.check { display: flex; gap: .6rem; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink); }
input[type=checkbox], input[type=radio] { margin: .15rem 0 0; accent-color: var(--ink); flex: none; }
.type-choice { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.type-choice legend { margin-bottom: .6rem; }
.type-choice .field-error { width: 100%; }
.choice { display: flex; gap: .5rem; align-items: center; color: var(--ink); font-size: 13px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.choice input { margin: 0; }
.choice:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.alert { margin-bottom: 2rem; }
.alert-error { font-weight: 500; }
.flash-area { padding-top: 2rem; }
.form-status { margin: 0; min-height: 1.5em; }
.form-status.is-error { font-weight: 500; }

/* Pagine di testo */
.prose ul { padding-left: 1.1rem; margin: 0 0 1em; }
.legal-text h2 { margin-top: 3rem; margin-bottom: .75em; }
.services { display: grid; gap: 2.5rem; max-width: 34rem; padding-bottom: var(--space); }
.service h2 { margin-bottom: .5em; }
.service p { margin: 0; }
.contact-grid { display: grid; gap: 4rem; padding-bottom: var(--space); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 34rem); justify-content: space-between; gap: 6rem; } }
.contact-grid h2 { margin: 2.5rem 0 .5em; }
.contact-grid h2:first-child { margin-top: 0; }
.hours div { display: flex; gap: 1rem; max-width: 18rem; justify-content: space-between; }
.social-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.confirm-box p { margin-bottom: .75em; }
.confirm-box .text-link { display: inline-block; margin-top: 2rem; }

/* Footer: una riga */
.site-footer { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; padding: 2rem var(--gutter) 1.5rem; font-size: 11px; }
.site-footer .muted { margin-left: auto; }
@media (max-width: 859px) { .site-footer .muted { margin-left: 0; width: 100%; } }
.site-footer .link-button { font-size: 11px; }
.site-footer .link-button:hover { opacity: 1; text-decoration: underline; }

/* Banner cookie */
.cookie-banner {
  position: fixed; inset: auto 0 0; z-index: 60; background: var(--ink); color: var(--paper);
  padding: 1rem var(--gutter); display: flex; flex-direction: column; gap: .75rem; font-size: 12px;
}
.cookie-banner p { margin: 0; max-width: 60rem; }
.cookie-banner :focus-visible { outline-color: var(--paper); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 1.25rem; flex: none; text-transform: uppercase; letter-spacing: .06em; }
@media (min-width: 860px) { .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; gap: 3rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
