/* ============================================
   MATTEO SOLARO — LEGAL & CUSTOMER CARE
   Design System v20260914
   ============================================ */

/* --- Page Layout --- */
.legal-page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Page Header --- */
.legal-header {
  padding: 80px 0 56px;
  border-bottom: 1px solid #E8E8E8;
  margin-bottom: 56px;
}
.legal-header .legal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 20px;
}
.legal-header h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1A1A1A;
  margin: 0 0 20px;
  line-height: 1.15;
}
.legal-header .legal-meta {
  font-size: 13px;
  color: #888;
  letter-spacing: 0.04em;
}
.legal-header .legal-meta span {
  color: #1A1A1A;
}

/* --- Two-column layout for long docs (desktop only) --- */
@media (min-width: 1024px) {
  .legal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 80px;
    align-items: start;
  }
}

/* --- Table of Contents --- */
.legal-toc {
  position: sticky;
  top: 80px;
}
.legal-toc-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E8E8E8;
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-toc li {
  margin-bottom: 4px;
}
.legal-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  padding: 5px 0;
  border-bottom: none;
  transition: color 0.2s ease;
  line-height: 1.5;
}
.legal-toc a:hover {
  color: #1A1A1A;
}
.legal-toc .toc-num {
  font-size: 10px;
  color: #BBBBBB;
  flex-shrink: 0;
  width: 18px;
}
.legal-toc a.active {
  color: #1A1A1A;
  font-weight: 600;
}

/* Mobile ToC — collapsible */
@media (max-width: 1023px) {
  .legal-toc {
    position: static;
    margin-bottom: 48px;
    border: 1px solid #E8E8E8;
    padding: 0;
  }
  .legal-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 18px 20px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #1A1A1A;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
  }
  .legal-toc-toggle-icon {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
  }
  .legal-toc.open .legal-toc-toggle-icon {
    transform: rotate(45deg);
  }
  .legal-toc-body {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid #E8E8E8;
  }
  .legal-toc.open .legal-toc-body {
    display: block;
  }
  .legal-toc-title {
    display: none;
  }
  .legal-toc a {
    font-size: 13px;
    padding: 8px 0;
  }
}
@media (min-width: 1024px) {
  .legal-toc-toggle { display: none; }
  .legal-toc-body { display: block !important; }
}

/* --- Section Structure --- */
.legal-content {
  min-width: 0;
}
.legal-section {
  padding-top: 56px;
  border-top: 1px solid #E8E8E8;
  margin-top: 0;
}
.legal-section:first-child {
  border-top: none;
  padding-top: 0;
}
.legal-section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.legal-section-number {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #BBBBBB;
  font-weight: 400;
  flex-shrink: 0;
  width: 28px;
}
.legal-section h2 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1A1A1A;
  margin: 0;
  text-transform: uppercase;
}
.legal-section h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1A1A1A;
  margin: 32px 0 12px;
  text-transform: uppercase;
}
.legal-section p {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 16px;
}
.legal-section ul,
.legal-section ol {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-section li {
  margin-bottom: 8px;
}
.legal-section a {
  color: #1A1A1A;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section a:hover {
  color: #C8A96E;
}
.legal-section strong {
  color: #1A1A1A;
  font-weight: 700;
}

/* --- Table in legal sections --- */
.legal-section .legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #444;
  margin-bottom: 16px;
}
.legal-section .legal-table th {
  text-align: left;
  font-weight: 700;
  color: #1A1A1A;
  padding: 10px 12px;
  border-bottom: 2px solid #E8E8E8;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-section .legal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: top;
}
.legal-section .legal-table tr:last-child td {
  border-bottom: none;
}

/* --- FAQ specific --- */
.legal-faq-item {
  border-bottom: 1px solid #E8E8E8;
}
.legal-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.01em;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
}
.legal-faq-q-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
  color: #888;
}
.legal-faq-item.open .legal-faq-q-icon {
  transform: rotate(45deg);
}
.legal-faq-a {
  display: none;
  padding: 0 0 24px;
  font-size: 15px;
  line-height: 1.75;
  color: #666;
}
.legal-faq-item.open .legal-faq-a {
  display: block;
}

/* --- Contact page specific --- */
.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin: 40px 0;
}
.legal-contact-item {
  border-top: 2px solid #1A1A1A;
  padding-top: 20px;
}
.legal-contact-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}
.legal-contact-value {
  font-size: 15px;
  color: #1A1A1A;
  line-height: 1.6;
}
.legal-contact-value a {
  color: #1A1A1A;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Mobile adjustments --- */
@media (max-width: 767px) {
  .legal-header {
    padding: 48px 0 40px;
    margin-bottom: 40px;
  }
  .legal-header h1 {
    font-size: 26px;
  }
  .legal-section {
    padding-top: 40px;
  }
  .legal-section h2 {
    font-size: 17px;
  }
  .legal-page-wrapper {
    padding: 0 16px;
  }
}

/* --- Smooth scroll --- */
html {
  scroll-behavior: smooth;
}
