/* ============ PDR LITERARY FESTIVAL ============
   Carta avorio, inchiostro, un serif classico e il rosso di PDR:
   l'impaginazione di un programma di festival stampato. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

.fest {
  --paper: #f4eee3;
  --paper-deep: #ebe2d2;
  --ink: #1d1914;
  --ink-soft: #5b5246;
  --gilt: #a8875a;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  padding: 0 clamp(16px, 4vw, 48px) clamp(64px, 8vw, 120px);
}

/* ---------- copertina ---------- */
.fest-hero { padding: clamp(28px, 4vw, 56px) 0 clamp(40px, 5vw, 72px); }
.fest-frame {
  max-width: 1080px; margin: 0 auto;
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: 6px;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 80px) clamp(32px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.55), transparent 60%),
    var(--paper);
}
.fest-crumb {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: clamp(24px, 3vw, 40px);
}
.fest-crumb a { color: var(--ink-soft); transition: color .2s; }
.fest-crumb a:hover { color: var(--red); }
.fest-crumb .sep { margin: 0 8px; opacity: 0.5; }
.fest-presents {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 clamp(16px, 2vw, 24px);
}
.fest-title { margin: 0; line-height: 0.9; font-weight: 400; }
.fest-title-pdr {
  display: block; font-family: var(--sans); font-weight: 900; letter-spacing: -0.045em;
  color: var(--red); font-size: clamp(64px, 12vw, 150px); line-height: 0.85;
}
.fest-title-main {
  display: block; font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(46px, 8.4vw, 112px); margin-top: 0.08em;
}
.fest-title-main em { font-style: italic; font-weight: 400; }
.fest-ornament {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  color: var(--red); font-size: 22px; margin: clamp(22px, 3vw, 34px) auto;
}
.fest-ornament span { display: block; width: clamp(60px, 12vw, 140px); height: 1px; background: var(--ink); }
.fest-lede {
  font-family: var(--serif); font-size: clamp(21px, 2.3vw, 28px); line-height: 1.35;
  max-width: 34em; margin: 0 auto; color: var(--ink);
}
.fest-lede em { color: inherit; }
.fest-facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 640px; margin: clamp(30px, 4vw, 48px) auto 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.fest-facts > div { padding: 14px 8px; }
.fest-facts > div + div { border-left: 1px solid var(--ink); }
.fest-facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.fest-facts dd { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px); font-style: italic; }

/* ---------- intestazioni di sezione ---------- */
.fest-guests, .fest-programme, .fest-coda { max-width: 1080px; margin: 0 auto; }
.fest-section-head {
  display: flex; align-items: baseline; gap: 18px;
  border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: clamp(24px, 3vw, 40px);
}
.fest-kicker { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--red); min-width: 1.4em; }
.fest-section-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.01em; color: var(--ink);
}

/* ---------- il muro dei nomi ---------- */
.fest-guests { margin-bottom: clamp(56px, 7vw, 100px); }
.fest-names {
  text-align: center; margin: 0 auto; max-width: 980px;
  font-family: var(--serif); font-size: clamp(26px, 3.4vw, 46px); line-height: 1.32; text-wrap: balance;
}
.fest-names a { color: var(--ink); text-decoration: none; transition: color .2s; white-space: nowrap; }
.fest-names a:nth-child(4n+2), .fest-names a:nth-child(4n+3) { font-style: italic; }
.fest-names a:hover, .fest-names a:focus-visible { color: var(--red); }
.fest-names .dot { color: var(--red); margin: 0 0.12em; font-style: normal; }
.fest-loading { font-style: italic; color: var(--ink-soft); font-size: 0.7em; }

/* ---------- il programma ---------- */
.fest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 56px); }
.fest-item {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid rgba(29,25,20,0.25);
  scroll-margin-top: 90px;
}
.fest-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer;
  background: var(--paper-deep) center / cover no-repeat; overflow: hidden;
  transition: filter .4s;
  box-shadow: 0 0 0 1px rgba(29,25,20,0.35);
}
.fest-item:hover .fest-thumb, .fest-thumb:focus-visible { filter: brightness(1.06); }
.fest-thumb::after {
  content: "\25B6"; position: absolute; right: 10px; bottom: 10px;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 12px; padding-left: 2px;
  opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s;
}
.fest-item:hover .fest-thumb::after, .fest-thumb:focus-visible::after { opacity: 1; transform: none; }
.fest-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin: 2px 0 8px; }
.fest-author { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.02; color: var(--ink); }
.fest-topic {
  /* i titoli YouTube sono in maiuscolo: li compongo in maiuscoletto, come in un programma a stampa */
  margin: 10px 0 12px; font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--ink-soft);
  text-transform: lowercase; font-variant-caps: small-caps; letter-spacing: 0.05em;
}
.fest-watch {
  background: none; border: 0; padding: 0 0 2px; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--ink);
}
.fest-watch:hover, .fest-watch:focus-visible { color: var(--red); border-color: var(--red); }
.fest-thumb { text-decoration: none; }
.fest-thumb-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; color: var(--ink-soft);
}
.fest-thumb.has-img .fest-thumb-num { display: none; }
.fest-thumb:not(.has-img) { filter: none; }
.fest-thumb:not(.has-img)::after { display: none; }
.fest-watch { text-decoration: none; display: inline-block; }
.fest-item.is-new .fest-meta { color: var(--red); }

/* ---------- chiusura ---------- */
.fest-coda { text-align: center; margin-top: clamp(56px, 7vw, 96px); font-family: var(--serif); font-size: clamp(20px, 2vw, 24px); }
.fest-coda a, .fest-fallback a { color: var(--red); }

/* ---------- finestra video ---------- */
.fest-dialog {
  width: min(1040px, 94vw); max-height: 90vh; margin: auto; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible;
}
.fest-dialog::backdrop { background: rgba(20,16,12,0.86); }
.fest-dialog-inner { position: relative; }
.fest-dialog-video { aspect-ratio: 16 / 9; background: #000; }
.fest-dialog-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.fest-dialog-close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6); background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.fest-dialog-caption { margin: 14px 0 0; font-family: var(--serif); font-size: 22px; font-style: italic; text-align: center; color: #f4eee3; }
.fest-checker { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

@media (max-width: 860px) {
  .fest-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .fest-item { grid-template-columns: 1fr; gap: 12px; }
  .fest-facts dd { font-size: 18px; }
  .fest-frame { outline-offset: 4px; }
}

/* ============ COLLEZIONI PDR: varianti di Saperi, Pop, Attualità ============ */
.fest-subtitle {
  margin: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft);
}

/* --- Saperi: quaderno di laboratorio su carta millimetrata --- */
.fest--saperi {
  --paper: #eef2f0; --paper-deep: #dfe6e3; --ink: #12232a; --ink-soft: #4b5d63;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(18,35,42,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,35,42,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.fest--saperi .fest-frame { background: rgba(238,242,240,0.92); outline-style: dashed; }
.fest--saperi .fest-title-main { font-family: var(--sans); font-weight: 900; letter-spacing: -0.05em; font-size: clamp(56px, 10vw, 128px); }
.fest--saperi .fest-kicker { font-family: var(--mono); font-style: normal; font-size: 15px; }
.fest--saperi .fest-section-head h2 { font-family: var(--sans); font-weight: 900; letter-spacing: -0.03em; }
.fest--saperi .fest-names { font-family: var(--sans); font-weight: 300; letter-spacing: -0.02em; font-size: clamp(24px, 3vw, 40px); }
.fest--saperi .fest-names a:nth-child(4n+2), .fest--saperi .fest-names a:nth-child(4n+3) { font-style: normal; font-weight: 700; }
.fest--saperi .fest-author { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(22px, 2.2vw, 28px); }
.fest--saperi .fest-topic { font-family: var(--sans); text-transform: none; font-variant-caps: normal; letter-spacing: 0; font-size: 16px; }
.fest--saperi .fest-thumb-num { font-family: var(--mono); font-style: normal; font-size: 18px; }

/* --- Pop: locandina da teatro --- */
.fest--pop { --paper: #fbf0dc; --paper-deep: #f2dfbd; --ink: #141010; --ink-soft: #5a4636; }
.fest--pop .fest-frame { border-width: 3px; outline: 0; box-shadow: 10px 10px 0 var(--ink); background: #fff7e8; }
.fest--pop .fest-title-main {
  font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em;
  font-size: clamp(84px, 17vw, 220px); line-height: 0.82; color: var(--ink);
  text-shadow: 6px 6px 0 var(--red);
}
.fest--pop .fest-title-pdr { font-size: clamp(36px, 6vw, 72px); }
.fest--pop .fest-lede { font-family: var(--sans); font-weight: 500; font-size: clamp(18px, 1.9vw, 22px); }
.fest--pop .fest-lede em { font-style: normal; font-weight: 800; }
.fest--pop .fest-facts dd { font-family: var(--sans); font-style: normal; font-weight: 800; text-transform: uppercase; font-size: clamp(14px, 1.5vw, 17px); }
.fest--pop .fest-kicker { font-family: var(--sans); font-style: normal; font-weight: 900; background: var(--red); color: #fff; padding: 0 10px; font-size: 20px; }
.fest--pop .fest-section-head { border-bottom-width: 3px; }
.fest--pop .fest-section-head h2 { font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; }
.fest--pop .fest-names { font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; font-size: clamp(24px, 3.4vw, 46px); line-height: 1.15; }
.fest--pop .fest-names a:nth-child(4n+2), .fest--pop .fest-names a:nth-child(4n+3) { font-style: normal; color: var(--red); }
.fest--pop .fest-names a:hover { color: var(--ink); text-decoration: underline; }
.fest--pop .fest-author { font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; font-size: clamp(22px, 2.3vw, 30px); }
.fest--pop .fest-topic { font-family: var(--sans); text-transform: none; font-variant-caps: normal; letter-spacing: 0; font-size: 16px; color: var(--ink-soft); }
.fest--pop .fest-thumb { filter: saturate(1.15) contrast(1.05); box-shadow: 4px 4px 0 var(--ink); }
.fest--pop .fest-thumb-num { font-family: var(--sans); font-style: normal; font-weight: 900; }

/* --- Attualita': prima pagina di un quotidiano --- */
.fest--attualita { --paper: #f1efe9; --paper-deep: #e3dfd5; --ink: #111; --ink-soft: #4d4a44; }
.fest--attualita .fest-frame { border: 0; outline: 0; border-top: 6px solid var(--ink); border-bottom: 1px solid var(--ink); box-shadow: inset 0 2px 0 var(--paper), inset 0 3px 0 var(--ink); padding-top: clamp(22px, 3vw, 40px); }
.fest--attualita .fest-title-main { font-family: var(--serif); font-weight: 600; font-size: clamp(60px, 11vw, 140px); letter-spacing: -0.02em; }
.fest--attualita .fest-title-pdr { font-size: clamp(30px, 5vw, 56px); }
.fest--attualita .fest-subtitle { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); display: inline-block; padding: 6px 14px; }
.fest--attualita .fest-lede { font-size: clamp(19px, 2vw, 24px); max-width: 36em; }
.fest--attualita .fest-names { font-weight: 600; }
.fest--attualita .fest-section-head { border-bottom: 3px double var(--ink); }
.fest--attualita .fest-item { border-bottom-style: dotted; }
.fest--attualita .fest-author { font-weight: 600; }
.fest--attualita .fest-topic { font-variant-caps: normal; text-transform: none; letter-spacing: 0; font-style: italic; font-size: 19px; }

/* blocco trasparenza dentro la copertina delle collezioni */
.fest-frame .pdr-support { margin-top: clamp(26px, 3.5vw, 40px); }
.fest-frame .share-bar { margin-top: 26px; }
