/* ============================================================
   legal.css — shared stylesheet for static/legal content pages
   (cookie-policy, and future privacy-policy/terms pages).
   global.css already supplies tokens, .container, headings, .btn,
   header/footer — this file never redefines any of those.

   Shape: a tinted header band holding the H1, then the document
   itself as a white card lifted onto the page background.
============================================================ */

/* ============================================================
   1. PAGE HEADER BAND
   Same green-050 + radial wash treatment as .hero--split in
   global.css, so a legal page reads as part of the same site.
============================================================ */
.legal-head{
  position:relative;
  overflow:hidden;
  background:var(--green-050);
  padding:clamp(36px,6vw,72px) 5vw clamp(56px,7vw,84px);
}

/* Decorative only — aria-hidden in markup */
.legal-head__shape{
  position:absolute;
  top:-44%; right:-12%;
  width:min(58vw,660px); aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle at 35% 35%,
              rgba(41,145,214,.16) 0%,
              rgba(255,81,0,.08) 45%,
              transparent 70%);
  pointer-events:none;
  z-index:0;
}

.legal-head__inner{
  position:relative;
  z-index:1;
  max-width:880px;
  margin:0 auto;
}

.legal-head h1{
  margin:0;
  color:var(--green-900);
  font-size:clamp(1.9rem,1.45rem + 2.1vw,2.9rem);
  line-height:1.06;
  letter-spacing:-.02em;
}

.legal-head h1 .accent{ color:var(--amber-500); }


/* ============================================================
   2. DOCUMENT CARD
   Pulled up into the band so the two read as one unit.
============================================================ */
.legal{
  padding:0 5vw clamp(64px,8vw,96px);
}

.legal-inner{ max-width:880px; margin:0 auto; }

.legal-doc{
  position:relative;
  z-index:1;
  margin-top:-40px;
  background:var(--paper-000);
  border:1px solid var(--line-200);
  border-radius:var(--radius-l);
  box-shadow:var(--shadow-card);
  padding:clamp(26px,4.5vw,56px);
}


/* ============================================================
   3. SECTION HEADINGS
   Short amber rule above each one — the site's accent motif,
   quieter than a full-width underline on a 13-section document.
============================================================ */
.legal-doc h2{
  margin:44px 0 16px;
  color:var(--green-900);
  font-size:clamp(1.22rem,1.1rem + .55vw,1.6rem);
  line-height:1.22;
}

.legal-doc h2::before{
  content:"";
  display:block;
  width:44px; height:3px;
  margin-bottom:14px;
  border-radius:2px;
  background:var(--amber-500);
}

.legal-doc h2:first-child{ margin-top:0; }


/* ============================================================
   4. BODY COPY
============================================================ */
.legal-doc p{
  margin:0 0 16px;
  font-size:16.5px;
  line-height:1.8;
  color:var(--ink-700);
}

/* Opening paragraph reads as a lead-in */
.legal-doc h2:first-child + p{
  font-size:17.5px;
  color:var(--ink-900);
}

/* Standing-head block some documents open with, above the first
   section — e.g. "IMPORTANTI INFORMAZIONI LEGALI". */
.legal-doc .legal-lead{
  margin:0;
  padding-bottom:26px;
  border-bottom:1px solid var(--line-200);
  color:var(--green-900);
  font-family:var(--font-display);
  font-size:clamp(.95rem,.9rem + .25vw,1.05rem);
  font-weight:700;
  line-height:1.6;
  letter-spacing:.02em;
}

.legal-doc .legal-lead + h2{ margin-top:36px; }

/* Dead links (no href) keep plain-text styling rather than faking a
   link affordance — see the page file's defect notes. */
.legal-doc a[href]{
  color:var(--green-700);
  text-decoration:underline;
  text-underline-offset:2px;
}
.legal-doc a[href]:hover{ color:var(--amber-600); }


/* ============================================================
   5. LISTS — amber bullets, numbered badges, rail on sub-lists
============================================================ */
.legal-doc ul,
.legal-doc ol{
  margin:0 0 18px;
  padding-left:0;
  list-style:none;
  display:grid;
  gap:12px;
  font-size:16.5px;
  line-height:1.8;
  color:var(--ink-700);
}

.legal-doc li{ position:relative; padding-left:26px; }

.legal-doc ul > li::before{
  content:"";
  position:absolute;
  left:7px; top:.74em;
  width:7px; height:7px;
  border-radius:50%;
  background:var(--amber-500);
}

.legal-doc ol{ counter-reset:legal-ol; gap:20px; }

.legal-doc ol > li{
  counter-increment:legal-ol;
  padding-left:40px;
}

.legal-doc ol > li::before{
  content:counter(legal-ol);
  position:absolute;
  left:0; top:.2em;
  width:26px; height:26px;
  display:grid; place-items:center;
  border-radius:50%;
  background:var(--green-900);
  color:var(--paper-000);
  font-family:var(--font-display);
  font-weight:700;
  font-size:.8rem;
  line-height:1;
}

/* Sub-list under a numbered item */
.legal-doc li > ul{
  margin:12px 0 0;
  padding-left:18px;
  border-left:2px solid var(--line-200);
  gap:10px;
}

/* "Cookie di sessione: ..." — the label half of a definition-style item */
.legal-doc li > strong:first-child{ color:var(--green-900); }


/* ============================================================
   6. COOKIE TABLE
   Five columns never fit a phone — scrolls instead of squeezing.
============================================================ */
.table-wrap{
  margin:0 0 22px;
  overflow-x:auto;
  border:1px solid var(--line-200);
  border-radius:var(--radius-m);
  -webkit-overflow-scrolling:touch;
}

.table{
  width:100%;
  min-width:680px;
  border-collapse:collapse;
  font-size:.92rem;
}

.table thead th{
  padding:13px 18px;
  text-align:left;
  white-space:nowrap;
  background:var(--green-900);
  color:var(--paper-000);
  font-family:var(--font-display);
  font-weight:700;
  font-size:.8rem;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.table td{
  padding:14px 18px;
  text-align:left;
  vertical-align:top;
  line-height:1.6;
  color:var(--ink-700);
  border-top:1px solid var(--line-100);
}

.table tbody tr:nth-child(even){ background:var(--green-050); }

.table td strong{ color:var(--green-900); white-space:nowrap; }

.table code{
  display:inline-block;
  padding:3px 6px;
  border-radius:4px;
  background:var(--green-050);
  color:var(--green-900);
  font-family:monospace;
  font-size:.85em;
  line-height:1.5;
}


/* ============================================================
   7. DOCUMENT FOOTER — revision date
============================================================ */
.legal-meta{
  margin:40px 0 0;
  padding-top:22px;
  border-top:1px solid var(--line-200);
  font-size:.9rem;
  color:var(--ink-500);
}

.legal-meta strong{ color:var(--ink-700); font-weight:600; }
