:root {
  --bg-top: #07111f;
  --bg-mid: #102339;
  --bg-bottom: #182f2f;
  --surface: rgba(9, 19, 31, 0.66);
  --surface-strong: rgba(9, 19, 31, 0.84);
  --line: rgba(175, 230, 198, 0.24);
  --line-strong: rgba(175, 230, 198, 0.5);
  --text: #f4f7ee;
  --muted: rgba(244, 247, 238, 0.72);
  --accent: #bafc7b;
  --accent-deep: #5fc156;
  --warning: #f1d36a;
  --danger: #ff7b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --font-display: "Press Start 2P", monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-width: min(1180px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top, rgba(89, 148, 225, 0.16), transparent 36%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
  mask-image: linear-gradient(180deg, transparent, black 12%, black 88%, transparent);
}

.sky-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0 0.8px, transparent 1px),
    radial-gradient(circle at 70% 12%, rgba(255, 255, 255, 0.7) 0 0.7px, transparent 1px),
    radial-gradient(circle at 88% 32%, rgba(255, 255, 255, 0.8) 0 0.8px, transparent 1px),
    radial-gradient(circle at 34% 48%, rgba(255, 255, 255, 0.7) 0 0.9px, transparent 1px),
    radial-gradient(circle at 52% 68%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px);
  background-size: 180px 180px;
  animation: noiseDrift 36s linear infinite;
}

.page-shell {
  position: relative;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 0 42px;
  isolation: isolate;
  overflow: clip;
}

.hero__nav,
.hero__content,
.section {
  width: var(--page-width);
  margin: 0 auto;
}

.hero__nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__nav-brand {
  margin-right: auto;
  color: rgba(244, 247, 238, 0.84);
}

.hero__nav-link {
  color: rgba(244, 247, 238, 0.78);
  text-decoration: none;
}

.hero__nav-link:hover,
.hero__nav-link:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: calc(100svh - 110px);
  padding: 8vh 0 12vh;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 1vw, 0.72rem);
  line-height: 1.9;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(186, 252, 123, 0.32);
}

.hero__title,
.section h2,
.join-strip__value {
  letter-spacing: -0.04em;
}

.hero__title {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(1.8rem, 4.8vw, 4rem);
  line-height: 1;
  font-weight: 900;
  text-wrap: balance;
}

.hero__summary,
.section__summary {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.8;
  color: var(--muted);
}

.hero__motd {
  display: grid;
  gap: 10px;
  max-width: 72rem;
}

.hero__motd-label {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 247, 238, 0.56);
}

.hero__motd-text {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: 1.08;
  font-weight: 700;
  text-wrap: balance;
}

.hero__statusline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  min-height: 42px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-copy {
  color: var(--muted);
  font-size: 0.98rem;
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 620px;
}

.metric {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.metric__label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 247, 238, 0.56);
}

.metric__value {
  display: block;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 700;
  line-height: 1.45;
}

.metric__value--mono,
.join-strip__value,
.status-grid dd {
  font-family: var(--font-display);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  padding-top: 10px;
}

.cta-button {
  appearance: none;
  border: 0;
  padding: 16px 22px;
  font: inherit;
  font-weight: 700;
  color: #062011;
  background: linear-gradient(180deg, #d9ffad 0%, #97ef72 100%);
  box-shadow:
    0 0 0 2px rgba(10, 34, 18, 0.28),
    0 14px 24px rgba(95, 193, 86, 0.28);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(10, 34, 18, 0.28),
    0 18px 28px rgba(95, 193, 86, 0.36);
  filter: saturate(1.05);
}

.text-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.copy-feedback {
  min-height: 1.5em;
  margin: 0;
  color: var(--warning);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.moon,
.stars,
.cloud,
.mountain,
.terrain {
  position: absolute;
  will-change: transform;
  transition: transform 100ms ease-out;
}

.moon {
  top: 14%;
  right: 14%;
  width: min(16vw, 180px);
  aspect-ratio: 1;
  border-radius: 20px;
  background:
    radial-gradient(circle at 32% 36%, rgba(255, 255, 255, 0.95) 0 16%, transparent 17%),
    radial-gradient(circle at 58% 62%, rgba(255, 255, 255, 0.78) 0 10%, transparent 11%),
    radial-gradient(circle at 50% 50%, #fff1b0 0 42%, #f7d777 43% 65%, transparent 66%);
  filter: drop-shadow(0 0 28px rgba(247, 215, 119, 0.5));
  transform: rotate(8deg);
  animation: floatSlow 12s ease-in-out infinite;
}

.stars {
  inset: 0;
  background-repeat: repeat;
}

.stars-a {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 1.2px, transparent 1.3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 0.8px, transparent 0.9px);
  background-size: 160px 160px, 120px 120px;
  background-position: 10px 20px, 80px 40px;
  opacity: 0.38;
  animation: driftLeft 45s linear infinite;
}

.stars-b {
  background-image:
    radial-gradient(circle, rgba(186, 252, 123, 0.68) 0 1px, transparent 1.1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.58) 0 0.7px, transparent 0.8px);
  background-size: 260px 260px, 180px 180px;
  background-position: 0 0, 120px 100px;
  opacity: 0.18;
  animation: driftRight 65s linear infinite;
}

.cloud {
  border-radius: 0;
  opacity: 0.18;
  filter: blur(1px);
}

.cloud-a {
  top: 22%;
  left: -10%;
  width: 28%;
  height: 72px;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(255, 255, 255, 0.2) 6% 18%, transparent 18% 22%,
    rgba(255, 255, 255, 0.16) 22% 44%, transparent 44% 49%, rgba(255, 255, 255, 0.12) 49% 67%,
    transparent 67% 100%);
  animation: driftRight 34s linear infinite;
}

.cloud-b {
  top: 29%;
  right: -12%;
  width: 24%;
  height: 56px;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(255, 255, 255, 0.16) 10% 28%, transparent 28% 36%,
    rgba(255, 255, 255, 0.12) 36% 58%, transparent 58% 100%);
  animation: driftLeft 28s linear infinite;
}

.mountain {
  inset-inline: -4%;
  bottom: 20%;
}

.mountain-far {
  height: 28%;
  background:
    linear-gradient(135deg, transparent 0 8%, #1d3754 8% 14%, transparent 14% 20%, #203d54 20% 26%, transparent 26% 33%,
    #1a344a 33% 41%, transparent 41% 100%),
    linear-gradient(225deg, transparent 0 12%, #172f46 12% 18%, transparent 18% 24%, #1d3754 24% 31%, transparent 31% 100%);
  clip-path: polygon(0 100%, 0 52%, 10% 44%, 18% 50%, 28% 34%, 38% 58%, 48% 36%, 57% 55%, 66% 38%, 78% 60%, 88% 42%, 100% 56%, 100% 100%);
  opacity: 0.8;
}

.mountain-mid {
  height: 22%;
  background:
    linear-gradient(135deg, transparent 0 10%, #29462f 10% 16%, transparent 16% 24%, #35583e 24% 31%, transparent 31% 100%),
    linear-gradient(225deg, transparent 0 14%, #234132 14% 20%, transparent 20% 28%, #385d41 28% 35%, transparent 35% 100%);
  clip-path: polygon(0 100%, 0 65%, 8% 58%, 20% 72%, 31% 48%, 41% 66%, 54% 52%, 65% 72%, 75% 60%, 88% 75%, 100% 63%, 100% 100%);
}

.terrain {
  inset-inline: 0;
  bottom: 0;
  height: 26%;
  background:
    linear-gradient(180deg, #578648 0 16%, #324d2f 16% 58%, #1c2c1f 58% 100%);
  clip-path: polygon(0 100%, 0 34%, 8% 34%, 8% 28%, 17% 28%, 17% 40%, 28% 40%, 28% 24%, 38% 24%, 38% 30%, 49% 30%, 49% 18%, 62% 18%, 62% 40%, 74% 40%, 74% 25%, 86% 25%, 86% 34%, 100% 34%, 100% 100%);
  box-shadow: inset 0 16px 0 rgba(186, 252, 123, 0.12);
}

.section {
  position: relative;
  padding: 120px 0;
}

.section h2 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1;
  font-weight: 800;
}

.section__intro {
  max-width: 780px;
}

.section--status {
  display: grid;
  gap: 38px;
}

.signal-lines {
  display: flex;
  gap: 16px;
  align-items: center;
}

.signal-lines span {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, rgba(186, 252, 123, 0.12), rgba(186, 252, 123, 0.82), rgba(186, 252, 123, 0.12));
  animation: pulseLine 2.4s ease-in-out infinite;
}

.signal-lines span:nth-child(1) {
  width: 18%;
}

.signal-lines span:nth-child(2) {
  width: 32%;
  animation-delay: 0.25s;
}

.signal-lines span:nth-child(3) {
  width: 22%;
  animation-delay: 0.5s;
}

.status-grid {
  margin: 0;
  display: grid;
  gap: 0;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%),
    rgba(5, 13, 22, 0.25);
  backdrop-filter: blur(8px);
}

.status-grid__row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(175, 230, 198, 0.1);
}

.status-grid__row:last-child {
  border-bottom: 0;
}

.status-grid dt {
  color: rgba(244, 247, 238, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.section--story {
  padding-top: 80px;
}

.story-panel {
  position: relative;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
}

.story-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 112px;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(186, 252, 123, 0.32);
}

.story-panel__content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding-top: 28px;
}

.story-block {
  min-height: 240px;
  padding: 28px;
  border: 1px solid rgba(175, 230, 198, 0.18);
  background:
    linear-gradient(180deg, rgba(186, 252, 123, 0.04), transparent 26%),
    var(--surface);
  box-shadow: var(--shadow);
}

.story-block__label {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.story-block__text {
  margin: 0 0 14px;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 1.9;
}

.story-block__text--muted {
  color: var(--muted);
}

.section--cta {
  padding-top: 96px;
  padding-bottom: 130px;
}

.join-strip {
  display: inline-flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
}

.join-strip__label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 247, 238, 0.6);
}

.join-strip__value {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1.1;
}

body[data-view-state="online"] .status-pill {
  color: var(--accent);
}

body[data-view-state="offline"] .status-pill {
  color: var(--warning);
}

body[data-view-state="error"] .status-pill {
  color: var(--danger);
}

body[data-view-state="loading"] .status-pill {
  color: rgba(244, 247, 238, 0.82);
}

body[data-view-state="online"] .hero__summary,
body[data-view-state="online"] #status-summary {
  color: rgba(244, 247, 238, 0.9);
}

body[data-view-state="error"] .copy-feedback {
  color: var(--danger);
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero__content {
    min-height: auto;
    padding: 14vh 0 16vh;
  }

  .hero__metrics,
  .story-panel__content {
    grid-template-columns: 1fr;
  }

  .moon {
    right: 10%;
    width: 124px;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 18px;
  }

  .hero__nav {
    gap: 14px;
    font-size: 0.72rem;
  }

  .hero__nav-brand {
    max-width: 9rem;
    line-height: 1.4;
  }

  .hero__title {
    max-width: none;
    font-size: clamp(1.5rem, 7.6vw, 2.5rem);
  }

  .hero__summary,
  .section__summary,
  .story-block__text {
    font-size: 0.98rem;
    line-height: 1.8;
  }

  .hero__motd-text {
    max-width: 100%;
    font-size: clamp(1.7rem, 8.8vw, 2.6rem);
    line-height: 1.12;
  }

  .metric__value {
    font-size: 1.16rem;
  }

  .status-grid__row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .status-grid dd {
    font-size: 0.72rem;
    line-height: 1.75;
  }

  .section {
    padding: 92px 0;
  }

  .section h2 {
    font-size: clamp(1.7rem, 10vw, 2.4rem);
  }

  .story-block {
    min-height: auto;
    padding: 24px 20px;
  }

  .join-strip__value {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .moon,
  .stars,
  .cloud,
  .mountain,
  .terrain {
    will-change: auto;
  }
}

@keyframes driftLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-80px);
  }
}

@keyframes driftRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100px);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(8deg);
  }
  50% {
    transform: translateY(-12px) rotate(6deg);
  }
}

@keyframes pulseLine {
  0%,
  100% {
    opacity: 0.42;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.08);
  }
}

@keyframes noiseDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-80px, -40px, 0);
  }
}
