:root {
  --black: #010101;
  --black-soft: #11110f;
  --paper: #eee9df;
  --muted: #aaa69e;
  --line: #37342f;
  --accent: #7f2d27;
  --accent-light: #b4775d;
  --max-width: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, audio { font: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--black);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.mobile-nav,
main,
.site-footer {
  width: min(100% - 40px, var(--max-width));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.brand {
  text-decoration: none;
  font-size: 24px;
  letter-spacing: .24em;
}
.site-nav { display: flex; gap: 30px; }
.site-nav a,
.mobile-nav a,
.menu-button {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--accent-light); }
.menu-button {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 9px 12px;
}
.mobile-nav {
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a { display: block; padding: 10px 0; }

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(310px, .75fr) minmax(0, 1.35fr);
  gap: clamp(36px, 5vw, 86px);
  align-items: center;
  padding-bottom: 56px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow,
.section-number {
  margin: 0 0 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: 11px;
}
.hero h1 {
  margin: 0 0 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(64px, 7vw, 116px);
  line-height: .87;
  letter-spacing: -.055em;
}
.hero h1 em {
  color: var(--accent-light);
  font-style: normal;
}
.hero-intro {
  max-width: 410px;
  margin: 0 0 28px;
  font-size: clamp(17px, 1.5vw, 21px);
  color: #d3cec5;
}
.text-link {
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent);
}
.hero-visual {
  position: relative;
  margin: 0;
  min-height: min(68vw, 680px);
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(127,45,39,.15) 48% 49%, transparent 49%),
    #121210;
}
.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
.hero-visual.has-image img { opacity: 1; }
.section {
  padding: clamp(54px, 7vw, 100px) 0;
  border-top: 1px solid var(--line);
}
.section-heading {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: start;
  margin-bottom: clamp(28px, 3.5vw, 50px);
}
.section h2,
.contact-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.04em;
}
.audio-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.audio-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px 14px 14px;
  border: 1px solid var(--line);
  background: var(--black-soft);
}
.media-index { color: var(--accent-light); font-size: 12px; letter-spacing: .12em; }
.audio-copy h3,
.video-card h3 { margin: 0; font-size: 18px; font-weight: 400; }
.audio-copy p,
.video-card p { margin: 5px 0 0; color: var(--muted); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 22px;
}
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--black-soft); }
.video-frame iframe,
.video-frame video { width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-card h3 { margin-top: 14px; }

.gallery-intro { max-width: 560px; margin: -25px 0 45px 80px; color: var(--muted); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.gallery-item {
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(.72);
  transition: transform .25s ease, filter .25s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
  filter: saturate(1);
}
.gallery-item span { display: none; }
.empty-message { margin-left: 80px; color: var(--muted); }

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: clamp(48px, 8vw, 140px);
  padding: clamp(60px, 8vw, 115px) 0;
  border-top: 1px solid var(--line);
}
.contact-section > div:first-child > p:last-child { max-width: 560px; color: var(--muted); }
.contact-list { align-self: end; }
.contact-item {
  display: block;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.contact-item:last-child { border-bottom: 1px solid var(--line); }
.contact-item span { display: block; color: var(--accent-light); font-size: 10px; letter-spacing: .17em; text-transform: uppercase; }
.contact-item strong { display: block; margin-top: 6px; font-size: 19px; font-weight: 400; }
.contact-item:hover strong { color: var(--accent-light); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: #77736c;
  font-size: 11px;
}
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }

.gallery-dialog {
  width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--paper);
}
.gallery-dialog::backdrop { background: rgba(0,0,0,.88); }
.gallery-dialog img { max-height: 78vh; margin: auto; }
.gallery-dialog p { margin: 12px 0 0; color: var(--muted); }
.dialog-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 64px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  background: rgba(9,9,8,.78);
  color: var(--paper);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}
.dialog-prev { left: 10px; }
.dialog-next { right: 10px; }
.dialog-nav:hover,
.dialog-nav:focus-visible { border-color: var(--accent); background: var(--accent); }
.dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--paper);
  font-size: 26px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-button { display: block; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 36px 0 80px;
  }
  .hero-visual { min-height: 70vw; order: -1; }
  .hero h1 { font-size: clamp(58px, 16vw, 96px); }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audio-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-section { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header,
  .mobile-nav,
  main,
  .site-footer { width: min(100% - 28px, var(--max-width)); }
  .site-header { min-height: 72px; }
  .brand { font-size: 20px; }
  .hero { padding-top: 14px; }
  .hero-visual { min-height: 92vw; }
  .hero h1 { font-size: clamp(52px, 17vw, 78px); }
  .section-heading { grid-template-columns: 45px 1fr; }
  .section h2,
  .contact-section h2 { font-size: clamp(40px, 13vw, 64px); }
  .video-grid { grid-template-columns: 1fr; }
  .audio-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-intro,
  .empty-message { margin-left: 45px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-section { padding-block: 60px; }
  .site-footer { display: block; }
  .site-footer p + p { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


@media (max-width: 420px) {
  .audio-list { grid-template-columns: 1fr; }
}

/* Modulo richiesta informazioni */
.contact-side { align-self: start; }
.contact-list { margin-bottom: 42px; }
.contact-form { display: grid; gap: 20px; padding: clamp(26px, 4vw, 46px); border: 1px solid var(--line); background: var(--black-soft); box-shadow: inset 3px 0 0 var(--accent); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-form h3 { margin: 0 0 10px; color: var(--paper); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(26px, 3vw, 38px); font-weight: 400; letter-spacing: -.02em; }
.contact-form label { display: grid; gap: 8px; color: var(--accent-light); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.contact-form input,
.contact-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; background: transparent; color: var(--paper); font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none; }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form input::placeholder { color: #706d67; }
.contact-form .privacy-check { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; letter-spacing: normal; text-transform: none; }
.contact-form .privacy-check input { width: 16px; flex: 0 0 16px; margin-top: 1px; }
.contact-form button { justify-self: start; border: 1px solid var(--accent); padding: 14px 20px; background: transparent; color: var(--paper); font: inherit; cursor: pointer; }
.contact-form button:hover { background: var(--accent); color: var(--black); }
.form-trap { position: absolute; left: -9999px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
/* Privacy, cookie e contenuti esterni */
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.legal-links button,
.cookie-info { border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; cursor: pointer; }
.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  max-width: 1180px;
  margin: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: #151411;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { margin: 0 0 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 400; }
.cookie-banner p { max-width: 760px; margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions button,
.video-consent button { border: 1px solid var(--line); padding: 11px 17px; background: transparent; color: var(--paper); cursor: pointer; }
.cookie-actions .cookie-accept,
.video-consent button { border-color: var(--accent); padding: 7px 12px; background: transparent; font-size: 12px; }
.cookie-actions button:hover,
.video-consent button:hover { border-color: var(--accent-light); }
.privacy-dialog { width: min(92vw, 760px); max-height: 88vh; padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line); background: var(--black-soft); color: var(--paper); }
.privacy-dialog::backdrop { background: rgba(0,0,0,.86); }
.privacy-dialog h2 { margin: 0 45px 28px 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(36px, 6vw, 58px); font-weight: 400; }
.privacy-dialog h3 { margin: 26px 0 6px; color: var(--accent-light); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.privacy-dialog p { margin: 0; color: var(--muted); }
.privacy-dialog a { color: var(--paper); }
.privacy-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; color: var(--paper); font-size: 27px; cursor: pointer; }
.video-consent { display: grid; place-content: center; justify-items: center; gap: 14px; width: 100%; height: 100%; padding: 28px; background-color: #151411; background-position: center; background-size: cover; text-align: center; }
.video-consent p { max-width: 310px; margin: 0; color: var(--muted); }
@media (max-width: 620px) {
  .cookie-banner { right: 10px; bottom: 10px; left: 10px; grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}
/* Copertine individuali dei player audio */
.audio-item {
  position: relative;
  background-color: var(--black-soft);
  background-position: center;
  background-repeat: no-repeat;
  background-size: calc(100% - 20px) calc(100% - 20px);
  box-shadow: inset 0 -70px 70px rgba(0,0,0,.28);
}
.audio-item > * { position: relative; z-index: 1; }
.audio-item .media-index { color: #d29678; text-shadow: 0 1px 8px #000; }
.audio-item .audio-copy h3,
.audio-item .audio-copy p { text-shadow: 0 2px 10px #000; }
.video-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: var(--black-soft);
  background-position: center;
  background-size: cover;
  color: var(--paper);
  cursor: pointer;
}
.video-cover span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(9,9,8,.68);
  font-size: 23px;
  transition: transform .2s ease, background .2s ease;
}
.video-cover:hover span,
.video-cover:focus-visible span { transform: scale(1.08); background: var(--accent); }
/* Player audio uniforme tra browser */
.custom-audio {
  display: grid;
  grid-template-columns: 28px minmax(35px, 1fr) 38px 36px;
  gap: 7px;
  align-items: center;
  min-width: 0;
  margin-top: auto;
  padding: 9px 8px;
  background: rgba(220,220,216,.86);
  color: #171715;
}
.audio-toggle,
.audio-volume { border: 0; padding: 0; background: transparent; color: #171715; cursor: pointer; }
.audio-toggle { position: relative; width: 28px; height: 28px; }
.audio-toggle::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 9px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}
.audio-toggle.is-playing::before {
  top: 7px;
  left: 8px;
  width: 11px;
  height: 14px;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}
.custom-audio input[type="range"] { width: 100%; min-width: 0; height: 4px; margin: 0; accent-color: #272725; cursor: pointer; }
.audio-elapsed { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.audio-volume { width: 36px; height: 28px; font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.audio-volume.is-muted { opacity: .48; text-decoration: line-through; }
.custom-audio.has-error { outline: 1px solid var(--accent); }
.custom-audio.has-error .audio-elapsed { color: #8b1f18; font-size: 10px; }
