/*
  Tiny Doors website: what every page shares. The type, the two themes, and the
  plain elements. home.css and policy.css add what their one page needs.

  Every custom property in the two :root blocks below is a literal value of the
  token of the same name in src/design/tokens.css, restated because this folder
  is deployed on its own and cannot read src/. Dusk is the default and daylight
  applies when the system asks for light, exactly as in the app.
  src/guards/site-brand.test.ts holds every value to its token in both themes,
  and fails on a colour written anywhere outside these two blocks, in this file
  or in any other stylesheet here.

  Both fonts are served from fonts/ beside this file, with their licences, and
  src/guards/site.test.ts fails on any reference that leaves the site.
*/

@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/newsreader-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Albert Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/albert-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #22303a;
  --surface: #2a3a46;
  --ink: #e9e4d8;
  --ink-muted: #a7b0ac;
  --lamp: #f2c879;
  --lamp-ink: var(--lamp);
  --plaster: #3d4a53;
  --plaster-shade: #33404a;
  --pavement: #263139;
  --rule: rgb(233 228 216 / 0.16);
  --paint-verdigris: #5f7f6d;
  --paint-lift: #fff8e6;
  --paint-sink: #0d1418;
  --brass-dim: #7d6a48;
  --font-display: 'Newsreader Variable', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Albert Sans Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-surface: 14px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #efece4;
    --surface: #f7f5ef;
    --ink: #2b2e2a;
    --ink-muted: #60655c;
    --lamp: #b4762a;
    --lamp-ink: #8a5a1c;
    --plaster: #e2dccf;
    --plaster-shade: #d8d1c1;
    --pavement: #cfc8b8;
    --rule: rgb(43 46 42 / 0.14);
    --paint-lift: #fffdf4;
    --paint-sink: #241a12;
    --brass-dim: #63523a;
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.75rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.45rem;
}

a {
  color: var(--lamp-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

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

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* Under 70 characters a line, spec 9.1. */
.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.site-footer {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

/* The not-found page, which loads nothing but this file. */
.lost {
  padding-top: 4rem;
}

.lost h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}
