/* Rentnook's legal pages: privacy and terms.
 *
 * One stylesheet, no framework, no web fonts. A privacy policy that loads a
 * third-party font is an argument against itself, so everything here is local
 * and the type is whatever the reader's own system already has.
 *
 * Palette: docs/brand/cozy-nook/design-brief.md. Ivory dominates, forest gives
 * structure, clay is decoration only -- it does not carry text, because
 * #C98265 on ivory is about 2.6:1 and that is not a colour to read a policy in.
 */

:root {
  --bg: #f7f4ec;        /* warm ivory */
  --surface: #ffffff;   /* card */
  --ink: #1f2420;
  --muted: #55605a;
  --forest: #245c4d;
  --clay: #c98265;      /* accents and rules only */
  --rule: #e3ddcf;
  --focus: #245c4d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917;
    --surface: #1c2320;
    --ink: #ece7db;
    --muted: #a7b1aa;
    /* The brand green at #245C4D is unreadable on a dark ground. This is the
     * same hue carried up to where it contrasts. */
    --forest: #82c3ac;
    --clay: #dfa183;
    --rule: #2c3531;
    --focus: #82c3ac;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* One column, about 38rem, centred. Most people open this from inside the
 * app, so the phone is the default case and the desktop is the accommodation. */
header,
main,
footer {
  max-width: 38rem;
  margin: 0 auto;
}

header {
  padding: 2.5rem 0 0;
}

.wordmark {
  display: inline-block;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

h1 {
  margin: 1.5rem 0 0.35rem;
  color: var(--forest);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.updated {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.lede {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--ink);
}

h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--forest);
  font-size: 1.3125rem;
  line-height: 1.3;
  font-weight: 700;
}

/* The first section sits under the lede and needs no second line above it. */
h2.first {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--clay);
}

/* What is collected, and why it exists: the thing, then the reason. */
dl {
  margin: 0 0 1rem;
}

dt {
  margin-top: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

strong {
  font-weight: 700;
  color: var(--ink);
}

/* Spacious rounded card, as the app uses for a block that stands apart. */
.card {
  margin: 1.5rem 0;
  padding: 1.25rem 1.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.card > :last-child {
  margin-bottom: 0.5rem;
}

.card h3 {
  margin-top: 0;
}

/* A postal address, which Apple's Schedule 1 minimum terms require the custom
 * EULA to carry. Set solid so the two lines read as one block. */
.address {
  line-height: 1.4;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--muted);
}

@media (min-width: 40rem) {
  body {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  h1 {
    font-size: 2.375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  h1,
  h2 {
    color: #000;
  }

  .card {
    border: 1px solid #999;
  }
}
