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

:root {
  --bg:            #0a0a0f;
  --bg-alt:        #0d0d14;
  --surface:       #111118;
  --surface-card:  #13131b;
  --surface-hover: #17171f;
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(124,92,252,0.45);
  --accent:        #7C5CFC;
  --accent-light:  #9f82ff;
  --accent-dim:    rgba(124,92,252,0.15);
  --accent-glow:   rgba(124,92,252,0.08);
  --text-1:        #ffffff;
  --text-2:        rgba(255,255,255,0.55);
  --text-3:        rgba(255,255,255,0.28);
  --nav-h:         60px;
  --filter-h:      56px;
  --radius-card:   12px;
  --radius-pill:   99px;
  --container:     1180px;
  --pad-h:         24px;

  /* category colors */
  --c-wallets-bg:    rgba(124,92,252,0.12);
  --c-wallets-text:  #9f82ff;
  --c-explorer-bg:   rgba(59,130,246,0.10);
  --c-explorer-text: #60a5fa;
  --c-defi-bg:       rgba(34,197,94,0.10);
  --c-defi-text:     #4ade80;
  --c-cex-bg:        rgba(251,191,36,0.10);
  --c-cex-text:      #fbbf24;
  --c-dev-bg:        rgba(20,184,166,0.10);
  --c-dev-text:      #2dd4bf;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle scanline texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.012) 2px,
    rgba(255,255,255,0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-h);
}

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

/* ─── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 0.5px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav > .container {
  flex: 1;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  width: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logomark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #7C5CFC, #9f82ff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(124,92,252,0.35);
}

.nav__wordmark {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  list-style: none;
}

.nav__links a {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}

.nav__cta {
  background: var(--accent);
  color: white;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s, box-shadow 0.2s;
  letter-spacing: -0.01em;
}

.nav__cta:hover {
  opacity: 0.88;
  box-shadow: 0 0 20px rgba(124,92,252,0.45);
}

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  color: var(--text-2);
}

.nav__hamburger svg { display: block; }

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--border);
  padding: 16px var(--pad-h);
  flex-direction: column;
  gap: 4px;
  z-index: 999;
}

.nav__mobile-menu.open { display: flex; }

.nav__mobile-menu a {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.nav__mobile-menu a:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* grid lines background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,92,252,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,252,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 80%);
}

.hero__glow {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(124,92,252,0.14) 0%, transparent 65%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 0.5px solid rgba(124,92,252,0.3);
  color: var(--accent-light);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-1);
  margin-bottom: 20px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero__title .accent {
  color: var(--accent);
  position: relative;
}

.hero__sub {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Stats Bar ───────────────────────────────────────────────────────── */
.stats {
  padding: 0 0 48px;
}

.stats__panel {
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.stats__item {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.stats__item + .stats__item::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 0.5px;
  background: rgba(255,255,255,0.07);
}

.stats__num {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--text-1);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stats__label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 300;
}

/* ─── Filter Bar ──────────────────────────────────────────────────────── */
.filter-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 900;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 10px 0;
}

.filter-wrap__inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  letter-spacing: -0.01em;
}

.filter-pill:hover {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 12px rgba(124,92,252,0.35);
}

.search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-pill);
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  padding: 6px 14px 6px 30px;
  width: 180px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  letter-spacing: -0.01em;
}

.search-input::placeholder { color: var(--text-3); }

.search-input:focus {
  border-color: rgba(124,92,252,0.4);
  background: rgba(124,92,252,0.05);
}

/* ─── Listings ────────────────────────────────────────────────────────── */
.listings {
  padding: 32px 0 60px;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ─── Listing Card ────────────────────────────────────────────────────── */
.listing-card {
  background: var(--surface-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.listing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(124,92,252,0.06);
}

.card-image {
  width: 100%;
  height: 80px;
  overflow: hidden;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}

/* Unique placeholder patterns per category */
.listing-card[data-category="wallets"] .card-placeholder {
  background: linear-gradient(135deg, rgba(124,92,252,0.08) 0%, rgba(124,92,252,0.03) 100%);
}
.listing-card[data-category="wallets"] .card-placeholder .initial { color: rgba(159,130,255,0.3); }

.listing-card[data-category="block-explorers"] .card-placeholder {
  background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.03) 100%);
}
.listing-card[data-category="block-explorers"] .card-placeholder .initial { color: rgba(96,165,250,0.3); }

.listing-card[data-category="defi"] .card-placeholder {
  background: linear-gradient(135deg, rgba(34,197,94,0.08) 0%, rgba(34,197,94,0.03) 100%);
}
.listing-card[data-category="defi"] .card-placeholder .initial { color: rgba(74,222,128,0.3); }

.listing-card[data-category="cex"] .card-placeholder {
  background: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(251,191,36,0.03) 100%);
}
.listing-card[data-category="cex"] .card-placeholder .initial { color: rgba(251,191,36,0.3); }

.listing-card[data-category="dev-tooling"] .card-placeholder {
  background: linear-gradient(135deg, rgba(20,184,166,0.08) 0%, rgba(20,184,166,0.03) 100%);
}
.listing-card[data-category="dev-tooling"] .card-placeholder .initial { color: rgba(45,212,191,0.3); }

/* decorative dots on placeholder */
.card-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-category {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.cat-wallets    { background: var(--c-wallets-bg);  color: var(--c-wallets-text); }
.cat-explorers  { background: var(--c-explorer-bg); color: var(--c-explorer-text); }
.cat-defi       { background: var(--c-defi-bg);     color: var(--c-defi-text); }
.cat-cex        { background: var(--c-cex-bg);      color: var(--c-cex-text); }
.cat-devtools   { background: var(--c-dev-bg);      color: var(--c-dev-text); }

.card-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card-desc {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
  flex: 1;
}

.card-link {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--accent-light);
  letter-spacing: 0.02em;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s, color 0.2s;
  font-weight: 400;
}

.listing-card:hover .card-link {
  gap: 8px;
  color: var(--accent-light);
}

/* ─── No-results ──────────────────────────────────────────────────────── */
.no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* ─── CTA Section ─────────────────────────────────────────────────────── */
.cta-section {
  padding: 0 0 60px;
}

.cta-panel {
  background: linear-gradient(135deg, rgba(124,92,252,0.10), rgba(124,92,252,0.03));
  border: 0.5px solid rgba(124,92,252,0.22);
  border-radius: 16px;
  padding: 52px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-panel::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.cta-panel__title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  position: relative;
}

.cta-panel__body {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.7;
  font-weight: 300;
  position: relative;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  position: relative;
  transition: opacity 0.2s, box-shadow 0.2s, gap 0.2s;
}

.cta-btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 28px rgba(124,92,252,0.5);
  gap: 12px;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 0.5px solid rgba(255,255,255,0.05);
  padding: 20px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 300;
}

.footer__link {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-3);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 300;
}

.footer__link:hover { color: var(--text-2); }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root { --pad-h: 16px; }
  .stats__panel {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats__item:nth-child(3)::before { display: none; }
  .stats__item:nth-child(3) {
    border-top: 0.5px solid rgba(255,255,255,0.07);
  }
  .stats__item:nth-child(4) {
    border-top: 0.5px solid rgba(255,255,255,0.07);
  }
  .search-input { width: 130px; }
  .cta-panel { padding: 36px 20px; }
}

@media (max-width: 480px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Page load animations ────────────────────────────────────────────── */
.hero__badge,
.hero__title,
.hero__sub {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
}

.hero__badge { animation-delay: 0.1s; }
.hero__title { animation-delay: 0.22s; }
.hero__sub   { animation-delay: 0.34s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── CF7 Form ─────────────────────────────────────────────────────────── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    color: var(--text-1);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    font-weight: 300;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 12px;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    border-color: rgba(124,92,252,0.4);
    background: rgba(124,92,252,0.05);
}

.wpcf7 input[type="submit"] {
    background: var(--accent);
    color: white;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.wpcf7 input[type="submit"]:hover {
    opacity: 0.9;
    box-shadow: 0 0 28px rgba(124,92,252,0.5);
}

.wpcf7 .wpcf7-response-output {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
}
