/* Le Scintille di P. Enrico Deidda — foglio di stile */

@font-face { font-family: "Gabarito"; src: url("font/gabarito.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("font/public-sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("font/public-sans-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --petrolio: #164e63;      /* colore di Solo: testata, archivi, contatti */
  --petrolio-scuro: #0f3a4a;
  --verde: #2e7d32;         /* intestazioni delle tabelle e pulsanti audio */
  --verde-scuro: #1b5e20;
  --oro: #facc15;           /* pulsante «Contattaci» */
  --carta: #f4f4f5;
  --inchiostro: #1f2328;
  --grigio: #5b6470;
  --fondo-piede: #2e2e2e;
  --bordo: #d4d4d8;
  --titoli: "Gabarito", system-ui, sans-serif;
  --testo: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--testo); font-size: 17px; line-height: 1.6; color: var(--inchiostro); background: #fff; }
h1, h2, h3, h4 { font-family: var(--titoli); line-height: 1.2; margin: 0 0 .6em; }
img { max-width: 100%; display: block; }
a { color: #1565c0; }
.contenitore { width: min(1100px, 100% - 32px); margin-inline: auto; }
.stretto { width: min(760px, 100% - 32px); margin-inline: auto; }
section { padding: 64px 0; scroll-margin-top: 64px; }
.titolo-sezione { text-align: center; font-size: clamp(1.7rem, 4vw, 2.3rem); }

/* --- testata --- */
.testata { background: var(--petrolio); color: #fff; position: sticky; top: 0; z-index: 10; }
.testata .contenitore { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.marchio { font-family: var(--titoli); font-weight: 700; font-size: 1.35rem; color: #fff; text-decoration: none; margin-right: auto; }
.menu { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.menu a { color: #fff; text-decoration: none; font-size: .95rem; }
.menu a:hover { text-decoration: underline; }
.bottone { display: inline-block; background: var(--oro); color: #1f1f1f; font-weight: 600; text-decoration: none; padding: 10px 22px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.bottone:hover { filter: brightness(.95); }
.menu .bottone { color: #1f1f1f; padding: 8px 18px; }

/* --- introduzione --- */
.intro { position: relative; color: #fff; min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 96px 0;
  background: #111 center / cover no-repeat; }
.intro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.6)); }
.intro > * { position: relative; }
.intro h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.intro p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 28px; }

/* --- archivi --- */
.archivi { background: var(--petrolio); color: #fff; }
.anno { background: #fff; color: var(--inchiostro); border-radius: 10px; margin: 0 0 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.anno summary { cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--titoli); font-weight: 700; font-size: 1.3rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.anno summary::-webkit-details-marker { display: none; }
.anno summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--verde); }
.anno[open] summary::after { content: "–"; }
.anno summary small { font-family: var(--testo); font-weight: 400; font-size: .9rem; color: var(--grigio); margin-left: auto; }
.tabella-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border-top: 1px solid var(--bordo); padding: 9px 10px; text-align: center; }
thead th { background: var(--verde); color: #fff; font-weight: 600; border-top: 0; }
tbody tr:nth-child(even) { background: #f6f6f6; }
tbody tr:hover { background: #e0f7fa; }
td.titolo { text-align: left; }
td.num { color: var(--grigio); width: 4.5em; white-space: nowrap; }
td.doc a { font-size: 1.3rem; text-decoration: none; }
.audio { font-size: 1rem; line-height: 1; padding: 7px 11px; background: var(--verde); color: #fff; border: 0; border-radius: 5px; cursor: pointer; min-width: 44px; }
.audio:hover { background: var(--verde-scuro); }
.audio[aria-pressed="true"] { background: #b45309; }
.manca { color: #a1a1aa; }

/* --- galleria --- */
.galleria { background: var(--fondo-piede); color: #fff; }
.carosello { position: relative; }
.binario { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; }
.binario::-webkit-scrollbar { display: none; }
.binario figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; background: #1a1a1a; height: min(70vh, 620px); }
.binario img { width: 100%; height: 100%; object-fit: contain; }
.freccia { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.freccia.sx { left: 10px; } .freccia.dx { right: 10px; }
.contatore { text-align: center; margin-top: 12px; color: #d4d4d8; font-size: .95rem; }

/* --- storia --- */
.storia { background: var(--carta); }
.storia .immagine-storia { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 32px; }
.storia h4 { font-size: 1.4rem; }
.storia blockquote { margin: 1em 0; padding: .4em 1.2em; border-left: 4px solid var(--petrolio); font-style: italic; color: #333; }

/* --- team --- */
.team { background: var(--carta); padding-top: 0; }
.membri { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; text-align: center; }
.membri img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; }
.membri h3 { font-size: 1.3rem; }
.membri .ruolo { color: var(--petrolio); }

/* --- contatti --- */
.contatti { background: var(--petrolio); color: #fff; }
.modulo { display: grid; gap: 12px; }
.modulo label { display: grid; gap: 4px; font-size: .95rem; }
.modulo input, .modulo textarea { font: inherit; padding: 11px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.95); color: var(--inchiostro); }
.modulo textarea { min-height: 140px; resize: vertical; }
.modulo .consenso { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.modulo .consenso input { margin-top: 4px; }
.modulo .bottone { justify-self: start; }
.esito { margin: 4px 0 0; font-weight: 600; min-height: 1.6em; }
.nascosto { position: absolute; left: -9999px; }
.contatti a { color: var(--oro); }

/* --- piede --- */
.piede { background: var(--fondo-piede); color: #d4d4d8; padding: 32px 0; font-size: .9rem; }
.piede .contenitore { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.piede a { color: #d4d4d8; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .testata { position: static; }   /* sul telefono la testata non resta fissa: ruberebbe mezzo schermo */
  .menu { gap: 14px; width: 100%; padding-bottom: 10px; }
  .menu .bottone { margin-left: auto; }
  th, td { padding: 7px 5px; font-size: .85rem; }
  td.num { width: 3.6em; }
  .anno summary { font-size: 1.15rem; padding: 14px 16px; }
}
