/* Stegstr Website - Bisq-inspired design */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-card: #ffffff;
  --gradient-hero: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fef3c7 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-accent: #60a5fa;
    --color-accent-hover: #93c5fd;
    --color-border: #334155;
    --color-card: #1e293b;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

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

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-link img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* Hero */
.hero {
  background: var(--gradient-hero);
  padding: 4rem 2rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
}

/* Download buttons */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.download-btn:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-accent);
  text-decoration: none;
}

.download-btn svg,
.download-btn img {
  width: 24px;
  height: 24px;
}

.download-btn .file-ext {
  font-size: 0.85em;
  opacity: 0.8;
}

.download-btn-secondary {
  background: var(--color-bg-alt);
}

.download-btn.preferred {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.download-secondary {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.download-secondary a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.download-secondary a:hover {
  color: var(--color-accent);
}

/* Sections */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

/* How it works */
.how-it-works {
  background: var(--color-bg-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
}

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

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

.step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Community */
.community-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.community-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.community-links a:hover {
  color: var(--color-accent);
}

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

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

/* Page layout */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page-content ul, .page-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content pre,
.page-content code {
  background: var(--color-bg-alt);
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}

.page-content pre {
  padding: 1rem;
  overflow-x: auto;
}

.page-content pre code {
  padding: 0;
}

/* Wiki sidebar */
.wiki-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

.wiki-nav {
  flex: 0 0 220px;
}

.wiki-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wiki-nav li {
  margin-bottom: 0.25rem;
}

.wiki-nav a {
  display: block;
  padding: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 4px;
}

.wiki-nav a:hover,
.wiki-nav a.active {
  color: var(--color-accent);
  background: var(--color-bg-alt);
}

.wiki-content {
  flex: 1;
  min-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .download-buttons {
    flex-direction: column;
  }

  .download-btn {
    justify-content: center;
  }

  .wiki-layout {
    flex-direction: column;
  }

  .wiki-nav {
    flex: none;
  }
}
