/* ============================================================
   ClimbSync — Legal pages (Imprint · Privacy · Terms)
   Ported from the v2 mockup: document hero, route tags,
   sticky section index, and plain prose in the Setting Grid system.
   ============================================================ */

/* ---------- Hero band ---------- */
.l-hero {
  position: relative;
  padding: calc(var(--module) * 1.5) 0 calc(var(--module) * 1.1);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.l-hero .container {
  position: relative;
  z-index: 1;
}
.l-hero .tag {
  margin-bottom: 22px;
}
.l-hero h1.display {
  max-width: 16ch;
  font-size: clamp(40px, 5vw, 76px);
}
.l-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 26px;
}
.l-stamp {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* legal sub-nav: the three docs as swappable route tags */
.l-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.l-subnav a {
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-tag);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.l-subnav a:hover {
  color: var(--text);
  border-color: var(--text-subtle);
}
.l-subnav a[aria-current="page"] {
  color: var(--on-accent);
  border-color: var(--accent);
  background: var(--accent);
}

/* ---------- Body: sticky index + prose ---------- */
.l-body {
  padding: calc(var(--module) * 1.2) 0 calc(var(--module) * 1.7);
}
.l-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: var(--module);
  align-items: start;
}

/* the section index */
.l-toc {
  position: sticky;
  top: 96px;
}
.l-toc .l-toc-label {
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.l-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.l-toc li {
  counter-increment: toc;
}
.l-toc a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.18s;
}
.l-toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  padding-top: 1px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.l-toc a:hover {
  color: var(--text);
}
.l-toc a:hover::before {
  color: var(--accent);
}

/* ---------- Prose ---------- */
.l-prose {
  max-width: 70ch;
  counter-reset: sec;
}
.l-lede {
  margin-bottom: 14px;
  color: var(--text);
  font-size: clamp(18px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}
.l-sec {
  padding-top: calc(var(--module) * 0.8);
  scroll-margin-top: 88px;
}
.l-sec:first-of-type {
  padding-top: 0;
}
.l-sec > h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0 0 18px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  counter-increment: sec;
}
.l-sec > h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: none;
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.l-sec h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
}
.l-prose p,
.l-prose li {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}
.l-prose p {
  margin: 0 0 15px;
}
.l-prose p strong,
.l-prose li strong {
  color: var(--text);
  font-weight: 600;
}
.l-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  transition: border-color 0.18s;
}
.l-prose a:hover {
  border-bottom-color: var(--accent);
}

.l-prose ul,
.l-prose ol.l-list {
  margin: 4px 0 18px;
  padding-left: 0;
  list-style: none;
}
.l-prose ul li,
.l-prose ol.l-list li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 26px;
}
.l-prose ul li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 1.5px 2px 0 var(--hard-ink);
}
.l-prose ol.l-list {
  counter-reset: li;
}
.l-prose ol.l-list li {
  counter-increment: li;
}
.l-prose ol.l-list li::before {
  content: counter(li);
  position: absolute;
  top: 2px;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* grouped current-copy subsections */
.l-subsections {
  display: grid;
  gap: 10px;
  margin: 8px 0 20px;
}
.l-subsection {
  padding: 16px 20px 17px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  background-image: var(--surface-grain);
  background-size: 7px 7px;
}
.l-subsection ul {
  margin-bottom: 0;
}
.l-subsection li:last-child {
  margin-bottom: 0;
}

/* callout plate — bolted card for the things that matter most */
.l-callout {
  position: relative;
  margin: 22px 0 24px;
  padding: 24px 26px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}
.l-callout.warn {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border-strong));
  background:
    linear-gradient(
      0deg,
      color-mix(in oklab, var(--accent) 6%, transparent),
      color-mix(in oklab, var(--accent) 6%, transparent)
    ),
    var(--surface);
}
.l-callout .l-callout-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.l-callout p {
  margin-bottom: 0;
  color: var(--text);
}
.l-callout p + p {
  margin-top: 12px;
}

.l-section-footer {
  margin-top: 18px;
  padding: 15px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 7%, transparent);
  color: var(--text-muted);
  font-style: italic;
}

/* updated / contact tail */
.l-tail {
  margin-top: calc(var(--module) * 0.9);
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}
.l-tail a {
  color: inherit;
  border-bottom-color: color-mix(in oklab, var(--text-subtle) 40%, transparent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .l-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .l-toc {
    position: static;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
  }
  .l-toc ol {
    columns: 2;
    column-gap: 28px;
  }
  .l-prose {
    max-width: none;
  }
}
@media (max-width: 640px) {
  .l-hero {
    padding: 62px 0 52px;
  }
  .l-stamps {
    gap: 8px 14px;
  }
  .l-toc ol {
    columns: 1;
  }
  .l-subsection,
  .l-callout,
  .l-section-footer {
    padding-right: 18px;
    padding-left: 18px;
  }
}
