:root {
  color-scheme: dark;
  --ink: #0d100c;
  --ink-soft: #151a13;
  --paper: #f2f0e8;
  --stone: #c7c3b5;
  --stone-dark: #817f75;
  --grass: #79d34d;
  --grass-deep: #3d8e32;
  --torch: #f5b44a;
  --water: #51aec8;
  --white: #ffffff;
  --border-dark: rgba(255, 255, 255, 0.22);
  --content-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  letter-spacing: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 64px), var(--content-width));
  height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  image-rendering: pixelated;
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 17px;
  line-height: 1;
}

.brand small {
  color: rgba(255, 255, 255, 0.62);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
}

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-links a,
.header-contact,
.header-home {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.header-contact:hover,
.header-contact:focus-visible,
.header-home:hover,
.header-home:focus-visible {
  color: var(--white);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.header-home {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(8, 12, 7, 0.28);
  white-space: nowrap;
}

.header-home:hover,
.header-home:focus-visible {
  border-color: var(--grass);
  background: rgba(8, 12, 7, 0.52);
}

.header-contact {
  padding: 9px 0;
  border-bottom: 2px solid var(--grass);
}

.hero {
  --parallax-x: 0px;
  --parallax-y: 0px;
  --pixel-x: 0px;
  --pixel-y: 0px;
  position: relative;
  display: flex;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  z-index: -3;
  background: url("assets/world.webp") center 52% / cover no-repeat;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.06);
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
  animation: settle 1.3s ease-out both;
}

.hero-shade {
  z-index: -2;
  background: rgba(4, 8, 4, 0.52);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: -1;
  background: rgba(8, 11, 7, 0.38);
  pointer-events: none;
}

.pixel-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(var(--pixel-x), var(--pixel-y), 0);
  transition: transform 520ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.pixel-field i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: var(--pixel);
  box-shadow: 10px -8px 0 rgba(255, 255, 255, 0.22);
  opacity: 0.7;
  animation: pixel-drift 6s var(--delay) steps(6, end) infinite;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  gap: clamp(56px, 8vw, 120px);
  align-items: end;
  width: min(calc(100% - 64px), var(--content-width));
  margin: auto auto 11vh;
  padding-top: 124px;
}

.hero-copy {
  max-width: 720px;
  animation: rise 700ms 100ms ease-out both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.76);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow-separator {
  color: rgba(255, 255, 255, 0.32);
}

.status-light {
  width: 9px;
  height: 9px;
  background: var(--grass);
  box-shadow: 0 0 0 4px rgba(121, 211, 77, 0.17);
}

.status-light:not(.is-loading):not(.is-offline) {
  animation: signal 1.8s steps(3, end) infinite;
}

.status-light.is-loading {
  background: var(--torch);
  box-shadow: 0 0 0 4px rgba(245, 180, 74, 0.17);
  animation: blink 1.4s steps(2, end) infinite;
}

.status-light.is-offline {
  background: #ef665f;
  box-shadow: 0 0 0 4px rgba(239, 102, 95, 0.17);
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: 92px;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.28), -2px 0 0 rgba(81, 174, 200, 0.22);
}

.hero-title-brand,
.hero-title-label {
  display: block;
}

.hero h1 .hero-title-brand {
  margin-bottom: 12px;
  color: var(--grass);
  font-size: 70px;
  line-height: 0.82;
  text-shadow: 5px 5px 0 rgba(37, 100, 32, 0.78), -2px 0 0 rgba(245, 180, 74, 0.26);
}

.hero-title-label {
  white-space: nowrap;
}

.hero-lede {
  max-width: 590px;
  margin: 26px 0 32px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  line-height: 1.75;
}

.address-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(100%, 590px);
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(8, 12, 7, 0.76);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.address-block::before,
.address-block::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 8px;
  height: 8px;
  pointer-events: none;
}

.address-block::before {
  top: -4px;
  left: -4px;
  background: var(--water);
}

.address-block::after {
  right: -4px;
  bottom: -4px;
  background: var(--torch);
}

.address-block:hover {
  border-color: rgba(121, 211, 77, 0.78);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(121, 211, 77, 0.18);
  transform: translateY(-2px);
}

.address-value {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 16px 22px;
}

.address-value span,
.join-command span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 800;
}

.address-value code,
.join-command code {
  overflow-wrap: anywhere;
  color: var(--white);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
}

.copy-button {
  min-width: 126px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--grass);
  color: #13200d;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(19, 32, 13, 0.24);
  transition: background 140ms ease, color 140ms ease, transform 100ms ease,
    box-shadow 100ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--torch);
  color: var(--ink);
}

.copy-button:active {
  transform: translateY(3px);
  box-shadow: inset 0 -2px 0 rgba(19, 32, 13, 0.24);
}

.copy-button.is-copied {
  background: var(--water);
  color: #07171c;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.hero-meta span {
  position: relative;
}

.hero-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -15px;
  width: 3px;
  height: 3px;
  background: var(--torch);
}

.hero-meta b {
  color: var(--white);
}

.hero-status {
  position: relative;
  padding: 26px 0 4px;
  border-top: 3px solid var(--torch);
  animation: rise 700ms 240ms ease-out both;
}

.hero-status::before,
.hero-status::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 8px;
  height: 11px;
  background: var(--torch);
}

.hero-status::before {
  left: 0;
}

.hero-status::after {
  right: 0;
}

.status-label,
.stat-kicker,
.section-index {
  margin: 0;
  color: var(--torch);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.player-figure {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 20px;
}

.player-figure strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 64px;
  line-height: 0.9;
}

.player-figure span {
  color: rgba(255, 255, 255, 0.5);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

.motd {
  min-height: 48px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.updated-at {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
}

.scroll-cue {
  position: absolute;
  right: max(32px, calc((100vw - var(--content-width)) / 2));
  bottom: 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  text-decoration: none;
}

.scroll-cue span {
  display: inline-block;
  margin-left: 8px;
  color: var(--grass);
  animation: cue-drop 1.5s steps(3, end) infinite;
}

.section-inner {
  width: min(calc(100% - 64px), var(--content-width));
  margin: 0 auto;
}

.world-section {
  background: var(--paper);
  color: var(--ink);
  padding: 104px 0 112px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) 1.1fr;
  column-gap: 64px;
  align-items: end;
}

.section-index {
  grid-column: 1;
  align-self: start;
  color: var(--grass-deep);
}

.section-heading h2 {
  grid-column: 1;
  margin: 14px 0 0;
  font-size: 68px;
  line-height: 1;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 520px;
  margin: 0;
  color: #5f605a;
  font-size: 17px;
  line-height: 1.8;
}

.world-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 64px;
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}

.stat-item {
  min-width: 0;
  padding: 30px 34px 32px 0;
}

.stat-item + .stat-item {
  padding-left: 34px;
  border-left: 1px solid var(--stone);
}

.stat-item:last-child {
  padding-right: 0;
}

.stat-kicker {
  color: var(--stone-dark);
}

.stat-item strong {
  display: block;
  margin-top: 24px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 42px;
  line-height: 1;
}

.stat-item .status-word {
  color: var(--grass-deep);
}

.stat-item p {
  margin: 14px 0 0;
  color: #6c6d65;
  font-size: 13px;
  line-height: 1.55;
}

.join-section {
  background: var(--ink-soft);
  padding: 104px 0 110px;
}

.join-heading .section-index {
  color: var(--torch);
}

.join-heading > p:last-child {
  color: rgba(255, 255, 255, 0.58);
}

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 72px 0 62px;
  padding: 0;
  list-style: none;
}

.join-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  min-width: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.step-number {
  color: var(--grass);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.join-steps h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.join-steps p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 1.65;
}

.join-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.join-command > div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 24px 30px;
}

.join-command code {
  font-size: 42px;
}

.copy-button-dark {
  min-width: 174px;
  border-left-color: rgba(255, 255, 255, 0.22);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-row > div {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.contact-row span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.contact-row strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
}

.text-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid var(--torch);
  background: transparent;
  color: var(--white);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--torch);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 92px;
  padding: 24px max(32px, calc((100vw - var(--content-width)) / 2));
  background: #090b08;
  color: rgba(255, 255, 255, 0.38);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
}

.site-footer a {
  width: max-content;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.site-footer span:last-child {
  justify-self: end;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  min-width: 190px;
  padding: 13px 18px;
  border-left: 4px solid var(--grass);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle {
  from {
    opacity: 0.65;
  }
  to { opacity: 1; }
}

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

@keyframes signal {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(121, 211, 77, 0.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(121, 211, 77, 0.22);
  }
}

@keyframes pixel-drift {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.3;
  }
  50% {
    transform: translate(12px, -24px);
    opacity: 0.8;
  }
}

@keyframes cue-drop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    width: min(calc(100% - 40px), var(--content-width));
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    width: min(calc(100% - 40px), var(--content-width));
    margin-bottom: 70px;
    padding-top: 140px;
  }

  .hero h1 {
    font-size: 72px;
  }

  .hero h1 .hero-title-brand {
    margin-bottom: 10px;
    font-size: 54px;
  }

  .section-heading h2 {
    font-size: 56px;
  }

  .join-command code {
    font-size: 34px;
  }

  .hero-status {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 30px;
    align-items: end;
  }

  .status-label,
  .updated-at {
    grid-column: 1 / -1;
  }

  .player-figure {
    margin-bottom: 0;
  }

  .motd {
    align-self: end;
  }

  .scroll-cue {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 26px;
  }

  .world-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-item:nth-child(3) {
    border-left: 0;
  }

  .stat-item:nth-child(n + 3) {
    border-top: 1px solid var(--stone);
  }

  .join-steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero-content,
  .section-inner {
    width: calc(100% - 32px);
  }

  .site-header {
    height: 74px;
  }

  .brand small,
  .header-contact {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-image {
    background-position: 58% center;
  }

  .pixel-field i:nth-child(even) {
    display: none;
  }

  .hero-content {
    gap: 38px;
    margin-bottom: 42px;
    padding-top: 116px;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 50px;
    line-height: 1;
  }

  .hero h1 .hero-title-brand {
    margin-bottom: 8px;
    font-size: 38px;
  }

  .hero-lede {
    margin: 20px 0 26px;
    font-size: 16px;
  }

  .address-block,
  .join-command {
    grid-template-columns: 1fr;
  }

  .address-block {
    min-height: 0;
  }

  .address-value {
    min-height: 82px;
    padding: 16px 18px;
  }

  .copy-button {
    min-width: 0;
    min-height: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .hero-meta {
    gap: 10px 21px;
  }

  .hero-meta span:not(:last-child)::after {
    right: -12px;
  }

  .hero-status {
    display: block;
    padding-top: 18px;
  }

  .player-figure {
    margin: 16px 0;
  }

  .player-figure strong {
    font-size: 48px;
  }

  .motd {
    min-height: 0;
  }

  .world-section,
  .join-section {
    padding: 76px 0 80px;
  }

  .world-stats {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .stat-item,
  .stat-item + .stat-item {
    padding: 24px 0;
    border-top: 1px solid var(--stone);
    border-left: 0;
  }

  .stat-item:first-child {
    border-top: 0;
  }

  .stat-item strong {
    margin-top: 16px;
  }

  .join-steps {
    margin: 50px 0 46px;
  }

  .join-command > div {
    min-height: 100px;
    padding: 20px;
  }

  .contact-row,
  .contact-row > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-row {
    gap: 18px;
  }

  .contact-row > div {
    gap: 6px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 28px 16px;
  }

  .site-footer span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
