:root {
  --bg: #1d2327;
  --surface: #22282c;
  --surface-alt: #191d20;
  --border: #2d3439;
  --teal: #0d9488;
  --teal-bright: #2dd4bf;
  --text: #e6edf0;
  --text-muted: #8b949e;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Consolas', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-muted);
}

code {
  font-family: var(--mono);
  background: var(--surface-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--teal-bright);
}

a {
  color: var(--teal-bright);
  text-decoration: none;
}

.rune {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(29, 35, 39, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Layout */
section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

section h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.rune--hero {
  width: 48px;
  height: 48px;
  stroke-width: 1.6;
}

.wordmark--hero {
  font-size: 3rem;
  margin: 0;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 40ch;
}

.cta {
  margin-top: 0.75rem;
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.cta:hover {
  background: var(--teal-bright);
}

/* Code first */
.code-first {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.snippets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.snippets + .snippets {
  margin-top: 1.5rem;
}

.snippets.snippets--single {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 1.5rem auto 0;
}

.snippet {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.snippet-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.snippet pre {
  margin: 0;
  padding: 1.1rem;
  overflow-x: auto;
}

.snippet code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre;
}

.tok-fn   { color: var(--teal-bright); }
.tok-str  { color: #e3b341; }
.tok-kw   { color: #d2a8ff; }
.tok-num  { color: #ff9f6b; }
.tok-comment { color: var(--text-muted); font-style: italic; }
.tok-punc { color: #6e7681; }

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature h3 {
  font-size: 1rem;
  color: var(--teal-bright);
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.95rem;
}

/* How it works */
.how {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-bright);
  border: 1px solid var(--teal);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.05rem;
  margin: 0.4rem 0 0.5rem;
}

.step p {
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand .wordmark {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
}

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

.license {
  color: var(--text-muted);
}

/* Responsive */
@media (min-width: 800px) {
  .snippets {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 500px) {
  .wordmark--hero {
    font-size: 2.25rem;
  }

  section {
    padding: 3.5rem 1.25rem;
  }

  .snippet code {
    font-size: 0.78rem;
  }
}
