/* ===========================================================
   Legal pages (Privacy Policy, Terms & Conditions).
   Built on the site tokens in styles.css: ink ground, paper text,
   Lato display, Hanken Grotesk body, logo blue for links.
   =========================================================== */

.legal-hero {
  padding: 150px 0 48px;
  border-bottom: 1px solid var(--line);
}
.legal-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 36px;
}
.legal-switch a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 999px;
  color: rgba(242, 237, 227, 0.7);
  transition: color 0.2s ease, background 0.2s ease;
}
.legal-switch a:hover { color: var(--paper); }
.legal-switch a[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
}
.legal-hero h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}
.legal-hero .legal-intro {
  margin-top: 24px;
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(242, 237, 227, 0.78);
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 28px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 237, 227, 0.55);
}
.legal-meta strong { color: var(--paper); font-weight: 600; }

.legal-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  padding: 64px 0 120px;
}
.legal-toc {
  position: sticky;
  top: 110px;
  align-self: start;
  font-size: 14px;
}
.legal-toc h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 237, 227, 0.5);
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: toc;
}
.legal-toc li { counter-increment: toc; display: flex; gap: 10px; }
.legal-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  font-weight: 600;
}
.legal-toc a { color: rgba(242, 237, 227, 0.75); line-height: 1.4; }
.legal-toc a:hover { color: var(--paper); }

.legal-doc { max-width: 72ch; }
.legal-doc section { scroll-margin-top: 110px; }
.legal-doc section + section {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.legal-doc h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.legal-doc h2 .legal-num {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 10px;
}
.legal-doc h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}
.legal-doc p,
.legal-doc li {
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(242, 237, 227, 0.82);
}
.legal-doc p + p { margin-top: 14px; }
.legal-doc ul {
  margin: 14px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-doc li::marker { color: var(--brand); }
.legal-doc strong { color: var(--paper); font-weight: 600; }
.legal-doc a {
  color: var(--brand-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal-doc a:hover { color: var(--paper); }
.legal-doc a:focus-visible,
.legal-toc a:focus-visible,
.legal-switch a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.legal-table {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.legal-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  line-height: 1.5;
}
.legal-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 237, 227, 0.55);
  background: var(--ink-2);
}
.legal-table td { color: rgba(242, 237, 227, 0.82); border-top: 1px solid var(--line); }
.legal-table td:first-child { color: var(--paper); font-weight: 600; white-space: nowrap; }

.legal-contact {
  margin-top: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.legal-contact p { margin: 0; }
.legal-contact p + p { margin-top: 6px; }

@media (max-width: 900px) {
  .legal-hero { padding: 120px 0 36px; }
  .legal-body { grid-template-columns: 1fr; gap: 40px; padding: 40px 0 88px; }
  .legal-toc { position: static; }
  .legal-doc section + section { margin-top: 44px; padding-top: 44px; }
}
