/* ==========================================================================
   Untravel — Legal pages (privacy.html, terms.html)  ·  legal.css
   --------------------------------------------------------------------------
   Standalone, readable legal-document layout in the "Classy Field Notes"
   system. Tokens come from colors_and_type.css; this file only lays out the
   reading column, the sticky brand bar, the contents box and the footer.
   ========================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-bright); }
::selection { background: var(--primary-bright); color: #fff; }

/* ---------- Sticky brand bar ---------- */
.legal-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.legal-brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.legal-brand img { height: 20px; width: auto; display: block; }
.legal-back {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-surface-variant); text-decoration: none;
}
.legal-back:hover { color: var(--primary); }

/* ---------- Reading column ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 88px;
}
.legal-kicker {
  font-family: var(--font-mono);
  font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.025em; line-height: 1.04;
  margin: 0;
}
.legal-stamp {
  font-family: var(--font-mono);
  font-weight: 500; font-size: 12px; letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  margin: 16px 0 0;
}

/* ---------- Contents box ---------- */
.legal-toc {
  margin: 36px 0 8px;
  padding: 22px 26px;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl);
}
.legal-toc__h {
  font-family: var(--font-mono);
  font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 12px;
}
.legal-toc ol {
  margin: 0; padding: 0; list-style: none;
  columns: 2; column-gap: 32px;
}
.legal-toc li { margin: 0 0 8px; break-inside: avoid; }
.legal-toc a {
  font-family: var(--font-body); font-size: 0.95rem; line-height: 1.4;
  color: var(--on-surface); text-decoration: none;
}
.legal-toc a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Body typography ---------- */
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.6rem);
  letter-spacing: -0.02em; line-height: 1.15;
  margin: 56px 0 0;
  scroll-margin-top: 80px;
}
.legal h3 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em;
  color: var(--on-surface);
  margin: 30px 0 0;
}
.legal p {
  font-size: 1.02rem; line-height: 1.72;
  color: var(--on-surface-variant);
  margin: 16px 0 0;
  text-wrap: pretty;
}
.legal h2 + p, .legal h3 + p { margin-top: 14px; }
.legal strong { font-weight: 700; color: var(--on-surface); }

.legal ul {
  margin: 14px 0 0; padding: 0 0 0 4px;
  list-style: none;
}
.legal ul li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0 0;
  font-size: 1.02rem; line-height: 1.7;
  color: var(--on-surface-variant);
}
.legal ul li::before {
  content: "";
  position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary-bright);
}

/* ---------- Footer ---------- */
.legal-foot {
  border-top: none;
  background: var(--surface-container-low);
  padding: 36px 24px 48px;
  text-align: center;
}
.legal-foot__row {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
}
.legal-foot__row a { color: var(--on-surface); text-decoration: none; }
.legal-foot__row a:hover { color: var(--primary); }
.legal-foot__row span { color: var(--outline); }
.legal-foot__copy {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--outline);
  margin: 16px 0 0;
}

@media (max-width: 600px) {
  .legal-toc ol { columns: 1; }
  .legal { padding: 40px 20px 72px; }
}
