/* Hearth, on the web.
 *
 * The colours are copied across from lib/theme/hearth_colors.dart in the
 * Heads Up repo, which is the only place in the app allowed to hold a hex
 * literal. If a token is retuned there, retune it here too — this file is
 * the one place on the site that knows what a colour is.
 *
 * Figtree is self-hosted rather than pulled from Google Fonts. A CDN link
 * would make a third-party request that the privacy policy would then have
 * to disclose, and it would cost the site the plainest true thing it can
 * say: that it loads nothing from anyone else.
 */

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #FAF4EC;
  --surface: #FFFDFA;
  --fg: #2A2320;
  --muted: #6B5F58;
  --faint: #8A7B72;
  --edge: #EDE3D7;
  --primary: #0B6E5F;
  --accent: #C0350F;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130F;
    --surface: #221C17;
    --fg: #F4EDE5;
    --muted: #C7B8AC;
    --faint: #A99C92;
    --edge: #332A23;
    --primary: #4FD6BC;
    --accent: #FF8A5C;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  -webkit-text-size-adjust: 100%;
}

h1 {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.6rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.6rem 0 0.4rem;
}

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

ul, ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
}

strong {
  font-weight: 600;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.updated {
  color: var(--faint);
  font-size: 0.9rem;
  margin: 0 0 2.5rem;
}

/* Nothing in Hearth is sharp; the smallest radius in the system is 10px. */
.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.25rem;
}

.card :last-child {
  margin-bottom: 0;
}

.card h2, .card h3 {
  margin-top: 0;
}

/* For the things a reader most needs to notice — the ones a policy would
 * normally bury. */
.callout {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0 0 1.25rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--edge);
}

th {
  font-weight: 600;
  color: var(--muted);
}

/* Wide content scrolls inside itself rather than the page. */
.scroll-x {
  overflow-x: auto;
}

/* The store screenshots, as a strip that scrolls sideways. Eight portrait
 * frames in a 42rem column would otherwise be a page of thumbnails; a strip
 * keeps each one large enough to read. The images are same-origin WebP,
 * downscaled from the store composites, so the site still loads nothing
 * from anyone else. */
.shots {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  margin: 0 0 1rem;
}

.shots img {
  flex: none;
  width: 13.5rem;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--edge);
  scroll-snap-align: start;
}

header.site {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.5rem;
}

header.site svg {
  border-radius: 10px;
  flex: none;
}

header.site a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--edge);
  color: var(--faint);
  font-size: 0.9rem;
}

footer.site a {
  margin-right: 1rem;
  display: inline-block;
}

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
