:root {
  --bg: #060912;
  --bg-elevated: #0f1729;
  --surface: #141f33;
  --border: #2a3d5c;
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --accent: #10b981;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.logo-img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
  border-radius: 10px;
}

.logo:hover .logo-img {
  filter: brightness(1.08);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.nav-cta {
  padding: 10px 20px;
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

@media (max-width: 768px) {
  .nav-cta { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover { transform: translateY(-1px); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--primary); color: var(--text); }

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

.btn-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.download-hero { padding: 24px 0 48px; }

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.download-icon { font-size: 3rem; margin-bottom: 16px; }

.download-card h2 { font-size: 1.5rem; margin-bottom: 8px; }

.download-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.download-meta code {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.download-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.download-note.ok { color: var(--accent); }
.download-note.warn { color: #f59e0b; }

.download-warning {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin: 32px 0;
}

.download-banner h3 { font-size: 1.25rem; margin-bottom: 8px; }
.download-banner p { color: var(--text-muted); margin: 0; max-width: 520px; }

/* Hero */
.hero {
  padding: 80px 0 100px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
              radial-gradient(ellipse 60% 40% at 80% 50%, rgba(16, 185, 129, 0.08), transparent);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 span { background: linear-gradient(135deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

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

.badge-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Sections */
section { padding: 72px 0; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.section-sub--left {
  margin-bottom: 0;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.section-head-cta {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .section-head-cta {
    width: 100%;
    justify-content: center;
  }
}

.section-blog-preview {
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 41, 0.55) 50%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-preview-grid .blog-card {
  margin-bottom: 0;
}

.blog-preview-grid .blog-card h2 {
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .blog-preview-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover { border-color: rgba(59, 130, 246, 0.4); transform: translateY(-2px); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* Chains */
.chains {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chain-pill {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Page header (inner pages) */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.page-header h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { color: var(--text-muted); font-size: 1.05rem; }

/* Content prose */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin: 2em 0 0.75em; color: var(--text); }
.prose h3 { font-size: 1.1rem; margin: 1.5em 0 0.5em; }
.prose p, .prose li { color: var(--text-muted); margin-bottom: 1em; }
.prose ul, .prose ol { margin-left: 1.5em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.5em; }

/* Tutorial steps */
.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.step-content h3 { margin-bottom: 8px; }
.step-content p { color: var(--text-muted); }

/* Contact form */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  margin: 48px 0;
}
.cta-band h2 { font-size: 1.75rem; margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 24px; }

/* Blog — listing */
.blog-page-header {
  padding: 48px 0 40px;
  margin-bottom: 40px;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.blog-page-header .blog-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.blog-page-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.15;
}

.blog-page-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.blog-featured-wrap {
  margin-bottom: 32px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}

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

/* Card links must not inherit global anchor blue */
a.blog-card,
a.blog-card:hover,
a.blog-card:focus {
  color: var(--text);
  text-decoration: none;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  box-shadow: var(--shadow);
}

.blog-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.blog-card-visual {
  height: 6px;
  width: 100%;
  flex-shrink: 0;
}

.blog-card-visual--wallets { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.blog-card-visual--comparison { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.blog-card-visual--security { background: linear-gradient(90deg, #10b981, #34d399); }
.blog-card-visual--education { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.blog-card-visual--defi { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.blog-card-visual--ethereum { background: linear-gradient(90deg, #627eea, #818cf8); }
.blog-card-visual--solana { background: linear-gradient(90deg, #9945ff, #14f195); }
.blog-card-visual--tokens { background: linear-gradient(90deg, #ec4899, #f472b6); }

.blog-card-body {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.blog-card--featured .blog-card-body {
  padding: 28px 32px 26px;
}

.blog-card--featured .blog-card-visual {
  height: 8px;
}

.blog-card--featured h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin-top: 14px;
}

.blog-card--featured p {
  font-size: 1rem;
  max-width: 52ch;
}

.blog-card h2 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 14px 0 10px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.02em;
}

.blog-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.blog-read {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  white-space: nowrap;
  transition: color 0.2s;
}

.blog-card:hover .blog-read {
  color: var(--accent);
}

.blog-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(59, 130, 246, 0.14);
  color: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.28);
  width: fit-content;
}

.blog-tag--security {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.blog-tag--defi {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.blog-tag--education {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.3);
}

.blog-tag--comparison {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
}

.blog-tag--ethereum {
  background: rgba(98, 126, 234, 0.15);
  color: #a5b4fc;
  border-color: rgba(98, 126, 234, 0.35);
}

.blog-tag--solana {
  background: rgba(153, 69, 255, 0.12);
  color: #c4b5fd;
  border-color: rgba(153, 69, 255, 0.35);
}

.blog-tag--tokens {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.3);
}

/* Blog — article pages */
.blog-article {
  max-width: 720px;
  margin: 0 auto 80px;
  padding-top: 8px;
}

.blog-article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.blog-article-header h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 18px 0 16px;
  letter-spacing: -0.03em;
  color: var(--text);
}

.blog-article-header .blog-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-back {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.blog-back:hover {
  color: var(--primary-light) !important;
}

.blog-prose {
  font-size: 1.05rem;
  line-height: 1.75;
}

.blog-prose h2 {
  margin-top: 2.25em;
  margin-bottom: 0.65em;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.blog-prose p {
  color: var(--text-muted);
  margin-bottom: 1.25em;
}

.blog-cta {
  margin-top: 3em;
  padding: 36px 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.blog-cta h2 {
  margin-top: 0;
  font-size: 1.35rem;
  color: var(--text);
}

.blog-cta p {
  color: var(--text-muted);
  margin-bottom: 20px;
}
