/*
 * The legal pages — privacy and terms. Static pages served as they are, like
 * 404.html, so they carry their own styles: the atelier's paper, light and
 * face, a reading measure, and nothing that moves but the first arrival.
 */
@font-face {
  font-family: "Instrument Sans";
  src: url("/atelier/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #faf4e8;
  --paper-raised: #fdf9f1;
  --shadow: #e8dedc;
  --sun: #fff9e9;
  --ink: #252323;
  --ink-soft: #5d5654;
  --hairline: color-mix(in oklab, var(--ink) 12%, transparent);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  color-scheme: light;
}

html {
  background: var(--paper);
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* The room's light, held still behind a page that scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 6% 12%, var(--sun), transparent 60%),
    linear-gradient(160deg, var(--paper) 30%, var(--shadow) 70%, var(--paper) 100%);
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in oklab, var(--ink) 40%, transparent);
  transition: text-decoration-color 150ms ease;
}
a:hover {
  text-decoration-color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
}
.skip:focus {
  top: 1rem;
}

/* Header: the wordmark home, and the two pages side by side. */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem var(--gutter) 0;
}
.legal-header img {
  display: block;
  width: 5rem;
  height: auto;
}
.legal-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}
.legal-nav a {
  color: var(--ink-soft);
  text-decoration-color: transparent;
}
.legal-nav a:hover {
  color: var(--ink);
  text-decoration-color: color-mix(in oklab, var(--ink) 40%, transparent);
}
.legal-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* The page: one reading column, lifted a little above centre. */
main {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 6rem) 1.5rem 5rem;
}

.legal-intro {
  animation: rise 900ms cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
.kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.06;
  text-wrap: balance;
}
.lede {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.updated {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* The short version: a sheet of paper laid on the page. */
.short {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--paper-raised);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.8) inset,
    0 1px 2px rgb(74 52 38 / 0.06),
    0 12px 32px -12px rgb(74 52 38 / 0.18);
}
.short h2 {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.short ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.short li {
  position: relative;
  padding-left: 1.5rem;
}
.short li + li {
  margin-top: 0.5rem;
}
.short li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.55em;
  width: 0.5rem;
  height: 0.3rem;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}

/* Contents: where each section is, in two columns where there is room. */
.contents {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.875rem;
  counter-reset: contents;
}
.contents li {
  break-inside: avoid;
  counter-increment: contents;
}
.contents li::before {
  content: counter(contents) ". ";
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.contents a {
  text-decoration-color: transparent;
}
.contents a:hover {
  text-decoration-color: var(--ink);
}

/* Sections: space between groups, not rules. */
section {
  margin-top: 3.5rem;
}
h2 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
h3 {
  margin: 1.75rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
section p,
section ul {
  margin: 0.75rem 0 0;
}
section ul {
  padding-left: 1.25rem;
}
section li + li {
  margin-top: 0.375rem;
}
strong {
  font-weight: 600;
}

/* Tables: a hairline under each row, no boxes. */
.table {
  margin: 1rem 0 0;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
th,
td {
  padding: 0.625rem 1rem 0.625rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
td:first-child {
  font-weight: 500;
  white-space: nowrap;
}

.note {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
footer p {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

@keyframes rise {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(0.5rem);
  }
}

@media (max-width: 40rem) {
  .contents {
    columns: 1;
  }
  td:first-child {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-intro {
    animation: none;
  }
  a {
    transition: none;
  }
}

@media print {
  body::before,
  .legal-nav,
  .skip {
    display: none;
  }
  .short {
    box-shadow: none;
    border: 1px solid var(--hairline);
  }
}
