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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --green: #3fb950;
  --green-dim: #2ea043;
  --red: #f85149;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 2rem;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.25rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; transition: opacity 0.15s, transform 0.1s; text-decoration: none;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-green  { background: var(--green); color: #0d1117; }
.btn-ghost  { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-gh     { background: #21262d; color: var(--text); border: 1px solid var(--border); }
.btn-lg     { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* ── Hero ── */
.hero {
  max-width: 800px; margin: 5rem auto 2rem;
  padding: 0 2rem; text-align: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: #1c2a1e; color: var(--green);
  border: 1px solid #2e4a31; border-radius: 99px;
  font-size: 0.8rem; font-weight: 600;
  margin-bottom: 1.75rem; letter-spacing: 0.02em;
}

.badge-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 1.25rem; letter-spacing: -0.03em;
}
h1 em { color: var(--green); font-style: normal; }

.hero-sub {
  font-size: 1.2rem; color: var(--muted);
  max-width: 560px; margin: 0 auto 2.25rem; line-height: 1.65;
}

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

.hero-social-proof {
  margin-top: 2rem; color: var(--muted); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

.avatar-stack { display: flex; }
.avatar-stack img {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--bg); margin-left: -8px;
}
.avatar-stack img:first-child { margin-left: 0; }

/* ── Demo section ── */
.demo-section {
  max-width: 1060px; margin: 4rem auto;
  padding: 0 2rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}

@media (max-width: 720px) {
  .demo-section { grid-template-columns: 1fr; gap: 2rem; }
  .demo-right { order: -1; }
}

.demo-left h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.demo-left p { color: var(--muted); margin-bottom: 1.5rem; line-height: 1.7; }

.code-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-label { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }

.copy-pill {
  background: var(--border); color: var(--muted);
  border: none; border-radius: 4px; padding: 0.2rem 0.6rem;
  font-size: 0.72rem; cursor: pointer;
}
.copy-pill:hover { background: #444c56; color: var(--text); }

.code-body {
  padding: 1rem 1.25rem;
  font-family: var(--mono); font-size: 0.85rem; color: #c9d1d9; line-height: 1.7;
}
.t { color: #7ee787; }  /* tag */
.a { color: #79c0ff; }  /* attr */
.v { color: #a5d6ff; }  /* value */
.c { color: #8b949e; }  /* comment */

/* ── Interactive modal demo ── */
.demo-right { display: flex; justify-content: center; }

.demo-browser {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.browser-bar {
  background: #21262d; padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.browser-url {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.25rem 0.75rem;
  font-size: 0.75rem; color: var(--muted); font-family: var(--mono);
  flex: 1; text-align: center;
}

.browser-body {
  padding: 1.5rem; background: #0d1117;
  min-height: 200px;
}

.readme-ctx { margin-bottom: 1rem; }
.readme-h { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.readme-p { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.75rem; }

.demo-trigger-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; background: #21262d;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color 0.15s;
}
.demo-trigger-btn:hover { border-color: var(--green); color: var(--green); }

@keyframes nudge { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06); border-color:var(--green); color:var(--green); } }

/* ── Demo overlay + modal ── */
.demo-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 200;
  align-items: center; justify-content: center; padding: 1rem;
}
.demo-overlay.open { display: flex; }

.demo-modal {
  background: #161b22; border: 1px solid #30363d;
  border-radius: 14px; padding: 1.5rem;
  width: 100%; max-width: 360px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95) translateY(8px); } to { opacity:1; transform:none; } }

.modal-close {
  float: right; background: none; border: none;
  color: var(--muted); font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-dev { display: flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; }
.modal-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, #1f6feb 0%, #3fb950 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.modal-devname { font-size: 0.95rem; font-weight: 700; }
.modal-handle { font-size: 0.8rem; color: var(--muted); }

.modal-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600; margin-bottom: 0.5rem;
}

.modal-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.modal-amt {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 6px; padding: 8px 4px; text-align: center;
  cursor: pointer; font-size: 0.95rem; font-weight: 700; color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}
.modal-amt:hover { border-color: var(--green); }
.modal-amt.sel { border-color: var(--accent); background: #0d2137; color: var(--accent); }

.modal-custom {
  width: 100%; background: #0d1117; border: 1px solid #30363d;
  border-radius: 6px; padding: 7px 10px; color: var(--text);
  font-size: 0.875rem; margin-bottom: 0.75rem; outline: none; font-family: inherit;
}
.modal-custom:focus { border-color: var(--accent); }
.modal-custom::placeholder { color: var(--muted); }

.modal-msg {
  width: 100%; background: #0d1117; border: 1px solid #30363d;
  border-radius: 6px; padding: 7px 10px; color: var(--text);
  font-size: 0.8rem; resize: none; height: 56px;
  margin-bottom: 0.75rem; outline: none; font-family: inherit;
}
.modal-msg:focus { border-color: var(--accent); }
.modal-msg::placeholder { color: var(--muted); }

.modal-fees {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 6px; padding: 8px 10px; margin-bottom: 10px;
}
.fee-row { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); padding: 2px 0; }
.fee-total { border-top: 1px solid #30363d; margin-top: 5px; padding-top: 5px; color: var(--text); font-weight: 700; }
.fee-total .fv { color: var(--green); }

.modal-submit {
  width: 100%; padding: 10px; background: var(--green); color: #0d1117;
  border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 700; cursor: pointer;
}
.modal-submit:hover { background: var(--green-dim); }

.modal-fine { font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 6px; }

/* ── Use cases ── */
.use-cases {
  max-width: 1060px; margin: 5rem auto;
  padding: 0 2rem;
}

.section-eyebrow {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green); font-weight: 700; margin-bottom: 0.75rem; text-align: center;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800;
  text-align: center; margin-bottom: 0.75rem; letter-spacing: -0.02em;
}

.section-sub {
  text-align: center; color: var(--muted); font-size: 1rem;
  max-width: 520px; margin: 0 auto 3rem;
}

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

.use-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.use-card:hover { border-color: #444c56; transform: translateY(-2px); }

.use-icon {
  font-size: 1.75rem; margin-bottom: 0.85rem;
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
}

.use-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.use-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.use-card .use-example {
  margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border);
  font-size: 0.78rem; color: var(--muted); font-family: var(--mono);
}
.use-card .use-example span { color: var(--accent); }

/* ── How it works ── */
.how-section {
  max-width: 860px; margin: 5rem auto;
  padding: 0 2rem;
}

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; margin-top: 3rem; position: relative;
}

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

.steps::before {
  content: "";
  position: absolute; top: 24px; left: calc(16.66% + 1rem); right: calc(16.66% + 1rem);
  height: 1px; background: var(--border);
}
@media (max-width: 640px) { .steps::before { display: none; } }

.step { text-align: center; }

.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800; color: var(--accent);
  margin: 0 auto 1rem; position: relative; z-index: 1;
}

.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* ── Compare ── */
.compare {
  max-width: 760px; margin: 5rem auto;
  padding: 0 2rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
.check { color: var(--green); font-weight: 600; }
.cross { color: var(--red); }
td:first-child { color: var(--muted); }
td:last-child { font-weight: 600; }

/* ── CTA ── */
.cta-strip {
  text-align: center; padding: 5rem 2rem 7rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(63,185,80,0.07) 0%, transparent 70%);
}

.cta-strip h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 900;
  margin-bottom: 0.85rem; letter-spacing: -0.02em;
}
.cta-strip p { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }

.cta-bullets {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 2.5rem; font-size: 0.875rem; color: var(--muted);
}
.cta-bullets span::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
