/*
  ZUGHS interface.
  The same rules as the art: flat colours from a fixed ramp, hard edges, no
  gradients, no soft shadows, no rounded corners. Panels are drawn with a one
  pixel dark outline and a two pixel light bevel, the way an eight bit menu is.
  Nothing scales by a fraction: borders are 4px, the grid steps in 8px.
*/
:root {
  --bg:        #12131c;
  --bg-2:      #1b1d2a;
  --panel:     #232637;
  --panel-hi:  #343a52;
  --panel-lo:  #0d0e15;
  --ink:       #e8ecf4;
  --ink-dim:   #97a0bb;
  --accent:    #46b0c8;
  --accent-hi: #8ae4f0;
  --hot:       #c83a82;
  --hot-hi:    #f892c0;
  --ok:        #6ad8b4;
  --px: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
html { background: var(--panel-lo); }   /* the strip above the fold matches the bar */
body {
  font-family: "Press Start 2P", ui-monospace, monospace;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.9;
  image-rendering: pixelated;
  padding-bottom: 64px;
  /* a flat checker, drawn once, tiled: the same dither the art uses */
  background-image:
    linear-gradient(45deg, var(--bg-2) 25%, transparent 25%, transparent 75%, var(--bg-2) 75%),
    linear-gradient(45deg, var(--bg-2) 25%, transparent 25%, transparent 75%, var(--bg-2) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
img { image-rendering: pixelated; display: block; }

/* the faint horizontal lines of a CRT, one pixel on, three off */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 40;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.20) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

/* ── panels ─────────────────────────────────────────────────────────────── */
.panel {
  max-width: 1040px;
  margin: 24px auto;
  padding: 24px;
  background: var(--panel);
  border: var(--px) solid var(--panel-lo);
  box-shadow:
    inset 0 var(--px) 0 0 var(--panel-hi),
    inset var(--px) 0 0 0 var(--panel-hi),
    inset calc(var(--px) * -1) 0 0 0 var(--panel-lo),
    inset 0 calc(var(--px) * -1) 0 0 var(--panel-lo),
    0 var(--px) 0 0 rgba(0,0,0,.55);
}
h2 {
  font-size: 14px; margin: 0 0 20px; letter-spacing: 2px; color: var(--accent-hi);
  text-shadow: 0 var(--px) 0 var(--panel-lo);
}

/* ── header ─────────────────────────────────────────────────────────────── */
/* a real top bar: it starts at the very top of the page, so there is no bare
   strip of background above it, and it carries its own floor line */
.top {
  margin: 0; padding: 20px 24px 16px; text-align: center;
  background: var(--panel-lo);
  border-bottom: var(--px) solid var(--panel-hi);
  box-shadow: 0 var(--px) 0 0 rgba(0,0,0,.5);
}
.brand { display: block; }
.brand img { width: 100%; max-width: 704px; height: auto; margin: 0 auto; }
.menu { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ── buttons: a hard bevel, and they physically move down when pressed ──── */
.btn {
  display: inline-block;
  padding: 12px 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border: var(--px) solid var(--panel-lo);
  box-shadow: inset 0 var(--px) 0 0 var(--panel-hi), 0 var(--px) 0 0 var(--panel-lo);
  cursor: pointer;
  font: inherit;
}
.btn:hover { background: var(--panel-hi); color: var(--accent-hi); }
.btn:active { transform: translateY(var(--px)); box-shadow: inset 0 var(--px) 0 0 var(--panel-hi); }
.btn.big { width: 100%; padding: 16px; margin-top: 16px; background: var(--accent); color: #07131a; }
.btn.big:hover { background: var(--accent-hi); }
.btn.big:disabled { background: var(--panel-hi); color: var(--ink-dim); cursor: not-allowed; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.lead { margin: 0 0 16px; line-height: 2.1; }
.facts { margin: 0; padding-left: 18px; color: var(--ink-dim); }
.facts b { color: var(--accent-hi); }
.stat-grid { display: grid; grid-template-rows: repeat(4, 1fr); gap: 8px; }
.stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; background: var(--bg-2);
  border: var(--px) solid var(--panel-lo);
  box-shadow: inset 0 var(--px) 0 0 rgba(255,255,255,.06);
}
.stat .k { color: var(--ink-dim); }
.stat .v { color: var(--ok); }

/* ── mint ───────────────────────────────────────────────────────────────── */
.mint-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
.preview img { width: 100%; height: auto; border: var(--px) solid var(--panel-lo); }
.mint-box .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 2px dashed var(--panel-hi); }
.mint-box .row span { color: var(--ink-dim); }
.mint-box .total b { color: var(--ok); }
.field { display: block; margin-top: 16px; }
.field span { display: block; color: var(--ink-dim); margin-bottom: 8px; }
.field input {
  width: 100%; padding: 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: var(--px) solid var(--panel-lo);
  box-shadow: inset 0 var(--px) 0 0 rgba(0,0,0,.5);
}
.field input:focus { outline: none; border-color: var(--accent); }
.note { color: var(--ink-dim); line-height: 2.1; margin: 16px 0 0; }
.note.bad { color: var(--hot-hi); }

/* ── gallery ────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.card { background: var(--bg-2); border: var(--px) solid var(--panel-lo); padding: 8px; }
.card img { width: 100%; height: auto; }
.card .id { color: var(--ink-dim); padding-top: 8px; text-align: center; }

/* ── market ─────────────────────────────────────────────────────────────── */
.market table { width: 100%; border-collapse: collapse; }
.market th, .market td { text-align: left; padding: 12px 8px; border-bottom: 2px solid var(--panel-hi); }
.market th { color: var(--ink-dim); }

.how { margin: 0; padding-left: 20px; line-height: 2.2; }
.how b { color: var(--accent-hi); }

.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-between;
  padding: 14px 24px; color: var(--ink-dim);
  background: var(--panel-lo); border-top: var(--px) solid var(--panel-hi);
}

@media (max-width: 860px) {
  .hero, .mint-grid { grid-template-columns: 1fr; }
  .panel { margin: 16px 8px; padding: 16px; }
  body { font-size: 9px; }
}


/* skip link, keyboard focus and reduced motion: the things that separate a real
   site from a mock up */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 60; background: var(--accent); color: #07131a; padding: 10px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: var(--px) solid var(--accent-hi); outline-offset: 2px;
}
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--ink-dim); text-decoration: none; }
.foot-links a:hover { color: var(--accent-hi); }
@media (prefers-reduced-motion: reduce) {
  .scanlines { display: none; }
  * { animation: none !important; transition: none !important; }
}

.artist { display: grid; grid-template-columns: 256px 1fr; gap: 24px; align-items: start; }
.artist img { width: 100%; height: auto; border: var(--px) solid var(--panel-lo); }
@media (max-width: 860px) { .artist { grid-template-columns: 1fr; } }
