/* Digits use Jersey 10 (clear 5 vs S); everything else is Pixelify Sans. */
@font-face { font-family: "Vamp Digits"; src: url("/assets/fonts/jersey10-latin.woff2") format("woff2");
  unicode-range: U+0030-0039; font-display: swap; size-adjust: 122%; ascent-override: 80%; descent-override: 20%; }

/* Palette pulled from the Vamps themselves: crypt charcoal, moss, oxblood, bone. */
:root {
  --night-1: #1c2420;
  --night-2: #121514;
  --night-3: #0a0b0b;
  --slab: #1d1a1c;
  --slab-hi: #2a2528;
  --line: #3d3538;
  --ink: #0b0809;
  --blood: #c81e32;
  --blood-hi: #ff4f4a;
  --blood-deep: #6b0d18;
  --ember: #ff7a3d;
  --moss: #4f7a4c;
  --moss-hi: #8fc27a;
  --moss-deep: #22361f;
  --gold: #f2c14e;
  --gold-deep: #9a6a12;
  --bone: #efe7d8;
  --mist: #b5ad9f;
  /* banded fills: hard colour stops read as pixel shading */
  --grad-blood: linear-gradient(180deg, var(--blood-hi) 0 18%, var(--blood) 18% 72%, #9b1426 72%);
  --grad-gold: linear-gradient(180deg, #fff0b0 0 16%, var(--gold) 16% 70%, #c8901f 70%);
  --grad-moss: linear-gradient(180deg, var(--moss-hi) 0 18%, var(--moss) 18% 72%, #36583a 72%);
  --grad-text: linear-gradient(180deg, #fff6e8 0 30%, #ffc48a 30% 52%, #ff5a40 52% 76%, #c8102e 76%);
  --notch: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  --dither: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 8px 8px;
  --font: "Vamp Digits", "Pixelify Sans", system-ui, sans-serif;
  --wrap: 1180px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night-3); }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 18px/1.55 var(--font);
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0;
  color: var(--bone);
  background:
    radial-gradient(900px 600px at 50% 115%, rgba(200, 30, 50, .2), transparent 65%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 45%, var(--night-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img.px, .px img { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }
:focus-visible { outline: 3px dashed var(--gold); outline-offset: 4px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Pixel frame: a 4px outline with notched corners plus a hard offset shadow.
   Components recolour it by setting --line. */
.panel, .vcard, .inv-card, .quest, .ptile, .trait, .wallet-opt, .toast, .msg, .seal, .tag,
.eligible, .stepper, .field input, .prefix-input, .drop, .cd-num, .bar, .close-x, .menu-btn,
.site-foot a, .face, .final-vamp {
  box-shadow: 0 -4px var(--line), 0 4px var(--line), -4px 0 var(--line), 4px 0 var(--line), 4px 8px 0 4px var(--drop, rgba(0, 0, 0, .45));
}

/* atmosphere */
#stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.fog { position: fixed; left: -10%; right: -10%; bottom: -40px; height: 220px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 30% 100%, rgba(160, 190, 150, .1), transparent 70%),
              radial-gradient(50% 90% at 75% 100%, rgba(200, 30, 50, .1), transparent 70%);
  animation: fog 18s ease-in-out infinite alternate; }
@keyframes fog { to { transform: translateX(6%); } }
.bat { position: fixed; z-index: 5; width: 40px; pointer-events: none; top: 0; left: 0; opacity: .9; }
.bat svg { width: 100%; display: block; animation: flap .22s steps(2) infinite; }
@keyframes flap { 50% { transform: scaleY(.55); } }

/* header */
.site-head { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: var(--ink); border-bottom: 4px solid var(--line); }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; background: var(--dither); opacity: .8; pointer-events: none; }
.site-head .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bone); margin-right: auto; }
.logo img.px { width: 40px; height: 40px; outline: 4px solid var(--gold); outline-offset: -2px; }
.logo-word { display: block; height: 30px; width: auto; }

/* Nav reads like a game menu: a ▸ cursor marks hover and the current page. */
.nav { display: flex; gap: 4px; }
.nav a { position: relative; color: var(--mist); text-decoration: none; padding: 8px 12px 8px 22px; transition: color .15s; }
.nav a::before { content: "▸"; position: absolute; left: 6px; color: var(--blood-hi); opacity: 0; transition: opacity .1s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bone); }
.nav a:hover::before { opacity: 1; animation: nudge .5s steps(2) infinite; }
.nav a[aria-current="page"]::before { opacity: 1; color: var(--gold); }
.nav a.mint-link { color: var(--ink); background: var(--gold); clip-path: var(--notch); margin-left: 4px; }
.nav a.mint-link::before { color: var(--blood-deep); opacity: 1; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { --drop: transparent; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: var(--slab); color: var(--bone); font: inherit; font-size: 22px; cursor: pointer; }
  .nav { position: fixed; top: calc(var(--header-h) + 4px); left: 0; right: 0; flex-direction: column; padding: 12px 16px 20px; gap: 2px;
    background: var(--ink); border-bottom: 4px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform .15s steps(3), opacity .15s; }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 12px 12px 28px; font-size: 20px; }
  .nav a::before { left: 8px; }
  .nav a.mint-link { margin: 6px 0 0; }
  .site-head .wrap { gap: 10px; }
  #walletBtn { font-size: 13px; padding: 10px 12px 13px; white-space: nowrap; }
}

/* buttons: notched slab with a pixel lip that sinks when pressed */
.btn, input, button, select, textarea { font-variant-ligatures: none; }
.btn { --face: var(--grad-blood); --lip: #4d0812;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 18px/1 var(--font); color: #fff; text-decoration: none; cursor: pointer;
  padding: 15px 24px 19px; border: 0; clip-path: var(--notch);
  background: var(--face);
  box-shadow: inset 0 -6px 0 var(--lip), inset 4px 0 0 rgba(255, 255, 255, .12), inset -4px 0 0 rgba(0, 0, 0, .15);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  transition: transform .06s, filter .15s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 var(--lip), inset 0 4px 0 rgba(0, 0, 0, .2); }
.btn:disabled, .btn[aria-disabled="true"] { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.gold { --face: var(--grad-gold); --lip: #6b4a0c; color: var(--ink); text-shadow: none; }
.btn.moss { --face: var(--grad-moss); --lip: var(--moss-deep); }
.btn.ghost { --face: var(--slab-hi); --lip: var(--ink); color: var(--bone); }
.btn.sm { font-size: 15px; padding: 11px 16px 14px; }
.btn.wide { width: 100%; }

/* panels */
.panel { position: relative; background: var(--slab); padding: clamp(20px, 4vw, 36px); }
.panel::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--blood) 0 12px, transparent 12px 20px); pointer-events: none; }

h1, h2, h3 { font-family: var(--font); line-height: 1.1; margin: 0 0 .5em; }
.title { font-weight: 700; font-size: clamp(34px, 6vw, 60px); letter-spacing: .5px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 var(--blood-deep)) drop-shadow(0 4px 0 #2c0612); }
.title.md { font-size: clamp(26px, 4.5vw, 36px); margin-bottom: 6px; }
.title.sm { font-size: 30px; }
.lead { color: var(--mist); font-size: clamp(18px, 2.2vw, 21px); max-width: 60ch; }
.page { padding: clamp(36px, 7vw, 80px) 0 120px; }
.page-head { text-align: center; margin-bottom: 36px; }
.page-head .lead, .lead.center { margin-inline: auto; }

/* form fields */
.field { display: grid; gap: 10px; margin-bottom: 18px; }
.gap-top { margin-top: 14px; }
.field label { color: var(--mist); font-size: 16px; }
.field input { --drop: transparent; font: inherit; font-size: 18px; color: var(--bone); padding: 12px 14px; margin: 4px; border: 0;
  background: var(--ink); transition: box-shadow .15s; }
.field input:focus { outline: none; --line: var(--gold); }
.field input[readonly] { color: var(--gold); }
.hint { color: var(--mist); font-size: 15px; }
.msg { --drop: transparent; padding: 14px 16px; margin: 20px 4px 4px; background: var(--slab-hi); }
.msg.ok { --line: var(--moss); background: #1e2a1d; }
.msg.err { --line: var(--blood); background: #2a1215; }
.msg.info { --line: var(--gold-deep); background: #2a2214; }

/* vamp cards (3D tilt) */
.tilt { --rx: 0deg; --ry: 0deg; transform-style: preserve-3d; transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .15s ease-out; }
.vcard { --line: var(--ink); position: relative; padding: 6px; background: var(--grad-gold); }
.vcard img { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #000; }
.vcard .shine { position: absolute; inset: 6px; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 55%); opacity: 0; transition: opacity .2s; }
.vcard:hover .shine { opacity: 1; }
.vcard figcaption { padding: 8px 4px 2px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.vcard figcaption small { display: block; font-weight: 400; opacity: .75; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(5, 4, 4, .82); animation: fadein .15s steps(3); }
.modal-box { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.modal-box h3 { font-size: 26px; }
@keyframes fadein { from { opacity: 0; } }
.wallet-list { display: grid; gap: 14px; margin: 18px 4px; }
.wallet-opt { --drop: transparent; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; cursor: pointer;
  font: 500 18px var(--font); color: var(--bone); text-align: left; background: var(--slab-hi); transition: transform .1s; }
.wallet-opt:hover { --line: var(--gold); transform: translateX(4px); }
.wallet-opt img, .wallet-opt .ico { width: 34px; height: 34px; display: grid; place-items: center; background: var(--moss); }
.close-x { --drop: transparent; position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; background: var(--slab-hi); color: var(--bone); font: inherit; font-size: 20px; cursor: pointer; }
.close-x:hover { --line: var(--blood); }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 14px; width: min(380px, calc(100% - 40px)); }
.toast { padding: 14px 16px; background: var(--slab-hi); animation: toastin .2s steps(4); }
.toast.err { --line: var(--blood); }
.toast.ok { --line: var(--moss); }
@keyframes toastin { from { transform: translateY(16px); opacity: 0; } }

/* footer */
.site-foot { position: relative; border-top: 4px solid var(--line); padding: 38px 0 44px; color: var(--mist); background: var(--ink); }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 8px; margin-bottom: 4px; background: var(--dither); opacity: .8; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.site-foot a { --drop: transparent; color: var(--bone); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 4px; background: var(--slab); }
.site-foot a:hover { --line: var(--gold); }

@media (max-width: 420px) { .logo-word { height: 22px; } .logo img.px { width: 34px; height: 34px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bat { display: none; }
}
