/* Loam's website (docs/tasks/website-waitlist.md): the page at /, the
   privacy page and the waitlist's answers. Served by the front with a CSP
   that allows this file, the fonts and no script at all (index.mjs,
   sitePage). The look decided on 2026-10-10 (docs/decisions.md, "the
   site's look"): the paper and dot grid of docs/look.md, light only; the
   app's own faces served from fonts/ (scripts/site-fonts.sh), never from
   another site; the name in Besley at 400, lower case, much larger than
   the three lines under it; ink and paper, no colour anywhere. */

@font-face { font-family: "Loam Sans"; src: url(/fonts/loam_sans.woff) format("woff"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Loam Sans"; src: url(/fonts/loam_sans_italic.woff) format("woff"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Loam Mono"; src: url(/fonts/loam_mono_medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Besley"; src: url(/fonts/besley.woff) format("woff"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f7f5ef;
  --surface: #fffefb;
  --sunken: #efece4;
  --dot: #c9c7c2;
  --ink: #1c1c1a;
  --quiet: #5a5954;
  --tertiary: #66655f;
  --hairline: #e3e0d6;
  --outline: #85837c;
  --bad: #c4312c;
  --scrim: rgba(28, 28, 26, 0.28);
  --sans: "Loam Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Loam Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --name: Besley, "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px);
  background-size: 21px 21px;
  color: var(--ink);
  font: 17px/1.5 var(--sans);
  font-feature-settings: "tnum";
}
a { color: var(--quiet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.quiet { color: var(--quiet); }

/* The front page: the name, three lines and a link, centred on the paper. */
body.front { display: flex; align-items: center; justify-content: center; }
body.front main { padding: 40px 24px; }
.name { font: 400 146px/1 var(--name); letter-spacing: -0.015em; margin: 0 0 11px; }
.tagline { font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; margin: 0; max-width: 24ch; }
.tagline span { display: block; }
.join {
  display: inline-block;
  margin-top: 26px;
  font-style: italic;
  font-size: 19px;
  color: var(--quiet);
  text-decoration: underline;
  text-decoration-color: var(--outline);
  text-underline-offset: 5px;
}
.join:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* The waitlist, a sheet with no script: the link targets #join and :target
   shows it; the scrim and the close link go back to #. */
#join { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1; }
#join:target { display: flex; }
#join .scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet {
  position: relative;
  width: 100%;
  max-width: 25rem;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 18px;
  padding: 26px 24px 22px;
}
.sheet h2 { font: 400 40px/1 var(--name); letter-spacing: -0.015em; margin: 0 36px 22px 0; }
.sheet .close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; color: var(--quiet); text-decoration: none; font-size: 22px; line-height: 1;
}
.sheet .close:hover { background: var(--sunken); color: var(--ink); }
.sheet .l { display: block; font: 500 12px/16px var(--mono); color: var(--quiet); margin: 0 0 6px; }
.sheet input[type="email"], .sheet input[type="text"] {
  display: block; width: 100%;
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--outline); border-radius: 10px;
  padding: 11px 12px; margin: 0 0 16px;
}
.phones { display: flex; gap: 8px; margin: 0 0 20px; }
.phones label {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; background: var(--surface); border: 1px solid var(--outline); border-radius: 10px;
  cursor: pointer; font-size: 16px;
}
.phones input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.phones label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sheet button {
  width: 100%;
  font: 600 17px/1 var(--sans); color: var(--paper); background: var(--ink);
  border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer;
}
.sheet .fine { margin: 14px 0 0; text-align: center; font: 500 12px/16px var(--mono); }
.sheet .fine a { color: var(--tertiary); }
@media (prefers-reduced-motion: no-preference) {
  #join:target .sheet { animation: rise 0.18s ease-out; }
  @keyframes rise { from { transform: translateY(12px); opacity: 0; } }
}

/* The other pages (privacy, the waitlist's answer): a column of text. */
body.doc main { max-width: 38rem; margin: 0 auto; padding: 40px 24px 56px; }
.doc .mark { font: 400 40px/1 var(--name); letter-spacing: -0.015em; margin: 0 0 28px; }
.doc .mark a { color: inherit; text-decoration: none; }
.doc h1 { font: 600 26px/1.25 var(--sans); letter-spacing: -0.006em; margin: 0 0 8px; }
.doc h1.bad { color: var(--bad); }
.doc h2 {
  font: 500 12px/16px var(--mono); color: var(--quiet);
  margin: 40px 0 10px; padding-top: 14px; border-top: 1px solid var(--hairline);
}
.doc p { margin: 0 0 12px; }
.doc .small { font-size: 15px; }
.doc ol { margin: 0 0 12px; padding-left: 1.4rem; }
.doc li { margin: 0 0 6px; }
.doc footer { margin-top: 48px; padding-top: 14px; border-top: 1px solid var(--hairline); font: 500 12px/16px var(--mono); }

/* Phone width, last so it wins. */
@media (max-width: 500px) {
  .name { font-size: 112px; }
  .tagline { font-size: 26px; }
  .sheet h2 { font-size: 28px; line-height: 1.1; }
}
