/*
  ONCHAINK - city page, top-down. Structure mirrors the street-as-a-page pattern.

  THE ART is pixel, THE INTERFACE is not: type stays clean so the street carries
  the page. Every colour below is sampled from assets/city.png (the purple ink
  street), none were chosen from outside it.

    --line    #2b1330  outline of every object in the city
    --enamel  #f5f3e9  the plate / sheet face
    --ink     #262033  ink text
    --inkdim  #6b6680  dim text
    --red     #d5635d  accent (shop awnings family)
    --reddeep #963441  kicker colour
    --yellow  #fde403  taxi yellow — the loudest colour on the street, used for
                       exactly ONE thing: the call to action
    --violet  #7132f5  the street's own purple
*/

:root {
  --ink: #262033;
  --ink-dim: #6b6680;
  --line: #2b1330;
  --line-deep: #1a0f26;
  --enamel: #f5f3e9;
  --stone: #ded5d1;
  --stone-shade: #a1909b;
  --red: #d5635d;
  --red-deep: #963441;
  --yellow: #fde403;
  --yellow-deep: #b99f02;
  --asphalt: #2b2650;
  --display: "Press Start 2P", ui-monospace, monospace;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--asphalt);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------- bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.right {
  display: flex; align-items: center; gap: 10px;
  margin-top: 15px; margin-left: auto;
}
.icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 3px solid var(--line);
  background: var(--enamel); color: var(--ink);
  font-size: 15px; cursor: pointer;
  box-shadow: 5px 5px 0 rgba(26, 15, 38, .32);
}
.icon:hover { background: var(--yellow); }

.cta {
  cursor: pointer;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--line);
  border-radius: 0;
  font-family: var(--pixel); font-weight: 700; letter-spacing: .06em;
  text-decoration: none; display: inline-block; text-align: center;
  box-shadow: 5px 5px 0 rgba(26, 15, 38, .32);
  transition: transform .08s ease, box-shadow .08s ease;
}
.cta:hover { background: #ffee4d; }
.cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(26, 15, 38, .32); }
.cta.small { font-size: 13px; padding: 10px 15px; }
.cta.big { font-size: 19px; padding: 17px 34px; }
.mintnow { display: block; margin: 22px 0 6px; text-align: center; }

/* ------------------------------------------------------------------ world */
.world { position: fixed; inset: 0; overflow: hidden; }
.stage { position: absolute; inset: 0; }

.city {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, 0);
  width: max(100vw, calc(100dvh * 1.85));
  aspect-ratio: 1888 / 1024;
}
.city img {
  display: block; width: 100%; height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ------------------------------------------------------------------ front */
.front {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  width: min(600px, 92vw);
  text-align: center;
}

.plate {
  position: relative;
  width: 100%;
  padding: 28px 32px 24px;
  background: var(--enamel);
  border: 4px solid var(--line);
  box-shadow: 9px 9px 0 rgba(26, 15, 38, .34);
}
.rivet {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
}
.rivet.tl { left: 10px; top: 10px; }
.rivet.tr { right: 10px; top: 10px; }
.rivet.bl { left: 10px; bottom: 10px; }
.rivet.br { right: 10px; bottom: 10px; }

.plate h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(15px, 2.6vw, 32px);
  letter-spacing: .02em; line-height: 1.15;
  color: var(--ink);
}
.plate .sub {
  margin: 16px 0 0;
  font-family: var(--pixel);
  font-size: clamp(10px, 1.3vw, 14px);
  letter-spacing: .02em; color: var(--ink-dim);
}

/* ------------------------------------------------------------------ sheet */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(26, 15, 38, .72); backdrop-filter: blur(3px);
}
.scrim[hidden] { display: none; }

.sheet {
  position: relative; width: min(440px, 100%);
  max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--enamel); border: 0; border-radius: 0;
  padding: 26px 24px 22px;
  box-shadow:
    0 0 0 4px var(--line),
    0 0 0 8px var(--enamel),
    0 0 0 12px var(--line),
    12px 12px 0 rgba(26, 15, 38, .45);
}

@keyframes doorPop {
  from { transform: translateY(10px) scale(.92); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes scrimIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.scrim:not([hidden]) { animation: scrimIn .12s steps(3) both; }
.scrim:not([hidden]) .sheet:not([hidden]) { animation: doorPop .16s steps(5) both; }

@media (prefers-reduced-motion: reduce) {
  .scrim:not([hidden]),
  .scrim:not([hidden]) .sheet:not([hidden]) { animation: none; }
}

.close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; cursor: pointer;
  color: var(--ink); font-size: 24px; line-height: 1; padding: 4px 8px;
}
.kicker {
  margin: 0; font-family: var(--pixel); font-size: 11px;
  letter-spacing: .17em; text-transform: uppercase; color: var(--red-deep);
}
.sheet h2 { margin: 8px 0 10px; font-family: var(--display); font-size: 15px; line-height: 1.4; }
.lead { margin: 0 0 18px; font-size: 13px; line-height: 1.55; color: var(--ink-dim); }
.lead strong { color: var(--ink); }

.spec { margin: 0 0 6px; display: grid; gap: 6px; }
.spec > div {
  display: flex; gap: 12px; align-items: baseline;
  padding: 7px 10px; background: var(--stone);
  border: 2px solid var(--line);
}
.spec dt {
  flex: 0 0 auto; min-width: 116px;
  font-family: var(--pixel); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red-deep);
}
.spec dd { margin: 0; flex: 1 1 auto; font-size: 13px; color: var(--ink); }

.fineprint { margin: 12px 0 0; font-size: 11px; line-height: 1.5; color: var(--ink-dim); text-align: center; }

/* ------------------------------------------------------------------ small */
@media (max-width: 760px) {
  .front { top: 50%; gap: 14px; }
  .city { width: max(250vw, calc(100dvh * 1.6)); transform: translate(-50%, 0); }
}
