/* NFT Demon Holdings — visual system (Grok design port, static edition)
   Deep-navy ground, ember→gold gradient accents, 3D hero stage, relics, tilt cards.
   Content/navigation/metadata live in the HTML; this file is presentation only. */

:root {
  --bg: #0a1833;
  --surface: #102244;
  --raised: #17305a;
  --fg: #e8eef8;
  --muted: #a9bdd9;
  --ember: #ff3b30;
  --gold: #ff8a00;
  --blue: #4d8dff;
  --line: #2c4d86;
  --radius: 14px;
  --grad: linear-gradient(100deg, #ff3b30, #ff8a00);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 80% -10%, rgba(40, 90, 180, .28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 8% 100%, rgba(255, 59, 48, .08), transparent 55%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: #fff; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--raised); color: var(--fg); padding: 10px 18px; z-index: 60;
}
.skip-link:focus { left: 8px; top: 8px; }

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

header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 24, 51, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(44, 77, 134, .8);
}

.scroll-progress {
  height: 2px; background: var(--grad);
  transform: scaleX(0); transform-origin: left;
}

header.site nav {
  max-width: 1152px; margin-inline: auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 800; letter-spacing: .14em;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.brand img { height: 36px; width: auto; border-radius: 8px; }
.brand span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand:hover { text-decoration: none; }

header.site nav ul {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
header.site nav ul a {
  display: block; padding: 10px 10px;
  font-size: .88rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
  border-radius: 8px;
  transition: color 160ms ease, background 160ms ease;
}
header.site nav ul a:hover { color: var(--fg); background: rgba(77, 141, 255, .08); }
header.site nav ul a.active { color: var(--fg); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--fg); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero & page heads ---------- */

main { display: block; }

section { position: relative; padding: 72px 0; }
section.alt { background: rgba(16, 34, 68, .72); }

.hero {
  overflow: hidden;
  padding: 40px 0 32px;
  background:
    radial-gradient(ellipse 50% 80% at 80% 40%, rgba(77, 141, 255, .22), transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 0%, rgba(255, 59, 48, .2), transparent 70%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, .14) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 70% 45%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 70% 45%, black, transparent 72%);
  animation: grid-drift 22s linear infinite;
}
@keyframes grid-drift { to { background-position: 56px 56px; } }

.hero .wrap { position: relative; z-index: 1; max-width: 1180px; }
body.fx .hero .wrap.staged {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  align-items: center; gap: 28px;
}

.hero-logo {
  width: 92px; border-radius: 16px; margin: 0 0 18px; display: block;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  animation: logo-in 700ms ease both;
}
@keyframes logo-in {
  from { opacity: 0; transform: rotateY(-18deg) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold); margin: 0 0 6px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.9rem);
  line-height: 1.06; margin: 12px 0 18px; font-weight: 800;
}
h1 em, .stat b {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { max-width: 720px; margin: 0 auto 30px; font-size: 1.13rem; color: var(--muted); }
.hero .lede { margin: 0 0 26px; max-width: 38rem; }
.sub { color: var(--muted); max-width: 760px; }

.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .cta-row { justify-content: flex-start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 13px 30px;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn.primary {
  background: var(--grad); background-size: 160% 100%;
  color: #fff; animation: btn-sheen 3.2s ease infinite;
  box-shadow: 0 10px 30px rgba(255, 90, 0, .22);
}
.btn.primary:hover { box-shadow: 0 14px 36px rgba(255, 90, 0, .34); }
@keyframes btn-sheen { 50% { background-position: 100% 0; } }
.btn.ghost { border-color: var(--line); background: var(--raised); color: var(--fg); }
.btn.ghost:hover { border-color: var(--gold); }

/* 3D stage (canvas injected by effects.js; CSS poster shows before/without WebGL) */
.hero-stage {
  position: relative;
  height: min(62vh, 520px); min-height: 380px;
  border-radius: 24px; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--line) 80%, var(--gold));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 0 80px rgba(77, 141, 255, .18);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 138, 0, .16), transparent 45%),
    radial-gradient(circle at 50% 42%, #1d4e96 0%, #0a1833 70%);
}
.hero-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 65%, rgba(10, 24, 51, .55));
}
.hero-stage canvas { display: block; width: 100%; height: 100%; }

.pagehead { max-width: 1180px; padding: 64px 0 8px; }
body.fx .pagehead.staged {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
  align-items: center; gap: 28px;
}
.pagehead h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; margin: 0 0 12px; }
.pagehead p { color: var(--muted); }
.pagehead .hero-stage { height: 300px; min-height: 240px; }

/* ---------- Content components ---------- */

h2.sec { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; margin: 0 0 12px; }

.grid { display: grid; gap: 22px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 40%), var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transform-style: preserve-3d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}
.card::before { /* pointer-tracked sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 138, 0, .10), transparent 60%);
  opacity: 0; transition: opacity 200ms ease;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--ember); box-shadow: 0 22px 50px rgba(255, 59, 48, .16); }
.card h3, .card h2 { font-size: 1.2rem; margin: 0 0 10px; font-weight: 700; }
.card p { color: var(--muted); }
.card .tag {
  display: inline-block; margin-bottom: 12px;
  font-size: .72rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold);
}
.card img { border: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat b { display: block; font-size: 2rem; font-weight: 800; }
.stat span { color: var(--muted); font-size: .92rem; }

.list-check { list-style: none; padding: 0; }
.list-check li { position: relative; padding: 8px 0 8px 28px; color: var(--muted); }
.list-check li::before {
  content: "▸"; position: absolute; left: 4px; color: var(--ember); font-weight: 800;
}

b, strong { color: var(--fg); }
.card p b, .list-check li b { color: var(--fg); }

details {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 14px;
}
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { color: var(--gold); }
details p { color: var(--muted); margin-top: 12px; }

.media-item { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.media-item .when { color: var(--gold); font-size: .82rem; font-weight: 700; min-width: 76px; }

.cmp { width: 100%; border-collapse: collapse; margin-top: 14px; }
.cmp th, .cmp td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); vertical-align: top; }
.cmp thead th { background: var(--raised); }
.cmp td { color: var(--muted); }

blockquote.pull {
  border-left: 3px solid var(--ember); padding: 6px 0 6px 22px;
  color: var(--muted); font-style: italic; margin: 28px 0;
}

.pill {
  display: inline-block; background: var(--raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 16px; font-size: .85rem;
  color: var(--muted); margin: 4px 6px 4px 0;
}

.figure img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }

/* ---------- Relics (CSS 3D ornaments) ---------- */

.relic-slot {
  position: absolute; top: 18px; width: 130px; height: 130px;
  pointer-events: none; z-index: 2; opacity: .8;
}
.relic-right { right: 24px; }
.relic-left { left: 24px; }
.relic { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: relic-spin 16s linear infinite; }
.relic .ring { position: absolute; inset: 12px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--ember); border-right-color: var(--gold); }
.relic .r1 { animation: ring-a 5s linear infinite; }
.relic .r2 { inset: 28px; border-top-color: var(--blue); border-left-color: var(--ember); animation: ring-b 7s linear infinite; }
.relic .r3 { inset: 44px; border-bottom-color: var(--gold); animation: ring-a 3.5s linear infinite reverse; }
.relic .cube { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; transform-style: preserve-3d; animation: cube-spin 8s linear infinite; }
.relic .cube i { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 59, 48, .85), rgba(255, 138, 0, .35)); border: 1px solid rgba(255, 255, 255, .35); }
.relic .cube i:nth-child(1) { transform: rotateY(0deg) translateZ(17px); }
.relic .cube i:nth-child(2) { transform: rotateY(180deg) translateZ(17px); }
.relic .cube i:nth-child(3) { transform: rotateY(90deg) translateZ(17px); }
.relic .cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(17px); }
.relic .cube i:nth-child(5) { transform: rotateX(90deg) translateZ(17px); }
.relic .cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(17px); }
@keyframes relic-spin { to { transform: rotateX(18deg) rotateZ(360deg); } }
@keyframes ring-a { to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes ring-b { to { transform: rotateY(70deg) rotateZ(-360deg); } }
@keyframes cube-spin { to { transform: rotateX(360deg) rotateY(360deg); } }

/* ---------- Reveal (JS-gated; content visible without JS) ---------- */

body.fx .pre-reveal { opacity: 0; transform: translateY(22px); }
body.fx .pre-reveal.shown {
  opacity: 1; transform: none;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Footer ---------- */

footer.site { border-top: 1px solid var(--line); background: rgba(16, 34, 68, .5); }
footer.site .wrap { padding-block: 48px 20px; }
footer.site .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; margin-bottom: 28px; }
footer.site .fth { font-size: 1rem; font-weight: 700; margin: 0 0 12px; color: var(--fg); }
footer.site p { color: var(--muted); font-size: .9rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer.site ul a { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color 160ms ease; }
footer.site ul a:hover { color: var(--fg); }
footer.site > .wrap > p { font-size: .8rem; margin: 6px 0; }

/* ---------- Article pages: clean reading, minimal motion ---------- */

body.article main .wrap { max-width: 820px; }
body.article main { padding-bottom: 40px; }
body.article main h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.18; font-weight: 800; margin: 26px 0 14px; }
body.article main h2 { font-size: 1.5rem; font-weight: 750; margin: 40px 0 12px; line-height: 1.3; }
body.article main h3 { font-size: 1.2rem; font-weight: 700; margin: 30px 0 10px; }
body.article main p, body.article main li { font-size: 1.075rem; line-height: 1.78; color: #cdd9ec; overflow-wrap: anywhere; }
body.article main p { margin: 0 0 18px; }
body.article main ul, body.article main ol { padding-left: 26px; margin: 0 0 20px; }
body.article main li { margin-bottom: 8px; }
body.article main img { border-radius: 12px; border: 1px solid var(--line); margin: 10px 0 4px; }
body.article main blockquote {
  border-left: 3px solid var(--ember); margin: 26px 0; padding: 4px 0 4px 20px;
  color: var(--muted); font-style: italic;
}
body.article main table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 20px 0; display: block; overflow-x: auto; }
body.article main th, body.article main td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; font-size: .95rem; }
body.article main th { background: var(--raised); }
body.article main hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
body.article .kicker { margin-top: 34px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  header.site nav { flex-wrap: wrap; }
  header.site nav ul {
    display: none; flex-basis: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px 0 12px; border-top: 1px solid var(--line); margin-top: 10px;
  }
  header.site nav ul.open { display: flex; }
  header.site nav ul a { padding: 12px 10px; font-size: 1rem; }

  body.fx .hero .wrap.staged, body.fx .pagehead.staged { grid-template-columns: 1fr; gap: 18px; }
  .hero { padding: 18px 0 24px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.14; margin: 8px 0 12px; }
  .hero .lede, .pagehead p { font-size: 1rem; margin-bottom: 14px; }
  .hero-logo { width: 64px; margin-bottom: 10px; }
  .hero-stage { height: 300px; min-height: 240px; max-height: 340px; }
  .pagehead { padding-top: 34px; }
  .pagehead h1 { font-size: 1.7rem; }

  section { padding: 52px 0 36px; }
  .grid.c3, .grid.c2 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .cta-row { gap: 10px; }
  .cta-row .btn { flex: 1 1 0; padding-inline: 12px; }
  .media-item { flex-direction: column; gap: 4px; }
  .cmp { display: block; overflow-x: auto; }

  .relic-slot { width: 64px; height: 64px; top: 8px; right: 10px; left: auto; overflow: hidden; border-radius: 50%; }
  h2.sec { padding-right: 72px; }

  footer.site .cols { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  body.article main p, body.article main li { font-size: 1.02rem; }
}

@media (max-width: 420px) {
  footer.site .cols { grid-template-columns: 1fr; }
  .brand { font-size: .8rem; letter-spacing: .1em; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  body.fx .pre-reveal { opacity: 1; transform: none; }
  .hero-stage { display: none; }
  body.fx .hero .wrap.staged, body.fx .pagehead.staged { display: block; }
}
