/* ============================================================
   Legal subpages — privacy.html, cookie.html, note-legali.html
   Shared prose layout. Loaded ALONGSIDE the modular source sheets:
   theme.css (palettes + dark), base.css (reset/body/skip-link/grain box),
   nav.css (header), sections.css (footer). This file only adds the
   document-prose layer and reuses existing custom properties.
   ============================================================ */

/* Grain background-image. base.css declares the body::before box
   (position / opacity / blend) but index.html injects the SVG via an
   idle script. The subpages have no such injector, so set it directly. */
body::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* The nav is position:fixed and rendered permanently in its .scrolled
   (solid) state here — there is no hero behind it — so the content must
   clear it. */
.legal-main {
  padding-top: clamp(96px, 12vh, 140px);
  padding-bottom: var(--section-pad);
  position: relative;
  z-index: 2;
}

.legal-prose {
  max-width: 74ch;
  margin: 0 auto;
}

/* ── Editorial header (eyebrow + title) ── */
.legal-head {
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--rule);
}
.legal-head .eyebrow { margin-bottom: 18px; }
.legal-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: clamp(38px, 5.5vw, 66px);
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.legal-head h1 em { font-style: italic; color: var(--brass-deep); }
.legal-head .lead {
  margin: clamp(16px, 2vw, 22px) 0 0;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── Body typography ── */
.legal-prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: clamp(40px, 5vw, 60px) 0 clamp(12px, 1.5vw, 18px);
  color: var(--ink);
}
.legal-prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 23px);
  margin: clamp(22px, 3vw, 30px) 0 8px;
  color: var(--ink);
}
.legal-prose p,
.legal-prose li {
  font-size: clamp(15px, 1.05vw, 16.5px);
  line-height: 1.75;
  color: var(--ink-soft);
}
.legal-prose p { margin: 0 0 clamp(14px, 1.8vw, 20px); }
.legal-prose ul,
.legal-prose ol { margin: 0 0 clamp(16px, 2vw, 22px); padding-left: 1.4em; }
.legal-prose li { margin-bottom: 8px; }
.legal-prose li::marker { color: var(--brass); }
.legal-prose strong { color: var(--ink); font-weight: 600; }
.legal-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.legal-prose a:hover { color: var(--brass-deep); }

/* ── Definition block (titolare / recapiti) ── */
.legal-dl {
  margin: 0 0 clamp(16px, 2vw, 22px);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
}
.legal-dl dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.legal-dl dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.05vw, 16.5px);
  line-height: 1.55;
}
@media (max-width: 560px) {
  .legal-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .legal-dl dd { margin-bottom: 12px; }
}

/* ── Table of contents ── */
.legal-toc {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: clamp(30px, 4vw, 48px);
}
.legal-toc .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 14px;
}
.legal-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 36px; }
.legal-toc li { margin-bottom: 7px; font-size: 14px; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }

/* ── Highlighted notice (e.g. chatbot caveat, disclaimer) ── */
.legal-note {
  border-left: 2px solid var(--brass);
  padding: 2px 0 2px 18px;
  margin: 0 0 clamp(16px, 2vw, 22px);
}
.legal-note p:last-child { margin-bottom: 0; }

/* ── "Ultimo aggiornamento" ── */
.legal-meta {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(20px, 2.5vw, 28px);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
