/* ============ Tokens ============ */
:root {
  --bg: #0b0e14;
  --bg-alt: #0f1420;
  --panel: #131826;
  --panel-2: #171d2d;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f8;
  --text-dim: #9aa3b8;
  --gold: #ffd257;
  --gold-2: #ffb937;
  --aqua: #45e8ff;
  --aqua-2: #1fb8d9;
  --red: #ff6b6b;
  --purple: #c58bff;
  --radius: 18px;
  --font-display: 'Rajdhani', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: #14100a; }

/* ============ Background canvas + cursor glow ============ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(255, 210, 87, 0.10) 0%, rgba(69, 232, 255, 0.06) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}
@media (hover: hover) {
  .cursor-glow { opacity: 1; }
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  background: var(--gold);
  color: #171006;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: 999px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(255, 210, 87, 0.35);
  transition: transform 0.4s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(11, 14, 20, 0.75);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 12px rgba(255, 210, 87, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.08);
  filter: drop-shadow(0 0 18px rgba(69, 232, 255, 0.5));
}
.brand-logo-sm { width: 24px; height: 24px; border-radius: 6px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.accent-gold { color: var(--gold); }
.accent-aqua { color: var(--aqua); }

.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-dim);
}
.nav-links a { position: relative; padding: 4px 0; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--aqua));
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.burger span {
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 82vw);
  height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 100px 28px 28px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.2, .9, .3, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.mobile-menu a:hover { color: var(--gold); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1204;
  box-shadow: 0 10px 30px rgba(255, 210, 87, 0.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(255, 210, 87, 0.4); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--aqua); color: var(--aqua); transform: translateY(-2px); }

.btn-ghost {
  background: var(--panel);
  color: var(--text-dim);
  border-color: var(--border);
  padding: 10px 18px;
  font-size: 0.9rem;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 100px;
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  inset: -10% -10%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(600px) rotateX(55deg) translateY(0);
  transform-origin: top center;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
  animation: gridDrift 14s linear infinite;
  z-index: -2;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 0 84px; }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.5;
  animation: floatGlow 10s ease-in-out infinite;
}
.hero-glow-a {
  width: 480px; height: 480px;
  background: var(--gold);
  top: -120px; left: -120px;
}
.hero-glow-b {
  width: 420px; height: 420px;
  background: var(--aqua);
  bottom: -140px; right: -100px;
  animation-delay: -5s;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.hero-content {
  position: relative;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  image-rendering: pixelated;
  margin-bottom: 22px;
  filter: drop-shadow(0 0 30px rgba(255, 210, 87, 0.4));
  animation: heroLogoFloat 5s ease-in-out infinite;
}
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #45ff8f;
  box-shadow: 0 0 10px #45ff8f;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 22px;
}
.hero-line {
  display: block;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  color: var(--text-dim);
  font-weight: 600;
}
.hero-logo {
  font-size: clamp(3rem, 9vw, 6.2rem);
  color: var(--text);
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 0 0 36px;
}

/* IP box */
.ip-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 6px 6px 20px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}
.ip-box::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 210, 87, 0.35), rgba(69, 232, 255, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.ip-box-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-right: 14px;
}
.ip-box-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  margin-right: 18px;
  letter-spacing: 0.01em;
}
.ip-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ip-copy:hover { color: var(--gold); border-color: var(--gold); }
.ip-copy:active { transform: scale(0.92); }

.ip-box-lg { padding: 10px 10px 10px 28px; margin: 30px auto; }
.ip-box-lg .ip-box-value { font-size: 1.5rem; }
.ip-box-lg .ip-copy { width: 50px; height: 50px; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }

.hero-tags {
  display: flex;
  gap: 12px 24px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.hero-tags span { display: flex; align-items: center; gap: 8px; }
.hero-tags span::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--aqua);
}

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollCue 1.6s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 20px; }
}

/* ============ Sections (generic) ============ */
.section {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 28px;
}
.section-alt {
  max-width: none;
  background: linear-gradient(180deg, transparent, var(--bg-alt) 12%, var(--bg-alt) 88%, transparent);
}
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

.section-head { max-width: 620px; margin-bottom: 56px; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 14px;
}
.section-head p { color: var(--text-dim); font-size: 1.05rem; max-width: 540px; }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2, .7, .2, 1), transform 0.7s cubic-bezier(.2, .7, .2, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============ Mode cards ============ */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.mode-card {
  --accent: var(--gold);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2, .8, .3, 1), border-color 0.3s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.mode-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -40%;
  width: 70%; height: 70%;
  background: var(--accent);
  filter: blur(60px);
  opacity: 0.16;
  border-radius: 50%;
  transition: opacity 0.35s ease;
}
.mode-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--accent) 45%, transparent);
}
.mode-card:hover::before { opacity: 0.28; }
.mode-icon { font-size: 2.1rem; margin-bottom: 18px; }
.mode-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.mode-card p { color: var(--text-dim); font-size: 0.95rem; margin: 0 0 20px; }
.mode-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ============ Feature grid ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  background: var(--panel);
  padding: 34px 28px;
  transition: background 0.3s ease;
}
.feature:hover { background: var(--panel-2); }
.feature-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.feature h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 10px; }
.feature p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

/* ============ Join ============ */
.join { padding-top: 60px; padding-bottom: 60px; }
.join-card {
  position: relative;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 72px 32px;
  overflow: hidden;
}
.join-glow {
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 0deg, var(--gold), var(--aqua), var(--purple), var(--gold));
  filter: blur(120px);
  opacity: 0.14;
  animation: spin 16s linear infinite;
  z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.join-card h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 8px 0 14px; }
.join-card > p { color: var(--text-dim); max-width: 440px; margin: 0 auto; }

.join-steps {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.join-step { display: flex; align-items: center; gap: 10px; }
.join-step span {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--aqua));
  color: #14100a;
  font-size: 0.85rem;
  font-weight: 800;
}

/* ============ Community ============ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.community-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.3s cubic-bezier(.2, .8, .3, 1), border-color 0.3s ease;
}
.community-card:hover { transform: translateY(-6px); border-color: var(--aqua); }
.community-icon { font-size: 1.9rem; margin-bottom: 16px; }
.community-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 8px; }
.community-card p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* ============ Footer ============ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 40px 28px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}
.footer-links { display: flex; gap: 24px; font-size: 0.9rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: var(--text-dim); font-size: 0.85rem; }

.footer-owner {
  max-width: 1180px;
  margin: 18px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  opacity: 0.7;
}
.footer-owner a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.footer-owner a:hover { color: var(--gold); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .hero { padding-top: 120px; }
}

@media (max-width: 560px) {
  .ip-box { flex-wrap: wrap; padding: 16px; }
  .ip-box-label { width: 100%; margin-bottom: 6px; }
  .join-card { padding: 52px 20px; }
  .section { padding: 90px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-grid, .hero-glow, .join-glow, .pill-dot, .scroll-cue span, .hero-logo-img { animation: none !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
