@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* Brand tokens: docs/brand/README.md in roam-travel */
:root {
  color-scheme: light;
  --ink: #192b24;
  --ink-soft: #62736b;
  --ink-faint: #b8c4bb;
  --line: #dce4dc;
  --green: #155840;
  --green-deep: #0f4030;
  --night: #0c2f23;
  --cream: #f3ecd8;
  --amber: #f2b84b;
  --ground: #eef2ec;
  --paper: #ffffff;
  --serif: "Literata", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; max-width: var(--measure); }
h1, h2, h3 { font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 25px; border: 0;
  background: var(--green); color: #fff;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: var(--green-deep); color: #fff; }
.button.amber { background: var(--amber); color: var(--night); }
.button.amber:hover { background: #f6c86a; color: var(--night); }
.button:disabled { opacity: 0.6; cursor: default; }

/* Hero: night green, the intro, the line, the form */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 22%, #1a5a43 0%, var(--green) 38%, var(--night) 100%);
  color: var(--cream);
  padding-bottom: clamp(56px, 9vw, 112px);
}
.top { position: relative; display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.top .mark img { width: 30px; height: 30px; }
.top nav a { font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; color: var(--cream); text-decoration: none; }
.top nav a:hover { color: var(--amber); }
.hero-body { position: relative; text-align: center; }
.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: 1.04; letter-spacing: -0.025em;
  max-width: 15ch; margin: 0 auto 1.1rem;
}
.hero h1 em { font-style: italic; color: var(--amber); font-weight: 400; }
.hero .lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; max-width: 32rem; margin: 0 auto; color: rgba(243, 236, 216, 0.88); }
.aside { font-family: var(--sans); font-size: 0.875rem; color: rgba(243, 236, 216, 0.66); margin: 14px auto 0; }

/* Ambient fireflies behind the hero */
.fireflies i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 10px 3px rgba(242, 184, 75, 0.55);
  opacity: 0; animation: drift 9s ease-in-out infinite;
}
.fireflies i:nth-child(1) { left: 8%;  top: 22%; animation-delay: 3.5s; }
.fireflies i:nth-child(2) { left: 88%; top: 16%; animation-delay: 5s; animation-duration: 11s; }
.fireflies i:nth-child(3) { left: 18%; top: 62%; animation-delay: 6.5s; animation-duration: 10s; }
.fireflies i:nth-child(4) { left: 78%; top: 54%; animation-delay: 4.2s; }
.fireflies i:nth-child(5) { left: 94%; top: 82%; animation-delay: 8s; animation-duration: 12s; }
.fireflies i:nth-child(6) { left: 4%;  top: 86%; animation-delay: 7s; }
.fireflies i:nth-child(7) { left: 66%; top: 8%;  animation-delay: 9s; animation-duration: 10s; }
.fireflies i:nth-child(8) { left: 30%; top: 10%; animation-delay: 10.5s; animation-duration: 13s; }
.fireflies i:nth-child(9) { left: 52%; top: 92%; animation-delay: 5.8s; animation-duration: 11s; }
@keyframes drift {
  0%   { opacity: 0;   transform: translate(0, 0) scale(.6); }
  25%  { opacity: .9;  transform: translate(14px, -18px) scale(1); }
  55%  { opacity: .35; transform: translate(-10px, -34px) scale(.8); }
  80%  { opacity: .8;  transform: translate(8px, -50px) scale(1); }
  100% { opacity: 0;   transform: translate(0, -64px) scale(.6); }
}
@media (prefers-reduced-motion: reduce) { .fireflies { display: none; } }

/* Signup forms */
.signup { margin: 2rem auto 0; max-width: 30rem; }
.hero .signup { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.signup input[type="email"], .signup input[type="text"] {
  width: 100%; min-height: 50px; padding: 0 16px;
  border: 1px solid var(--ink-faint); border-radius: 25px; background: #fff;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
}
.hero .signup input { flex: 1 1 14rem; width: auto; border-color: transparent; }
.signup input:focus { outline: 3px solid var(--amber); outline-offset: 1px; }
.hero .signup .button { flex: 0 0 auto; }
@media (max-width: 480px) { .hero .signup .button { flex: 1 1 100%; } }
.status { font-family: var(--sans); font-size: 0.9375rem; margin: 6px 0 0; min-height: 1.4em; flex-basis: 100%; }
.status:empty { min-height: 0; margin: 0; }
.status.ok { font-weight: 600; }
.status a { color: inherit; }

/* Steps: text beside one or two phones */
.step {
  display: grid; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(16px, 3vw, 32px);
}
.step-text { max-width: 30rem; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--green);
}
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon .fill { fill: currentColor; stroke: none; }
.eyebrow .icon { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: var(--ground); }
.step q { font-style: italic; quotes: "\201C" "\201D"; }
.note { font-family: var(--sans); font-size: 0.9375rem; color: var(--ink-soft); }

.phones { display: flex; justify-content: center; gap: 16px; }
.phone {
  margin: 0; width: min(100%, 260px);
  border-radius: 36px; overflow: hidden; background: #fff;
  border: 6px solid #10241c;
  box-shadow: 0 30px 60px -28px rgba(12, 47, 35, 0.45);
}
.phone img { width: 100%; height: auto; }
.phones.two .phone { width: min(47%, 240px); border-radius: 26px; border-width: 5px; }
.phones.two .phone:last-child { margin-top: 48px; }

@media (min-width: 820px) {
  .step { grid-template-columns: 1fr 1fr; }
  .step.flip .step-text { order: 2; }
  .phone { width: 280px; }
}

/* A single lantern scene beside a section */
.with-scene { position: relative; }
.with-scene .scene { width: 120px; border-radius: 20px; margin-bottom: 20px; }
@media (min-width: 820px) {
  .with-scene .scene { position: absolute; right: var(--gutter); top: clamp(56px, 8vw, 104px); width: 260px; border-radius: 28px; margin: 0; }
  .with-scene .faq, .with-scene .features, .with-scene h2 { max-width: calc(100% - 300px); }
}

/* Features */
main > section.wrap:not(.step) { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(40px, 6vw, 80px); }
.features { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 32px 48px; }
.features li { max-width: 28rem; }
.features .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--ground); color: var(--green); margin-bottom: 12px; }
.features p { margin: 0; font-size: 1rem; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }

/* Waitlist */
.waitlist {
  position: relative; overflow: hidden;
  background: var(--green); color: var(--cream);
  padding: clamp(56px, 8vw, 104px) 0;
}
.waitlist p { color: rgba(243, 236, 216, 0.85); }
.waitlist .signup { margin: 1.5rem 0 0; }
.waitlist .aside { margin-left: 0; }
.waitlist-scene { position: absolute; right: -40px; bottom: -40px; width: min(46vw, 420px); opacity: 0.55; border-radius: 28px; pointer-events: none; }
@media (max-width: 719px) { .waitlist-scene { display: none; } }
.waitlist .wrap { position: relative; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; margin-bottom: 6px; }

/* Questions */
.faq { max-width: 40rem; margin: 0; }
.faq dt { font-weight: 600; font-size: 1.125rem; margin-top: 1.5rem; }
.faq dd { margin: 0.35rem 0 0; }
.faq dd p { font-size: 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-top: 32px; padding-bottom: 48px; font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.foot-brand img { border-radius: 8px; }
.foot-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink-soft); }

/* Plain pages: privacy, support, credits */
.page-top { background: var(--night); }
.page-top .top a { color: var(--cream); text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; }
.page-top .brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; }
.doc { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.5rem; }
.doc h2 { font-size: 1.5rem; margin: 2.25rem 0 0.6rem; }
.doc .updated { font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); }
.doc ul, .doc ol { max-width: var(--measure); padding-left: 1.2em; }
.doc li { margin-bottom: 0.4em; }
.doc code { font-size: 0.9em; background: var(--ground); padding: 2px 6px; border-radius: 6px; }
