/* ============================================================
   BYDURAN.CO — Legal pages (Privacy & Licensing)
   ============================================================ */

.legal-hero {
  padding-block: calc(var(--nav-height) + var(--sp-16)) var(--sp-12);
  background: var(--cream-dark);
  border-bottom: 1px solid var(--color-border);
}

.legal-hero__eyebrow {
  display: block;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: var(--sp-4);
}

.legal-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: var(--weight-light);
  color: var(--espresso);
  line-height: var(--leading-tight);
  margin-bottom: var(--sp-4);
}

.legal-hero__meta {
  font-size: var(--text-xs);
  color: var(--sand-dark);
  letter-spacing: var(--tracking-wide);
}

/* ── Layout ──────────────────────────────────────────────── */
.legal-wrap {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--sp-16) var(--sp-24);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-20);
  align-items: start;
}

/* ── Table of contents (sticky sidebar) ─────────────────── */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp-8));
}

.legal-toc__heading {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--sand-dark);
  margin-bottom: var(--sp-5);
}

.legal-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.legal-toc__item a {
  font-size: var(--text-xs);
  color: var(--olive);
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
  padding-block: var(--sp-2);
  display: block;
  border-left: 1px solid transparent;
  padding-left: var(--sp-4);
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.legal-toc__item a:hover {
  color: var(--espresso);
  border-left-color: var(--olive);
}

.legal-toc__item--active a {
  color: var(--espresso);
  border-left-color: var(--olive-dark);
  font-weight: var(--weight-medium);
}

/* ── Content ─────────────────────────────────────────────── */
.legal-content {
  min-width: 0;
}

.legal-section {
  padding-bottom: var(--sp-14);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-14);
  scroll-margin-top: calc(var(--nav-height) + var(--sp-8));
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.legal-section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-light);
  color: var(--espresso);
  margin-bottom: var(--sp-6);
  line-height: var(--leading-tight);
}

.legal-section__subtitle {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--espresso-mid);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.legal-content p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--taupe);
  margin-bottom: var(--sp-4);
  max-width: 68ch;
}

.legal-content ul,
.legal-content ol {
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.legal-content li {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--taupe);
  max-width: 68ch;
}

.legal-content a {
  color: var(--olive-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}

.legal-content a:hover {
  color: var(--espresso);
}

.legal-highlight {
  background: var(--cream-dark);
  border-left: 3px solid var(--sand);
  padding: var(--sp-5) var(--sp-6);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-block: var(--sp-6);
}

.legal-highlight p {
  margin: 0;
  font-style: italic;
}

/* ── License tiers table ─────────────────────────────────── */
.license-table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--sp-6);
  font-size: var(--text-xs);
}

.license-table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--sand-dark);
  border-bottom: 1px solid var(--color-border);
}

.license-table td {
  padding: var(--sp-4);
  color: var(--taupe);
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: top;
  line-height: var(--leading-relaxed);
}

.license-table tr:last-child td {
  border-bottom: none;
}

.license-table td:first-child {
  font-weight: var(--weight-medium);
  color: var(--espresso-mid);
  white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-wrap {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .legal-toc {
    position: static;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--sp-8);
  }

  .legal-toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-6);
  }

  .legal-toc__item a {
    border-left: none;
    border-bottom: 1px solid transparent;
    padding-left: 0;
    padding-bottom: var(--sp-1);
  }

  .legal-toc__item a:hover,
  .legal-toc__item--active a {
    border-left-color: transparent;
    border-bottom-color: var(--olive);
  }
}
