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

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #DBEAFE;
  --blue-bg: #EFF6FF;
  --green: #059669;
  --green-dark: #047857;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --max-w: 1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  line-height: 1.7;
  font-size: 16px;
  background: #fff;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.nav-brand span { color: var(--blue); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--blue); text-decoration: none; }

.nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid var(--gray-200);
  flex: 0 0 auto;
}
.nav-mark:hover { text-decoration: none; border-color: var(--blue-light); }
.nav-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}
.nav-mark-brand {
  width: 38px;
  height: 38px;
}
.nav-mark-brand img {
  width: 28px;
  height: 28px;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--gray-700); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { padding: 5rem 1.5rem; }

.container { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: linear-gradient(170deg, var(--blue-bg) 0%, #fff 60%);
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.hero-title span { color: var(--blue); }

.hero-intro {
  max-width: 900px;
  margin: 0 auto 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.hero-mark {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hero-mark img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--gray-600);
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
  text-align: left;
}

.hero-notes {
  max-width: 860px;
  margin: -0.75rem auto 2rem;
  display: grid;
  gap: 0.75rem;
}

.hero-note {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--gray-700);
}

.hero-note-muted {
  background: var(--gray-50);
  color: var(--gray-600);
}

.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }

.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-green:hover { background: var(--green-dark); text-decoration: none; }

/* ── Cards grid ───────────────────────────────────────────────────────────── */
.cards { display: grid; gap: 1.5rem; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
}

.card-icon {
  width: 48px; height: 48px;
  background: var(--blue-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--blue); fill: none; stroke-width: 2; }

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.925rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ── Problem section ──────────────────────────────────────────────────────── */
.problem { background: var(--gray-50); }

.problem-stat {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* ── How it works ─────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step-item { text-align: center; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: 0.925rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* connector arrows between steps — desktop only */
.step-connector {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 1.5rem;
}

/* ── Properties ───────────────────────────────────────────────────────────── */
.properties { background: var(--gray-50); }

.prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.prop-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
}

.prop-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--blue-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prop-icon svg { width: 20px; height: 20px; stroke: var(--blue); fill: none; stroke-width: 2; }

.prop-item strong {
  display: block;
  font-size: 0.925rem;
  color: var(--gray-900);
  margin-bottom: 0.15rem;
}

.prop-item span {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* ── Whitepaper section ───────────────────────────────────────────────────── */
.whitepaper-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.whitepaper-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  line-height: 1.35;
}

.whitepaper-card p {
  font-size: 0.925rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ── Get Involved ─────────────────────────────────────────────────────────── */
.involved { background: var(--gray-50); }

.involve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.involve-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.75rem;
}

.involve-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.involve-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.involve-item code {
  display: block;
  background: var(--gray-100);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.involve-item a.link {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Diagram ──────────────────────────────────────────────────────────────── */
.diagram {
  margin: 3rem auto 0;
  max-width: 780px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  overflow-x: auto;
}

.diagram svg { width: 100%; height: auto; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}
.footer-links a:hover { color: var(--blue); }

.footer-tagline {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: italic;
}

.footer-credit {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.75rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 3.5rem 1.25rem; }
  .hero { padding-top: 6rem; padding-bottom: 3.5rem; }
  .section-title { font-size: 1.6rem; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-actions { gap: 0.5rem; }
  .nav-mark {
    width: 30px;
    height: 30px;
  }
  .nav-mark img {
    width: 21px;
    height: 21px;
  }
  .nav-mark-brand {
    width: 34px;
    height: 34px;
  }
  .nav-mark-brand img {
    width: 24px;
    height: 24px;
  }
  .hero-intro {
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
  }
  .hero-mark {
    width: 78px;
    height: 78px;
  }
  .hero-mark img {
    width: 60px;
    height: 60px;
  }
  .hero-sub {
    text-align: center;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
}

@media (min-width: 900px) {
  .step-connector { display: flex; }
  .steps { grid-template-columns: 1fr auto 1fr auto 1fr; }
}
