/*
 * Summer Hours — the website. Colours are copied from apps/mobile/theme/tokens.ts (§8 light, §7 dark,
 * `entrance` for the night scene); CSS cannot import TypeScript. Change one and change it there.
 */

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #f6f2e8;
  --surface: #fdfaf1;
  --edge: rgba(120, 96, 48, 0.14);
  --rule: rgba(33, 29, 56, 0.16);
  --text: #211d38;
  --text-soft: #3a3357;
  --text-quiet: #6f6880;
  --accent: #8a6220;
  --mark: rgba(189, 148, 74, 0.32);
  --night-line: #f3efe6;
  --night-aside: #b6b0c8;
  /* One face, as the app is set (tokens.ts `ONE_FACE`); the three roles stay so a page says which it means. */
  --display: 'Newsreader', Georgia, serif;
  --body: var(--display);
  --mono: var(--display);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #100f29;
    --surface: #1a1932;
    --edge: rgba(255, 255, 255, 0.08);
    --rule: rgba(255, 255, 255, 0.12);
    --text: #f3efe6;
    --text-soft: #e9d8b8;
    --text-quiet: #a5a2bd;
    --accent: #c9b485;
    --mark: rgba(201, 180, 133, 0.28);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.wrap {
  width: min(44rem, 100% - 3rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -100vw;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
}

/* Draft-only: `node apps/site/check.mjs --publish` refuses a page that still has these. */
.draft {
  margin: 0;
  padding: 0.6rem 1.5rem;
  background: var(--mark);
  color: var(--text);
  font: 400 0.8125rem/1.5 var(--mono);
  text-align: center;
}
mark {
  background: var(--mark);
  color: inherit;
  padding: 0.05em 0.25em;
}

/* The header on every page but the landing's night scene. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  font: italic 400 1.375rem/1 var(--display);
  text-decoration: none;
}
.brand svg {
  width: 1.5rem;
  height: 1.5rem;
}
/* Legal pages. */
.doc {
  padding-block: 1.5rem 4rem;
}
.doc h1 {
  margin: 1rem 0 0.5rem;
  font: 400 clamp(2.25rem, 7vw, 3rem) / 1.1 var(--display);
}
.doc .dated {
  margin: 0 0 2rem;
  color: var(--text-quiet);
  font: 400 0.8125rem/1.5 var(--mono);
}
.doc h2 {
  margin: 2.5rem 0 0.5rem;
  font: 400 1.5rem/1.25 var(--display);
}
.doc p,
.doc li {
  color: var(--text-soft);
}
.doc ul {
  padding-left: 1.25rem;
}
.doc li + li {
  margin-top: 0.4rem;
}
.doc .summary {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 0.75rem;
}
.doc .summary p:first-child {
  margin-top: 0;
}
.doc .summary p:last-child,
.doc .summary ul:last-child {
  margin-bottom: 0;
}
.action {
  display: inline-block;
  margin-block: 0.5rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: 2rem;
  color: var(--accent);
  font-weight: 400;
  text-decoration: none;
}
.scroll {
  overflow-x: auto;
  margin-block: 1rem;
}
table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}
th,
td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text-soft);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--text-quiet);
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.06em;
}

footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--text-quiet);
  font-size: 0.875rem;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}
footer a {
  color: inherit;
}
footer p {
  margin: 0;
}
