/* ============================================
   TOKENS — Minecraft dark palette
============================================ */
:root {
  --void:       #020204;
  --deep:       #050508;
  --cave:       #08080D;
  --deepslate:  #0C0C12;
  --stone:      #0F0F14;
  --surface:    #131318;
  --bg:         #0A0A0F;

  --panel:      #111116;
  --border:     #1C1C24;
  --border-hi:  #2A2A38;

  --cyan:       #3FEDE2;
  --cyan-dim:   #1A6B66;
  --cyan-glow:  rgba(63, 237, 226, 0.12);
  --grey:       #C8C8C8;
  --grey-dim:   #666672;
  --grey-faint: #333340;

  --text:       #DDDDE8;
  --text-soft:  #888898;
  --text-faint: #44444E;

  --font-pixel: "Press Start 2P", monospace;
  --font-mono:  "JetBrains Mono", "IBM Plex Mono", monospace;
  --font-body:  "Inter", -apple-system, sans-serif;

  --max: 1060px;
  --radius: 2px;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   Y-LEVEL DEPTH INDICATOR (fixed sidebar)
============================================ */
#y-level {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  user-select: none;
}

#y-level .y-label {
  font-family: var(--font-pixel);
  font-size: 6px;
  color: var(--cyan);
  letter-spacing: 0.05em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.7;
}

#y-level .y-track {
  width: 2px;
  height: 120px;
  background: var(--border);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}

#y-level .y-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, #3FEDE2, #1A3F8F, #020204);
  transition: height 0.1s linear;
  border-radius: 1px;
}

#y-level .y-value {
  font-family: var(--font-pixel);
  font-size: 5px;
  color: var(--cyan);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#y-level .y-biome {
  font-family: var(--font-pixel);
  font-size: 4px;
  color: var(--grey-dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.55;
}

@media (max-width: 900px) {
  #y-level { display: none; }
}

/* ============================================
   DEPTH BACKGROUND LAYERS (per section)
============================================ */
body { background: var(--bg); }

.depth-surface  { background: #0F1218; }
.depth-stone    { background: #0C0C14; }
.depth-deepslate{ background: #090910; }
.depth-cave     { background: #06060C; }
.depth-void     { background: #030306; }

/* ============================================
   PIXEL SCANLINE OVERLAY
============================================ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3 {
  font-family: var(--font-pixel);
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--text);
  image-rendering: pixelated;
}

h1 { font-size: clamp(0.85rem, 2.2vw, 1.3rem); }
h2 { font-size: clamp(0.72rem, 1.6vw, 0.95rem); }
h3 { font-size: 0.7rem; }

p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s, box-shadow 0.1s;
  letter-spacing: 0.04em;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}
.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.btn-line {
  background: transparent;
  border-color: var(--border-hi);
  color: var(--grey);
}
.btn-line:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================
   HEADER
============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--cyan);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark-icon {
  width: auto;
  height: 22px;
  max-width: 36px;
  image-rendering: pixelated;
}

.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  transition: color 0.12s;
}
.main-nav a:hover { color: var(--cyan); }

.nav-discord {
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--cyan-dim);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
.nav-discord:hover {
  background: var(--cyan-glow);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ============================================
   HERO
============================================ */
.hero {
  padding: 80px 0 60px;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 14, 0.72) 0%,
    rgba(6, 6, 12, 0.85) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

/* IP block — first & prominent */
.ip-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 18px 22px;
  width: fit-content;
  position: relative;
}

.ip-block::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cyan-dim), transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

#server-ip {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.copy-btn {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  background: var(--border);
  color: var(--grey);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
.copy-btn:hover {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.copy-btn.copied {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.ip-label {
  position: absolute;
  top: -10px;
  left: 14px;
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  color: var(--cyan);
  background: var(--bg);
  padding: 0 6px;
  letter-spacing: 0.1em;
}

.hero-tagline {
  margin-bottom: 24px;
}

.hero-tagline .label {
  display: block;
  margin-bottom: 18px;
}

.hero-tagline h1 {
  margin-bottom: 16px;
}

.hero-tagline p {
  font-size: 0.88rem;
  max-width: 46ch;
  color: var(--text-soft);
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* pixel diamond art on right */
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art img {
  width: 140px;
  height: 140px;
  image-rendering: pixelated;
  opacity: 0.85;
  filter: drop-shadow(0 0 24px rgba(63,237,226,0.35));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* ============================================
   ABOUT
============================================ */
.about {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.about .label { display: block; margin-bottom: 16px; }
.about h2 { margin-bottom: 16px; }
.about p { max-width: 56ch; }

/* ============================================
   SYSTEMS / PLUGINS
============================================ */
.systems {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.systems-header { margin-bottom: 40px; }
.systems-header .label { display: block; margin-bottom: 16px; }
.systems-header h2 { margin-bottom: 0; }

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}


.plugin-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
  grid-column: span 2;
}

/* Center the last 2 cards in a 5-card 3-col grid */
.plugin-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.plugin-card:hover {
  border-color: var(--border-hi);
  background: #141419;
}

.plugin-card:hover .plugin-icon {
  filter: drop-shadow(0 0 8px var(--cyan-glow));
  color: var(--cyan);
}

.plugin-tag {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
}

.plugin-icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.15s, filter 0.15s;
  color: var(--grey-dim);
}

.plugin-card h3 {
  font-size: 0.6rem;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.plugin-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.12s;
}

.plugin-link:hover {
  color: var(--cyan);
}

.plugin-card p {
  font-size: 0.82rem;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ============================================
   WIKI CALLOUT
============================================ */
.wiki-callout {
  margin-top: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 28px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.wiki-callout h3 { font-size: 0.6rem; margin-bottom: 8px; }
.wiki-callout p { margin: 0; font-size: 0.82rem; color: var(--text-soft); }

/* ============================================
   DISCORD
============================================ */
.discord-section {
  padding: 64px 0 80px;
  border-top: 1px solid var(--border);
}

.discord-section .label { display: block; margin-bottom: 16px; }
.discord-section h2 { margin-bottom: 12px; }
.discord-section > .wrap > p { max-width: 46ch; margin-bottom: 0; }

.community-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.discord-embed-wrap {
  margin: 28px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.discord-embed-wrap iframe { display: block; }

/* ============================================
   FOOTER
============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--void);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-wordmark {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-decoration: none;
}

.footer-ip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin: 6px 0 0;
}

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  transition: color 0.12s;
}
.footer-links a:hover { color: var(--cyan); }

/* ============================================
   SECTION DEPTH TRANSITIONS
============================================ */
section {
  transition: background 0.3s ease;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .plugin-grid { grid-template-columns: repeat(2, 1fr); }
  .wiki-callout { grid-template-columns: 1fr; }
  #server-ip { font-size: 0.65rem; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .plugin-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 0.78rem; }
  h2 { font-size: 0.65rem; }
  .ip-block { padding: 14px 16px; flex-wrap: wrap; }
}

/* ============================================
   FOCUS / ACCESSIBILITY
============================================ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--cyan-glow); }
  50% { box-shadow: 0 0 20px rgba(63,237,226,0.25); }
}

.ip-block {
  animation: glow-pulse 3s ease-in-out infinite;
}
