/*
 * The public site's one stylesheet (PRODUCTION.md §7).
 *
 * The app's palette, copied from Cloud/packages/client/src/app.css — the chrome, the panel, the
 * three inks, the line and the accent, light and dark — so the site and the app read as one thing.
 * There is no theme switch: a switch needs script, and the site has none, so it follows the
 * system's choice and nothing else. System fonts, like the app, so no page asks a font host for
 * anything.
 */

:root {
  --chrome: #f1e9d8;
  --panel: #faf6ec;
  --ink: #241d12;
  --ink-quiet: #685941;
  --ink-faint: #7b6b4c;
  --line: #e4dac2;
  --accent: #57472e;
  --on-accent: #faf6ec;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --chrome: #241d12;
    --panel: #3e3220;
    --ink: #f1e9d8;
    --ink-quiet: #cbbb8e;
    --ink-faint: #b3a276;
    --line: #4e4029;
    --accent: #cbbb8e;
    --on-accent: #241d12;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--chrome);
  color: var(--ink);
  font: 1rem/1.55 system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* The bar: the mark and the name, linking home. */
.bar {
  border-bottom: 1px solid var(--line);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}

.home img {
  width: 1.75rem;
  height: 1.75rem;
}

.bar nav {
  font-size: 0.9375rem;
}

main {
  flex: 1;
  padding: 2rem 0 3rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0 0 0.875rem;
}

li + li {
  margin-top: 0.375rem;
}

.quiet {
  color: var(--ink-quiet);
}

.lede {
  font-size: 1.1875rem;
  color: var(--ink-quiet);
  margin-bottom: 1.5rem;
}

/* The landing page's opening: the mark large, the name, the one line. */
.hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.hero img {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
}

.hero h1 {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.button {
  display: inline-block;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.soon {
  color: var(--ink-faint);
}

.points {
  padding-left: 1.25rem;
}

.points b {
  color: var(--ink);
}

.not {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}

/* Legal pages: a panel to read on, and the other language one link away. */
.doc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem 1rem;
}

.doc h1 {
  font-size: 1.625rem;
}

.lang {
  float: right;
  margin: 0.25rem 0 0.5rem 1rem;
  font-size: 0.9375rem;
}

.stamp {
  color: var(--ink-faint);
  font-size: 0.9375rem;
}

address {
  font-style: normal;
}

dl {
  margin: 0 0 1rem;
}

dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dd {
  margin: 0;
}

/* The foot of every page (PRODUCTION.md L1). */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-quiet);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.5rem;
}

.foot p {
  margin: 0;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.5rem;
  }

  .hero img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .doc {
    padding: 1.25rem 1rem 0.75rem;
    border-radius: 0.5rem;
  }

  .lang {
    float: none;
    display: block;
    margin: 0 0 0.75rem;
  }
}
