/* ─── Zero Signal ───────────────────────────────────────────────────────────
   Dark / concrete / gold theme. Inspired by the in-game splash.
   ---------------------------------------------------------------------------*/
:root {
  --bg:        #0c0d0d;
  --bg-2:      #131414;
  --panel:     #17191a;
  --panel-2:   #1d1f20;
  --line:      #2a2c2d;
  --concrete:  #e9e6df;
  --muted:     #9a978d;
  --muted-2:   #6f6d66;
  --gold:      #c9a14a;
  --gold-dim:  #9c7c38;
  --gold-soft: rgba(201, 161, 74, 0.12);
  --green:     #5fae57;
  --red:       #c2453f;
  --maxw:      1120px;
  --ease:      cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--concrete);
  font-family: "Barlow", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: "Oswald", "Barlow Condensed", Impact, sans-serif;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.05;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.eyebrow {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .72rem;
  color: var(--gold);
  margin: 0 0 .9rem;
}

.gold { color: var(--gold); }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .9rem;
  padding: .8rem 1.5rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--concrete);
  cursor: pointer;
  transition: .2s var(--ease);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn:hover { border-color: var(--gold); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #1a1407; border-color: var(--gold); font-weight: 600; }
.btn--gold:hover { background: #d8b25e; box-shadow: 0 0 26px rgba(201,161,74,.35); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ── nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(12,13,13,0);
  border-bottom: 1px solid transparent;
  transition: .3s var(--ease);
}
.nav.scrolled {
  background: rgba(12,13,13,.82);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; align-items: center; gap: .6rem; font-family: "Oswald", sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: 1rem; }
.nav__brand img { width: 30px; height: 30px; }
.nav__brand b { font-weight: 600; }
.nav__brand .gold { font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 1.9rem; }
.nav__links a {
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .12em; font-size: .82rem; color: var(--muted);
  transition: color .2s;
}
.nav__links a:hover { color: var(--concrete); }
.nav__toggle { display: none; background: none; border: 0; color: var(--concrete); cursor: pointer; }

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 7rem 1rem 4rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(201,161,74,.10), transparent 55%),
    radial-gradient(120% 120% at 50% 120%, rgba(0,0,0,.85), transparent 60%),
    linear-gradient(180deg, #15171a 0%, #0d0e0f 45%, #090a0a 100%);
}
.hero__bg::after { /* drifting fog */
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 30% at 20% 30%, rgba(120,130,140,.10), transparent 70%),
    radial-gradient(45% 35% at 80% 25%, rgba(120,130,140,.08), transparent 70%),
    radial-gradient(50% 40% at 60% 70%, rgba(90,100,110,.07), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
.hero__grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__scanline {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0,0,0,.18) 3px 4px);
  mix-blend-mode: overlay;
}
@keyframes drift { to { transform: translate3d(2%, -2%, 0) scale(1.06); } }

.hero__inner { position: relative; z-index: 2; max-width: 880px; }
.hero__tower { width: clamp(74px, 12vw, 120px); margin: 0 auto .4rem; display: block; filter: drop-shadow(0 0 24px rgba(201,161,74,.28)); }
.hero__rule { width: 230px; max-width: 60%; height: 1px; margin: 1rem auto 1.4rem; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); }

.wordmark {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  line-height: .9; letter-spacing: .02em;
  display: flex; justify-content: center; align-items: baseline; gap: .04em;
}
.wordmark .z { color: var(--concrete); text-shadow: 0 2px 0 #00000040; }
.wordmark .zero {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,161,74,.45);
  font-family: "Oswald", sans-serif;
}
.wordmark__sub {
  font-family: "Oswald", sans-serif; font-weight: 500;
  color: var(--gold);
  letter-spacing: .58em;
  font-size: clamp(1rem, 3.4vw, 2.1rem);
  margin: .35rem 0 0 .58em;
  text-indent: .58em;
}
.hero__tagline {
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .34em; color: var(--muted);
  font-size: clamp(.8rem, 2vw, 1.05rem);
  margin: 1.4rem 0 0;
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.3rem; }
.hero__scroll {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--muted-2); font-size: 1.4rem; animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ── section frame ───────────────────────────────────────────────────────── */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.section__head { text-align: center; margin-bottom: 3rem; }
.section__head h2 { font-size: clamp(2rem, 5vw, 3.1rem); text-transform: uppercase; }
.section__head p { color: var(--muted); max-width: 560px; margin: .8rem auto 0; }

/* ── status ──────────────────────────────────────────────────────────────── */
.status {
  max-width: 760px; margin-inline: auto;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  padding: 1.8rem clamp(1.2rem, 4vw, 2.4rem);
}
.status__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.status__name { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: 1.35rem; }
.status__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 2px;
  color: var(--muted);
}
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 0 currentColor; }
.status__badge.is-online { color: var(--green); border-color: rgba(95,174,87,.4); }
.status__badge.is-online .status__dot { background: var(--green); animation: pulse 1.8s infinite; }
.status__badge.is-offline { color: var(--red); border-color: rgba(194,69,63,.4); }
.status__badge.is-offline .status__dot { background: var(--red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95,174,87,.5);} 70%{ box-shadow:0 0 0 8px rgba(95,174,87,0);} 100%{box-shadow:0 0 0 0 rgba(95,174,87,0);} }

.status__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; margin-top: 1.6rem; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--panel); padding: 1.1rem 1rem; text-align: center; }
.stat__num { font-family: "Oswald", sans-serif; font-size: 2rem; color: var(--gold); line-height: 1; }
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin-top: .4rem; }
.status__connect { margin-top: 1.4rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.status__connect[hidden] { display: none; }
.status__connect code {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .95rem;
  background: #0a0b0b; border: 1px solid var(--line); padding: .55rem .9rem; color: var(--concrete);
  letter-spacing: .02em;
}
.copy-btn { background: none; border: 1px solid var(--line); color: var(--muted); padding: .5rem .7rem; cursor: pointer; transition: .2s; }
.copy-btn:hover { color: var(--gold); border-color: var(--gold); }

/* ── feature cards ───────────────────────────────────────────────────────── */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  padding: 1.6rem; position: relative; transition: .25s var(--ease);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.card:hover { border-color: var(--gold-dim); transform: translateY(-4px); }
.card__icon { color: var(--gold); font-size: 1.7rem; margin-bottom: .8rem; display: block; }
.card h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ── rules ───────────────────────────────────────────────────────────────── */
.rules { max-width: 820px; margin-inline: auto; display: grid; gap: .9rem; }
.rule {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  padding: 1.1rem 1.3rem;
}
.rule__num { font-family: "Oswald", sans-serif; font-size: 1.5rem; color: var(--gold-dim); line-height: 1; min-width: 2.2rem; }
.rule__body h4 { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; margin: 0 0 .25rem; }
.rule__body p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ── donate ──────────────────────────────────────────────────────────────── */
.donate-wrap { max-width: 720px; margin-inline: auto; text-align: center; }
.donate-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.tier {
  background: var(--panel); border: 1px solid var(--line); padding: 1.8rem 1.2rem; position: relative;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.tier--feature { border-color: var(--gold); }
.tier__tag { position: absolute; top: -1px; right: -1px; background: var(--gold); color: #1a1407; font-family: "Oswald",sans-serif; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; padding: .25rem .6rem; }
.tier__name { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-size: 1.15rem; }
.tier__price { font-family: "Oswald", sans-serif; font-size: 2.4rem; margin: .3rem 0 .2rem; }
.tier__price span { font-size: .9rem; color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 1rem 0 0; text-align: left; }
.tier li { color: var(--muted); font-size: .9rem; padding: .35rem 0 .35rem 1.4rem; position: relative; }
.tier li::before { content: "›"; position: absolute; left: 0; color: var(--gold); }
.donate-note { margin-top: 1.6rem; color: var(--muted-2); font-size: .9rem; }

/* ── discord banner ──────────────────────────────────────────────────────── */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
.cta-band p { color: var(--muted); max-width: 520px; margin: .8rem auto 2rem; }

/* ── footer ──────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: #090a0a; }
.footer__pills {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-bottom: 1px solid var(--line);
}
.pill {
  display: flex; align-items: center; gap: .8rem; justify-content: center;
  padding: 1.4rem 1rem; border-right: 1px solid var(--line);
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .14em;
  font-size: .8rem; color: var(--muted); transition: .2s;
}
.pill:last-child { border-right: 0; }
.pill:hover { color: var(--gold); background: var(--gold-soft); }
.pill svg, .pill i { color: var(--gold); font-size: 1.2rem; width: 1.2em; }
.footer__base { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.6rem 0; }
.footer__base small { color: var(--muted-2); }

.reveal { opacity: 0; transform: translateY(22px); transition: .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── wiki: shared ────────────────────────────────────────────────────────── */
.page-head {
  padding: 8rem 1rem 2.5rem; text-align: center; position: relative;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(201,161,74,.10), transparent 55%),
    linear-gradient(180deg, #15171a, var(--bg) 80%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); text-transform: uppercase; }
.page-head p { color: var(--muted); max-width: 620px; margin: 1rem auto 0; }
.page-head .eyebrow { margin-bottom: .6rem; }
.gen-stamp { color: var(--muted-2); font-size: .78rem; margin-top: 1.2rem; font-family: "JetBrains Mono", monospace; }

/* rarity legend + chips */
.rarity-legend { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.rar-key { display: inline-flex; align-items: center; gap: .5rem; font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--muted); }
.rar-dot { width: 11px; height: 11px; border-radius: 2px; }
.rar-low    { background: var(--red); }
.rar-medium { background: var(--gold); }
.rar-high   { background: var(--green); }

.rar-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .08em;
  font-size: .68rem; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 2px; color: var(--muted);
}
.rar-tag .rar-dot { width: 8px; height: 8px; }

/* filter bar */
.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; justify-content: center; margin-bottom: 2rem; }
.filters input[type="search"], .filters select {
  font-family: "Barlow", sans-serif; font-size: .9rem;
  background: var(--panel); color: var(--concrete);
  border: 1px solid var(--line); padding: .6rem .8rem;
}
.filters input[type="search"] { min-width: 230px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); }
.filters .count { color: var(--muted-2); font-size: .82rem; font-family: "JetBrains Mono", monospace; margin-left: auto; }

/* category overview cards */
.cat-card h3 { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cat-card .badge { font-family: "JetBrains Mono", monospace; font-size: .8rem; color: var(--gold); }
.cat-card .locs { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.loc-pill { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: .15rem .5rem; }

/* ── wiki: player item grid ──────────────────────────────────────────────── */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.item-cell {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
  padding: .7rem .9rem; display: flex; flex-direction: column; gap: .4rem; transition: .18s var(--ease);
}
.item-cell:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.item-cell.rl-low    { border-left-color: var(--red); }
.item-cell.rl-medium { border-left-color: var(--gold); }
.item-cell.rl-high   { border-left-color: var(--green); }
.item-cell__name { font-family: "Oswald", sans-serif; letter-spacing: .03em; font-size: .98rem; }
.item-cell__meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.src-tag { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-dim); }
.empty-note { text-align: center; color: var(--muted-2); padding: 3rem 1rem; }

/* ── wiki: admin table ───────────────────────────────────────────────────── */
.admin-banner {
  max-width: 980px; margin: 0 auto 2rem; text-align: center;
  border: 1px solid var(--gold-dim); background: var(--gold-soft);
  color: var(--concrete); padding: .8rem 1rem; font-size: .9rem;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2.4rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.lt { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.lt th, table.lt td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.lt thead th {
  position: sticky; top: 0; background: var(--panel-2); z-index: 1;
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em; font-size: .74rem;
  color: var(--muted); cursor: pointer; user-select: none;
}
table.lt thead th:hover { color: var(--gold); }
table.lt thead th.sorted::after { content: " ▾"; color: var(--gold); }
table.lt thead th.sorted.asc::after { content: " ▴"; }
table.lt tbody tr:hover { background: var(--panel); }
table.lt td.name { font-family: "JetBrains Mono", monospace; font-size: .82rem; color: var(--concrete); }
table.lt td.num { text-align: right; font-family: "JetBrains Mono", monospace; }
table.lt td.num.hot { color: var(--gold); }
table.lt .muted { color: var(--muted-2); }

@media (max-width: 760px) {
  .filters .count { margin-left: 0; width: 100%; text-align: center; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__links.open { display: flex; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; gap: 0; background: rgba(12,13,13,.97); border-bottom: 1px solid var(--line); padding: .6rem 0; }
  .nav__links.open a { padding: .8rem 1.4rem; }
  .nav__toggle { display: inline-flex; }
  .pill { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
