/* ============================================
   XJOY - THE TOKENIZATION OF DUALITY
   CSS Stylesheet | Dark Tech Urban Aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080808;
  --surface: #0f0f0f;
  --surface2: #141414;
  --surface3: #1a1a1a;
  --cyan: #00e5ff;
  --cyan-dim: rgba(0,229,255,0.15);
  --cyan-glow: rgba(0,229,255,0.3);
  --cyan-glow2: rgba(0,229,255,0.6);
  --purple: #7c3aed;
  --purple-dim: rgba(124,58,237,0.15);
  --purple-glow: rgba(124,58,237,0.4);
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --text-dim: #444444;
  --border: #1f1f1f;
  --border-lit: rgba(0,229,255,0.2);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--cyan-dim);
  color: var(--cyan);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--text-primary);
}

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

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--cyan-dim);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ── UTILITY ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--cyan);
  display: block;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-title span {
  color: var(--cyan);
}

/* ── FADE IN ANIMATION ── */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--transition);
}

.nav-logo:hover { color: var(--cyan); }

.nav-logo svg {
  width: 28px;
  height: 28px;
}

.nav-logo .logo-dollar {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-social a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.nav-social svg {
  width: 16px;
  height: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.hero-title .dollar {
  color: var(--cyan);
  text-shadow:
    0 0 30px rgba(0, 229, 255, 0.8),
    0 0 60px rgba(0, 229, 255, 0.4),
    0 0 100px rgba(0, 229, 255, 0.2);
}

/* Glitch effect */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-1 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  left: -2px;
  opacity: 0.7;
}

.glitch::after {
  color: var(--purple);
  animation: glitch-2 4s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  left: 2px;
  opacity: 0.7;
}

@keyframes glitch-1 {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  92% { transform: translateX(-4px); opacity: 0.7; }
  94% { transform: translateX(4px); opacity: 0.7; }
  96% { transform: translateX(-2px); opacity: 0.7; }
  98% { transform: translateX(0); opacity: 0; }
}

@keyframes glitch-2 {
  0%, 91%, 100% { transform: translateX(0); opacity: 0; }
  93% { transform: translateX(4px); opacity: 0.7; }
  95% { transform: translateX(-4px); opacity: 0.7; }
  97% { transform: translateX(2px); opacity: 0.7; }
  99% { transform: translateX(0); opacity: 0; }
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin: 1.5rem 0 3rem;
  text-transform: uppercase;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  pointer-events: all;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--cyan);
  color: #000;
}

.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 40px var(--cyan-glow2);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--cyan));
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

#about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-statement {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.about-statement em {
  color: var(--cyan);
  font-style: normal;
}

.about-tagline {
  margin-top: 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.about-hashtag {
  margin-top: 1rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--purple);
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  background: var(--surface2);
  transition: all var(--transition);
}

.info-card:hover {
  border-color: var(--border-lit);
  border-left-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0,229,255,0.05), inset 0 0 30px rgba(0,229,255,0.03);
  transform: translateX(4px);
}

.info-card-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.info-card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-card-text strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   SPIDERWEB SECTION
   ============================================ */

#spiderweb {
  background: var(--bg);
  text-align: center;
}

.spiderweb-header {
  margin-bottom: 4rem;
}

.spiderweb-desc {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 1 / 0.75;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

#spiderweb-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.canvas-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.5;
}

.canvas-corner.tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.canvas-corner.tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.canvas-corner.bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.canvas-corner.br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* Pool Cards Grid */
.pool-cards-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 4rem 0 1.5rem;
}

.pool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.pool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.pool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cyan-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.pool-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 30px var(--cyan-glow), inset 0 0 20px rgba(0,229,255,0.05);
  transform: translateY(-4px);
  color: var(--text-primary);
}

.pool-card:hover::before {
  opacity: 1;
}

.pool-card-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.2rem 0.5rem;
  background: var(--cyan);
  color: #000;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pool-card-pair {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.pool-card-pair .pool-name {
  color: var(--cyan);
}

.pool-card-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

/* ============================================
   FOUNDER SECTION
   ============================================ */

#founder {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 6rem;
  align-items: center;
}

.founder-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.founder-image-ring {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
}

.founder-image-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan), var(--purple), var(--cyan));
  animation: ring-rotate 6s linear infinite;
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.founder-image-ring::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
  animation: ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.founder-img {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
}

.founder-handle {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.founder-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  line-height: 1.1;
}

.founder-bio {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.founder-bio p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.founder-bio p strong {
  color: var(--text-primary);
  font-weight: 500;
}

.founder-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.founder-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.founder-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

/* ============================================
   NFT GALLERY SECTION
   ============================================ */

#legends {
  background: var(--bg);
}

.gallery-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-about {
  max-width: 780px;
  margin: 0 auto 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  background: var(--surface);
}

.gallery-about p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
}

.gallery-about p em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 500;
}

/* Filter Bar */
.gallery-filter {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Mobile: override to horizontal scroll */
@media (max-width: 900px) {
  .gallery-filter {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0.5rem 1rem 1rem !important;
    gap: 0.5rem !important;
    scroll-snap-type: x mandatory;
  }
  .gallery-filter::-webkit-scrollbar { display: none !important; }
  .filter-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
    min-height: 44px !important;
    min-width: 64px !important;
    font-size: 0.78rem !important;
    padding: 0.5rem 1rem !important;
    touch-action: manipulation;
  }
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 1px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.filter-btn.active {
  box-shadow: 0 0 16px var(--cyan-glow);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface2);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: grayscale(20%);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-name {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.gallery-item-glow {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-glow {
  box-shadow: inset 0 0 0 1px var(--cyan), 0 0 20px var(--cyan-glow);
}

.gallery-count {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

#footer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.footer-logo span {
  color: var(--cyan);
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.footer-xrpl {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-xrpl span {
  color: var(--cyan);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .founder-grid { grid-template-columns: 1fr; gap: 3rem; }
  .founder-image-wrap { justify-content: flex-start; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .section { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(20px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: flex; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .pool-cards { grid-template-columns: repeat(2, 1fr); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .founder-image-ring { width: 200px; height: 200px; }
  .canvas-wrap { aspect-ratio: auto; min-height: 500px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 1rem; }
}


/* ═══════════════════════════════════════════════════
   LEGEND MODAL
═══════════════════════════════════════════════════ */
.legend-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.legend-modal.active {
  opacity: 1;
  pointer-events: all;
}
.legend-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.legend-modal-sheet {
  position: absolute;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1.5rem 2.5rem;
  transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
}
/* Desktop: centered modal */
@media (min-width: 640px) {
  .legend-modal-sheet {
    top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    width: min(560px, 90vw);
    max-height: 85vh;
    border-radius: 16px;
    flex-direction: row;
    align-items: flex-start;
  }
  .legend-modal.active .legend-modal-sheet {
    transform: translate(-50%, -50%);
  }
}
/* Mobile: bottom sheet */
@media (max-width: 639px) {
  .legend-modal-sheet {
    bottom: 0; left: 0; right: 0;
    top: auto;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    padding: 1.5rem 1.25rem 2rem;
  }
  .legend-modal.active .legend-modal-sheet {
    transform: translateY(0);
  }
}
.legend-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #aaa;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  flex-shrink: 0;
}
.legend-modal-close:hover { background: #2a2a2a; color: #fff; }
.legend-modal-img-wrap {
  flex-shrink: 0;
}
.legend-modal-img-wrap img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #00e5ff44;
  box-shadow: 0 0 24px #00e5ff22;
  display: block;
}
@media (max-width: 639px) {
  .legend-modal-img-wrap img {
    width: 120px;
    height: 120px;
  }
}
.legend-modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.legend-modal-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  width: fit-content;
}
.legend-modal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #f0f0f0;
  line-height: 1.2;
  margin: 0;
}
.legend-modal-content p {
  font-size: 0.9rem;
  color: #999;
  line-height: 1.65;
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   MOBILE OPTIMIZATION
═══════════════════════════════════════════════════ */

/* Fluid typography */
h1, .hero-title { font-size: clamp(2.5rem, 10vw, 7rem) !important; }
h2 { font-size: clamp(1.6rem, 5vw, 3rem) !important; }
h3 { font-size: clamp(1.1rem, 3vw, 1.75rem) !important; }

/* Touch targets */
button, a, .filter-btn, .gallery-item {
  min-height: 44px;
  touch-action: manipulation;
}
.filter-btn { min-height: 38px; padding: 0.5rem 1rem; }

/* Filter bar — horizontal scroll on mobile */
@media (max-width: 768px) {
  .gallery-filter-wrap {
    position: relative;
  }
  .gallery-filter-wrap::after {
    content: "";
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, #080808);
    pointer-events: none;
    z-index: 2;
    border-radius: 0 8px 8px 0;
  }
  #gallery-filter {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  #gallery-filter::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex-shrink: 0; }
}

/* Gallery grid responsive */
@media (max-width: 1024px) {
  #gallery-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
  #gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 480px) {
  #gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Sections — reduced padding on mobile */
@media (max-width: 768px) {
  section, .section { padding: 4rem 1.25rem !important; }
  .container, .section-inner { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
}

/* SpiderWeb — hide canvas on small mobile, show cards */
@media (max-width: 600px) {
  /* SpiderWeb canvas: see end of file for mobile rules */
}

/* Founder section — stack on mobile */
@media (max-width: 768px) {
  .founder-layout, .founder-grid {
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .founder-img-wrap { margin: 0 auto; }
}

/* About section — stack on mobile */
@media (max-width: 768px) {
  .about-grid, .about-layout {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }
}

/* Navbar mobile improvements */
@media (max-width: 768px) {
  .nav-links { gap: 0 !important; }
  .nav-logo { font-size: 1.1rem !important; }
}

/* Safe area insets for notched devices */
.navbar, nav { padding-top: max(0.75rem, env(safe-area-inset-top)); }
footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }

/* Performance */
.gallery-item, .spiderweb-node, .hero-canvas {
  will-change: transform;
  transform: translateZ(0);
}

/* Footer Built by GRID */
.footer-built-by {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1a1a1a;
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}
.footer-grid-link {
  color: #00e5ff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-left: 0.4rem;
  transition: opacity 0.2s;
}
.footer-grid-link:hover { opacity: 0.65; }


/* ===== MOBILE OPTIMIZATIONS: SpiderWeb + Gallery Filter ===== */

/* Ensure spiderweb canvas container has explicit height on all screens */
.spiderweb-canvas-wrap,
#spiderweb .canvas-wrap {
  height: 600px;
  min-height: 600px;
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .spiderweb-canvas-wrap,
  #spiderweb .canvas-wrap {
    height: 480px !important;
    min-height: 480px !important;
  }
  #spiderweb-canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 480px !important;
  }
}

@media (max-width: 480px) {
  .spiderweb-canvas-wrap,
  #spiderweb .canvas-wrap {
    height: 400px !important;
    min-height: 400px !important;
  }
  #spiderweb-canvas {
    min-height: 400px !important;
  }
}

/* Gallery filter bar - horizontal scroll with fade indicator */
.gallery-filter-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-filter-wrap::before,
.gallery-filter-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s;
}

.gallery-filter-wrap::before {
  left: 0;
  background: linear-gradient(to right, #080808, transparent);
}

.gallery-filter-wrap::after {
  right: 0;
  background: linear-gradient(to left, #080808, transparent);
}

@media (max-width: 768px) {
  #gallery-filter {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    gap: 0.5rem !important;
    padding: 0.5rem 2.5rem 1rem !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory;
    cursor: grab;
  }

  #gallery-filter::-webkit-scrollbar {
    display: none !important;
  }

  .filter-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    scroll-snap-align: start;
    min-height: 44px !important;
    min-width: 70px !important;
    font-size: 0.78rem !important;
    padding: 0.5rem 1rem !important;
    touch-action: manipulation;
  }

  /* Gallery grid 2 cols on mobile */
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0 0.5rem !important;
  }

  .gallery-item {
    border-radius: 8px !important;
  }

  .gallery-item-name {
    font-size: 0.65rem !important;
    padding: 0.4rem !important;
  }
}

@media (max-width: 360px) {
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
  }
}


/* ===== LEGEND WALLET CTA ===== */
.legend-wallet-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.legend-wallet-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 12px rgba(0,229,255,0.6));
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(0,229,255,0.6)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(0,229,255,0.9)); }
}

.legend-wallet-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.03em;
  line-height: 1.4;
  margin: 0;
}

.legend-coming-soon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 180px;
  min-height: 44px;
}

.legend-coming-soon-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.1), rgba(124,58,237,0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.legend-coming-soon-btn:hover::before,
.legend-coming-soon-btn.coming-soon-active::before {
  opacity: 1;
}

.legend-coming-soon-btn:hover,
.legend-coming-soon-btn.coming-soon-active {
  background: rgba(0,229,255,0.08);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 24px rgba(0,229,255,0.3), inset 0 0 12px rgba(0,229,255,0.05);
  transform: translateY(-1px);
  letter-spacing: 0.18em;
}

/* ===== XAMAN WALLET BUTTON (NAVBAR) ===== */
.nav-wallet {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.xaman-address {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cyan);
  opacity: 0.8;
}

.xaman-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.55);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.xaman-connect-btn::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.xaman-connect-btn.connected {
  border-color: #4ade80;
  color: #4ade80;
}

.xaman-connect-btn.connected::before {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

.xaman-connect-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255,255,255,0.1);
}

.xaman-connect-btn.connected:hover {
  background: rgba(74,222,128,0.08);
  border-color: #4ade80;
  box-shadow: 0 0 14px rgba(74,222,128,0.2);
}

/* ===== LEGEND MODAL — UNLOCKED STATE ===== */
.legend-bio {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legend-owned-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.4);
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* ===== LEGEND CONNECT BUTTON IN MODAL ===== */
.legend-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  min-height: 44px;
}

.legend-connect-btn:hover {
  background: rgba(0,229,255,0.1);
  box-shadow: 0 0 24px rgba(0,229,255,0.3);
  transform: translateY(-1px);
}

/* ===== ABOUT LOGO + SOCIAL LINKS ===== */
.about-logo-wrap {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}
.about-logo-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px rgba(255,255,255,0.08);
  display: block;
}
.about-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.about-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: rgba(255,255,255,0.03);
}
.about-social-link:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}
