/* #pugMi - palette campionata da color palette pugmi.png.
   Vincoli di contrasto (calcolati, non stimati):
     #57498B su bianco 7.7:1 -> testo e titoli, ok
     #1A1A2E su #FAE502 13:1 -> blocco giallo, ok
     #1A1A2E su #F29200  7:1 -> bottoni arancio: il testo deve restare scuro
     #6683B9 su bianco 3.85:1 -> solo testo grande, bordi, decorazioni
     #F29200 su bianco 2.38:1 -> mai come colore di testo */
:root {
  --giallo: #FAE502;
  --viola: #57498B;
  --blu: #6683B9;
  --arancio: #F29200;
  --inchiostro: #1A1A2E;
  --tenue: #5b5b6b;
  --tinta: #eef1f8;
  --bordo: #dfe3ee;
  --wrap: min(1120px, 100% - 3rem);
  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--inchiostro);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.4rem, 1.5rem + 4.2vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

a { color: var(--viola); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--arancio);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: var(--wrap); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; z-index: 20; top: 0.5rem; left: 0.5rem;
  background: var(--inchiostro); color: #fff; padding: 0.6rem 1rem; border-radius: 6px;
}

/* --- bottoni --- */
.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--arancio); color: var(--inchiostro); }
.btn-orange:hover { background: #d98300; }
.btn-ghost { border-color: currentColor; color: var(--viola); }
.btn-ghost:hover { background: var(--tinta); }

/* --- header --- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordo);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.25rem;
}
.brand { line-height: 0; margin-right: auto; }
.brand img { width: 92px; }
.menu ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.4rem;
}
.menu a { color: var(--inchiostro); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--viola); text-decoration: underline; }

/* Sotto i 56rem le ancore non ci stanno accanto al logo e alla CTA. La pagina è
   una sola: si scorre. Meglio niente menu che un hamburger da mantenere. */
@media (max-width: 56rem) {
  .menu { display: none; }
  .brand img { width: 76px; }
  .header-cta { padding: 0.55rem 1rem; font-size: 0.92rem; }
}

/* --- sezioni --- */
section { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.block-yellow { background: var(--giallo); }
.block-purple { background: var(--viola); color: #fff; }
.block-tint { background: var(--tinta); }
.block-purple a { color: #fff; }
.block-purple h3 { color: var(--giallo); }
.block-yellow h3 { color: var(--viola); }
.section-lead { color: var(--tenue); max-width: 62ch; }
.block-purple .section-lead { color: rgba(255, 255, 255, 0.88); }

/* --- hero --- */
.hero { padding-top: clamp(3rem, 5vw, 5rem); }
/* Due colonne da 62rem in su: il logo riempie il vuoto a destra, che a schermo
   largo era meta' dell'hero. Sotto quella soglia il logo sparisce, perché è
   già nell'header e ripeterlo non aggiunge nulla. */
.hero-inner { display: grid; gap: 0 3rem; align-items: center; }
.hero-logo { display: none; margin: 0; }
@media (min-width: 62rem) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .hero-logo { display: block; justify-self: center; }
  .hero-logo img { width: min(100%, 22rem); }
  .stats { grid-column: 1 / -1; }
}
.eyebrow {
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.8rem; color: var(--viola); margin-bottom: 1rem;
}
.lead { font-size: 1.15em; max-width: 54ch; color: var(--tenue); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; max-width: none; }
.stats {
  list-style: none; max-width: none;
  margin: 2.75rem 0 0; padding: 1.75rem 0 0;
  display: flex; flex-wrap: wrap; gap: 1rem 3rem;
  border-top: 1px solid var(--bordo);
}
.stats li { display: flex; flex-direction: column; }
.stats b { font-size: 1.9rem; font-weight: 800; color: var(--viola); line-height: 1.1; }
.stats span { font-size: 0.9rem; color: var(--tenue); }

/* --- schede chi siamo --- */
.cards {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
.cards article { border-radius: 14px; padding: 1.5rem; }
.cards p:last-child { margin-bottom: 0; }

/* Le schede prendono il fondo dal blocco che le ospita. Sul viola il bianco sta
   all'8%: così il testo bianco resta a 6.2:1 e i titoli gialli a 4.8:1, senza
   appoggiarsi all'esenzione per il testo grande (sono a peso 600, non 700). */
.block-purple .cards article { background: rgba(255, 255, 255, 0.08); }
.block-yellow .cards article { background: rgba(255, 255, 255, 0.55); }
.block-yellow .cards a { color: #3d3163; }

/* --- eventi --- */
.next { margin-bottom: 3.5rem; }
.loading { color: var(--tenue); }
.next-card, .empty {
  border: 2px solid var(--viola); border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
/* Con zero eventi in calendario il box contiene una riga e un bottone: a 1120rem
   di larghezza sembrerebbe un banner vuoto, non una scheda. */
.empty { border-style: dashed; border-color: var(--blu); max-width: 46rem; }
.next-card .when {
  font-weight: 600; color: var(--viola); text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.85rem;
}
.next-card h4 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); margin: 0.4rem 0 0.75rem; line-height: 1.15; }
.next-card .meta, .event-card .meta { color: var(--tenue); font-size: 0.92rem; }

.event-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
}
.event-card {
  border: 1px solid var(--bordo); border-left: 4px solid var(--blu);
  border-radius: 12px; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.event-card time { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tenue); }
.event-card h4 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.event-card h4 a { text-decoration: none; }
.event-card h4 a:hover { text-decoration: underline; }
.event-card .excerpt { font-size: 0.92rem; color: var(--tenue); margin: 0; }
.event-card .meta { margin: auto 0 0; padding-top: 0.5rem; }
.more { margin-top: 2rem; font-weight: 600; }

/* --- ospita una serata --- */
.ospita { display: grid; gap: 2.5rem 3.5rem; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }
.ospita > div > p:last-child { margin-bottom: 0; }

/* <dl> perché sono coppie termine/descrizione: è l'elemento nativo per questo,
   e regge da sé la relazione fra "Cosa serve" e il suo testo. */
.patto { margin: 0; }
.patto dt {
  font-weight: 600; color: var(--viola);
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding-top: 1rem; border-top: 2px solid var(--blu);
}
.patto dt + dd { margin: 0.5rem 0 1.75rem; }
.patto dd:last-child { margin-bottom: 0; }

/* --- organizzatori --- */
/* L'h2 sta fuori dalla griglia: dentro la prima colonna spingeva il suo contenuto
   sotto al titolo, mentre la seconda partiva dall'alto. Fuori, le due colonne sono
   sorelle e i due h3 si allineano sulla stessa riga. */
.organizers { display: grid; gap: 2.5rem 3.5rem; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); align-items: start; }
.organizers p:last-child { margin-bottom: 0; }
.person { display: flex; gap: 1.1rem; align-items: start; }
.person img { width: 72px; border-radius: 50%; flex: none; }
.person h3 { margin-bottom: 0.35rem; }
.person p { font-size: 0.98rem; }
.person-link { font-weight: 600; }

/* Sui telefoni più stretti l'avatar accanto al testo lascia ~220px di colonna e
   la bio va a capo sette volte: sotto i 24rem passa sopra al nome. */
@media (max-width: 24rem) {
  .person { display: block; }
  .person img { margin-bottom: 0.9rem; }
}

/* --- contatti --- */
.contact { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 48rem) { .contact { grid-template-columns: 1fr; } }
form p { margin: 0 0 1.1rem; }
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bordo); border-radius: 10px;
  background: #fff;
}
input:focus, textarea:focus { border-color: var(--viola); }
textarea { resize: vertical; }
button { font: inherit; cursor: pointer; }
button[disabled] { opacity: 0.6; cursor: progress; }
.form-status { font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #1c6b3f; }
.form-status.ko { color: #a11b1b; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.links a { font-weight: 600; }

/* --- footer --- */
.site-footer { border-top: 1px solid var(--bordo); padding: 2.5rem 0 3.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; }
.footer-inner img { width: 130px; }
.footer-inner p { margin: 0; color: var(--tenue); font-size: 0.92rem; }
