/* =====================================================================
   MINEVANE - "Living Stone" design system
   A community-first NZ/AU Minecraft SMP. Dark, cinematic, stone + vine.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --emerald:        #0EC75C;
  --emerald-bright: #2BE57C;
  --emerald-soft:   #98FFB3;
  --mint:           #C9FFD9;
  --discord:        #5865F2;

  /* Surfaces (green-black, layered) */
  --bg:        #070B08;
  --bg-2:      #0A100C;
  --surface:   #0E1611;
  --surface-2: #121D16;
  --raised:    #16241B;

  /* Lines & text */
  --line:        rgba(152, 255, 179, 0.10);
  --line-strong: rgba(152, 255, 179, 0.22);
  --text:        #EAF3EC;
  --text-soft:   #B6C7BB;
  --text-mute:   #7E8F84;
  --stone:       #C7D1CA;

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --container: 1160px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Effects */
  --glow: 0 0 0 1px var(--line-strong), 0 18px 50px -20px rgba(14, 199, 92, 0.5);
  --shadow-card: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient backdrop: deep radial wash + faint vine topography */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 50% -10%, rgba(14, 199, 92, 0.16), transparent 60%),
    radial-gradient(900px 700px at 100% 110%, rgba(14, 199, 92, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

img { max-width: 100%; display: block; }

/* Deter casual saving/dragging of logos & images (a client-side deterrent, not real protection) */
img, svg, canvas {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS Safari: suppress the image save/copy popover */
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: rgba(14, 199, 92, 0.32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--emerald-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--emerald);
  color: #04130a;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Film grain overlay */
.fx-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(8, 16, 11, 0.6) 12%, rgba(8, 16, 11, 0.6) 88%, transparent); }

/* Hairline vine divider between alt sections */
.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }

/* ---------- Section headings ---------- */
.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--emerald-soft);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}
.section-sub {
  margin-top: 1.1rem;
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  position: relative;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-fg: #04130a;
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
  border-color: transparent;
  box-shadow: 0 14px 34px -14px rgba(14, 199, 92, 0.7);
}
.btn-primary:hover { box-shadow: 0 18px 44px -12px rgba(14, 199, 92, 0.85); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(152, 255, 179, 0.08); border-color: var(--emerald-soft); }

.btn-discord { --btn-fg: #fff; background: var(--discord); border-color: transparent; padding: 0.65rem 1.25rem; font-size: 0.88rem; }
.btn-discord:hover { background: #6a76ff; box-shadow: 0 14px 30px -14px rgba(88, 101, 242, 0.8); }

.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn-mini { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 13, 10, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  /* Safety net: never let the top bar bleed a horizontal scrollbar onto the
     page on very narrow viewports (the fixed mobile panel below 900px is
     positioned out of flow, so clipping the bar can't hide its content). */
  overflow-x: clip;
}
.site-header.scrolled {
  background: rgba(8, 13, 10, 0.82);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.brand-icon { width: 38px; height: 38px; border-radius: 9px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #fff;
}
.brand-region {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--emerald-soft);
  border: 1px solid var(--line-strong);
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  align-self: center;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  /* Guarantee the nav never crowds the brand + NZ·AU badge at any width. */
  padding-left: 1.25rem;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.2s var(--ease);
  /* Reset for the <button> variant used by the dropdown toggle. */
  font-family: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
/* Per-link underline: each .nav-link (including the Tools toggle) owns its own
   bar that scales in on hover / focus, and sits steady when .active. This
   replaces the old single sliding .nav-indicator — it works identically for an
   active page and an active section, and on every page (incl. sub-pages). */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--emerald-soft));
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  pointer-events: none;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link:focus-visible::after { opacity: 1; transform: scaleX(1); }
.nav-link.active { color: var(--emerald-soft); }
.nav-link.active::after { opacity: 1; transform: scaleX(1); }
.nav-link:focus-visible,
.nav-dropdown-item:focus-visible {
  outline: 2px solid var(--emerald-soft);
  outline-offset: 2px;
}

/* ---------- Tools dropdown / disclosure menu ---------- */
.nav-dropdown { position: relative; display: inline-flex; }
.nav-caret {
  transition: transform 0.2s var(--ease);
  color: var(--text-mute);
}
.nav-dropdown-toggle[aria-expanded="true"] { color: #fff; }
.nav-dropdown-toggle[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: rgba(8, 13, 10, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  /* visibility:hidden removes the closed menu items from the tab order and the
     accessibility tree (opacity/pointer-events alone leave them focusable). */
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  z-index: 10;
}
.nav-dropdown.open > .nav-dropdown-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}
.nav-dropdown-item {
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible { color: #fff; background: rgba(152, 255, 179, 0.08); }
/* Current page inside the Tools menu (e.g. Nicknames on /nicknames). */
.nav-dropdown-item[aria-current="page"] { color: var(--emerald-soft); }
/* External "Live Map" item: lay out the ↗ affordance to the right. */
.nav-dropdown-item-ext { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.nav-dropdown-item-ext .ext-arrow { color: var(--text-mute); }
.nav-dropdown-item-ext:hover .ext-arrow,
.nav-dropdown-item-ext:focus-visible .ext-arrow { color: inherit; }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* "Support us" — a quiet text link (not a filled button) so the purple
   Discord button stays the single bold CTA in the bar. */
.nav-support {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  transition: color 0.2s var(--ease);
}
.nav-support .ic { color: var(--emerald); transition: transform 0.2s var(--ease); }
.nav-support:hover { color: var(--text); }
.nav-support:hover .ic { transform: scale(1.14); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.06);
  will-change: transform;
}
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(420px 420px at var(--mx, 50%) var(--my, 35%), rgba(43, 229, 124, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  mix-blend-mode: screen;
}
.hero:hover .hero-spotlight { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 8, 0.55) 0%, rgba(7, 11, 8, 0.35) 35%, rgba(7, 11, 8, 0.82) 80%, var(--bg) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(7, 11, 8, 0.9), transparent 60%);
}

.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(7, 14, 9, 0.55);
  backdrop-filter: blur(6px);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(43, 229, 124, 0.25);
  animation: pulse 2.4s var(--ease) infinite;
}

.hero-wordmark { margin: 1.6rem 0 0; }
.hero-wordmark img {
  width: clamp(280px, 46vw, 560px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(14, 199, 92, 0.25));
}

.hero-blurb {
  margin: 1.5rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: #e6f3ea;
  max-width: 56ch;
}

/* Connect card */
.connect {
  margin: 2rem auto 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(160deg, rgba(18, 29, 22, 0.92), rgba(8, 14, 10, 0.92));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  max-width: 460px;
  text-align: left;
  backdrop-filter: blur(10px);
}
.connect-row { display: flex; align-items: center; gap: 0.75rem; }
.connect-ip { flex: 1; min-width: 0; }
.connect-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.connect-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.btn-copy {
  flex-shrink: 0;
  background: var(--emerald);
  color: #04130a;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}
.btn-copy:hover { transform: translateY(-1px); background: var(--emerald-bright); }
.btn-copy .ic-check { display: none; }
.btn-copy.copied { background: #0a3d22; color: var(--emerald-soft); }
.btn-copy.copied .ic-copy { display: none; }
.btn-copy.copied .ic-check { display: block; }

.connect-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-soft);
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-mute);
  flex-shrink: 0;
}
.connect-status[data-state="loading"] .status-dot { animation: pulse 1.2s infinite; }
.connect-status[data-state="online"] .status-dot {
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(43, 229, 124, 0.22);
  animation: pulse 2.4s infinite;
}
.connect-status[data-state="offline"] .status-dot { background: #e06363; }
.connect-status[data-state="online"] .status-text strong { color: var(--emerald-soft); }

.copy-toast {
  font-size: 0.8rem;
  color: var(--emerald-soft);
  height: 0;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.copy-toast.show { height: auto; opacity: 1; margin-top: 0.6rem; }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1.8rem; }

.hero-scroll {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
}
.hero-scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--emerald-soft);
  animation: scrollcue 1.8s var(--ease) infinite;
}

/* ---------- Stats ---------- */
.stats { padding: clamp(2.5rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--r-md);
  background: rgba(14, 22, 17, 0.5);
  border: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  padding-bottom: 0.15em;
  background: linear-gradient(135deg, #fff, var(--emerald-soft));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat-text { letter-spacing: -0.01em; }
.stat-label {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

/* ---------- Features (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.feature {
  position: relative;
  padding: 1.7rem;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 200px at var(--fx, 50%) 0%, rgba(14, 199, 92, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}
.feature:hover::after { opacity: 1; }

/* Inline commands inside body copy */
.feature p code,
.perk-list code,
.vote-card p code,
.section-sub code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--mint);
  background: rgba(7, 14, 9, 0.7);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

/* GEO-Lock - the identity card, given a brighter accent */
.feature-geo {
  background:
    radial-gradient(420px 200px at 50% 0%, rgba(14, 199, 92, 0.16), transparent 70%),
    linear-gradient(165deg, var(--surface-2), var(--surface));
  border-color: var(--line-strong);
}
.feature-geo .feature-ico { background: rgba(14, 199, 92, 0.18); }

.feature-ico {
  font-size: 1.6rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(14, 199, 92, 0.1);
  border: 1px solid var(--line-strong);
  margin-bottom: 1rem;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.feature p { color: var(--text-soft); font-size: 0.95rem; }
.feature strong { color: var(--emerald-soft); }

.cmd-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.cmd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--mint);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(7, 14, 9, 0.7);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.cmd:hover { border-color: var(--emerald); color: #fff; transform: translateY(-1px); }
.cmd.copied { border-color: var(--emerald); color: var(--emerald-bright); }

/* ---------- Vote ---------- */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.vote-card {
  position: relative;
  padding: 2rem 1.6rem;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.vote-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.vote-rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--line-strong);
  margin-bottom: 0.4rem;
}
.vote-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.vote-card p { color: var(--text-soft); font-size: 0.93rem; flex: 1; }
.vote-perk {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--emerald-soft);
  padding: 0.4rem 0;
  border-top: 1px dashed var(--line);
  margin-top: 0.4rem;
}
.vote-card .btn { margin-top: 0.6rem; }

/* ---------- Live Map ---------- */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.map-points { display: flex; flex-direction: column; gap: 0.55rem; margin: 1.4rem 0; }
.map-points li {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--text-soft); font-size: 0.95rem;
}
.map-points li::before {
  content: "";
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  background: rgba(14, 199, 92, 0.16);
  border: 1px solid var(--emerald);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2398FFB3'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}

.map-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 11;
}
.map-media {
  display: block;
  width: 100%; height: 100%;
  padding: 0; border: none;
  background: #0a120d;
  cursor: pointer;
  position: relative;
}
.map-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.3s var(--ease); }
.map-media:hover img { transform: scale(1.05); filter: brightness(0.7); }
.map-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  background: rgba(7, 11, 8, 0.35);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.map-media:hover .map-play { opacity: 1; }
.live-badge {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(7, 11, 8, 0.7);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 0 4px rgba(255, 90, 90, 0.25);
  animation: pulse 1.8s infinite;
}

/* ---------- Staff ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}
.staff-card {
  text-align: center;
  padding: 1.2rem 0.8rem;
  border-radius: var(--r-md);
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.staff-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.staff-card img {
  width: 64px; height: 64px;
  margin: 0 auto 0.8rem;
  border-radius: 12px;
  image-rendering: pixelated;
  background: #0a120d;
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease);
}
.staff-card:hover img { transform: scale(1.08) rotate(-2deg); }
.staff-card figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
  word-break: break-word;
}

/* s3rax easter egg */
.staff-egg .egg-real { transition: opacity .2s ease; }
.staff-egg .egg-alt  { display: none; color: var(--emerald); }
.staff-egg:hover .egg-real { text-decoration: line-through; opacity: 0.5; }
.staff-egg:hover .egg-alt  { display: inline; margin-left: 0.35em; }

/* ---------- Rules ---------- */
.rules-list {
  column-count: 2;
  column-gap: 1.4rem;
  counter-reset: rule;
}
/* Fill column 1 with rules 1-6, then start column 2 at rule 7. */
.rules-list li:nth-child(7) {
  break-before: column;
  -webkit-column-break-before: always;
}
.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 0.7rem;
  border-radius: var(--r-md);
  background: rgba(14, 22, 17, 0.45);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.95rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.rules-list li:hover { border-color: var(--line-strong); background: rgba(18, 29, 22, 0.7); }
.rule-n {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--emerald);
  flex-shrink: 0;
  padding-top: 0.05rem;
}
.rules-note {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-style: italic;
}

/* ---------- Seasons timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  counter-reset: season;
}
.tl-node {
  position: relative;
  padding: 1.6rem 1.4rem;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tl-node::before {
  content: "";
  position: absolute;
  top: 1.7rem; right: 1.4rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.tl-node:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.tl-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.9rem;
}
.tl-node h3 { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: 0.4rem; }
.tl-node p { color: var(--text-soft); font-size: 0.9rem; }
.tl-current {
  background:
    radial-gradient(380px 200px at 50% 0%, rgba(14, 199, 92, 0.2), transparent 70%),
    linear-gradient(165deg, var(--surface-2), var(--surface));
  border-color: var(--line-strong);
}
.tl-current::before {
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(43, 229, 124, 0.22);
  animation: pulse 2.4s infinite;
}
.tl-current .tl-tag { color: var(--emerald-soft); }

/* ---------- Supporter / Donate ---------- */
.supporter-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 3rem);
  border-radius: var(--r-xl);
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(14, 199, 92, 0.16), transparent 60%),
    linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
}
.supporter-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
}
.supporter-art {
  font-size: clamp(5rem, 13vw, 8rem);
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: rgba(7, 14, 9, 0.7);
  border: 1px solid var(--line-strong);
}
.price-amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
}
.price-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  text-align: left;
}
.price-meta strong { color: var(--emerald-soft); }
.supporter-btn { width: 100%; }

.supporter-perks h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.1rem;
}
.perk-list { display: grid; gap: 0.6rem; }
.perk-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0.95rem;
  border-radius: var(--r-md);
  background: rgba(14, 22, 17, 0.45);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.perk-list li:hover { border-color: var(--line-strong); background: rgba(18, 29, 22, 0.7); }
.perk-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--emerald-soft);
  letter-spacing: 0.01em;
}
.perk-list li strong { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; background: rgba(7, 11, 8, 0.6); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-tag { color: var(--text-mute); font-size: 0.92rem; margin: 1rem 0; max-width: 38ch; }
.footer-ip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--emerald-soft);
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.footer-ip:hover { background: rgba(14, 199, 92, 0.1); }
.footer-nav h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1rem;
}
.footer-nav a { display: block; color: var(--text-soft); font-size: 0.92rem; padding: 0.3rem 0; transition: color 0.2s var(--ease); }
.footer-nav a:hover { color: var(--emerald-soft); }
.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-mute);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.32s; }

/* ---------- Keyframes ---------- */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(43, 229, 124, 0); }
  50% { box-shadow: 0 0 0 5px rgba(43, 229, 124, 0.18); }
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .staff-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: 1fr; }
  .supporter-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Nav collapses to the hamburger at 900px (not 760px): the horizontal row of
   brand + NZ·AU badge + 5 links (incl. the long "Nicknames") + Donate + Discord
   exceeds an ~800px row, so a 768-820px viewport would otherwise crowd/clip the
   bar. Collapsing earlier guarantees a clean fallback across the 761-900 band. */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
    padding-left: 1.5rem;
    background: rgba(8, 13, 10, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    /* visibility:hidden takes the 5 section links + Tools toggle out of the tab
       order / a11y tree while the hamburger is closed (opacity/pointer-events
       alone leave them focusable as phantom off-canvas targets). Mirrors the
       inner .nav-dropdown-menu treatment below. */
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s var(--ease);
    max-height: calc(100svh - 72px);
    overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .nav-link { padding: 0.9rem 0.5rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  /* In the stacked mobile panel the per-link underline bar would float over the
     row borders, so suppress it; .active still recolours the text. */
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; }
  .btn-discord span:not(.ic) { display: none; }
  .btn-discord { padding: 0.7rem 0.85rem; }

  /* Dropdown becomes a flat, always-expanded group inside the panel. */
  .nav-dropdown { display: block; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: hidden;
    max-height: 0;
    /* Collapsed group: keep it out of the tab order / a11y tree until expanded,
       so a keyboard user doesn't tab into the hidden Features/Staff/Rules links. */
    visibility: hidden;
    transition: max-height 0.25s var(--ease), visibility 0.25s var(--ease);
  }
  .nav-dropdown.open > .nav-dropdown-menu { max-height: 320px; visibility: visible; }
  .nav-dropdown-item {
    padding: 0.8rem 0.5rem 0.8rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }

  /* Heart-only on mobile, mirroring the icon-only Discord button, so the
     "Support us" label can't wrap into the NZ-AU badge. */
  .nav-support span { display: none; }
  .nav-support { padding: 0.5rem; }
}

/* Very narrow phones (≤400px): the top bar must still fit the brand icon +
   NZ·AU badge + Donate + Discord-icon + hamburger inside ~272px of content
   width. Drop the "Minevane" wordmark (icon + badge still brand the page),
   tighten the row gap and shrink Donate so nothing overflows / clips. */
@media (max-width: 400px) {
  .brand-name { display: none; }
  .nav { gap: 0.75rem; }
  .nav-actions { gap: 0.5rem; }
}
/* Below 360px even the badge is squeezed — hide it as the last resort. */
@media (max-width: 360px) {
  .brand-region { display: none; }
}

/* Content-stacking breakpoint stays at 760px (unchanged) so the nav-collapse
   move to 900px doesn't prematurely single-column these sections. */
@media (max-width: 760px) {
  .rules-list { column-count: 1; }
  .rules-list li:nth-child(7) { break-before: auto; }
  .vote-grid { grid-template-columns: 1fr; }
  .perk-list li { grid-template-columns: 130px 1fr; }
}

@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .connect { max-width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .perk-list li { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-img { transform: none; }
}
