@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/Barlow-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/Barlow-Medium.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/Barlow-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("fonts/BarlowSemiCondensed-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 800; font-display: swap; src: url("fonts/BarlowSemiCondensed-ExtraBold.ttf") format("truetype"); }

:root {
  color-scheme: dark light;
  --ground: #0B0E12;
  --raised: #161A20;
  --control: #1F252D;
  --ink: #F4F6F8;
  --ink-2: #A8AFB9;
  --ink-3: #868D98;
  --violet: #7F45F6;
  --violet-hover: #6D36E3;
  --violet-ink: #A77BFA;
  --on-violet: #F4F6F8;
  --observed: #B466E8;
  --elevation: #9AA1AB;
  --plan: #54C7F3;
  --plan-fill: rgba(27, 167, 232, 0.13);
  --plan-long: #65DF8C;
  --error: #F37459;
  --hairline: rgba(255, 255, 255, 0.10);
  --boundary: rgba(255, 255, 255, 0.40);
  --trail: url("img/trail-dark.jpg");
  --wordmark: url("img/wordmark-dark.png");
  --display: "Barlow Semi Condensed", "Barlow", sans-serif;
  --copy: "Barlow", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #F2F4F7;
    --raised: #FFFFFF;
    --control: #E9ECF1;
    --ink: #0B0E12;
    --ink-2: #4D5461;
    --ink-3: #5F6673;
    --violet-ink: #6630E0;
    --on-violet: #FFFFFF;
    --observed: #9A4CD6;
    --elevation: #737A86;
    --plan: #0A76AD;
    --plan-fill: rgba(10, 118, 173, 0.12);
    --plan-long: #18874A;
    --error: #C4381B;
    --hairline: rgba(11, 14, 18, 0.10);
    --boundary: rgba(11, 14, 18, 0.52);
    --trail: url("img/trail-light.jpg");
    --wordmark: url("img/wordmark-light.png");
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.45 var(--copy);
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--violet); color: var(--on-violet); }
a { color: var(--violet-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--violet-ink); outline-offset: 3px; border-radius: 4px; }

h1 { margin: 0 0 12px; font: 800 3rem/1 var(--display); letter-spacing: -0.01em; text-wrap: balance; }

/* The home page is one screen: the trail is the page, the ground washes in
   behind the text at the top and behind the links at the bottom. */
.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
}
.stage::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--trail) center 72% / cover no-repeat;
}
.stage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, var(--ground) 0%, color-mix(in srgb, var(--ground) 70%, transparent) 30%, transparent 52%),
    linear-gradient(to top, var(--ground) 0%, color-mix(in srgb, var(--ground) 60%, transparent) 14%, transparent 30%);
}
.stage-main {
  flex: 1;
  width: min(100% - 48px, 420px);
  margin: 0 auto;
  padding: clamp(48px, 10svh, 112px) 0 48px;
  text-align: center;
}
.wordmark-title { margin: 0; }
.wordmark {
  display: block;
  width: min(62vw, 240px);
  aspect-ratio: 810 / 410;
  margin: 0 auto;
  background: var(--wordmark) center / contain no-repeat;
}
.tagline {
  margin: 20px 0 32px;
  font: 800 clamp(2.25rem, 9vw, 3.5rem)/1 var(--display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.stage-footer {
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.stage-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
}
.stage-footer ul a { display: inline-block; padding: 12px 0; color: var(--ink); font-weight: 500; text-decoration: none; }
.stage-footer ul a:hover { text-decoration: underline; }
.stage-footer p { margin: 4px 0 0; }
.stage-footer p a { color: var(--ink-2); }

/* Joined: the same stage, the form replaced by the confirmation. */
.joined-copy { margin: 0 auto 24px; max-width: 30ch; color: var(--ink-2); font-size: 1.125rem; text-wrap: balance; }
.joined-copy strong { color: var(--ink); font-weight: 600; }

/* Document pages share the footer */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 20px calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.footer-inner { width: min(100%, 680px); margin: 0 auto; display: grid; gap: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer ul a { display: inline-block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.footer ul a:hover { text-decoration: underline; }
.footer p { margin: 0; }
.footer p a { color: var(--ink-2); }

/* Waitlist form */
.waitlist { text-align: left; }
.waitlist label { display: block; margin-bottom: 8px; font-weight: 600; }
.field {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--boundary);
  border-radius: 12px;
  background: var(--raised);
  color: var(--ink);
  font: 400 1.0625rem var(--copy);
  caret-color: var(--violet-ink);
}
.field::placeholder { color: var(--ink-3); }
.field:focus-visible { outline: 2px solid var(--violet-ink); outline-offset: 0; border-radius: 12px; }
.field[aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 8px 0 0; color: var(--error); font-size: 0.9375rem; }
.button {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--violet);
  color: var(--on-violet);
  font: 600 1.0625rem var(--copy);
  cursor: pointer;
}
.button:hover { background: var(--violet-hover); }

/* Document pages: the app's legal reading surface. */
.doc-header {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  padding: 24px 0 0;
}
.doc-header .wordmark { width: 88px; margin: 0; }
.doc {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  padding: 36px 0 64px;
}
.doc h1 { font-size: clamp(2.25rem, 8vw, 3rem); line-height: 1.02; }
.doc .meta {
  margin: 0 0 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-3);
  font-size: 0.875rem;
}
.doc h2 { margin: 36px 0 12px; font: 700 1.375rem/1.2 var(--display); }
.doc p, .doc li { font-size: 1rem; line-height: 1.55; max-width: 68ch; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 1.25rem; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--ink-3); }
