/* ─────────────────────────────────────────────────────────────────────────────
   nETHER-451 — the darkside of the chain.
   Voxel-nether: ash black, acid green, ember orange. Hard edges, no softness.
   ───────────────────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=VT323&family=Chakra+Petch:wght@400;600;700&display=swap");

:root {
  --void: #05070a;
  --ash: #0b0f0c;
  --pit: #121a13;
  --line: rgba(168, 255, 0, 0.16);
  --acid: #a8ff00;
  --leaf: #7bbd12;
  --flare: #d4ff5c;
  --ember: #ff5a1f;
  --bone: #f6ffd6;
  --dim: #6d7a63;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(168, 255, 0, 0.3); color: #fff; }

a { color: var(--acid); text-decoration: none; }
a:hover { color: var(--flare); }

/* ── atmosphere ──────────────────────────────────────────────────────────── */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(168, 255, 0, 0.10) 0%, transparent 62%),
    linear-gradient(180deg, #070a07 0%, var(--void) 60%);
}
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 255, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 255, 0, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(100% 60% at 50% 0%, #000 15%, transparent 75%);
}

/* falling embers */
.ember {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  z-index: -1;
  animation: fall linear infinite;
  opacity: 0.7;
}
@keyframes fall {
  0% { transform: translateY(-10vh); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% { transform: translateY(110vh); opacity: 0; }
}

/* ── shell ───────────────────────────────────────────────────────────────── */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(12px);
}
.nav {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img {
  width: 36px; height: 36px;
  border-radius: 4px;
  border: 1px solid var(--line);
  image-rendering: pixelated;
}
.brand b {
  font-family: VT323, monospace;
  font-size: 25px;
  letter-spacing: 1.5px;
  color: var(--bone);
}
.brand b span { color: var(--acid); }
.nav a.lnk { font-size: 14px; color: var(--dim); letter-spacing: .4px; }
.nav a.lnk:hover { color: var(--acid); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--acid);
  background: rgba(168, 255, 0, 0.08);
  color: var(--acid);
  font: 600 13.5px "Chakra Petch", sans-serif;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .12s;
}
.btn:hover { background: rgba(168, 255, 0, 0.18); box-shadow: 0 0 22px rgba(168, 255, 0, 0.28); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.solid { background: var(--acid); color: #061006; }
.btn.solid:hover { background: var(--flare); }
.btn.ghost { border-color: var(--line); color: var(--dim); background: transparent; }
.btn.ghost:hover { color: var(--acid); border-color: var(--acid); }

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: 72px 0 56px; }
/* The portal art sits behind the hero, strongest on the right where the copy ends,
   so the words stay readable and the nether still shows through. */
.hero .banner {
  position: absolute;
  inset: -68px 0 auto 0;
  height: 640px;
  background: url("img/banner.jpeg") center right / cover no-repeat;
  opacity: .62;
  /* One mask only. Stacking two and compositing them silently drops the layer in
     some engines, which is how this ended up invisible the first time. */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 97%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 97%);
  z-index: 0;
}
/* Ink poured from the left so the copy stays readable over the portal. */
.hero::after {
  content: "";
  position: absolute;
  inset: -68px 0 auto 0;
  height: 640px;
  background: linear-gradient(90deg, var(--void) 4%, rgba(5, 7, 10, .92) 30%, rgba(5, 7, 10, .35) 62%, transparent 85%);
  z-index: 1;
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 2; }

.tag {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  color: var(--acid);
  font-family: VT323, monospace;
  font-size: 15px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
h1 {
  font-family: VT323, monospace;
  font-size: clamp(52px, 9vw, 108px);
  line-height: .92;
  margin: 0 0 6px;
  letter-spacing: 1px;
  text-shadow: 0 0 34px rgba(168, 255, 0, 0.35);
}
h1 span { color: var(--acid); }
.sub {
  font-family: VT323, monospace;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--acid);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.lede { max-width: 620px; font-size: 16.5px; line-height: 1.72; color: #c9d6bd; }
.lede em { color: var(--bone); font-style: normal; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* ── stats ───────────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  margin: 46px 0;
  background: rgba(11, 15, 12, 0.6);
}
.stat { padding: 20px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k {
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
}
.stat .v {
  font-family: VT323, monospace;
  font-size: 34px;
  color: var(--acid);
  line-height: 1.1;
  margin-top: 4px;
}
.stat .v.small { font-size: 20px; word-break: break-all; }

/* ── sections ────────────────────────────────────────────────────────────── */

section { padding: 62px 0; border-top: 1px solid var(--line); }
h2 {
  font-family: VT323, monospace;
  font-size: clamp(30px, 4.4vw, 46px);
  margin: 0 0 8px;
  letter-spacing: 1px;
}
h2 span { color: var(--acid); }
.kicker {
  font-family: VT323, monospace;
  color: var(--acid);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 15px;
  margin-bottom: 10px;
}
p { line-height: 1.75; color: #c2cfb7; font-size: 15.5px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 26, 19, 0.75), rgba(7, 10, 8, 0.75));
  padding: 24px;
}
.card h3 {
  font-family: VT323, monospace;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--bone);
  letter-spacing: .5px;
}
.card p { margin: 0; font-size: 14.5px; }

/* ── the forge (live objects) ────────────────────────────────────────────── */

.forge { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.viewer {
  border: 1px solid var(--line);
  background: #05070a;
  padding: 18px;
  position: relative;
}
.viewer .art {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #05070a;
  overflow: hidden;
}
.viewer .art svg, .viewer .art img { width: 100%; height: 100%; display: block; }
.viewer .empty {
  color: var(--dim);
  font-family: VT323, monospace;
  font-size: 20px;
  letter-spacing: 2px;
  text-align: center;
  padding: 40px;
}
.viewer .bar {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.viewer .id { font-family: VT323, monospace; font-size: 22px; color: var(--acid); }
.traits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.trait { border: 1px solid var(--line); padding: 9px 12px; }
.trait .k { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); }
.trait .v { font-family: VT323, monospace; font-size: 20px; color: var(--bone); }
.trait .v.hot { color: var(--ember); }
.trait .v.frozen { color: var(--flare); }

.charbar { height: 6px; background: var(--pit); border: 1px solid var(--line); margin-top: 4px; }
.charbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--acid), var(--ember)); }

/* ── docs table ──────────────────────────────────────────────────────────── */

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
table.t th { background: rgba(168, 255, 0, 0.05); color: var(--acid); font-weight: 600; letter-spacing: .5px; }
table.t td.mono, .mono { font-family: VT323, monospace; font-size: 17px; letter-spacing: .5px; }

.note {
  border-left: 2px solid var(--ember);
  background: rgba(255, 90, 31, 0.05);
  padding: 12px 16px;
  color: #d8c7b4;
  font-size: 14px;
  line-height: 1.65;
}

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 46px;
  color: var(--dim);
  font-size: 13px;
}
footer .row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .cols, .forge { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .nav a.lnk { display: none; }
}

/* ── the collection ──────────────────────────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.obj {
  border: 1px solid var(--line);
  background: #05070a;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.obj:hover {
  border-color: var(--acid);
  box-shadow: 0 0 26px rgba(168, 255, 0, 0.22);
  transform: translateY(-2px);
}
.obj svg { width: 100%; height: auto; display: block; }
.obj .meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-family: VT323, monospace;
}
.obj .meta .n { color: var(--acid); font-size: 17px; }
.obj .meta .f { color: var(--bone); font-size: 15px; }
.obj .meta .c { margin-left: auto; color: var(--dim); font-size: 14px; }
.obj.frozen .meta .c { color: var(--flare); }

/* ── page-by-page ────────────────────────────────────────────────────────────
   No long scroll and no dropdown: one screen at a time, tabs always visible.
   Each page owns the viewport under the header and scrolls inside itself only
   when its own content genuinely overflows. */

body { height: 100%; }

main {
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
  position: relative;
}

.page {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 34px 0 46px;
  border-top: 0;
}
.page.active {
  display: block;
  animation: pagein .28s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes pagein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* the hero page keeps its own generous spacing */
#page-home { padding-top: 0; }
.hero.page { padding: 0; }
#page-home > .wrap { padding-top: 54px; }

/* tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--dim);
  font: 600 13px "Chakra Petch", sans-serif;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color .14s, border-color .14s, background .14s;
}
.tab:hover { color: var(--acid); }
.tab.active {
  color: var(--acid);
  border-bottom-color: var(--acid);
  background: rgba(168, 255, 0, 0.06);
}

/* the banner belongs to the home page only */
.hero .banner, .hero::after { height: 100%; inset: 0; }

/* pages no longer need their own rule */
section.page { padding-top: 34px; }

@media (max-width: 900px) {
  /* the grid was forcing a minimum column width the phone could not honour, which
     pushed the whole page wider than the viewport — pin the column count instead */
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wrap { padding: 0 16px; }
  .nav { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 8px; }
  .tabs { order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: 6px; }
  .tab { padding: 8px 11px; font-size: 12px; }
  main { height: calc(100vh - 122px); height: calc(100dvh - 122px); }
  .brand b { font-size: 21px; }
  .stats { grid-template-columns: 1fr 1fr; margin: 30px 0 0; }
  h1 { font-size: clamp(40px, 13vw, 62px); }
  #page-home > .wrap { padding-top: 26px; }
  .btn { padding: 9px 14px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  .nav .right { gap: 8px; }
  .nav .right .btn { padding: 8px 11px; font-size: 12px; }
  .brand img { width: 30px; height: 30px; }
  .brand b { font-size: 19px; }
  .lede { font-size: 15px; }
  .viewer { padding: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px 15px; }
  .stat .v { font-size: 27px; }
  .stat .v.small { font-size: 15px; }
  h2 { font-size: clamp(26px, 8vw, 34px); }
  .traits { grid-template-columns: 1fr 1fr; }
  table.t { font-size: 12.5px; }
  table.t th, table.t td { padding: 7px 8px; }
}

/* nothing may ever push the page wider than the screen */
html, body { max-width: 100%; overflow-x: hidden; }
main, .page, .wrap { max-width: 100vw; }
table.t { display: block; overflow-x: auto; }
