@charset "UTF-8";
/* COLORI DEL SITO: modifica qui nero, avorio e rosso. */
:root {
  color-scheme: dark;
  --bg: #151615;
  --panel: #20211f;
  --paper: #e9e3d7;
  --muted: #b9b6af;
  --line: #3c3d37;
  --red: #cf4a40;
  --serif: Georgia, 'Times New Roman', serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font:
    15px/1.6 Arial,
    Helvetica,
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
}
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f1b968;
  outline-offset: 5px;
}
::selection {
  background: #84382f;
  color: white;
}
.wrap {
  max-width: 1360px;
  width: calc(100% - 112px);
  margin-inline: auto;
} /* TESTATA E NAVIGAZIONE */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 29px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 2px;
}
.brand-mark {
  font: 34px var(--serif);
  letter-spacing: -2px;
}
.brand-mark span {
  color: var(--red);
}
nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 12px;
}
nav > a {
  color: var(--muted);
}
.languages {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}
.languages button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 5px;
  min-height: 44px;
  min-width: 30px;
  font-size: 12px;
}
.languages button[aria-pressed='true'] {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 9px;
}
.languages > span {
  color: #6f7168;
}
.chapter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 26px 0 33px;
  color: var(--muted);
}
.chapter > span:last-child {
  color: #d48479;
} /* IMPAGINAZIONE PRINCIPALE */
.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(35px, 5vw, 78px);
  align-items: start;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  margin: 0;
}
.red-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
} /* GALLERIA DEI DOCUMENTI */
.gallery {
  background: var(--panel);
}
.image-button {
  border: 0;
  width: 100%;
  height: 465px;
  padding: 20px;
  background: #d7d3c9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.image-button > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.expand {
  position: absolute;
  right: 13px;
  bottom: 13px;
  background: var(--bg);
  color: var(--paper);
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.gallery-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 8px 9px;
}
.gallery-controls button {
  background: transparent;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 21px;
}
.gallery-controls button:hover {
  background: #33342e;
}
#counter {
  font-size: 11px;
  letter-spacing: 2px;
  min-width: 71px;
  text-align: center;
}
#play {
  margin-left: auto;
  font-size: 11px;
  padding: 8px 10px;
  color: var(--muted);
}
.caption {
  margin-top: 18px;
}
.caption > span {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #d48479;
}
.caption p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 15px;
  min-height: 39px;
}
.thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 10px;
}
.thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 58px;
  border: 1px solid var(--line);
  background: #ddd7cb;
  padding: 3px;
  opacity: 0.58;
}
.thumb[aria-pressed='true'] {
  opacity: 1;
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.translation-note {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 450px;
  margin: 12px 0 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #d48479;
  margin: 0 0 15px;
}
h1 {
  font: clamp(48px, 5.4vw, 78px)/0.99 var(--serif);
  letter-spacing: -3px;
  margin: 0 0 30px;
  font-weight: 400;
}
h1 em {
  color: #d9786d;
  font-weight: 400;
} /* COPERTINA E DESCRIZIONE DEL LIBRO */
.book-details {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 25px;
  align-items: start;
}
.cover {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: none;
  transform: rotate(-2deg);
}
.small-rule {
  display: block;
  background: var(--red);
  height: 2px;
  width: 30px;
  margin: 3px 0 17px;
}
.lead {
  font: 22px/1.3 var(--serif);
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
}
.book-copy .muted {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.amazon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #a7332b;
  color: #fff4e8;
  padding: 17px 23px;
  margin-top: 31px;
  font-size: 13px;
  letter-spacing: 0.2px;
  min-height: 58px;
  transition: background 0.2s;
}
.amazon:hover {
  background: #ba3c33;
  text-decoration: none;
}
.amazon > span:last-child {
  font-size: 23px;
}
.purchase-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
} /* STORIA E FONTI */
.story {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(35px, 5vw, 78px);
  border-top: 1px solid var(--line);
  margin-top: 66px;
  padding: 42px 0 44px;
}
.story h2,
.events h2 {
  font: 34px/1.15 var(--serif);
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.7px;
}
.story > div > p:not(.eyebrow) {
  margin: 0 0 14px;
  font-size: 14px;
}
.story .archival-note {
  font-size: 11px !important;
  line-height: 1.75;
} /* CALENDARIO */
.events {
  background: var(--paper);
  color: #262722;
  padding: 36px 39px 40px;
  margin-bottom: 54px;
}
.events .eyebrow {
  color: #9c342b;
}
.events-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid #bdb8ae;
}
.events h2 {
  font-size: 32px;
}
.event-tag {
  font-size: 9px;
  letter-spacing: 1.6px;
  text-align: right;
  max-width: 130px;
}
.empty {
  display: flex;
  gap: 28px;
  align-items: center;
  padding-top: 27px;
}
.empty > span {
  font: 48px var(--serif);
  color: #a7332b;
}
.empty h3 {
  font: 21px var(--serif);
  margin: 0 0 6px;
}
.empty p {
  font-size: 12px;
  color: #565850;
  margin: 0;
}
.event-row {
  display: grid;
  grid-template-columns: 125px 1fr auto;
  gap: 25px;
  align-items: center;
  padding-top: 25px;
  margin-top: 25px;
  border-top: 1px solid #bdb8ae;
}
.event-row:first-child {
  border: 0;
  margin-top: 0;
}
.event-row time {
  font: 22px var(--serif);
}
.event-row h3 {
  font: 23px var(--serif);
  margin: 0;
}
.event-row p {
  margin: 5px 0;
  font-size: 13px;
}
.event-row a {
  border-bottom: 1px solid;
  font-size: 13px;
}
.past {
  font-size: 11px;
  color: #674b45;
}
footer {
  padding-bottom: 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
}
.footer-author {
  color: #999c92;
} /* DOCUMENTO INGRANDITO */
dialog {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--paper);
  width: min(1100px, 95vw);
  max-height: 94dvh;
  padding: 20px;
}
dialog::backdrop {
  background: #000d;
}
.viewer-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 15px;
  font-size: 12px;
}
.viewer-bar button {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px 18px;
  flex-shrink: 0;
  min-height: 44px;
}
.viewer-image {
  overflow: auto;
  max-height: 70dvh;
  background: #d7d3c9;
}
.viewer-image img {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  margin: auto;
}
dialog > p {
  font-size: 11px;
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  background: var(--paper);
  color: #171816;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.noscript {
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}
/* ADATTAMENTI ALLE DIMENSIONI DELLO SCHERMO */
@media (min-width: 1500px) {
  .image-button {
    height: 510px;
  }
}
@media (max-width: 1050px) {
  .wrap {
    width: calc(100% - 64px);
  }
  .hero,
  .story {
    gap: 32px;
  }
  .book-details {
    gap: 18px;
    grid-template-columns: 40% 1fr;
  }
  .lead {
    font-size: 19px;
  }
  .image-button {
    height: 420px;
  }
  h1 {
    font-size: 58px;
  }
  .book-copy .muted {
    font-size: 11px;
  }
  .events {
    padding: 30px;
  }
  .event-tag {
    display: none;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .header {
    padding-block: 20px;
  }
  .brand {
    font-size: 8px;
    gap: 11px;
    letter-spacing: 1.3px;
  }
  .brand-mark {
    font-size: 28px;
  }
  nav {
    gap: 10px;
  }
  nav > a {
    display: none;
  }
  .languages {
    gap: 5px;
    margin: 0;
  }
  .chapter {
    font-size: 8px;
    letter-spacing: 1.2px;
    padding: 24px 0;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .book {
    grid-row: 1;
  }
  .eyebrow {
    font-size: 9px;
  }
  h1 {
    font-size: clamp(54px, 10vw, 76px);
    letter-spacing: -2px;
    margin-bottom: 25px;
  }
  .book-details {
    grid-template-columns: minmax(125px, 38%) 1fr;
    gap: 25px;
  }
  .lead {
    font-size: 21px;
  }
  .book-copy .muted {
    font-size: 12px;
  }
  .amazon {
    margin-top: 25px;
  }
  .image-button {
    height: 390px;
  }
  .caption p {
    min-height: 0;
  }
  .thumbnails {
    gap: 10px;
  }
  .thumb {
    flex-basis: 48px;
  }
  .story {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 36px;
    padding-block: 32px;
  }
  .story h2 {
    font-size: 32px;
  }
  .events {
    padding: 25px 22px;
    margin-bottom: 30px;
  }
  .events h2 {
    font-size: 28px;
  }
  .events-heading {
    padding-bottom: 22px;
  }
  .empty {
    gap: 15px;
  }
  .event-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .event-row a {
    justify-self: start;
  }
  footer {
    flex-direction: column;
    gap: 7px;
  }
  .footer-author {
    display: block;
  }
  .viewer-bar {
    align-items: flex-start;
  }
  .viewer-image {
    max-height: 65dvh;
  }
}
@media (max-width: 360px) {
  .book-details {
    gap: 16px;
  }
  .lead {
    font-size: 19px;
  }
  .book-copy .muted {
    font-size: 11px;
  }
  .image-button {
    height: 330px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
.archive,
.book {
  min-width: 0;
}
#story-title {
  white-space: pre-line;
}

/* ARCHIVIO: categorie separate e miniature. */
.archive-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.archive-tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 48px;
  padding: 11px 12px;
  font-size: 11px;
  letter-spacing: 0.5px;
  line-height: 1.4;
  text-align: left;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
.archive-tabs button[aria-pressed='true'] {
  background: #34312b;
  border-color: #c98370;
  box-shadow: inset 0 -2px #c98370;
}
.archive-tabs button:hover {
  background: #34352f;
}
.archive-tabs button:disabled {
  opacity: 0.4;
}
.archive-tabs button[data-category='politicsChurch'] {
  grid-column: 1 / -1;
}
.archive-empty {
  min-height: 310px;
  padding: 32px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.archive-empty h3 {
  margin: 0 0 16px;
  font: 25px/1.3 var(--serif);
}
.archive-empty p {
  color: var(--muted);
  font-size: 13px;
}
.archive-thumbnails {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}
.thumbnail-group {
  min-width: 0;
  padding: 13px 15px;
  background: #1c1e1b;
  border-left: 2px solid #8c6d59;
}
.thumbnail-group[data-type='photo'] {
  background: #1a2020;
  border-color: #6c8784;
}
.thumbnail-group h3 {
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin: 0 0 11px;
  color: var(--muted);
}
.thumbnail-strip {
  display: flex;
  gap: 9px;
  overflow: auto;
  padding: 4px 3px 7px;
  scrollbar-width: thin;
  scrollbar-color: #66685e transparent;
}
.thumb {
  transition:
    opacity 0.18s ease,
    border-color 0.18s ease;
}
.thumb:hover {
  opacity: 1;
}
.caption p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.cover {
  transform: none;
  box-shadow: none;
  transition: transform 0.25s ease;
}
.music-toggle {
  background: transparent;
  border: 1px solid #66675d;
  border-radius: 2px;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--paper);
  font-size: 11px;
  line-height: 1.4;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.music-toggle:before {
  content: '♪';
  margin-right: 7px;
  color: #d48479;
}
.music-toggle[aria-pressed='true'] {
  background: #34312b;
  border-color: #c98370;
}
.music-toggle:hover {
  background: #30312b;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.header nav {
  gap: 22px;
}
.gallery-controls {
  flex-wrap: wrap;
}
.gallery-controls #play {
  max-width: 180px;
  text-align: right;
  line-height: 1.4;
}
.book,
.archive,
.story,
.events {
  animation: soft-arrival 0.45s ease-out both;
}
.story,
.events {
  animation-delay: 0.08s;
}
@keyframes soft-arrival {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cover:hover {
    transform: translateY(-3px);
  }
}
@media (min-width: 901px) {
  .book {
    position: sticky;
    top: 24px;
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .book {
    grid-row: 1;
  }
  .book-details {
    grid-template-columns: minmax(180px, 30%) 1fr;
    gap: 30px;
  }
  .book-copy .muted {
    font-size: 14px;
  }
  .lead {
    font-size: 25px;
  }
  .book h1 {
    font-size: 72px;
  }
  .book .amazon {
    max-width: 100%;
  }
  .image-button {
    height: 440px;
  }
  .story {
    gap: 28px;
  }
  .header {
    flex-wrap: wrap;
  }
  .header nav {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .header nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .languages {
    margin: 0;
  }
  .music-toggle {
    font-size: 11px;
    padding: 8px 10px;
  }
  .header {
    gap: 12px;
  }
  .book h1 {
    font-size: clamp(54px, 10vw, 72px);
  }
  .book-details {
    gap: 25px;
  }
  .image-button {
    height: 390px;
  }
  .thumbnail-group {
    padding: 12px;
  }
  .archive-tabs button {
    font-size: 10px;
  }
  .story {
    grid-template-columns: 1fr;
  }
  .gallery-controls #play {
    font-size: 10px;
  }
}
@media (max-width: 520px) {
  .book-details {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: 22px;
  }
  .lead {
    font-size: 21px;
  }
  .book-copy .muted {
    font-size: 12px;
  }
  .image-button {
    height: 350px;
    padding: 14px;
  }
}
@media (max-width: 360px) {
  .book-details {
    gap: 15px;
  }
  .lead {
    font-size: 19px;
  }
  .book-copy .muted {
    font-size: 11px;
  }
  .gallery-controls #play {
    max-width: 130px;
  }
  .image-button {
    height: 310px;
  }
  .archive-tabs button {
    padding: 10px 8px;
    letter-spacing: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 520px) {
  .book-details {
    grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
    gap: 22px;
  }
  .book-copy {
    display: contents;
  }
  .book-copy .small-rule {
    display: none;
  }
  .book-details .cover {
    grid-column: 1;
    grid-row: 1;
  }
  .book-copy .lead {
    grid-column: 2;
    grid-row: 1;
    font-size: 22px;
  }
  .book-copy .muted {
    grid-column: 1/-1;
    font-size: 14px;
    line-height: 1.75;
  }
  .amazon {
    font-size: 12px;
  }
  .events h2 {
    font-size: 27px;
  }
}
@media (max-width: 360px) {
  .book-details {
    gap: 17px;
  }
  .book-copy .lead {
    font-size: 20px;
  }
}

/* COPERTINA: l’ombra segue la trasparenza della PNG. */
.cover {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 6px 8px rgb(0 0 0 / 28%));
}

/* CONTATTI: un indirizzo leggibile anche su schermi piccoli. */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  margin-bottom: 24px;
}
.contact h2 {
  font: 32px/1.2 var(--serif);
  font-weight: 400;
  margin: 0;
}
.contact-details {
  min-width: 0;
}
.contact-details p {
  margin: 0 0 10px;
  color: var(--muted);
}
.contact-details a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 18px;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 6px;
}
.site-error {
  border: 1px solid var(--red);
  padding: 16px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .contact-details a {
    font-size: 16px;
  }
}

/* Scritta sotto il pulsante della musica */
.music-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  min-width: 0;
}

.music-caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.music-toggle[hidden] + .music-caption {
  display: none;
}
