:root {
  --ink: #f8f4dc;
  --dark: #171b16;
  --dark-2: #222820;
  --dirt: #6d4327;
  --grass: #63a83b;
  --grass-dark: #376d25;
  --stone: #777d76;
  --gold: #ffd84a;
  --sky-top: #5cbcf4;
  --sky-bottom: #c8efff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--dark);
  font-family: "Courier New", Courier, monospace;
  overflow-x: hidden;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: 22px 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links a {
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 3px 3px 0 #1f4d1f;
}

.brand {
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: .08em;
}

.nav-links { display: flex; gap: 10px; }
.nav-links a {
  padding: 9px 12px;
  background: rgba(21, 38, 24, .78);
  border: 3px solid rgba(255,255,255,.7);
  box-shadow: 4px 4px 0 rgba(0,0,0,.35);
  font-size: .85rem;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  padding-top: 100px;
  padding-bottom: 80px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero::before {
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.07) 50%, transparent 50.5%) 0 0 / 64px 64px,
    linear-gradient(transparent 49.5%, rgba(255,255,255,.07) 50%, transparent 50.5%) 0 0 / 64px 64px,
    linear-gradient(var(--sky-top) 0 62%, var(--grass) 62% 68%, var(--dirt) 68% 100%);
}

.hero::after {
  top: 68%;
  opacity: .42;
  background:
    linear-gradient(90deg, rgba(42,27,16,.55) 25%, transparent 25% 50%, rgba(112,72,40,.55) 50% 75%, transparent 75%) 0 0 / 80px 80px,
    linear-gradient(90deg, transparent 25%, rgba(45,31,19,.5) 25% 50%, transparent 50% 75%, rgba(122,78,43,.55) 75%) 0 40px / 80px 80px;
}

.construction-badge,
.eyebrow {
  display: inline-block;
  color: #172014;
  background: var(--gold);
  border: 3px solid #473800;
  padding: 7px 10px;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 4px 4px 0 rgba(0,0,0,.22);
}

.logo {
  margin: 25px 0 16px;
  color: #d7dad7;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(3.9rem, 9.5vw, 8.6rem);
  line-height: .78;
  letter-spacing: -.045em;
  text-transform: uppercase;
  -webkit-text-stroke: clamp(2px, .28vw, 5px) #1d211e;
  text-shadow: 0 7px 0 #707670, 0 12px 0 #252b27, 8px 18px 0 rgba(0,0,0,.25);
  transform: perspective(700px) rotateX(2deg) rotateY(2deg);
}

.guild-title {
  display: inline-block;
  margin-left: .08em;
  color: var(--gold);
  font-size: clamp(1.4rem, 3vw, 2.7rem);
  font-weight: 900;
  letter-spacing: .18em;
  text-shadow: 4px 4px 0 #6b4b00;
  transform: rotate(-2deg);
}

.intro {
  max-width: 650px;
  margin: 34px 0 28px;
  color: #182117;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 800;
  line-height: 1.55;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

.button {
  display: inline-block;
  padding: 16px 24px;
  color: #fff;
  background: linear-gradient(#69b83f 0 50%, #52952f 50%);
  border: 4px solid #244c1c;
  box-shadow: inset 0 0 0 3px #8ed265, 7px 7px 0 rgba(0,0,0,.3);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .16s ease, filter .16s ease;
}

.button:hover,
.button:focus-visible { transform: translate(-2px, -2px); filter: brightness(1.08); outline: none; }

.character-frame {
  position: relative;
  justify-self: center;
  width: min(100%, 410px);
  padding: 12px;
  background: var(--stone);
  border: 7px solid #30352f;
  box-shadow: inset 0 0 0 5px #a6aaa4, 14px 14px 0 rgba(0,0,0,.28);
  transform: rotate(1.5deg);
}

.character-frame::before {
  content: "steve_bee";
  position: absolute;
  top: -22px;
  right: 14px;
  z-index: 2;
  padding: 8px 11px;
  color: #171717;
  background: var(--gold);
  border: 3px solid #473800;
  font-weight: 900;
  box-shadow: 4px 4px 0 rgba(0,0,0,.28);
}

.character-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 4px solid #272b27;
}

.dark-section,
.members-section { padding: 84px 0; }

.dark-section {
  background:
    linear-gradient(rgba(20,23,20,.95), rgba(20,23,20,.95)),
    repeating-linear-gradient(45deg, #303630 0 20px, #242a24 20px 40px);
  border-top: 8px solid #0c0f0c;
  border-bottom: 8px solid #0c0f0c;
}

.members-section {
  color: #182117;
  background:
    linear-gradient(rgba(218,239,193,.94), rgba(218,239,193,.94)),
    repeating-linear-gradient(90deg, #8fbd68 0 32px, #77a956 32px 64px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 13px 0 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0,0,0,.3);
}

.section-heading p { margin: 0; font-family: Arial, Helvetica, sans-serif; }
.updated { color: #c7cbc5; text-align: right; }
.light-heading h2 { text-shadow: 4px 4px 0 rgba(255,255,255,.55); }
.light-heading .eyebrow { color: #fff; background: var(--grass-dark); border-color: #173613; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.stat-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #333a33;
  border: 4px solid #111411;
  box-shadow: inset 0 0 0 3px #646b64, 7px 7px 0 rgba(0,0,0,.25);
}

.stat-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
}

.online-block {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  background: #55d83c;
  border: 5px solid #173d12;
  box-shadow: inset 0 0 0 5px #8cff72, 5px 5px 0 rgba(0,0,0,.28);
}

.stat-card span,
.strip-label {
  display: block;
  color: #bfc5bd;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  overflow-wrap: anywhere;
}

.guild-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 24px;
  background: #656b64;
  border: 4px solid #111411;
  box-shadow: 7px 7px 0 rgba(0,0,0,.25);
}

.guild-strip > div { padding: 18px 20px; background: #252b25; }
.guild-strip strong { display: block; margin-top: 6px; color: var(--gold); font-size: 1.05rem; }

.status-box {
  padding: 20px;
  color: #fff;
  background: #4a5348;
  border: 4px solid #20251f;
  box-shadow: 6px 6px 0 rgba(0,0,0,.22);
  font-family: Arial, Helvetica, sans-serif;
}

.status-box.error { background: #71392e; }
.status-box[hidden] { display: none; }

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.member-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  min-width: 0;
  padding: 15px;
  background: #f6f1dc;
  border: 4px solid #33382f;
  box-shadow: inset 0 0 0 3px #fff, 7px 7px 0 rgba(42,63,31,.28);
}

.member-card.leader { border-color: #856800; background: #fff3b8; }
.member-card.online { border-color: #318b27; box-shadow: inset 0 0 0 3px #d9ffd1, 7px 7px 0 rgba(42,63,31,.28); }
.member-avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: #91c873;
  border: 4px solid #252a22;
  image-rendering: pixelated;
}

.member-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #596057;
  font: 700 .64rem/1 Arial, Helvetica, sans-serif;
}

.presence::before {
  content: "";
  width: 9px;
  height: 9px;
  background: #899087;
  border: 2px solid #343934;
}

.presence.is-online { color: #287622; }
.presence.is-online::before { background: #55d83c; border-color: #1c5c17; box-shadow: 0 0 0 2px #b6efa9; }
.presence.is-unknown { color: #8a6823; }
.presence.is-unknown::before { background: #e4b441; border-color: #745410; }

.rank-badge {
  display: inline-block;
  max-width: 100%;
  padding: 4px 7px;
  color: #fff;
  background: #537f39;
  border: 2px solid #1f3a17;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader .rank-badge { color: #2f2600; background: var(--gold); border-color: #806600; }
.member-meta { margin: 8px 0 0; color: #51594d; font: .8rem/1.4 Arial, Helvetica, sans-serif; }

footer {
  padding: 35px 16px;
  color: #c7cbc5;
  background: #101310;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
}

footer strong { color: var(--gold); font-family: "Courier New", monospace; }
footer p { margin: 8px 0 0; }
footer a { color: #8ed265; }

@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .character-frame { order: 2; width: min(78vw, 330px); }
  .intro { margin-left: auto; margin-right: auto; }
  .logo { font-size: clamp(3.25rem, 17vw, 6.5rem); }
  .guild-title { font-size: clamp(1.1rem, 6vw, 2rem); }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .updated { text-align: left; }
  .guild-strip { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav-links a:first-child { display: none; }
  .stats-grid,
  .members-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 14px; }
  .dark-section,
  .members-section { padding: 58px 0; }
}

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