:root {
  --bg: #F3F5FE; --card: #EEF0FA; --text: #292B31; --muted: #646778;
  --border: #CFD3E5; --accent: #796CBF; --accent-text: #5D5294;
  --shadow: 0 1px 2px rgba(41, 43, 49, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161826; --card: #20222F; --text: #E9E9ED; --muted: #9397AB;
    --border: #3F424D; --accent: #9184D9; --accent-text: #D2CEFD;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  padding: 0 20px;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 56px 0 80px; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 21px; line-height: 1.35; margin: 40px 0 10px; font-weight: 600; }
h3 { font-size: 17px; margin: 0; font-weight: 600; }
p  { margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--muted); margin-bottom: 28px; }
.meta { font-size: 14px; color: var(--muted); }

/* Dividers fade at both ends — a plain hairline is not this design language. */
.rule {
  height: 1px; border: 0; margin: 40px 0;
  background: linear-gradient(90deg, transparent, var(--border) 18%, var(--border) 82%, transparent);
}
nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; margin-bottom: 40px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-text); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; margin: 0 0 12px; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 8px; }

/* Outlined, never filled — emphasis is a border and a colour, not a slab. */
.btn {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent-text);
  border-radius: 999px; padding: 11px 22px; text-decoration: none; font-weight: 500;
  background: transparent;
}
.btn:hover { border-color: var(--accent-text); }

ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 8px; }

/* Belt and braces for the join page, which toggles two cards with [hidden].
   A later rule setting display on .card would otherwise silently show both. */
[hidden] { display: none !important; }

/* An invite code exists to be transcribed into a phone, so it is monospace and
   loosely tracked: the eye has to hold twelve characters across a room. */
.code {
  font: 500 20px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em; margin: 0 0 8px; word-break: break-all;
}
footer { margin-top: 56px; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); }
@media (max-width: 520px) {
  body { padding: 0 16px; }
  .wrap { padding: 36px 0 56px; }
  h1 { font-size: 28px; }
}

/* ── The landing page ─────────────────────────────────────────────────────
   Only the landing uses this. Help, Privacy, Terms and Join stay in the 680px
   reading column, because they are documents and a document wants one column.  */
.wrap-wide { max-width: 1080px; }

.hero { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero h1 { font-size: 52px; letter-spacing: -.035em; margin-bottom: 18px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 14px;
}
/* Problem, then answer, in two weights: the muted paragraph is the reader's
   current Tuesday night, the solid one is what changes. */
.hero .problem { font-size: 19px; color: var(--muted); margin: 0 0 12px; max-width: 40ch; }
.hero .solve   { font-size: 19px; color: var(--text);  margin: 0 0 26px; max-width: 40ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.chips li {
  font-size: 13.5px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 13px; margin: 0;
}

/* A phone, drawn rather than photographed: a rounded frame and a hairline.
   No glossy device chrome — the screen is the subject.                      */
.phone {
  width: 310px; flex: none; border-radius: 42px; padding: 9px;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(20, 22, 40, .18);
}
@media (prefers-color-scheme: dark) { .phone { box-shadow: 0 24px 60px rgba(0, 0, 0, .45); } }
/* ⚠️ height:auto is load-bearing. The hero image carries width/height
   attributes so the browser can reserve its box before the JPEG lands (no
   layout shift) — but an HTML height attribute beats CSS that only sets
   width, and the hero rendered 2796px tall until this was added.
   ⚠️ No backticks anywhere in this stylesheet: it is a template literal, and
   a stray one ends it mid-rule. That has now cost two builds. */
.phone img, .phone .stack { display: block; width: 100%; height: auto; border-radius: 34px; }
.phone .stack { position: relative; aspect-ratio: 1290 / 2796; overflow: hidden; }
.phone .stack img { position: absolute; inset: 0; height: 100%; object-fit: cover; }

.section-head { max-width: 60ch; }
.section-head h2 { font-size: 27px; margin-top: 0; }

/* ── The two workflow players ─────────────────────────────────────────────
   Pure CSS, no script. The /join page is the only one here allowed inline
   JavaScript and it had to argue for it; a marketing animation does not clear
   that bar, so the frames cross-fade on a shared keyframe and each one is
   offset by a negative animation-delay. The step list runs the same clock, so
   the caption and the screen can never drift apart.                          */
.flow { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.flow-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.flow-steps li {
  counter-increment: step; position: relative; padding: 14px 0 14px 52px;
  border-top: 1px solid var(--border); margin: 0; opacity: .45;
  animation: stepOn var(--dur) infinite;
}
.flow-steps li:first-child { border-top: 0; }
.flow-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 12px;
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--accent);
  color: var(--accent-text); font-size: 14px; font-weight: 600;
  display: grid; place-items: center;
}
.flow-steps b { display: block; font-weight: 600; }
.flow-steps span { color: var(--muted); font-size: 15px; }
.flow .stack img { opacity: 0; animation: frameOn var(--dur) infinite; }

/* ⚠️ The visible window starts AT 0%, not after a fade-in. With a fade at the
   front, every frame sat at opacity 0 for the first instant of the cycle and
   the phone flashed empty on load. Wrapping the last 2% back to 1 means the
   outgoing frame is still fading as the next one takes over. */
@keyframes frameOn {
  0%, 18%  { opacity: 1; }
  20%, 98% { opacity: 0; }
  100%     { opacity: 1; }
}
@keyframes stepOn {
  0%, 18%  { opacity: 1; }
  20%, 98% { opacity: .4; }
  100%     { opacity: 1; }
}

/* Reduced motion gets the whole story at once, as a filmstrip — the frames are
   the content, so they must not simply vanish when the animation does.        */
@media (prefers-reduced-motion: reduce) {
  .flow { display: block; }
  .flow .phone { display: none; }
  .flow-steps li { opacity: 1; animation: none; }
  .filmstrip { display: grid !important; }
}
.filmstrip {
  display: none; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 22px;
}
.filmstrip img { width: 100%; border-radius: 14px; border: 1px solid var(--border); }

/* Image-led feature cards: the picture carries the point, the words caption it. */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.shot {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow);
}
.shot img { width: 100%; border-radius: 12px; display: block; margin-bottom: 14px; }
.shot h3 { margin-bottom: 6px; }
.shot p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 900px) {
  .hero, .flow { grid-template-columns: 1fr; gap: 32px; }
  .hero .phone, .flow .phone { justify-self: center; }
  .hero h1 { font-size: 34px; }
  .hero .lede { max-width: none; }
}
