/* Legal pages (Privacy Policy). Loaded only on those pages. */

.legal {
  position: relative;
  padding: 0 var(--nav-float-inset);
}

.legal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 560px;
  background:
    radial-gradient(42% 70% at 38% 0%, rgba(255, 112, 139, 0.16) 0%, rgba(255, 112, 139, 0) 70%),
    radial-gradient(38% 60% at 64% 0%, rgba(255, 198, 159, 0.1) 0%, rgba(255, 198, 159, 0) 70%);
  pointer-events: none;
}

/* —— Header —— */
.legal-hero {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(150px, 20vh, 200px) 24px clamp(56px, 7vw, 88px);
  text-align: center;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.legal-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 5.6vw, 72px);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.legal-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.005em;
}

.legal-meta strong {
  font-weight: 500;
  color: inherit;
}

/* —— Layout —— */
.legal-layout {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: space-between;
  gap: 64px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 56px) 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* —— Table of contents —— */
.legal-aside {
  position: relative;
}

.legal-toc {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 136px);
  overflow-y: auto;
  scrollbar-width: none;
}

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

.legal-toc summary {
  margin-bottom: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  list-style: none;
  pointer-events: none;
}

.legal-toc summary::-webkit-details-marker {
  display: none;
}

.legal-toc ol {
  list-style: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 1px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-toc a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.legal-toc a.is-active {
  color: #fff;
  border-left-color: #fff;
}

/* —— Body —— */
.legal-body {
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.006em;
}

.legal-body > p {
  margin-bottom: 18px;
}

.legal-body > p:first-child {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1.65;
}

.legal-body p,
.legal-body li {
  overflow-wrap: break-word;
}

.legal-body strong {
  font-weight: 600;
  color: #fff;
}

.legal-body a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.legal-body a:hover {
  text-decoration-color: #fff;
}

.legal-section {
  scroll-margin-top: 104px;
  padding-top: 48px;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-section p {
  margin-bottom: 16px;
}

.legal-section h2 {
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.legal-num {
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.legal-section h3 {
  scroll-margin-top: 104px;
  margin: 36px 0 12px;
  color: #fff;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-section h4 {
  margin: 28px 0 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal-section h2 + h3,
.legal-section h2 + h4 {
  margin-top: 8px;
}

.legal-body ul {
  list-style: none;
  margin: 0 0 20px;
}

.legal-body li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.legal-body li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.legal-example {
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: #0a0a0a;
  color: #fff;
}

.legal-address {
  color: rgba(255, 255, 255, 0.85);
}

/* At-a-glance summary card */
.legal-glance {
  margin-top: 40px;
  padding: clamp(28px, 3.4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: clamp(20px, 2.2vw, 28px);
  background: #050505;
}

.legal-glance + .legal-section {
  border-top: none;
}

.legal-glance ul {
  margin-bottom: 24px;
}

.legal-glance li {
  margin-bottom: 12px;
}

.legal-glance li::before {
  background: var(--gradient);
}

.legal-glance > p:last-child {
  margin-bottom: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-page .site-footer {
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-page .footer-col a[aria-current="page"] {
  color: #fff;
}

/* —— Tablet / mobile —— */
@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 760px;
  }

  .legal-toc {
    position: static;
    max-height: none;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: #050505;
  }

  .legal-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 16px 20px;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
  }

  .legal-toc summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.6);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
  }

  .legal-toc[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
  }

  .legal-toc ol {
    margin: 0 20px 16px;
  }
}

@media (max-width: 768px) {
  .legal {
    padding: 0 20px;
  }

  .legal::before {
    height: 420px;
    background:
      radial-gradient(70% 60% at 30% 0%, rgba(255, 112, 139, 0.16) 0%, rgba(255, 112, 139, 0) 70%),
      radial-gradient(60% 50% at 75% 0%, rgba(255, 198, 159, 0.1) 0%, rgba(255, 198, 159, 0) 70%);
  }

  .legal-hero {
    padding: 128px 0 40px;
  }

  .legal-eyebrow {
    margin-bottom: 18px;
  }

  .legal-hero h1 {
    margin-bottom: 14px;
    font-size: clamp(40px, 11vw, 48px);
  }

  .legal-meta {
    font-size: 14px;
  }

  .legal-layout {
    padding: 28px 0 0;
  }

  .legal-body {
    font-size: 15px;
    line-height: 1.7;
  }

  .legal-body > p:first-child {
    font-size: 17px;
  }

  .legal-glance {
    margin-top: 32px;
    padding: 24px 20px;
  }

  .legal-section {
    scroll-margin-top: 84px;
    padding-top: 36px;
    margin-top: 36px;
  }

  .legal-glance + .legal-section {
    margin-top: 24px;
  }

  .legal-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .legal-section h3 {
    scroll-margin-top: 84px;
    margin-top: 28px;
    font-size: 17px;
  }

  .legal-page .site-footer {
    margin-top: 72px;
  }
}
