/* ============================================================
   zlorp — legal / policy pages (loads after styles.css)
   Sticky ToC + readable prose. Light, calm, readable.
   ============================================================ */

/* ---- hero (compact, light) ---- */
.legal-hero { padding-top: 130px; padding-bottom: 44px; position: relative; isolation: isolate; }
.legal-hero .hero__aurora { height: 420px; opacity: .55; }
.legal-hero h1 {
  font-size: clamp(40px, 6.4vw, 80px); font-weight: 600; letter-spacing: -0.045em;
  margin-top: 22px;
}
.legal-hero h1 .accentword { color: var(--brand); font-style: italic; font-weight: 500; }
.legal-hero__sub { margin-top: 22px; font-size: clamp(16px, 1.7vw, 20px); color: var(--ink-2); max-width: 60ch; }

.legal-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; align-items: center; }
.legal-meta__item { display: flex; flex-direction: column; gap: 2px; }
.legal-meta__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.legal-meta__v { font-size: 14.5px; font-weight: 600; color: var(--ink); }

.legal-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.legal-chips a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 9px 16px; transition: all .25s var(--ease); white-space: nowrap;
}
.legal-chips a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.legal-chips a .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* ---- at-a-glance cards (terms) ---- */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.gcard { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 26px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gcard__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.gcard__k::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.gcard p { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }

/* ============================================================
   Layout: sticky ToC + body
   ============================================================ */
.legal-layout { display: grid; grid-template-columns: 256px 1fr; gap: 56px; align-items: start; padding-top: 8px; padding-bottom: clamp(70px, 9vw, 120px); }

.toc-wrap { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.toc__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding-left: 14px; }
.toc { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; }
.toc a {
  display: flex; gap: 11px; align-items: baseline;
  font-size: 13.5px; font-weight: 500; color: var(--ink-3);
  padding: 8px 14px; border-radius: 9px; border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
  line-height: 1.3;
}
.toc a:hover { color: var(--ink); background: var(--bg-2); }
.toc a .n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); flex: none; transition: color .2s; }
.toc a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-soft); }
.toc a.active .n { color: var(--brand); }

.toc-help { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); padding: 18px; }
.toc-help__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.toc-help p { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.toc-help a { color: var(--brand); font-weight: 600; font-size: 14px; }

/* ============================================================
   Prose body
   ============================================================ */
.legal-body { max-width: 720px; }
.legal-sec { padding-block: 26px; border-top: 1px solid var(--line-2); scroll-margin-top: 100px; }
.legal-sec:first-child { border-top: 0; padding-top: 4px; }
.legal-sec__n { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 14px; }
.legal-sec__n b { color: var(--brand); font-weight: 500; }
.legal-sec__n .k { text-transform: uppercase; letter-spacing: .12em; }

.legal-sec h2 { font-size: clamp(24px, 3vw, 33px); font-weight: 600; letter-spacing: -0.03em; }
.legal-sec h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 26px; color: var(--ink); }
.legal-sec p { margin-top: 16px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.legal-sec p strong, .legal-sec li strong { color: var(--ink); font-weight: 700; }
.legal-sec a { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in oklch, var(--brand) 35%, transparent); text-underline-offset: 3px; }
.legal-sec a:hover { text-decoration-color: var(--brand); }

.legal-sec ul, .legal-sec ol { margin-top: 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.legal-sec li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.legal-sec ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.legal-sec ol { counter-reset: li; }
.legal-sec ol li { counter-increment: li; }
.legal-sec ol li::before { content: counter(li); position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-family: var(--font-mono); font-size: 11px; font-weight: 500; display: grid; place-items: center; }

/* ---- callout / highlight ---- */
.callout { margin-top: 22px; border-radius: var(--r-md); padding: 22px 24px; }
.callout__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; }
.callout__k::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.callout p { margin-top: 10px; font-size: 15.5px; line-height: 1.6; }
.callout--brand { background: color-mix(in oklch, var(--brand) 7%, var(--surface)); border: 1px solid color-mix(in oklch, var(--brand) 22%, transparent); }
.callout--brand .callout__k { color: var(--brand); }
.callout--brand .callout__k::before { background: var(--brand); }
.callout--brand p { color: var(--ink); }
.callout--accent { background: color-mix(in oklch, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in oklch, var(--accent) 34%, transparent); }
.callout--accent .callout__k { color: var(--accent-ink); }
.callout--accent .callout__k::before { background: var(--accent); }
.callout--accent p { color: var(--ink); }

/* ---- bottom contact CTA (dark) ---- */
.legal-contact { text-align: center; }
.legal-contact h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 600; letter-spacing: -0.04em; }
.legal-contact p { color: var(--dk-ink-2); margin-top: 16px; font-size: 16px; }
.legal-contact__grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.legal-contact__card { border: 1px solid var(--dk-line); border-radius: var(--r-md); padding: 18px 26px; min-width: 200px; }
.legal-contact__card .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-ink-3); }
.legal-contact__card .v { font-size: 16px; font-weight: 600; color: var(--dk-ink); margin-top: 6px; }
.legal-contact__card .v a { color: var(--dk-ink); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc-wrap { position: static; top: auto; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .toc { flex-direction: row; flex-wrap: wrap; max-height: none; overflow: visible; gap: 6px; }
  .toc a { border-left: 0; border: 1px solid var(--line); }
  .toc a.active { border-color: var(--brand); }
  .toc__label { width: 100%; }
  .toc-help { flex: 1; min-width: 220px; }
  .glance { grid-template-columns: 1fr; }
}
