/* ============ dap — legal pages ============ */

.legal-page {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

/* faint ambient glow at the top, matching the site mood */
.legal-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 60vh;
  background: radial-gradient(80% 60% at 50% -10%, rgba(255, 190, 130, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- header ---------- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(18px, 4vw, 40px);
  padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(11, 11, 11, 0.7);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.legal-header .header-logo { color: #fff; display: block; }
.legal-header .header-logo .logo { width: 54px; height: auto; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--pill);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.legal-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.legal-back:hover { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }

/* ---------- hero ---------- */
.legal-hero {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 100px) clamp(22px, 5vw, 40px) clamp(28px, 5vw, 44px);
  text-align: center;
}
.legal-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 18px;
}
.legal-hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #fff;
  text-wrap: balance;
}
.legal-hero p {
  margin: 20px auto 0;
  max-width: 560px;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

/* meta chips (last updated, effective date, etc.) */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px auto 0;
  max-width: 680px;
}
.legal-meta span {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  padding: 9px 16px;
  border-radius: var(--pill);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}
.legal-meta span small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- document body ---------- */
.legal-doc {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 40px) clamp(22px, 5vw, 40px) clamp(80px, 12vw, 130px);
}

/* table of contents */
.legal-toc {
  border-radius: 22px;
  padding: clamp(22px, 4vw, 32px);
  margin-bottom: clamp(40px, 7vw, 64px);
}
.legal-toc h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 18px;
}
.legal-toc ol {
  list-style: none;
  columns: 2;
  column-gap: 28px;
}
.legal-toc li {
  break-inside: avoid;
  margin-bottom: 9px;
}
.legal-toc a {
  display: flex;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.25s;
}
.legal-toc a:hover { color: #fff; }
.legal-toc a .n { color: rgba(255, 255, 255, 0.4); font-variant-numeric: tabular-nums; min-width: 1.6em; }

@media (max-width: 560px) {
  .legal-toc ol { columns: 1; }
}

/* section blocks */
.legal-section {
  scroll-margin-top: 90px;
  padding-top: clamp(28px, 5vw, 44px);
  margin-top: clamp(28px, 5vw, 44px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.legal-section:first-of-type { border-top: none; margin-top: 0; }

.legal-doc h2.legal-h {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 18px;
}
.legal-doc h2.legal-h .num {
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  margin-right: 0.5em;
}
.legal-doc h3 {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 600;
  color: #fff;
  margin: 28px 0 12px;
}
.legal-doc p {
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 14px;
}
.legal-doc a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-doc ul,
.legal-doc ol.legal-list {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}
.legal-doc li {
  position: relative;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.74);
  padding-left: 26px;
  margin-bottom: 9px;
}
.legal-doc ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.legal-doc ol.legal-list {
  counter-reset: li;
}
.legal-doc ol.legal-list > li {
  counter-increment: li;
}
.legal-doc ol.legal-list > li::before {
  content: counter(li);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
  line-height: 1.85;
}
.legal-doc strong { color: #fff; font-weight: 600; }
.legal-doc .term { color: #fff; font-weight: 600; }

/* highlighted statement (e.g. "dap is not a bank") */
.legal-callout {
  border-radius: 18px;
  padding: 18px 22px;
  margin: 20px 0;
}
.legal-callout p { margin: 0; color: rgba(255, 255, 255, 0.9); }
.legal-callout p + p { margin-top: 12px; }

/* key/value contact block */
.legal-kv p { margin-bottom: 6px; }
.legal-kv strong { display: inline-block; min-width: 0; }

/* back-to-top */
.legal-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(40px, 7vw, 64px);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.25s;
}
.legal-top:hover { color: #fff; }
.legal-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the shared footer sits above the ambient glow */
.legal-page .site-footer { position: relative; z-index: 1; }
