/* =========================================================================
   Legal pages (privacy.html)

   A page of reading, set as the site sets its words: the serif for the
   title, the mono for labels and numbers, and the body in the sans at a
   comfortable measure. On a wide screen a list of the sections stays
   beside the text as it is read; on a phone it comes first.
   ========================================================================= */

.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.legal-page__header {
  padding:
    calc(var(--gutter) * 0.8 + var(--safe-top))
    var(--gutter-safe)
    0;
}

.legal-page__back {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--c-ink-3);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

@media (hover: hover) {
  .legal-page__back:hover {
    color: var(--c-ink);
  }
}

/* ---- The title ---- */
.legal {
  flex: 1;
  padding: var(--section-pad) var(--gutter-safe) 0;
}

.legal__intro {
  max-width: 46rem;
  margin-bottom: var(--block-gap);
}

.legal__eyebrow,
.legal__meta,
.legal__contents-title,
.legal__num {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
}

.legal__eyebrow {
  margin: 0 0 var(--space-6);
  letter-spacing: var(--track-eyebrow);
  color: var(--c-ink-2);
}

.legal__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-headline);
  line-height: 1.02;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #f4f8fb 0%, #c9d6e0 45%, var(--c-obsidian) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--c-ink);
}

.legal__meta {
  margin: var(--space-5) 0 0;
  color: var(--c-ink-4);
}

.legal__lede {
  margin: var(--space-6) 0 0;
  font-size: var(--fs-headline-line);
  line-height: 1.5;
  color: var(--c-ink-3);
  text-wrap: pretty;
}

/* ---- The contents, and the text ---- */
.legal__body {
  padding-top: var(--block-gap);
  border-top: 1px solid var(--c-hairline);
}

@media (min-width: 64rem) {
  .legal__body {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 44rem);
    column-gap: clamp(var(--space-7), 7vw, 8rem);
    align-items: start;
  }

  /* held beside the text as it is read */
  .legal__contents {
    position: sticky;
    top: var(--space-7);
  }
}

.legal__contents {
  margin-bottom: var(--block-gap);
}

.legal__contents-title {
  margin: 0 0 var(--space-4);
  color: var(--c-ink-4);
}

.legal__contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: contents;
}

/* until it can stand beside the text, two columns, so the policy itself
   is not pushed a screen down */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .legal__contents ol {
    columns: 2;
    column-gap: var(--space-7);
  }

  .legal__contents li {
    break-inside: avoid;
  }
}

.legal__contents li {
  counter-increment: contents;
}

.legal__contents a {
  display: flex;
  gap: var(--space-4);
  padding: 0.3rem 0;
  font-size: var(--fs-small);
  color: var(--c-ink-3);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

.legal__contents a::before {
  content: counter(contents, decimal-leading-zero);
  flex: none;
  width: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  line-height: 1.9;
  color: var(--c-ink-4);
}

@media (hover: hover) {
  .legal__contents a:hover {
    color: var(--c-ink);
  }
}

/* ---- The sections ---- */
/* a reading measure at every width, not the page's */
.legal__article {
  max-width: 44rem;
}

.legal__article section {
  /* an anchor lands with air above it */
  scroll-margin-top: var(--space-7);
}

.legal__article section + section {
  margin-top: var(--block-gap);
  padding-top: var(--block-gap);
  border-top: 1px solid var(--c-hairline);
}

.legal__article h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem);
  line-height: 1.3;
  color: var(--c-ink);
}

.legal__num {
  flex: none;
  color: var(--c-gold);
}

.legal__article h3 {
  margin: var(--space-6) 0 var(--space-3);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  color: var(--c-ink);
}

.legal__article p,
.legal__article li {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--c-ink-3);
  text-wrap: pretty;
}

.legal__article p {
  margin: 0 0 var(--space-4);
}

.legal__article p:last-child {
  margin-bottom: 0;
}

.legal__article strong,
.legal__article em {
  font-weight: 400;
  color: var(--c-ink-2);
}

.legal__article ul {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

/* each point marked with a short hairline, not a bullet */
.legal__article ul li {
  position: relative;
  padding-left: var(--space-6);
}

.legal__article ul li + li {
  margin-top: var(--space-2);
}

.legal__article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 0.85rem;
  height: 1px;
  background: var(--c-ink-4);
}

.legal__article a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.3);
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-fast) ease;
}

@media (hover: hover) {
  .legal__article a:hover {
    text-decoration-color: currentColor;
  }
}

/* ---- Who to write to ---- */
.legal__contact {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-6) 0 0;
  border-top: 1px solid var(--c-hairline);
  font-style: normal;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-ink-2);
}

.legal__contact-name {
  color: var(--c-ink);
}
