/*
 * The three static pages — /privacy, /terms, /support — and nothing else.
 *
 * It lives in `public/` rather than in `src/` because those pages carry no
 * bundle at all: they are documents, and a document that waits on a module
 * graph to become readable is a worse document. Being copied verbatim also
 * means its own relative URLs resolve against `dist/`, which is why the fonts
 * below are `./fonts/…` here and `../fonts/…` would be wrong.
 *
 * `public/` is copied wholesale, so the native bundle carries these four
 * kilobytes without a page to apply them to — the same unread-but-harmless
 * deal as `version.json`, and cheaper than a second place for the pages to
 * live.
 *
 * Colours are the game's, copied rather than imported for the same reason the
 * icon generator copies them: nothing in `public/` can reach into `src/`. They
 * are the Tidepool palette's accent over the HUD's ink and dim — see the
 * `:root` block in index.html.
 */

/* The same three faces the HUD asks for, from the same bundled files. No CDN:
   see the note in index.html about the native build having no network. */
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('./fonts/outfit-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('./fonts/outfit-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('./fonts/outfit-latin-700-normal.woff2') format('woff2');
}

:root {
  --ink: #dff6ff;
  --text: #c2dbe8;
  --dim: #6f93a8;
  --accent-rgb: 86 240 255;
  --accent: rgb(var(--accent-rgb));
  --rule: rgb(var(--accent-rgb) / 0.14);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  /* The water, standing still: the backdrop shader's own glow, flattened to two
     radials. Fixed, so it doesn't slide up the page as a gradient on `body`
     would once the content is longer than the viewport. */
  background:
    radial-gradient(1200px 700px at 50% -10%, #0b2a3d 0%, transparent 62%),
    radial-gradient(900px 600px at 85% 110%, #07202e 0%, transparent 60%),
    #03080f;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

/* ------------------------------------------------------------------ header */

.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
  padding: 6px 0;
}
.back:hover, .back:focus-visible { color: var(--accent); }
.back .arrow { font-size: 15px; line-height: 1; }

h1 {
  margin: 26px 0 0;
  font-size: clamp(30px, 8vw, 42px); font-weight: 300; line-height: 1.15;
  letter-spacing: -0.01em; color: var(--ink);
  text-shadow: 0 0 34px rgb(var(--accent-rgb) / 0.28);
}

.updated {
  margin: 10px 0 0;
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim);
}

.lede {
  margin: 22px 0 0;
  font-size: 18px; line-height: 1.7; color: var(--ink);
}

/* ------------------------------------------------------------------- body */

h2 {
  margin: 46px 0 0; padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 21px; font-weight: 500; line-height: 1.3; color: var(--ink);
}

h3 {
  margin: 30px 0 0;
  font-size: 16px; font-weight: 500; color: var(--ink);
}

p { margin: 14px 0 0; }

ul { margin: 14px 0 0; padding-left: 20px; }
li { margin-top: 8px; }
li::marker { color: rgb(var(--accent-rgb) / 0.55); }

a { color: var(--accent); text-decoration-color: rgb(var(--accent-rgb) / 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

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

code, .key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em; color: var(--ink);
  background: rgb(var(--accent-rgb) / 0.08);
  border: 1px solid var(--rule); border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* A stored key and what is in it: the label sits above its own line rather than
   beside it, so a long key never squeezes the description into a column two
   words wide on a phone. */
dl { margin: 18px 0 0; }
dt { margin-top: 16px; }
dd { margin: 4px 0 0; }

blockquote {
  margin: 20px 0 0; padding: 14px 18px;
  border-left: 2px solid rgb(var(--accent-rgb) / 0.5);
  background: rgb(var(--accent-rgb) / 0.05);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
}
blockquote p:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ footer */

footer {
  margin-top: 56px; padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--dim);
}
.links {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  list-style: none; margin: 0; padding: 0;
}
.links li { margin: 0; }
.links a[aria-current='page'] { color: var(--dim); text-decoration: none; cursor: default; }
.small { margin-top: 18px; font-size: 12px; }

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