/* ============================================================
   Legal center — long-form document styling.
   Chrome (nav pill, footer, socials) is reused as-is from
   components/About.css + components/Footer.css; this file only
   owns the legal-specific hero, doc switcher, and prose.
   ============================================================ */

.legal-page {
  --legal-ink: var(--about-ink);
  --legal-muted: var(--about-muted);
  --legal-rule: rgba(29, 29, 29, 0.1);
  --legal-measure: 860px;
  background: var(--brand-white);
  color: var(--legal-ink);
}

/* ---- Hero ---- */

.legal-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--brand-white);
}

.legal-hero__bg,
.legal-hero__scrim {
  position: absolute;
  inset: 0;
}

.legal-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.legal-hero__scrim {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.42) 60%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.legal-hero__inner {
  position: relative;
  padding-top: 188px;
  padding-bottom: 96px;
}

.legal-hero__title {
  margin: 0;
  max-width: 720px;
  font-size: 64px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--brand-white);
}

/* The nav drawer is markup-present but toggled by script on this page. */
.about-nav__drawer[hidden] {
  display: none;
}

/* ---- Document switcher ---- */

.legal-tabs-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--legal-rule);
}

.legal-tabs {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  scrollbar-width: none;
}

.legal-tabs::-webkit-scrollbar {
  display: none;
}

.legal-tabs .nav-link {
  padding: 20px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--legal-muted);
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.legal-tabs .nav-link:hover {
  color: var(--legal-ink);
}

.legal-tabs .nav-link.active {
  color: var(--legal-ink);
  border-bottom-color: var(--legal-ink);
}

/* ---- Document body ---- */

.legal-main {
  padding: 80px 0 40px;
}

.legal-doc {
  width: var(--about-max);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--about-pad);
}

.content-section {
  display: none;
  max-width: var(--legal-measure);
}

.content-section.active {
  display: block;
  animation: legal-fade-in 400ms ease-out;
}

@keyframes legal-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-section.active {
    animation: none;
  }
}

.content-section h1 {
  margin: 0 0 16px;
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--legal-ink);
}

.last-updated {
  display: inline-block;
  margin: 0 0 56px;
  padding: 7px 16px;
  border: 1px solid var(--legal-rule);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--legal-muted);
}

.content-section h2 {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--legal-ink);
}

.content-section h3 {
  margin: 32px 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--legal-ink);
}

.content-section h4 {
  margin: 24px 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--legal-ink);
}

.content-section p {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--legal-muted);
}

.content-section p:last-child {
  margin-bottom: 0;
}

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

.content-section a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-section a:hover {
  color: var(--color-primary-hover);
}

.content-section ul,
.content-section ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.content-section ul {
  list-style: disc;
}

.content-section ol {
  list-style: decimal;
}

.content-section li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--legal-muted);
}

.content-section li::marker {
  color: rgba(29, 29, 29, 0.35);
}

/* Each numbered clause reads as its own block, separated by a hairline. */
.section {
  padding-top: 44px;
  margin-bottom: 44px;
  border-top: 1px solid var(--legal-rule);
  scroll-margin-top: 96px;
}

/* ---- Table of contents ---- */

.toc {
  margin-bottom: 8px;
  padding: 28px 32px;
  background: var(--color-surface);
  border: 1px solid var(--legal-rule);
  border-radius: var(--radius-md);
}

.toc h3 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--legal-muted);
}

.toc ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin: 0;
}

.toc a {
  font-size: 15px;
  line-height: 1.5;
  color: var(--legal-ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---- Callouts ---- */

.highlight {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--color-warm-soft);
  border-left: 2px solid var(--color-warm);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--legal-ink);
}

.contact-info {
  margin: 28px 0 0;
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--legal-rule);
  border-radius: var(--radius-md);
}

.contact-info h3 {
  margin-top: 0;
  font-size: 18px;
}

.rights-list {
  margin: 24px 0;
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--legal-rule);
  border-radius: var(--radius-md);
}

.rights-list h4 {
  margin-top: 0;
}

.rights-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rights-list li {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--legal-rule);
}

.rights-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.no-cookies {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--color-surface);
  border-left: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

/* ---- Tables ---- */

/* Data tables run wider than the reading measure so 4-column grids stay legible. */
.content-section table {
  width: calc(var(--about-max) - 2 * var(--about-pad));
  max-width: calc(100vw - 2 * var(--about-pad));
  margin: 28px 0;
  border: 1px solid var(--legal-rule);
  border-radius: var(--radius-md);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 15px;
}

.content-section th,
.content-section td {
  padding: 14px 18px;
  text-align: left;
  line-height: 1.6;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--legal-rule);
}

.content-section th {
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--legal-ink);
}

.content-section td {
  color: var(--legal-muted);
  vertical-align: top;
}

.content-section tbody tr:last-child td {
  border-bottom: 0;
}

.content-section tbody tr:hover td {
  background: rgba(29, 29, 29, 0.02);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .legal-hero__title {
    font-size: 52px;
  }

  .content-section h1 {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  .legal-hero__inner {
    padding-top: 132px;
    padding-bottom: 64px;
  }

  .legal-hero__title {
    font-size: 40px;
  }

  .legal-main {
    padding: 48px 0 24px;
  }

  .content-section h1 {
    font-size: 34px;
  }

  .content-section h2 {
    font-size: 24px;
  }

  .last-updated {
    margin-bottom: 40px;
  }

  .toc {
    padding: 24px;
  }

  .toc ul {
    grid-template-columns: 1fr;
  }

  .legal-tabs {
    gap: 24px;
  }

  .content-section table {
    display: block;
    overflow-x: auto;
  }
}
