:root {
  --paper: #f6f6f4;
  --white: #ffffff;
  --ink: #0d0d0e;
  --ink-2: #3a3a3e;
  --muted: #76767c;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --accent: #2b9aeb;
  --accent-deep: #1566ab;
  --sky-50: #f2f9fe;
  --sky-100: #e4f2fd;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  cursor: pointer;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  image-rendering: pixelated;
}

/* faint static paper grain on top of the canvas, under the text */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(0, 0, 0, 0.12) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}

main,
.nav,
.rail,
.foot {
  position: relative;
  z-index: 2;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(246, 246, 244, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  width: 18px;
  height: 18px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 6px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 12px 0 / 6px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 6px 6px / 6px 6px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 0 12px / 6px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 12px 12px / 6px 6px no-repeat;
}

.links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.links a {
  text-decoration: none;
  color: var(--ink-2);
}

.links a:hover {
  color: var(--ink);
}

.lang {
  font: 500 12px var(--mono);
  background: none;
  border: 0.5px solid var(--line-strong);
  padding: 5px 9px;
  color: var(--ink-2);
}

.lang:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.pill {
  background: var(--ink);
  color: var(--white) !important;
  padding: 7px 14px;
  font-weight: 500;
}

.pill:hover {
  background: var(--accent-deep);
}

/* ---------- side rail ---------- */
.rail {
  position: fixed;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 12px;
  align-items: stretch;
  font: 500 11px var(--mono);
  color: var(--muted);
}

.rail-track {
  width: 1px;
  background: var(--line-strong);
  position: relative;
}

.rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--ink);
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail li.on {
  color: var(--ink);
}

.rail li.on::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- common ---------- */
section {
  position: relative;
}

.eyebrow,
.num {
  font: 500 12px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0;
}

h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.06;
  margin-bottom: 18px;
}

:lang(zh) h1,
:lang(zh) h2 {
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p {
  margin: 0 0 14px;
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 0.5px solid var(--ink);
}

.btn.primary {
  background: var(--ink);
  color: var(--white);
}

.btn.primary::after {
  content: '→';
  font-family: var(--mono);
}

.btn.primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
}

.btn.ghost:hover {
  background: var(--white);
}

/* stepped wipe: the only motion on the page besides the canvas */
.reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s steps(14, end);
}

.reveal.in {
  clip-path: inset(0 -2% 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    clip-path: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px var(--gutter) 80px calc(var(--gutter) + 56px);
}

.hero-inner {
  max-width: 760px;
}

.hero .lede {
  font-size: clamp(17px, 1.5vw, 20px);
  max-width: 560px;
  margin: 26px 0 32px;
  color: var(--ink-2);
  background: rgba(246, 246, 244, 0.72);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ticker {
  position: absolute;
  right: var(--gutter);
  bottom: 56px;
  width: 320px;
  background: var(--white);
  border: 0.5px solid var(--line-strong);
  font-size: 13px;
}

.ticker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 0.5px solid var(--line);
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  animation: blink 1.2s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.ticker ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ticker li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 0.5px solid var(--line);
}

.ticker li:last-child {
  border-bottom: 0;
}

.ticker li .t {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.ticker li .tm {
  font: 400 11px var(--mono);
  color: var(--muted);
}

.ticker li.top {
  background: var(--sky-50);
}

.glyph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 10px var(--mono);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  margin: 8px auto 0;
  background: var(--ink);
  animation: drip 1.6s steps(8) infinite;
  transform-origin: top;
}

@keyframes drip {
  0% {
    transform: scaleY(0);
  }
  60% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ---------- steps ---------- */
.step {
  min-height: 135vh;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter) 0 calc(var(--gutter) + 56px);
}

.step.right {
  justify-content: flex-end;
}

.panel {
  width: min(460px, 100%);
  background: var(--white);
  border: 0.5px solid var(--line-strong);
  padding: 32px 32px 26px;
  position: sticky;
  top: 25vh;
}

.panel.wide {
  width: min(540px, 100%);
}

.chips {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips li {
  font: 500 12px var(--mono);
  padding: 5px 9px;
  border: 0.5px solid var(--line-strong);
  color: var(--ink-2);
}

.ranklist {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  border-top: 0.5px solid var(--line);
  counter-reset: r;
}

.ranklist li {
  counter-increment: r;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 14px;
}

.ranklist li::before {
  content: counter(r, decimal-leading-zero);
  font: 500 11px var(--mono);
  color: var(--muted);
}

.ranklist li:first-child::before {
  color: var(--accent);
}

.ranklist .w {
  font: 400 11px var(--mono);
  color: var(--muted);
}

.ranklist li.done {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 0.5px;
}

/* ask card */
.ask {
  margin-top: 22px;
  border: 0.5px solid var(--line-strong);
  background: var(--white);
}

.ask-src {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--line);
  font: 400 12px var(--mono);
  color: var(--muted);
}

.src-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5e6ad2;
}

.ask-src .time {
  margin-left: auto;
}

.ask-title {
  margin: 12px 14px 6px;
  font-weight: 600;
  color: var(--ink);
}

.ask-brief {
  margin: 0 14px 14px;
  font-size: 14px;
  color: var(--ink-2);
}

.ask-q {
  margin: 0;
  padding: 12px 14px;
  border-top: 0.5px solid var(--line);
  font-weight: 500;
  color: var(--ink);
}

.opts {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}

.opts button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: none;
  border: 0;
  padding: 9px 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.opts button:hover,
.opts button.picked {
  background: var(--sky-50);
}

.opts .k {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0.5px solid var(--line-strong);
  font: 500 11px var(--mono);
  color: var(--muted);
}

.opts button.picked .k {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.opts b {
  font-weight: 500;
}

.opts em {
  font-style: normal;
  color: var(--accent);
}

.composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 8px 8px;
  padding: 10px 12px;
  border: 0.5px solid var(--line-strong);
  font-size: 14px;
  min-height: 42px;
}

.composer .placeholder {
  color: var(--muted);
}

.composer .send {
  font-family: var(--mono);
  color: var(--muted);
}

.composer.filled .send {
  color: var(--accent);
}

.quote {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-weight: 500;
}

/* ---------- who ---------- */
.who {
  padding: 24vh var(--gutter) 10vh calc(var(--gutter) + 56px);
}

.who-head {
  width: fit-content;
  max-width: 100%;
  padding: 22px 26px 8px 0;
  background: var(--paper);
}

.grid {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--white);
  border: 0.5px solid var(--line-strong);
}

.grid li {
  padding: 26px 22px 30px;
  border-right: 0.5px solid var(--line);
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.grid li:last-child {
  border-right: 0;
}

.grid p {
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.gn {
  font: 500 12px var(--mono);
  color: var(--accent);
}

/* ---------- goal ---------- */
.goal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 10vh var(--gutter) 14vh calc(var(--gutter) + 56px);
}

.goal-inner {
  width: 100%;
  max-width: 980px;
}

.big {
  font-size: clamp(120px, 22vw, 300px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin: 0 0 24px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.big small {
  font-size: 0.35em;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 0.08em;
}

.bar {
  height: 18px;
  border: 0.5px solid var(--ink);
  background: var(--white);
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  /* ordered-dither style fill: a 4x4 checker that thins out toward the end */
  background:
    repeating-conic-gradient(var(--accent) 0 25%, transparent 0 50%) 0 0 / 4px 4px,
    linear-gradient(90deg, var(--accent) 70%, transparent);
}

.goal-text {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 760px;
}

.goal-inner {
  background: var(--paper);
  border: 0.5px solid var(--line-strong);
  padding: clamp(24px, 4vw, 48px);
}

.end {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 0.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.end p {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.foot {
  display: flex;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-top: 0.5px solid var(--line);
  background: var(--paper);
  font: 400 12px var(--mono);
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid li:nth-child(2) {
    border-right: 0;
  }
  .grid li:nth-child(-n + 2) {
    border-bottom: 0.5px solid var(--line);
  }
  .ticker {
    display: none;
  }
}

@media (max-width: 760px) {
  .rail,
  .links a:not(.pill) {
    display: none;
  }
  .links {
    gap: 10px;
  }
  .hero,
  .step,
  .who,
  .goal {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  .hero {
    align-items: flex-end;
    padding-bottom: 96px;
  }
  .step {
    min-height: 120vh;
    align-items: flex-end;
    padding-bottom: 12vh;
  }
  .step.right {
    justify-content: flex-start;
  }
  .panel {
    top: auto;
    bottom: 16px;
    padding: 22px 20px 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .grid li {
    border-right: 0;
    border-bottom: 0.5px solid var(--line);
    min-height: 0;
  }
  .grid li:last-child {
    border-bottom: 0;
  }
  .end {
    flex-direction: column;
    align-items: flex-start;
  }
}
