@font-face {
  font-family: "Fusion Pixel";
  src: url("/static/fonts/fusion-pixel-zh.woff2?v=4") format("woff2");
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+3000-303F, U+FF00-FFEF;
}

@font-face {
  font-family: "Fusion Pixel";
  src: url("/static/fonts/fusion-pixel-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F;
}

:root {
  --bg: #050505;
  --fg: #e6e6e6;
  --accent: #f2f2f2;
  --glitch-a: #bdbdbd;
  --glitch-b: #7a7a7a;
  --mute: #9a9a9a;
  --line: #3a3a3a;
  --panel: #101010;
  --pixel: "Fusion Pixel", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--pixel);
  font-size: 18px;
  overflow-x: hidden;
}

html::-webkit-scrollbar {
  width: 6px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: #2e2e2e;
  border-radius: 0;
}
html::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a;
}
html::-webkit-scrollbar-corner {
  background: transparent;
}

#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: #050505;
  filter: grayscale(1) contrast(1.05);
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0,
    rgba(0, 0, 0, 0.28) 1px,
    transparent 2px,
    transparent 4px
  );
  animation: flicker 6s infinite;
}

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

.crt-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  box-shadow: inset 0 0 120px rgba(255, 255, 255, 0.04);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    transparent 30%,
    transparent 70%,
    rgba(0, 0, 0, 0.25)
  );
}

@keyframes flicker {
  0%, 97%, 100% { opacity: 0.5; }
  98% { opacity: 0.2; }
  99% { opacity: 0.65; }
}

.page { position: relative; z-index: 10; }

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh 6vw;
  text-align: center;
}

.stack {
  position: relative;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  position: relative;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.35;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow:
    2px 0 var(--glitch-b),
    -2px 0 #fff,
    0 0 18px rgba(255, 255, 255, 0.2);
  animation: glitchShift 2.8s infinite steps(2, end);
  margin-bottom: 1.4rem;
  image-rendering: pixelated;
}

.brand::before,
.brand::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0.7;
}

.brand::before {
  color: #fff;
  transform: translate(2px, -1px);
  clip-path: inset(0 0 55% 0);
  animation: sliceA 2.8s infinite steps(2, end);
}

.brand::after {
  color: #8a8a8a;
  transform: translate(-2px, 1px);
  clip-path: inset(45% 0 0 0);
  animation: sliceB 2.4s infinite steps(2, end);
}

@keyframes sliceA {
  0%, 90%, 100% { transform: translate(2px, -1px); }
  92% { transform: translate(-5px, 2px); }
}

@keyframes sliceB {
  0%, 88%, 100% { transform: translate(-2px, 1px); }
  91% { transform: translate(6px, -2px); }
}

@keyframes glitchShift {
  0%, 90%, 100% { filter: none; }
  91% { filter: contrast(1.3) brightness(1.15); }
  93% { filter: none; }
}

.headline {
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 1.1rem;
  color: #f5f5f5;
}

.lead,
.section-lead {
  color: var(--mute);
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  line-height: 1.75;
  max-width: 26em;
  margin: 0 auto 1.6rem;
}

.section-body {
  color: #c4c4c4;
  font-size: clamp(0.95rem, 1.9vw, 1.15rem);
  line-height: 1.85;
  max-width: 28em;
  margin: 0 auto 1.2rem;
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.cta {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 1rem;
  padding: 0.9rem 1.15rem;
  border: 3px solid #f0f0f0;
  color: #050505;
  background: #f0f0f0;
  text-decoration: none;
  box-shadow: 5px 5px 0 #6e6e6e;
  image-rendering: pixelated;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #9a9a9a;
}

.cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.scroll-hint {
  color: var(--mute);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  animation: bob 1.8s infinite steps(2, end);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

.kicker {
  color: #cfcfcf;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  color: #f2f2f2;
  letter-spacing: 0.08em;
  margin-bottom: 1.4rem;
  text-shadow: 2px 0 #777, -2px 0 #fff;
}

.quote {
  color: #efefef;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.8;
  max-width: 24em;
  min-height: 3.8em;
  margin: 0 auto 1.6rem;
  border-left: 3px solid #ddd;
  border-right: 3px solid #777;
  padding: 0.6rem 1rem;
}

.quote.typing::after {
  content: "█";
  margin-left: 2px;
  font-size: 0.85em;
  animation: caretBlink 0.9s steps(1, end) infinite;
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.pixel-list {
  list-style: none;
  margin: 1.4rem auto 0;
  max-width: 22em;
  text-align: left;
}

.pixel-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.4rem;
  color: #e0e0e0;
  line-height: 1.6;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateX(-18px);
}

.pixel-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: #fff;
}

.pixel-list.pop li {
  animation: listPop 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.pixel-list.pop li:nth-child(1) { animation-delay: 0.12s; }
.pixel-list.pop li:nth-child(2) { animation-delay: 0.62s; }
.pixel-list.pop li:nth-child(3) { animation-delay: 1.12s; }

@keyframes listPop {
  0% {
    opacity: 0;
    transform: translateX(-22px) scale(0.96);
  }
  72% {
    opacity: 1;
    transform: translateX(3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.join-form {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
  text-align: left;
  margin-top: 0.4rem;
}

.join-form label {
  display: grid;
  gap: 6px;
  color: var(--mute);
  font-size: 0.9rem;
}

.join-form input,
.join-form textarea {
  width: 100%;
  background: #0c0c0c;
  border: 2px solid var(--line);
  color: var(--fg);
  font-family: var(--pixel);
  font-size: 0.95rem;
  padding: 10px 12px;
  outline: none;
}

.join-form input:focus,
.join-form textarea:focus {
  border-color: #cfcfcf;
}

.join-form .cta {
  justify-self: center;
  margin-top: 8px;
}

.form-msg {
  text-align: center;
  font-size: 0.9rem;
}

.form-msg.ok { color: #eaeaea; }
.form-msg.err { color: #cfcfcf; text-decoration: underline; }

.foot {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 1rem 3rem;
  color: var(--mute);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.foot a {
  color: #ddd;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pixel-list li,
  .pixel-list.pop li {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .quote.typing::after {
    animation: none;
    content: none;
  }
}

@media (max-width: 720px) {
  .panel { padding: 10vh 5vw; min-height: 100svh; }
  .brand { font-size: clamp(2rem, 12vw, 3.2rem); letter-spacing: 0.06em; }
}
