/* =========================================================================
   FICEDL · Bologna 2026
   Font: Junicode (SIL OFL) — self-hosted, variabile (wght 300–700)
   Palette accessibile (WCAG AA): carta crema, inchiostro, rosso profondo.
     carta   #f4f0e6   sfondo
     inchio. #1a1a1a   testo        → 16:1  (AAA)
     rosso   #c01818   titoli/link  → 5.6:1 (AA)
   ========================================================================= */

@font-face {
  font-family: "Junicode";
  src: url("/fonts/Junicode-Roman.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Junicode";
  src: url("/fonts/Junicode-Italic.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --carta: #f4f0e6;
  --ink: #1a1a1a;
  --rosso: #c01818;
  --nero: var(--ink); /* alias: bordi e regole usano l'inchiostro */
  --hair: rgba(26, 26, 26, 0.3);
  --max: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--carta);
  color: var(--ink);
  font-family: "Junicode", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.3rem);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--rosso);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
a:hover { background: var(--rosso); color: var(--carta); border-color: var(--rosso); }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 5vw, 3rem);
}

/* ---- striscione federazione (in alto, come sul volantino) ------------- */
.federation {
  padding: 1.4rem 0 1.1rem;
  font-weight: 700;
  font-size: clamp(0.74rem, 0.62rem + 0.6vw, 0.95rem);
  line-height: 1.32;
  text-align: center;
  text-wrap: balance;
}
.federation .sep { opacity: 0.55; padding: 0 0.15em; }

/* ---- hero --------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  gap: 1rem clamp(1rem, 4vw, 3rem);
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.hero__title {
  font-weight: 700;
  font-size: clamp(4.5rem, 2rem + 16vw, 13rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--rosso);
}
.hero__dateline {
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem);
  margin: 0.4rem 0 0;
}
.hero__sub {
  font-style: italic;
  font-size: clamp(1rem, 0.85rem + 1vw, 1.4rem);
  margin: 0.2rem 0 0;
}

/* l'edificio "emerge" dal rosso: il bianco si fonde, le linee restano nere,
   le pietre grigie diventano rosso scuro (mix-blend-mode: multiply) */
.hero__art {
  align-self: end;
  margin-bottom: -1px;
}
.hero__art img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

/* ---- sezioni di testo --------------------------------------------------- */
section { padding-block: clamp(2rem, 6vw, 4rem); }

.rule { border: 0; border-top: 3px solid var(--nero); margin: 0; }

.prose { max-width: 46rem; }
.prose h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.05;
  margin: 2rem 0 0.6rem;
  color: var(--rosso);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose strong { font-weight: 700; }

/* ---- programma ---------------------------------------------------------- */
.section-title {
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 4vw, 4rem);
  line-height: 0.95;
  margin: 0 0 1.6rem;
  color: var(--rosso);
}

.program {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0;
  border: 3px solid var(--nero);
}
.day {
  padding: 1.4rem 1.4rem 1.6rem;
  border-right: 3px solid var(--nero);
}
.day:last-child { border-right: 0; }
.day__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 700;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1;
  margin-bottom: 0.15rem;
}
.day__time { font-style: italic; font-weight: 400; }
.day__venue {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  font-style: italic;
  border-bottom: 1px solid currentColor;
}
.day__items { list-style: none; margin: 0; padding: 0; }
.day__items li {
  padding: 0.45rem 0 0.45rem 1.4rem;
  position: relative;
  border-top: 1px solid rgba(0, 0, 0, 0.35);
  line-height: 1.3;
}
.day__items li::before {
  content: "→";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--rosso);
}

@media (max-width: 760px) {
  .day { border-right: 0; border-bottom: 3px solid var(--nero); }
  .day:last-child { border-bottom: 0; }
}

/* ---- luoghi ------------------------------------------------------------- */
.venues { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.venue h3 { font-weight: 700; font-size: 1.4rem; margin: 0 0 0.2rem; }
.venue p { margin: 0; font-style: italic; }
.venue .tag {
  display: inline-block; font-style: normal; font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 2px solid var(--nero); padding: 0.05rem 0.5rem; margin-top: 0.5rem;
}

/* ---- footer ------------------------------------------------------------- */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-block: 2.5rem 3rem;
  font-weight: 700;
  font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.2rem);
}

/* ---- responsive hero --------------------------------------------------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__art { max-width: 60%; margin-top: 1.5rem; }
}
@media (max-width: 480px) {
  .hero__art { max-width: 80%; }
}

/* ---- topbar: navigazione + lingue -------------------------------------- */
.topbar { border-bottom: 3px solid var(--ink); }
.topbar__inner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.4rem;
  padding-block: 0.7rem;
}
.topbar .brand {
  font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em;
  color: var(--rosso); border: 0; margin-right: auto;
}
.topbar .brand:hover { background: none; color: var(--rosso); }
.nav, .langs { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a, .langs a { border-bottom: 0; font-weight: 400; }
.nav a:hover, .langs a:hover { background: none; color: var(--rosso); text-decoration: underline; }
.langs {
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em;
  padding-left: 1.1rem; border-left: 2px solid var(--hair);
}
.langs a { color: var(--ink); }
.langs a.on { color: var(--rosso); text-decoration: underline; }

/* ---- pagine singole (invito + eventi) ---------------------------------- */
.page { padding-block: clamp(2rem, 6vw, 4rem); max-width: 52rem; }
.page__title {
  font-weight: 700; color: var(--rosso); line-height: 1.0;
  font-size: clamp(2.2rem, 1.4rem + 4vw, 4rem); margin: 0 0 1.2rem;
  text-wrap: balance;
}
.page .prose { max-width: none; }
.page .prose p { margin: 0 0 1.1rem; }

.meta {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1.2rem;
  margin: 0 0 2rem; padding: 1rem 0; border-block: 2px solid var(--hair);
  font-size: 0.95rem;
}
.meta dt { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; align-self: center; }
.meta dd { margin: 0; font-style: italic; }

.tbd {
  font-style: italic; padding: 1.2rem 1.4rem; border: 2px dashed var(--hair);
  background: rgba(192, 24, 24, 0.05);
}
.backlink { margin-top: 2.5rem; }
.backlink a { font-weight: 700; }

/* bottone "leggi l'invito" */
.btn {
  display: inline-block; margin-top: 0.5rem; padding: 0.5rem 1.1rem;
  font-weight: 700; color: var(--carta); background: var(--rosso);
  border: 2px solid var(--rosso);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--carta); }

.lead { font-style: italic; margin: 0 0 2rem; }
.lead a { border-bottom: 0; }

/* ---- adesioni ---------------------------------------------------------- */
.adesioni { list-style: none; margin: 2rem 0; padding: 0; border-top: 2px solid var(--hair); }
.adesione {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.3rem 1rem;
  padding: 0.7rem 0; border-bottom: 2px solid var(--hair);
}
.adesione__name { font-weight: 700; }
.adesione__place { font-style: italic; opacity: 0.85; }
.wip {
  font-size: 0.85rem; font-weight: 700; font-style: normal; vertical-align: middle;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--carta);
  background: var(--rosso); padding: 0.1rem 0.55rem; border-radius: 2px;
  white-space: nowrap;
}

/* ---- prose: sottotitoli e liste (pagine di testo) ---------------------- */
.prose h3 {
  font-weight: 700; font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  margin: 1.6rem 0 0.4rem;
}
.prose ul { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; line-height: 1.4; }
.luoghi-link { margin-top: 1.6rem; font-weight: 700; }
