/*
 * Hearth, on the web.
 *
 * The same tokens the app uses (apps/mobile/src/constants/theme.ts), typed
 * out here rather than shared. A stylesheet and a React Native StyleSheet
 * have no format in common, and a build step to bridge four colours and two
 * fonts would be more moving parts than the thing it generates. If the
 * palette changes, both move together, and the comment in each file says so.
 */

:root {
  --ground: #fbf4ea;
  --surface: #fffdf9;
  --ink: #2e2620;
  --ink-muted: #6f6457;
  --ink-faint: #8f8272;
  --line: #ece2d3;
  --accent: #b84a2c;
  --accent-ink: #fff6ef;
  --event: #406e72;
  --event-soft: #e2efef;
  --todo: #6b4e96;
  --todo-soft: #efe8f5;
  --measure: 34rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Figtree, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", Figtree, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 0.5em; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }

a { color: var(--accent); }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

header.site .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mark {
  font-family: "Bricolage Grotesque", Figtree, sans-serif;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
}

nav a {
  margin-left: 1rem;
  font-size: 0.95rem;
  text-decoration: none;
}

nav a:hover { text-decoration: underline; }

.lede {
  font-size: 1.2rem;
  color: var(--ink-muted);
  margin: 0 0 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.card h3 { margin-top: 0; }

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

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

footer.site .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }

footer.site a { color: var(--ink-muted); }

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

ul { padding-left: 1.15rem; }
li { margin: 0.4rem 0; }

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1613;
    --surface: #221d19;
    --ink: #f4ece2;
    --ink-muted: #bdb0a1;
    --ink-faint: #8f8272;
    --line: #352d26;
    --accent: #e2714f;
    --accent-ink: #1a1613;
    --event: #7fbcbf;
    --event-soft: #23383a;
    --todo: #b197d6;
    --todo-soft: #332b44;
  }
}


/* The monogram, cream on rust. The app draws the W as Bricolage Grotesque
   text rather than a vector; here it is a plain glyph on a rounded square
   for the same reason, which is that a stylesheet can do it and an asset
   would be one more thing to keep in step. */
.mark { display: inline-flex; align-items: center; gap: 0.55rem; }
.mark .glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}


/* The landing page, which is one screen rather than a scroll.
   svh, not vh: mobile browsers report vh as the height without the address
   bar, so 100vh on a phone is taller than what anybody can actually see. */
.landing { display: flex; flex-direction: column; min-height: 100svh; }
.landing main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 1.5rem 1.25rem;
}
.hero { width: 100%; max-width: 38rem; margin: 0 auto; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.eyebrow .sep { color: var(--line); }
.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.landing h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
}
.landing .lede {
  margin: 0 0 1.6rem;
  max-width: 30rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Wren's voice. A card rather than a pull quote, because the thing being
   shown is a message that arrives, not a sentence somebody wrote. */
.said {
  display: flex;
  gap: 0.85rem;
  margin: 0 0 1.6rem;
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  max-width: 32rem;
}
.said .avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}
.said blockquote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Every message occupies the same grid cell, so the card is sized by the
   longest one and holds still while they change. A shorter message leaves a
   little room under it, which is the price of never making the page jump. */
.said .lines { display: grid; }
.said .line {
  grid-area: 1 / 1;
  opacity: 0;
  /* Out of the accessibility tree as well as out of sight, so a screen
     reader gets the one message on screen rather than all four. */
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.said .line.is-on { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .said .line { transition: none; }
}

.beta { margin: 0; font-size: 0.95rem; color: var(--ink-muted); }
.landing footer.site { margin-top: 0; }
.entity { color: var(--ink-faint); font-size: 0.85rem; }
