/* pages.css — the two pages outside the app: about and privacy.
 *
 * They are read before anybody signs in (the sign-in page links to them) and
 * by people who will never sign in, so they load nothing of the app: no
 * scripts beyond the language switch, no app.css, nothing from anybody else.
 * The look is the sign-in page's — apricot ground, the name with the carmine
 * rule under it, the colophon at the foot — so that following a link from it
 * does not feel like leaving. */

@font-face {
  font-family: 'Pattaya'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./fonts/pattaya-latin.woff2) format('woff2');
}

:root {
  --ground: #fed3a8;
  --card: color-mix(in srgb, #fffcf8 72%, #fed3a8);
  --card-rule: color-mix(in srgb, #9e1f32 22%, #fed3a8);
  --ink: #241715;
  --ink-soft: #55423d;
  --muted: #6b5a52;
  --accent: #9e1f32;
  --pine: #195a56;
  --mark-pine: #195a56;
  --mark-carmine: #9e1f32;
  --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
  --sans: 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --logo: 'Pattaya', 'Alegreya', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #16201f; --card: #1f2b2a; --card-rule: #2d3a3a;
    --ink: #f2e7db; --ink-soft: #d5c7b8; --muted: #9d8f82;
    --accent: #e46d7b; --pine: #6fc0b0;
    --mark-pine: #7fc0a8; --mark-carmine: #e8807c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #16201f; --card: #1f2b2a; --card-rule: #2d3a3a;
  --ink: #f2e7db; --ink-soft: #d5c7b8; --muted: #9d8f82;
  --accent: #e46d7b; --pine: #6fc0b0;
  --mark-pine: #7fc0a8; --mark-carmine: #e8807c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 17px/1.6 var(--sans);
  padding: calc(env(safe-area-inset-top, 0px) + 5vh) max(18px, env(safe-area-inset-right, 0px))
           calc(env(safe-area-inset-bottom, 0px) + 24px) max(18px, env(safe-area-inset-left, 0px));
}
.page { width: min(680px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }

.brand { border-bottom: 4px solid var(--accent); padding-bottom: 16px; }
.brand a { display: block; }
.brand svg { display: block; width: min(420px, 100%); height: auto; margin: 0 auto; }
.brand .ink-pine { fill: var(--mark-pine); }
.brand .ink-carmine { fill: var(--mark-carmine); }


.text {
  background: var(--card); border: 1px solid var(--card-rule); border-radius: 14px;
  padding: 26px clamp(18px, 5vw, 40px) 30px;
}
.text h1 {
  margin: 0 0 4px; text-align: center; font-weight: 400; line-height: 1.05;
  font-family: var(--logo); font-size: 44px; color: var(--accent);
}
.text .when { margin: 0 0 22px; text-align: center; font-size: 14px; color: var(--muted); }
.text .lede { font-size: 18.5px; color: var(--ink); text-wrap: pretty; }
.text h2 {
  margin: 30px 0 8px; font: 700 21px/1.2 var(--serif); color: var(--pine);
  text-wrap: balance;
}
.text p, .text li { max-width: 64ch; text-wrap: pretty; }
/* The line under the title is centred on the card, not on a 64ch measure
   that starts at the card's left edge. */
.text .when { max-width: none; }
.text p { margin: 0 0 12px; }
.text ul { margin: 0 0 12px; padding-left: 1.2em; }
.text li { margin: 0 0 7px; }
.text li::marker { color: var(--accent); }
.text a { color: var(--pine); font-weight: 600; text-underline-offset: 2px; }
.text a:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 2px; }
.text strong { font-weight: 700; }
.text .aside { font-size: 15.5px; color: var(--ink-soft); }

/* The three plain promises, at the top: what a person reading this wants to
   know before anything else. */
.promises {
  list-style: none; padding: 0 !important; margin: 18px 0 6px !important;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px;
}
.promises li {
  margin: 0; padding: 12px 14px; border-radius: 10px; max-width: none;
  border: 1px solid var(--card-rule); font-size: 15.5px; line-height: 1.4; color: var(--ink-soft);
}
.promises strong { display: block; color: var(--ink); font: 700 16.5px/1.25 var(--serif); margin-bottom: 2px; }

.foot { text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--card-rule); padding-top: 12px; }
.foot nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 6px; font-size: 14.5px; }
.foot a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--accent); text-decoration: underline; }
.foot a[aria-current="page"] { color: var(--accent); }
.foot p { margin: 0; line-height: 1.5; }

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .text h1 { font-size: 38px; }
}
