:root {
  --cobalt: #0e0e0e;
  --ink: #14103a;
  --line: rgba(255, 255, 255, 0.28);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --heading: "Quicksand", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--cobalt);
  color: #fff;
}

body { overflow: hidden; }
body.is-flow { overflow: auto; }

/* the mind, behind everything */
.mind-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.6s var(--ease);
}
body.is-flow .mind-canvas { opacity: 0.2; }

/* ============================================================
   LANDING
   ============================================================ */
.stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  transition: opacity 0.35s var(--ease);
  z-index: 2;
}
body.is-flow .stage {
  opacity: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  margin: auto;
  max-width: 620px;
  padding: 56px 28px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* warm breathing glow behind the hero —
   fades in only after the logo + wordmark have finished animating,
   so the wordmark's reveal cover never shows as a bar over it */
.glow {
  position: fixed;
  top: 46%;
  left: 50%;
  width: min(820px, 92vw);
  height: min(820px, 92vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: glow-in 1.8s ease-out 1.4s forwards;
}
.glow__core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 214, 150, 0.55) 0%,
    rgba(240, 158, 88, 0.36) 26%,
    rgba(150, 84, 42, 0.17) 46%,
    rgba(80, 44, 22, 0.06) 62%,
    transparent 74%);
  filter: blur(36px);
  will-change: transform, opacity;
  animation: breathe 8s ease-in-out infinite;
}
@keyframes glow-in { to { opacity: 1; } }
@keyframes breathe {
  0%, 100% { transform: scale(0.9);  opacity: 0.72; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.hero__lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* staggered arrival under the logo draw */
.hero__sub,
.hero .beta-pill,
.hero .cta { animation: rise 0.55s var(--ease) both; }
.hero__sub { animation-delay: 0.95s; }
.hero .beta-pill { animation-delay: 1.2s; }
.hero .cta { animation-delay: 1.35s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero__sub {
  margin: 30px 0 0;
  font-family: var(--heading);
  font-size: clamp(17px, 2.3vw, 21px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.8);
  max-width: 24ch;
  text-wrap: balance;
}

.cta {
  margin-top: 30px;
  width: clamp(124px, 14.5vw, 168px);
  padding: 13px 12px;
  font: inherit;
  font-family: var(--heading);
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.cta:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
.cta:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }

/* the mark, revealed along its own line */
.mark-icon {
  width: clamp(76px, 9.5vw, 100px);
  height: auto;
}
/* the pen: one visible stroke, drawn A to B */
.pen {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: draw 1.2s cubic-bezier(0.3, 0, 0.55, 1) 0.1s forwards;
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* wordmark reveals with the draw — the svg itself is never animated;
   a cobalt cover slides off it, so the text pixels never re-rasterize */
.word-reveal { position: relative; display: block; }
.mark-word {
  display: block;
  width: clamp(124px, 14.5vw, 168px);
  height: auto;
  fill: #fff;
}
.word-cover {
  position: absolute;
  inset: -3px -5px;
  background: var(--cobalt);
  transform-origin: 100% 50%;
  animation: uncover 1.05s var(--ease) 0.2s forwards;
}
@keyframes uncover {
  to { transform: scaleX(0); }
}

/* recruiting pill */
.beta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}
.beta-pill__text { text-wrap: balance; }
.beta-pill__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5cf2a6;
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ============================================================
   PILOT FLOW
   ============================================================ */
.flow {
  position: relative;
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(24px, 5vh, 56px) 24px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease) 0.1s, visibility 0s linear 0.5s;
  z-index: 1;
}
body.is-flow .flow {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s var(--ease) 0.15s, visibility 0s;
}

.flow__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
}

/* the flow's glow is already in place by the time you navigate here,
   so it shouldn't replay the landing's fade-in delay */
.glow--flow { opacity: 1; animation: none; }

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 16px -8px;
  padding: 6px 10px 6px 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s;
}
.back:hover { color: #fff; }

/* ---------- steps ---------- */
.step {
  margin: auto 0;
  padding-bottom: 24px;
  animation: rise 0.4s var(--ease) both;
}
.step[hidden] { display: none; }

.step__head { margin-bottom: 32px; }
.step__head h1 {
  margin: 0 0 8px;
  font-family: var(--heading);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step__head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}
.step h2 {
  margin: 36px 0 16px;
  font-family: var(--heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step > .submit { width: 100%; margin-top: 36px; }

/* ---------- eligibility checklist ---------- */
.reqs { display: flex; flex-direction: column; gap: 12px; }

.req {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
label.req,
.req__row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.req:hover { border-color: rgba(255, 255, 255, 0.5); }
.req input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #fff;
  cursor: pointer;
}
.req__hint { color: rgba(255, 255, 255, 0.55); }

.req--group { display: flex; flex-direction: column; gap: 12px; }
.devices { display: flex; flex-wrap: wrap; gap: 8px; margin-left: 30px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip span:hover { border-color: rgba(255, 255, 255, 0.6); }
.chip input:checked + span { background: #fff; border-color: #fff; color: var(--ink); }
.chip input:focus-visible + span { outline: 1px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
.req--group .error { margin-left: 30px; }
.req--group .error.show { display: block; }

/* ---------- study description ---------- */
.plan {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan li {
  position: relative;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}
.plan strong { color: #fff; font-weight: 600; }
.plan--steps { counter-reset: pstep; }
.plan--steps li::before {
  counter-increment: pstep;
  content: counter(pstep);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.plan--get li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5cf2a6;
}
.meta {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.85);
}
.field .opt { color: rgba(255, 255, 255, 0.4); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: #fff;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
}
.field.invalid input,
.field.invalid textarea { border-color: #ffb3bc; }

.error {
  font-size: 12.5px;
  color: #ffd2d7;
  display: none;
}
.field.invalid .error { display: block; }

/* honeypot — hidden from humans, present for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* human check — inline math, no fuss */
.field--captcha { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.field--captcha label {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
}
.field--captcha input { width: 80px; text-align: center; }
.field--captcha .error { flex-basis: 100%; }

.submit {
  position: relative;
  margin-top: 8px;
  padding: 13px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.submit:hover { opacity: 0.92; }
.submit:disabled { cursor: progress; opacity: 0.8; }
.submit.loading .submit__label { opacity: 0; }
.submit.loading .submit__spin { opacity: 1; }
.submit__spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 16, 58, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fineprint {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- success ---------- */
.success { padding-top: 8px; }
.success[hidden] { display: none; }
.success__check {
  width: 36px;
  height: 36px;
  color: #fff;
  margin-bottom: 18px;
}
.success__check path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: check 0.5s var(--ease) 0.15s forwards;
}
@keyframes check { to { stroke-dashoffset: 0; } }
.success h2 {
  margin: 0 0 8px;
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.success p {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}
.success p strong { color: #fff; font-weight: 600; }

.ghost {
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ghost:hover { border-color: rgba(255, 255, 255, 0.7); }

/* ---------- landing footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 16px 24px 22px;
  text-align: center;
  animation: rise 0.55s var(--ease) 1.5s both;
}
.foot a {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.15s;
}
.foot a:hover { color: #fff; text-decoration: underline; }

/* ---------- document pages (privacy, etc.) ---------- */
body.is-doc { overflow: auto; }
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 64px) 24px 72px;
}
.doc__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: fit-content;
  margin: 0 0 44px;
}
.doc__brand .mark-icon { width: 44px; height: auto; }
.doc__brand .mark-word { width: 96px; height: auto; }
.doc__card {
  margin: 0 0 14px;
  padding: 20px 22px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}
.doc__card ul { margin: 0; }
.doc__foot {
  margin: 56px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
}
.doc__foot a { color: rgba(255, 255, 255, 0.6); }
.doc h1 {
  margin: 0 0 10px;
  font-family: var(--heading);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.doc__meta {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 32px;
}
.doc h2 {
  margin: 8px 0 14px;
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 600;
}
.doc h3 {
  margin: 24px 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.doc p,
.doc li {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc ul ul { margin: 8px 0 0; }
.doc strong { color: #fff; font-weight: 600; }
.doc a { color: #fff; }
.doc hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 32px 0;
}

/* ---------- mobile ---------- */
@media (max-width: 480px) {
  .hero { padding: 40px 22px 48px; }
  .hero__sub { font-size: 17px; }
  .cta { font-size: 15px; padding: 12px; }
  .glow { width: min(900px, 132vw); height: min(900px, 132vw); }
  /* compact equal-width chips so all three share one row, none orphaned */
  .devices { gap: 6px; margin-left: 0; }
  .chip { flex: 1 1 0; min-width: 0; }
  .chip span { display: block; text-align: center; padding: 10px 4px; font-size: 13px; white-space: nowrap; }
  .req--group .error { margin-left: 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .pen { stroke-dashoffset: 0; }
  .word-cover { display: none; }
  .glow { opacity: 0.9; }
  .glow__core { animation: none; transform: scale(1); opacity: 1; }
}
