:root {
  --bg: #04060d;
  --fg: #e8f1ff;
  --muted: #9fb3cf;
  --soul: #5fb4ff;
  --soul-deep: #1f5cff;
  --blood: #8e1b22;
  --card-bg: #0a1020;
  --overlay: rgba(40, 95, 190, 0.66);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: transparent;
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- Backdrop (fixed behind everything) ---------- */

.backdrop,
.backdrop img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
.backdrop { z-index: -3; }
.backdrop img {
  object-fit: cover;
  object-position: 50% 50%;
}

/* Darkens the painting where text and cards sit, without hiding it. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(3, 6, 16, 0.55), rgba(3, 6, 16, 0) 75%),
    linear-gradient(rgba(3, 6, 16, 0.15) 0%, rgba(3, 6, 16, 0.35) 45%, rgba(3, 6, 16, 0.6) 100%);
}

.fire {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- Floating header art ---------- */

/* The art is 1983x793 (40% as tall as wide). It spans the full width, but
   on wide, short screens it's capped in height and trimmed from the bottom
   so it never takes over the page. */
:root { --topbar-h: min(40vw, 48vh); }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: var(--topbar-h);
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  /* Start below the skeleton's hand, which hangs ~70% of the art's height. */
  padding: calc(var(--topbar-h) * 0.72 + 12px) 16px 36px;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eaf4ff;
  text-shadow:
    0 0 14px rgba(95, 180, 255, 0.85),
    0 0 42px rgba(31, 92, 255, 0.6),
    0 2px 3px rgba(0, 0, 0, 0.9);
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.subtitle a { color: var(--fg); text-decoration-color: rgba(95, 180, 255, 0.7); }

.stats {
  display: inline-flex;
  justify-content: center;
  gap: 40px;
  margin: 28px 0 0;
  padding: 14px 28px;
  border: 1px solid rgba(95, 180, 255, 0.25);
  border-radius: 10px;
  background: rgba(4, 8, 20, 0.55);
  backdrop-filter: blur(4px);
}
.stats[hidden] { display: none; }
.stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.stats dd {
  margin: 4px 0 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(95, 180, 255, 0.55);
}

/* ---------- Grid of burned NFTs ---------- */

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 30vh; }

.status { text-align: center; color: var(--muted); text-shadow: 0 1px 3px #000; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: 48px;
}

.card {
  position: relative;
  aspect-ratio: 1;
  isolation: isolate;
  outline: none;
  cursor: pointer;
}

/* Layers, bottom to top: fire behind the card (licking up its sides), the
   card frame with the NFT, fire rising into the NFT, then the details. */
.fire-back,
.fire-front { filter: blur(1.5px) saturate(1.2); }

/* Ring of small flames around the card (16px of room on every side). */
.fire-back {
  position: absolute;
  z-index: 0;
  left: -16px;
  top: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  pointer-events: none;
}

.frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(140, 200, 255, 0.45);
  box-shadow: 0 0 22px 2px rgba(40, 110, 255, 0.35);
}

.fire-front {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card-img, .card-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-fallback { display: grid; place-items: center; color: var(--muted); }
.card-fallback[hidden] { display: none; }

/* See-through blue overlay, the colour of the flames: the NFT stays faintly
   visible behind the text. */
.overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--overlay);
  backdrop-filter: blur(1px);
  box-shadow: inset 0 0 40px rgba(95, 180, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  text-shadow: 0 1px 3px rgba(0, 10, 40, 0.9);
}

/* Shown on hover (real mouse only), keyboard focus, or after a tap/click.
   Clicking an open overlay dismisses it until the pointer leaves. */
.card:focus-visible .frame { border-color: rgba(190, 225, 255, 0.9); }
.card:focus-visible:not(.is-dismissed) .overlay,
.card.is-open .overlay { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .card:hover:not(.is-dismissed) .overlay { opacity: 1; pointer-events: auto; }
}

.collection {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.details { margin: 0; display: grid; gap: 10px; }
.details dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d9ecff;
}
.details dd { margin: 2px 0 0; font-size: 1rem; font-variant-numeric: tabular-nums; }

.os-link,
.es-link {
  font-size: 0.8rem;
  color: #bfe0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Links sit together at the bottom of the details box. */
.os-link { margin-top: auto; }
.es-link { margin-top: -8px; }

.site-footer {
  position: relative;
  padding: 24px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-shadow: 0 1px 3px #000;
}

/* Phones: the tall painting puts the skeleton in the top fifth, so start
   the content below it. */


@media (max-width: 480px) {
  .grid { grid-template-columns: minmax(0, 290px); gap: 48px; }
  .stats { gap: 24px; padding: 12px 20px; }
}
