:root {
  --paper: #f6ecd6;
  --paper-deep: #efe2c4;
  --card: #fbf5e8;
  --trail: #33735a;
  --trail-deep: #24573f;
  --ink: #8c6129;
  --text: #2f2a22;
  --muted: #6d6252;
  --line: #e2d3b2;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1a16;
    --paper-deep: #24211b;
    --card: #2a261f;
    --trail: #6fb293;
    --trail-deep: #8cc7ab;
    --ink: #d0a464;
    --text: #efe6d4;
    --muted: #b3a690;
    --line: #3b352b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--trail); text-underline-offset: 3px; }
a:hover { color: var(--trail-deep); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; gap: 24px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 640px) { .site-nav .optional { display: none; } }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 96px;
}
.hero::before {
  /* soft watercolour wash behind everything */
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background:
    radial-gradient(40% 50% at 78% 30%, rgba(170, 160, 220, 0.35), transparent 70%),
    radial-gradient(35% 40% at 20% 20%, rgba(230, 170, 150, 0.28), transparent 70%),
    radial-gradient(45% 45% at 50% 90%, rgba(110, 160, 120, 0.18), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: clamp(44px, 7vw, 76px); margin-bottom: 0.2em; }
.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink);
  margin-bottom: 24px;
}
.hero .lede { font-size: 20px; color: var(--muted); max-width: 32em; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--trail);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.badge:hover { background: var(--trail-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .badge, .badge:hover { color: #14231b; } }
.badge svg { width: 18px; height: 18px; }
.cta-note { font-size: 15px; color: var(--muted); }

/* ---------- Phone ---------- */

.phone {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1200 / 2600;
  margin: 0 auto;
  border-radius: 48px;
  padding: 12px;
  background: #1d1d1f;
  box-shadow:
    0 40px 80px -30px rgba(60, 40, 10, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  transform: rotate(2deg);
}
.phone .screen {
  position: relative;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: var(--paper) center top / cover no-repeat;
}
.phone .island {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 30%;
  height: 22px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.phone .chapter-card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(251, 245, 232, 0.92);
  color: #2f2a22;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  line-height: 1.45;
}
.phone .chapter-card .kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #33735a;
}
.phone .chapter-card h3 { font-size: 20px; margin: 4px 0 2px; color: #2f2a22; }
.phone .chapter-card .place { color: #8c6129; font-size: 12px; margin-bottom: 10px; }
.phone .progress {
  height: 6px;
  border-radius: 99px;
  background: #e6d9bd;
  overflow: hidden;
  margin: 10px 0 6px;
}
.phone .progress span { display: block; height: 100%; width: 64%; background: #33735a; border-radius: inherit; }
.phone .progress-label { display: flex; justify-content: space-between; font-size: 11px; color: #6d6252; }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .phone { transform: none; margin-top: 16px; }
}

/* ---------- Sections ---------- */

section { padding: 96px 0; }
section.alt { background: var(--paper-deep); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4.5vw, 46px); }
.section-head p { color: var(--muted); font-size: 19px; }
.center { text-align: center; margin-inline: auto; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.step .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--trail);
  color: var(--trail);
  font-family: var(--serif);
  font-weight: 700;
  margin-bottom: 18px;
}
.step h3 { font-size: 23px; }
.step p { color: var(--muted); font-size: 16.5px; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* The trail of chapters */
.trail-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) { .trail-layout { grid-template-columns: 1fr; gap: 40px; } }

.chapters { list-style: none; margin: 0; padding: 0; position: relative; }
.chapters li {
  position: relative;
  padding: 0 0 26px 52px;
}
.chapters li::before {
  /* dotted trail joining the stops, like the app icon */
  content: "";
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: -2px;
  border-left: 4px dotted var(--ink);
}
.chapters li:last-child::before { display: none; }
.chapters .dot {
  position: absolute;
  left: 4px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 6px solid var(--trail);
  background: var(--paper);
}
.chapters li.locked .dot { border-color: var(--line); background: var(--line); width: 16px; height: 16px; left: 9px; top: 7px; border-width: 0; }
.chapters li.here .dot { box-shadow: 0 0 0 6px color-mix(in srgb, var(--trail) 22%, transparent); }
.chapters .title { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; }
.chapters .meta { font-size: 14px; color: var(--muted); }
.chapters li.locked .title { color: var(--muted); }
.more { padding-left: 52px; font-size: 18px; color: var(--muted); font-style: italic; font-family: var(--serif); }

.excerpt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 44px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  position: relative;
}
.excerpt .eyebrow { font-family: var(--sans); }
.excerpt h3 { font-size: 30px; margin-bottom: 4px; }
.excerpt .place { color: var(--ink); font-style: italic; margin-bottom: 24px; }
.excerpt p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.85;
  padding: 6px 8px 0 0;
  color: var(--trail);
}
.excerpt .fade { color: var(--muted); }
@media (max-width: 600px) { .excerpt { padding: 28px 24px; font-size: 18px; } }

/* Stories */
.stories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .stories { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.story {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.story .art {
  height: 240px;
  background-size: cover;
  background-position: center 18%;
}
.story .art.map { background-position: center 22%; }
.story .art.pct {
  position: relative;
  background:
    radial-gradient(60% 70% at 25% 30%, rgba(160, 190, 140, 0.75), transparent 70%),
    radial-gradient(55% 60% at 80% 70%, rgba(220, 170, 120, 0.6), transparent 70%),
    radial-gradient(50% 50% at 70% 20%, rgba(150, 170, 210, 0.6), transparent 70%),
    #efe5cc;
}
.story .art.pct svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.story .body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.story h3 { font-size: 25px; margin-bottom: 6px; }
.story p { color: var(--muted); font-size: 16.5px; }
.story .tag {
  align-self: flex-start;
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--trail) 14%, transparent);
  color: var(--trail);
}
.story .tag.paid { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 56px;
}
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.feature svg { width: 32px; height: 32px; color: var(--trail); margin-top: 4px; }
.feature h3 { font-family: var(--sans); font-size: 18px; font-weight: 650; margin-bottom: 4px; letter-spacing: 0; }
.feature p { color: var(--muted); font-size: 16.5px; margin: 0; }

/* Privacy band */
.privacy-band {
  background: var(--trail);
  color: #f6ecd6;
  border-radius: 32px;
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.privacy-band h2 { font-size: clamp(30px, 4vw, 42px); color: #fff; }
.privacy-band p { color: rgba(246, 236, 214, 0.85); margin: 0; max-width: 36em; }
.privacy-band a.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(246, 236, 214, 0.7);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.privacy-band a.button:hover { background: rgba(255, 255, 255, 0.1); }
@media (prefers-color-scheme: dark) { .privacy-band { background: #24573f; } }
@media (max-width: 760px) { .privacy-band { grid-template-columns: 1fr; padding: 44px 28px; } }

/* Final CTA */
.closing { text-align: center; padding: 112px 0 120px; }
.closing img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 28px; box-shadow: 0 16px 40px -18px rgba(36, 87, 63, 0.6); }
.closing h2 { font-size: clamp(34px, 5vw, 52px); }
.closing p { color: var(--muted); font-size: 19px; }
.closing .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  font-size: 15px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Long-form pages (privacy, support) ---------- */

.page { padding: 64px 0 96px; }
.page .wrap { max-width: 720px; }
.page h1 { font-size: clamp(38px, 6vw, 54px); }
.page h2 { font-size: 26px; margin-top: 2em; }
.page .updated { color: var(--muted); font-size: 15px; margin-bottom: 2em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.5em; }
.page details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.page summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.page summary::-webkit-details-marker { display: none; }
.page summary::after { content: "+"; color: var(--trail); font-family: var(--sans); font-weight: 400; font-size: 26px; line-height: 1; }
.page details[open] summary::after { content: "–"; }
.page details > *:not(summary) { margin-top: 12px; color: var(--muted); }
.page details p:last-child { margin-bottom: 0; }
.contact-card {
  margin-top: 48px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.contact-card h2 { margin-top: 0; }
.contact-card p:last-child { margin-bottom: 0; }

.not-found { text-align: center; padding: 120px 0; }
.not-found h1 { font-size: clamp(40px, 6vw, 60px); }
.not-found p { color: var(--muted); }
