/* roamjourneys.app: Roam's warm palette (pine ink, terracotta, paper),
   the same colors as the app's default theme, in light and dark. */
:root {
  --paper: #f6f3eb;
  --surface: #fffdfa;
  --ink: #274a42;
  --muted: #5e716a;
  --accent: #96502f;
  --create: #dd7151;
  --line: #e4e5dc;
  --soft: #e8e9df;
  --button: #203934;
  --on-button: #ffffff;
  --band: #203934;
  --on-band: #f6f3eb;
  --on-band-muted: #c9d6cf;
  --band-accent: #f0a07f;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a17;
    --surface: #1b2622;
    --ink: #e4eee9;
    --muted: #a9bab3;
    --accent: #e7a88c;
    --create: #e5805f;
    --line: #33413b;
    --soft: #26332e;
    --button: #d7e6df;
    --on-button: #13201b;
    --band: #1f3a33;
    --on-band: #f1f5f2;
    --on-band-muted: #b9cbc3;
    --band-accent: #f0a07f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--create); }

.site-header, .site-footer, main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--ink); }

main { padding-top: 12px; padding-bottom: 56px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 18px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
}
p, li { color: var(--ink); }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }

/* Legal pages: smaller title, comfortable reading width. */
.doc h1 { font-size: clamp(30px, 6vw, 40px); }
.doc h2 { font-size: 20px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--create);
  background: var(--soft);
  border-radius: 8px;
}

.hero { padding: 36px 0 12px; }
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 36px 0 8px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.button {
  display: inline-block;
  background: var(--button);
  color: var(--on-button);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 14px;
  margin-top: 8px;
}
.button:hover { color: var(--on-button); opacity: 0.92; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p, .faq details ul { margin: 10px 0 2px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer p { margin: 6px 0; color: var(--muted); }

/* ───────────── Home page ───────────── */

body.is-home { overflow-x: hidden; }
body.is-home .site-header,
body.is-home .site-footer,
main.home { max-width: 1160px; }
main.home { padding-top: 0; overflow-x: clip; }

/* Italic serif accent on headings: the one stylistic flourish. */
main.home h1 em, main.home h2 em {
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

/* Hero */
.hero-x {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 28px 0 40px;
}
.hero-x h1 { font-size: clamp(40px, 9vw, 74px); line-height: 1.0; margin-bottom: 20px; }
.hero-x .lede { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; }
.hero-copy { position: relative; z-index: 1; }
.hero-route {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.route-line, .closing-route path {
  fill: none;
  stroke: var(--create);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}
.route-pin { fill: var(--surface); stroke: var(--create); stroke-width: 4; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
  font-size: 15px;
}
.store-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--create);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--create) 30%, transparent);
}
.text-link { font-weight: 700; text-decoration: none; color: var(--ink); }
.text-link:hover { color: var(--accent); }

/* Phones */
.phone {
  position: relative;
  margin: 0;
  width: min(300px, 64vw);
  padding: 9px;
  border-radius: 48px;
  background: #0f1d19;
  box-shadow:
    0 40px 70px -30px rgba(23, 44, 38, 0.55),
    0 12px 24px -12px rgba(23, 44, 38, 0.35),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 39px;
  background: var(--soft);
}

.hero-visual {
  position: relative;
  min-height: min(640px, 150vw);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.phone-front { z-index: 2; transform: rotate(3deg); margin-left: 18%; }
.phone-back {
  position: absolute;
  z-index: 1;
  top: 44px;
  left: 50%;
  margin-left: calc(min(300px, 64vw) * -0.92);
  transform: rotate(-7deg) scale(0.9);
  filter: saturate(0.9);
  opacity: 0.96;
}

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(23, 44, 38, 0.45);
}
.chip svg {
  width: 26px;
  height: 26px;
  padding: 4px;
  border-radius: 50%;
  background: var(--soft);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chip-a { top: 12%; right: 2%; }
.chip-b { top: 52%; left: 0; }
.chip-c { bottom: 6%; right: 4%; }

@media (prefers-reduced-motion: no-preference) {
  .phone-front { animation: float 7s ease-in-out infinite; }
  .chip { animation: float 6s ease-in-out infinite; }
  .chip-b { animation-delay: -2s; }
  .chip-c { animation-delay: -4s; }
  @keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
  }
}

/* Ticker */
.ticker {
  position: relative;
  margin: 8px -20px 0;
  padding: 16px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; gap: 0; }
.ticker span {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.ticker span::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 22px;
  border-radius: 50%;
  background: var(--create);
}
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 38s linear infinite; }
  @keyframes ticker { to { transform: translateX(-50%); } }
}

/* Feature sections */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: 72px 0 24px;
}
.feature h2, .steps h2, .closing h2 {
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 16px;
}
.feature-copy > p:not(.eyebrow) { font-size: 18px; color: var(--muted); max-width: 30em; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li {
  position: relative;
  padding: 10px 0 10px 36px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--create);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2L4.5 10.1l1.4-1.4 2.7 2.7 5.5-5.5 1.4 1.4-6.9 6.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2L4.5 10.1l1.4-1.4 2.7 2.7 5.5-5.5 1.4 1.4-6.9 6.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.feature-visual { position: relative; display: flex; justify-content: center; }
.phone-tilt-r { transform: rotate(-2.5deg); }
.note-card {
  position: absolute;
  left: 0;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px -18px rgba(23, 44, 38, 0.5);
  font-size: 14px;
  line-height: 1.35;
}
.note-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--create);
  color: #fff;
  font-weight: 800;
}

.panel {
  margin: 64px -20px 0;
  padding: 56px 20px;
  border-radius: 36px;
  background: var(--soft);
}
.duo { min-height: min(600px, 140vw); }
.phone-duo-a { z-index: 2; transform: rotate(-3deg); margin-right: 22%; }
.phone-duo-b {
  position: absolute;
  z-index: 1;
  top: 40px;
  left: 50%;
  margin-left: calc(min(300px, 64vw) * -0.05);
  transform: rotate(6deg) scale(0.88);
}

/* Steps */
.steps { padding: 88px 0 24px; text-align: left; }
.steps ol {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: none;
}
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 18px;
}
.steps h3 { margin: 14px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.steps li p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px dashed var(--create);
  color: var(--accent);
  font-weight: 800;
}

/* Closing band */
.closing {
  position: relative;
  overflow: hidden;
  margin: 80px 0 24px;
  padding: 56px 28px 48px;
  border-radius: 36px;
  background: var(--band);
  color: var(--on-band);
  text-align: center;
}
.closing h2 { color: var(--on-band); }
.closing h2 em { color: var(--band-accent) !important; }
.closing p { color: var(--on-band-muted); font-size: 18px; margin: 0 auto 8px; max-width: 30em; }
.closing a { color: var(--on-band); }
.closing-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 22px; margin-top: 24px !important; }
.button-light {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 14px;
  background: var(--on-band);
  color: var(--band) !important;
  font-weight: 800;
  text-decoration: none;
}
.closing-route {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 60%;
  pointer-events: none;
}
.closing-route path { stroke: var(--band-accent); opacity: 0.45; }

.credits { font-size: 13px; color: var(--muted); max-width: 52em; margin: 28px 0 0; line-height: 1.5; }

/* Wider screens: two columns */
@media (min-width: 900px) {
  .hero-x { grid-template-columns: 1.05fr 1fr; align-items: center; padding: 56px 0 72px; gap: 40px; }
  .hero-visual { min-height: 680px; }
  .hero-route { display: block; }
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding-top: 104px; }
  .feature-flip .feature-copy { order: 2; }
  .panel { margin-left: 0; margin-right: 0; padding: 72px 56px; }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
  .closing { padding: 80px 40px 72px; }
  .ticker { margin-left: 0; margin-right: 0; }
  .note-card { left: 4%; }
}

/* Small phones: tuck the chips in and shrink the stacked phones. */
@media (max-width: 520px) {
  .phone { border-radius: 40px; padding: 7px; }
  .phone img { border-radius: 33px; }
  .hero-visual { min-height: 0; padding-bottom: 20px; }
  .phone-front { margin-left: 26%; width: min(250px, 60vw); }
  .phone-back { width: min(250px, 60vw); margin-left: calc(min(250px, 60vw) * -0.86); top: 30px; }
  .chip { font-size: 12.5px; padding: 7px 11px 7px 8px; }
  .chip svg { width: 22px; height: 22px; padding: 3px; }
  .chip-a { top: 4%; right: 0; }
  .chip-b { top: 48%; left: 0; }
  .chip-c { bottom: 4%; right: 0; }
  .duo .phone { width: min(240px, 58vw); }
  .phone-duo-b { margin-left: calc(min(240px, 58vw) * -0.05); }
  .note-card { bottom: 6%; }
}
