/* ==========================================================================
   算力界 · suanlijie.com
   Editorial monochrome — "After-hours member's lounge"
   Pure black canvas, warmth from form and voice, not color.
   ========================================================================== */

/* === Tokens === */
:root {
  /* Canvas — pure black (explicit brand ask, overrides "always tint" principle) */
  --ink: #000;
  --ink-elev: oklch(0.11 0 0);
  --ink-soft: oklch(0.07 0 0);

  /* Chalk (text) — pure neutral grayscale, zero chroma */
  --chalk-1: oklch(0.98 0 0);
  --chalk-2: oklch(0.70 0 0);
  --chalk-3: oklch(0.48 0 0);
  --chalk-4: oklch(0.30 0 0);

  /* Hairline borders (transparent white, never colored) */
  --hairline: color-mix(in oklab, white 10%, transparent);
  --hairline-soft: color-mix(in oklab, white 5%, transparent);

  /* Fonts — kept per brand decision */
  --font-cn: 'Noto Sans SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Inter', 'SF Pro Display', -apple-system, sans-serif;

  /* Type scale (fluid for marketing headings) */
  --fs-h0: clamp(3.5rem, 10.5vw, 7.25rem);   /* hero title */
  --fs-h1: clamp(2rem, 4.5vw, 3.25rem);      /* section title */
  --fs-h2: 1.5rem;                            /* step / row title */
  --fs-lead: clamp(1.0625rem, 1.4vw, 1.25rem);
  --fs-body: 1rem;
  --fs-label: 0.875rem;
  --fs-micro: 0.75rem;

  /* 4pt space scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;

  /* Layout */
  --max-w: 1080px;
  --max-w-hero: 1200px;
  --nav-h: 60px;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}
body {
  font-family: var(--font-cn);
  background: var(--ink);
  color: var(--chalk-1);
  font-size: var(--fs-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; }

::selection {
  background: var(--chalk-1);
  color: var(--ink);
}

/* === Layout primitives === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* Section head (eyebrow + title + optional lead) */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-8);
  max-width: 48ch;
}
.section-lead {
  font-size: var(--fs-lead);
  color: var(--chalk-2);
  line-height: 1.55;
  margin-top: var(--s-3);
}

/* Eyebrow label (Latin, tracked uppercase) */
.eyebrow,
.section-eyebrow,
.adjunct-eyebrow,
.ticker-label {
  font-family: var(--font-en);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-3);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--chalk-1);
  border-radius: 50%;
}

/* Section title (h2) */
.section-title {
  font-family: var(--font-cn);
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--chalk-1);
}

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid var(--hairline);
  height: var(--nav-h);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--chalk-1);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.nav-link {
  font-size: var(--fs-label);
  color: var(--chalk-2);
  transition: color 0.18s ease;
}
.nav-link:hover { color: var(--chalk-1); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-cn);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--chalk-1);
  color: var(--ink);
  border-color: var(--chalk-1);
}
.btn-primary:hover {
  background: oklch(0.88 0 0);
  border-color: oklch(0.88 0 0);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--chalk-1);
  border-color: var(--hairline);
}
.btn-ghost:hover {
  border-color: var(--chalk-2);
}
.btn-lg {
  font-size: 0.9375rem;
  padding: 14px 30px;
}

/* === Hero === */
.hero {
  max-width: var(--max-w-hero);
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--s-10)) var(--s-5) var(--s-11);
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-title {
  font-family: var(--font-cn);
  font-size: var(--fs-h0);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--chalk-1);
  margin-top: var(--s-3);
}
.hero-lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--chalk-2);
  max-width: 46ch;
  margin-top: var(--s-3);
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-5);
  flex-wrap: wrap;
}
.hero-cta-note {
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--chalk-3);
  font-family: var(--font-en);
}

/* === Live ticker (hero) === */
.live-ticker {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-5);
  margin-top: var(--s-8);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.ticker-label {
  white-space: nowrap;
  color: var(--chalk-1);
}
.ticker-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chalk-1);
  display: inline-block;
  margin-right: var(--s-2);
  animation: ticker-blink 1.6s ease-in-out infinite;
}
@keyframes ticker-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.ticker-track {
  position: relative;
  height: 1.5em;
  overflow: hidden;
}
.ticker-item {
  position: absolute;
  inset: 0;
  color: var(--chalk-1);
  font-size: var(--fs-label);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-item.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* === Section wrappers — shared vertical rhythm === */
.how,
.tape,
.manifesto,
.adjunct,
.bottom {
  padding: var(--s-11) 0;
}

/* === How (steps) === */
.steps {
  display: flex;
  flex-direction: column;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-7);
  padding: var(--s-7) 0;
  border-top: 1px solid var(--hairline);
  align-items: start;
}
.step:last-child {
  border-bottom: 1px solid var(--hairline);
}
.step-num {
  font-family: var(--font-en);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 300;
  color: var(--chalk-3);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  padding-top: 0.1em;
}
.step-body h3 {
  font-family: var(--font-cn);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--chalk-1);
  margin-bottom: var(--s-2);
}
.step-body p {
  font-size: var(--fs-lead);
  color: var(--chalk-2);
  line-height: 1.6;
  max-width: 48ch;
}

/* Asymmetric offset on desktop — editorial feel */
@media (min-width: 900px) {
  .step:nth-child(2) { padding-left: var(--s-8); }
  .step:nth-child(3) { padding-left: var(--s-10); }
}

.section-cta {
  padding-top: var(--s-7);
}

/* === Tape (inside, today) === */
.tape-stream {
  position: relative;
  height: 520px;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  /* Fade top/bottom so scroll loop doesn't read as "cut off" */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
          mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}
.tape-track {
  display: flex;
  flex-direction: column;
  animation: tape-scroll 60s linear infinite;
}
.tape-stream:hover .tape-track {
  animation-play-state: paused;
}
@keyframes tape-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.tape-row {
  display: grid;
  grid-template-columns: 56px 16px 1fr auto;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.tape-row:last-child { border-bottom: 0; }
.tape-time {
  font-family: var(--font-en);
  font-size: var(--fs-micro);
  font-weight: 400;
  color: var(--chalk-3);
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
  letter-spacing: 0.02em;
}
.tape-mark {
  color: var(--chalk-4);
  font-size: 1.125rem;
  line-height: 1;
  padding-top: 4px;
  font-family: var(--font-en);
}
.tape-body h4 {
  font-family: var(--font-cn);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--chalk-1);
  margin-bottom: 2px;
}
.tape-body p {
  font-size: var(--fs-label);
  color: var(--chalk-2);
  line-height: 1.55;
  max-width: 56ch;
}
.tape-type {
  font-family: var(--font-en);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk-3);
  padding-top: 7px;
  white-space: nowrap;
}

/* === Manifesto === */
.manifesto-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-9);
}
.manifesto-item {
  max-width: 58ch;
}
.manifesto-item[data-indent="1"] {
  margin-left: clamp(0px, 6vw, var(--s-9));
}
.manifesto-item[data-indent="2"] {
  margin-left: clamp(0px, 12vw, var(--s-11));
}
.manifesto-tag {
  font-family: var(--font-cn);
  font-size: var(--fs-label);
  font-weight: 400;
  font-style: italic;
  color: var(--chalk-3);
  margin-bottom: var(--s-3);
  letter-spacing: 0.005em;
}
.manifesto-body {
  font-family: var(--font-cn);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--chalk-1);
  letter-spacing: -0.015em;
}

/* === Adjunct (exhibition entry) === */
.adjunct {
  padding: var(--s-9) 0;
}
.adjunct-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-6) var(--s-7);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.adjunct-link:hover {
  border-color: var(--chalk-2);
  background: var(--ink-soft);
}
.adjunct-link:hover .adjunct-arrow {
  transform: translateX(4px);
}
.adjunct-text {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.adjunct-title {
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--chalk-1);
  letter-spacing: -0.01em;
  margin-top: var(--s-1);
}
.adjunct-sub {
  font-size: var(--fs-label);
  color: var(--chalk-2);
}
.adjunct-arrow {
  font-family: var(--font-en);
  font-size: 1.5rem;
  color: var(--chalk-2);
  transition: transform 0.2s ease;
}

/* === Bottom CTA === */
.bottom {
  border-top: 1px solid var(--hairline);
}
.bottom .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}
.bottom-title {
  font-family: var(--font-cn);
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--chalk-1);
  max-width: 14ch;
}
.bottom-sub {
  font-size: var(--fs-lead);
  color: var(--chalk-2);
  max-width: 46ch;
  line-height: 1.6;
}
.bottom .btn {
  margin-top: var(--s-4);
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-6) 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-micro);
  color: var(--chalk-3);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer-meta,
.footer-links {
  display: inline-flex;
  align-items: center;
  gap: var(--s-5);
}
.footer a {
  color: var(--chalk-3);
  transition: color 0.18s ease;
}
.footer a:hover { color: var(--chalk-1); }

/* === Reveal animation (quiet) === */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */

/* Tablet */
@media (max-width: 899px) {
  :root {
    --nav-h: 56px;
    --s-10: 96px;
    --s-11: 120px;
  }
  .section-head {
    margin-bottom: var(--s-7);
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --nav-h: 54px;
    --s-10: 72px;
    --s-11: 88px;
  }

  .nav-right { gap: var(--s-3); }
  .nav-link { font-size: 0.8125rem; }
  .btn { padding: 9px 18px; font-size: 0.8125rem; }
  .btn-lg { padding: 13px 24px; font-size: 0.9375rem; }

  .hero {
    padding: calc(var(--nav-h) + var(--s-8)) var(--s-5) var(--s-10);
  }
  .hero-title {
    letter-spacing: -0.05em;
    line-height: 0.98;
  }
  .hero-lead { max-width: 100%; }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-3);
  }
  .hero-cta .btn {
    width: 100%;
  }
  .hero-cta-note {
    text-align: center;
  }

  .live-ticker {
    grid-template-columns: 1fr;
    gap: var(--s-2);
    padding: var(--s-3) 0;
  }
  .ticker-track { height: 3em; }
  .ticker-item { white-space: normal; }

  .step {
    grid-template-columns: auto 1fr;
    gap: var(--s-4);
    padding: var(--s-5) 0;
  }
  .step-num { font-size: 1.75rem; padding-top: 0.15em; }
  .step-body h3 { font-size: 1.125rem; }
  .step-body p { font-size: 1rem; }

  .tape-stream { height: 420px; }
  .tape-row {
    grid-template-columns: 48px 14px 1fr;
    gap: var(--s-3);
    padding: var(--s-4) 0;
  }
  .tape-type { display: none; }
  .tape-body h4 { font-size: 0.9375rem; }
  .tape-body p { font-size: 0.8125rem; }

  .manifesto-list { gap: var(--s-7); }
  .manifesto-item,
  .manifesto-item[data-indent="1"],
  .manifesto-item[data-indent="2"] {
    margin-left: 0;
  }
  .manifesto-body { font-size: 1.125rem; }

  .adjunct-link {
    grid-template-columns: 1fr;
    padding: var(--s-5);
    gap: var(--s-3);
  }
  .adjunct-arrow { justify-self: flex-start; font-size: 1.25rem; }

  .bottom .btn { align-self: stretch; width: 100%; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
  }
  .footer-meta,
  .footer-links {
    gap: var(--s-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .tape-track,
  .ticker-label::before {
    animation: none;
  }
  .ticker-item {
    opacity: 1;
    transform: none;
    position: static;
    display: block;
  }
  .ticker-item + .ticker-item { display: none; }
}
