/*
 * The legal documents.
 *
 * One stylesheet for all three, because all three are the same page with
 * different words in it. The measure is deliberately narrow — a contract read
 * at 100 characters a line is a contract nobody finishes — and the type scale
 * is flatter than the landing's, because there is nothing here to sell.
 */

:root {
  --ink: #1C1B17;
  --paper: #F7F6F2;
  --yellow: #FFED00;
  --muted: #6B6960;
  --line: #E2E0D8;
  --rule: #EFEDE6;
}

*, *::before, *::after { box-sizing: border-box; }

body.legal-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.legal-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}
.legal-skip:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------- header */

.legal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 246, 242, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.legal-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.legal-header-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}

.legal-header-nav a {
  position: relative;
  padding: 4px 0;
  color: #4A463C;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease;
}

.legal-header-nav a:hover { color: var(--ink); }

.legal-header-nav a.is-current { color: var(--ink); font-weight: 800; }
.legal-header-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--yellow);
}

.legal-header-side { display: flex; align-items: center; gap: 12px; flex: none; }

.legal-language {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.legal-language a {
  padding: 6px 11px;
  border-radius: 6px;
  color: #8A8880;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}

.legal-language a:hover { color: var(--ink); }
.legal-language a.is-active { background: var(--yellow); color: var(--ink); font-weight: 800; }

.legal-call {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--yellow);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .14s ease;
}

.legal-call:hover { transform: translateY(-1px); }

/* ---------------------------------------------------------------- page */

.legal-main { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }

.legal-document { max-width: 760px; margin: 0 auto; padding: 56px 0 0; }

.legal-eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: #A89C00;
  text-transform: uppercase;
}

.legal-document h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.legal-updated {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.legal-body { font-size: 16.5px; }
.legal-body > :first-child { margin-top: 0; }

.legal-body h2 {
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}

.legal-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 36px; }
.legal-body h3 { margin: 28px 0 10px; font-size: 18px; font-weight: 800; }
.legal-body p { margin: 0 0 15px; }
.legal-body ul, .legal-body ol { margin: 0 0 18px; padding-left: 22px; }
.legal-body li { margin: 0 0 9px; }
.legal-body strong, .legal-body b { font-weight: 800; }
.legal-body a { color: var(--ink); text-underline-offset: 3px; }
.legal-body a:hover { color: #8A7F00; }
.legal-body blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-left: 4px solid var(--yellow);
  background: #fff;
  border-radius: 0 12px 12px 0;
}
.legal-body img { max-width: 100%; height: auto; border-radius: 12px; }

.legal-empty {
  margin: 0;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
}

/* -------------------------------------------------------------- footer */

.legal-footer { background: var(--ink); color: #C5C6C6; }

.legal-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 24px 30px;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}

.legal-footer-brand p { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: #8A8880; }
.legal-footer-brand p:first-of-type { color: #C5C6C6; font-weight: 700; }

.legal-footer-column { display: flex; flex-direction: column; gap: 11px; }

.legal-footer-column span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  color: #5A574E;
  text-transform: uppercase;
}

.legal-footer-column a {
  color: #C5C6C6;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .16s ease;
}

.legal-footer-column a:hover { color: var(--yellow); }

.legal-footer-number {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--yellow) !important;
}

.legal-footer-base {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 34px;
  border-top: 1px solid #2E2C26;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #5A574E;
  letter-spacing: .05em;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .legal-header-inner { flex-wrap: wrap; gap: 14px; }
  .legal-header-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .legal-header-nav a.is-current::after { bottom: -3px; }
  .legal-header-side { margin-left: auto; }
  .legal-footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .legal-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body.legal-page { font-size: 16px; }
  .legal-header-inner { padding: 12px 16px; }
  .legal-main { padding: 0 16px 60px; }
  .legal-document { padding-top: 36px; }
  .legal-body { font-size: 16px; }
  .legal-body h2 { margin-top: 34px; font-size: 20px; }
  .legal-call { display: none; }
  .legal-footer-inner { grid-template-columns: 1fr; padding: 40px 16px 24px; }
  .legal-footer-base { padding: 16px 16px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-call:hover { transform: none; }
  * { transition-duration: .01ms !important; }
}
