/* NEXUS brand + website styles. Tokens here are the brand system; the game UI imports the
   same tokens from /styles/tokens.css. */
@import url('/styles/tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
body { margin: 0; background: var(--ink-900); color: var(--pearl); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--mint); color: var(--ink-900); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mt { margin-top: 1.5rem; }

/* ---------- buttons, chips, tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 0.95rem/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 15px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pearl); color: var(--ink-900); box-shadow: 0 0 0 0 rgba(110, 245, 210, 0); }
.btn-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(110, 245, 210, 0.25); }
.btn-ghost { background: transparent; color: var(--pearl); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--pearl); }
.btn-sm { padding: 10px 16px; font-size: 0.8rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { font: 500 0.9rem var(--font-body); color: var(--pearl); background: var(--ink-800); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--mint); background: rgba(110, 245, 210, 0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5rem 0 0.5rem; }
.tag { display: inline-block; font: 600 0.7rem/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; margin-bottom: 14px; }
.tag-live { color: var(--mint); background: rgba(110, 245, 210, 0.1); }
.tag-later { color: var(--violet); background: rgba(181, 155, 255, 0.12); }
.eyebrow { font: 600 0.78rem var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mint); margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(110, 245, 210, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(110, 245, 210, .6); } 70% { box-shadow: 0 0 0 10px rgba(110, 245, 210, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 245, 210, 0); } }
.lead { font-size: 1.15rem; color: #CFCDE0; max-width: 60ch; }
.lead.narrow { max-width: 62ch; margin-bottom: 2.5rem; }
.hint { color: var(--muted); font-size: .9rem; min-height: 1.6em; }
.link-arrow { display: inline-block; margin-top: 1.4rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.link-arrow:hover { color: var(--pearl); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 20, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { height: 30px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a:not(.btn) { text-decoration: none; color: #C9C7DA; font-weight: 500; font-size: .95rem; }
.nav nav a:not(.btn):hover { color: var(--pearl); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--pearl); transition: transform .2s; }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink-900); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; display: none; }
  .nav nav.open { display: flex; }
  .nav nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav nav .btn { margin-top: 14px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 90px) 0 clamp(60px, 8vw, 110px); }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 900px; height: 900px; background: radial-gradient(closest-side, rgba(110, 245, 210, 0.13), transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(236,234,244,0.07) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(to bottom, black, transparent 85%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; }
.hero-title { font-size: clamp(4.2rem, 13vw, 9.5rem); font-weight: 800; letter-spacing: 0.04em; line-height: 0.9; margin: 0 0 0.2em; background: linear-gradient(180deg, #FFFFFF 30%, #B8B6CC); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tag { font: 600 clamp(1.3rem, 2.6vw, 1.9rem)/1.2 var(--font-display); margin-bottom: 0.7em; }
.hero-sub { color: #C9C7DA; font-size: 1.1rem; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-avatar { width: min(460px, 100%); filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); animation: float 6s ease-in-out infinite; position: relative; z-index: 1; }
.hero-orbit { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(110, 245, 210, 0.25); transform: rotateX(72deg); bottom: 2%; animation: spin 18s linear infinite; }
.hero-orbit::before { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); top: -6px; left: 50%; box-shadow: 0 0 18px var(--mint); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotateX(72deg) rotateZ(360deg); } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; text-align: left; } .hero-art { order: -1; max-width: 320px; margin: 0 auto; } }

/* ---------- sections ---------- */
.section { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--ink-950), var(--ink-900)); border-block: 1px solid rgba(255,255,255,0.04); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.traits { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 14px; }
.traits li { padding-left: 22px; position: relative; color: #C9C7DA; }
.traits li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--mint); }
.traits strong { color: var(--pearl); }
.showcase { position: relative; aspect-ratio: 4 / 5; border-radius: 28px; background: radial-gradient(120% 80% at 50% 10%, #1D1F33, var(--ink-950) 70%); border: 1px solid var(--line); overflow: hidden; }
.showcase canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.showcase-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--pearl); box-shadow: 0 0 0 2px var(--ink-900), 0 0 0 4px var(--pearl); }

.card { background: var(--ink-800); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.card p { color: #BEBCD0; margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.district { background: linear-gradient(180deg, #16182A, var(--ink-800)); }
.later { margin-top: 18px; }
.card-later { background: transparent; border-style: dashed; }
.card-later h3 { color: #D6D4E6; }

/* cosmetic cards */
.cos-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1000px) { .cos-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cos-grid { grid-template-columns: repeat(2, 1fr); } }
.cos-card { background: var(--ink-800); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.cos-card h3 { font-size: 1rem; margin: 0; }
.cos-card p { color: var(--muted); font-size: .85rem; margin: 0; }
.cos-card .thumb { aspect-ratio: 1; border-radius: 12px; background: radial-gradient(circle at 50% 35%, #25283F, #111220); display: grid; place-items: center; margin-bottom: 8px; overflow: hidden; }
.cos-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cos-card .cat { font: 600 .7rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cos-card .rar { font-size: .75rem; font-weight: 600; }
.cos-card::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--rarity, var(--line)); }
.rarity-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.rarity { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: #C9C7DA; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.rarity i { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); }
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.ways > div { border-top: 1px solid var(--line); padding-top: 14px; }
.ways h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); margin-bottom: 4px; }
.ways p { color: #BEBCD0; font-size: .95rem; margin: 0; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr 1fr; } }

/* community */
.waitlist { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
.waitlist input[type=email] { background: var(--ink-900); border: 1px solid var(--line-strong); color: var(--pearl); border-radius: 999px; padding: 14px 18px; font: inherit; min-width: 0; }
.waitlist .consent { grid-column: 1 / -1; font-size: .9rem; color: #BEBCD0; display: flex; gap: 8px; align-items: center; }
.form-msg { grid-column: 1 / -1; min-height: 1.4em; margin: 0; font-size: .9rem; }
.form-msg.ok { color: var(--mint); } .form-msg.err { color: var(--coral); }
@media (max-width: 480px) { .waitlist { grid-template-columns: 1fr; } }
.stat-row { display: flex; gap: 36px; margin: 10px 0 12px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font: 700 2.2rem var(--font-display); }
.stat-label { color: var(--muted); font-size: .85rem; }
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a, .socials span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; }
.socials span { color: var(--muted); border-style: dashed; }
.updates { margin-top: 40px; }
.update-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.update-list li { border-left: 2px solid var(--line); padding: 4px 0 4px 18px; }
.update-list time { color: var(--muted); font-size: .85rem; }
.update-list h4 { margin: 2px 0 4px; font-size: 1.05rem; }
.update-list p { color: #BEBCD0; margin: 0; }

/* roadmap */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: p; }
.phase { border: 1px solid var(--line); border-radius: 22px; padding: 26px; background: var(--ink-800); position: relative; }
.phase-now { border-color: rgba(110, 245, 210, 0.5); box-shadow: 0 0 0 1px rgba(110,245,210,0.15), 0 20px 60px -30px rgba(110,245,210,0.4); }
.phase-num { font: 600 .75rem var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 10px; }
.phase h3 { font-size: 1.5rem; text-transform: uppercase; }
.phase ul { padding-left: 18px; margin: 0; color: #C9C7DA; display: grid; gap: 6px; }
@media (max-width: 860px) { .roadmap { grid-template-columns: 1fr; } }

.final-cta { text-align: center; padding: 100px 0 120px; background: radial-gradient(60% 80% at 50% 100%, rgba(110,245,210,0.12), transparent 70%); }
.final-cta img { margin: 0 auto 20px; }
.final-cta h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); margin-bottom: 1.2em; }

.footer { border-top: 1px solid var(--line); padding: 34px 0 44px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { text-decoration: none; color: #C9C7DA; }
.footer p { flex-basis: 100%; margin: 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- shared form/page styles (account, profile, admin) ---------- */
.page { min-height: calc(100vh - 68px); padding: 50px 0 80px; }
.panel { background: var(--ink-800); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: .92rem; }
.field input, .field select { background: var(--ink-900); border: 1px solid var(--line-strong); color: var(--pearl); border-radius: 12px; padding: 12px 14px; font: inherit; }
.field input:focus { border-color: var(--mint); outline: none; }
.field small { color: var(--muted); }
.tabs { display: flex; gap: 6px; margin-bottom: 22px; background: var(--ink-900); border-radius: 999px; padding: 4px; width: fit-content; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 .9rem var(--font-body); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink-700); color: var(--pearl); }
.error { color: var(--coral); min-height: 1.4em; font-size: .92rem; }
.success { color: var(--mint); }
