/*
 * Tokens mirror the app's theme (src/ui/theme.ts) so the site and the product
 * are recognisably the same thing. Both schemes define every colour, so no
 * element can be left with a light-only value.
 */
:root {
  --bg: #fbf9f7;
  --surface: #ffffff;
  --border: #e8e3dd;
  --text: #181513;
  --text-secondary: #5e5751;
  --text-tertiary: #918981;
  --accent: #b2491b;
  --accent-text: #ffffff;
  --accent-muted: #f6e7df;
  --radius: 14px;
  --measure: 34rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1d1b1a;
    --border: #332f2d;
    --text: #f4f1ee;
    --text-secondary: #b5aea8;
    --text-tertiary: #857e78;
    --accent: #e8845c;
    --accent-text: #241009;
    --accent-muted: #3a251c;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.wrap {
  margin: 0 auto;
  max-width: 68rem;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- header */

header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.menu {
  display: flex;
  gap: 22px;
}

.menu a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--accent);
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-weight: 700;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  border-radius: 11px;
  height: 36px;
  width: 36px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 88px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 auto 20px;
  max-width: 18ch;
}

.hero p.lead {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  margin: 0 auto 32px;
  max-width: 44ch;
}

.badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--accent-text);
  display: inline-block;
  font-weight: 600;
  padding: 13px 26px;
  text-decoration: none;
}

.btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.note {
  color: var(--text-tertiary);
  font-size: 0.86rem;
  margin-top: 16px;
}

/* ------------------------------------------------------------ screenshots */

/*
 * Capped rather than fluid: a phone screenshot stretched to the full width of
 * a column is enormous on a narrow viewport, and nothing in it is legible at
 * that size anyway. The column count is fixed rather than `auto-fit`, because
 * with four screenshots auto-fit lands on three-plus-one at mid widths and
 * leaves the fourth stranded on a row of its own.
 */
.shots {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 190px));
  justify-content: center;
  padding: 28px 0 72px;
}

@media (min-width: 62rem) {
  .shots {
    grid-template-columns: repeat(4, minmax(0, 190px));
  }
}

.shots figure {
  margin: 0;
}

.shots img {
  border: 1px solid var(--border);
  border-radius: 18px;
  display: block;
  /* `height: auto` is load-bearing: the width/height attributes on the tag are
     there to reserve layout space, but without this the height attribute wins
     and every screenshot renders its full intrinsic height, stretched. */
  height: auto;
  width: 100%;
}

.shots figcaption {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  padding-top: 10px;
  text-align: center;
}

/* -------------------------------------------------------------- features */

.features {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 40px 48px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 64px 0;
}

.features h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.features p {
  color: var(--text-secondary);
  margin: 0;
}

/* ------------------------------------------------------------------ prose */

.prose {
  max-width: var(--measure);
  padding: 56px 0 72px;
}

.prose h1 {
  font-size: 2rem;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.prose .updated {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin: 0 0 40px;
}

.prose h2 {
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
  margin: 40px 0 12px;
  padding-top: 28px;
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
}

.callout {
  background: var(--accent-muted);
  border-radius: var(--radius);
  color: var(--text);
  padding: 18px 20px;
}

/* ----------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.92rem;
  margin-top: 40px;
  padding: 44px 0 0;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  justify-content: space-between;
}

.foot-brand {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  max-width: 24rem;
}

.foot-brand img {
  border-radius: 10px;
  height: 34px;
  width: 34px;
}

.foot-brand strong {
  color: var(--text);
  display: block;
}

.foot-links {
  display: grid;
  gap: 10px 32px;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
}

.foot-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--accent);
}

.foot-legal {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding: 20px 0 40px;
}
