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

:root {
  --rust-orange:  #f74c00;
  --rust-orange2: #e05a00;
  --dark-bg:      #1a1a2e;
  --dark-nav:     #16213e;
  --text:         #2d2d2d;
  --text-light:   #555;
  --border:       #ddd;
  --code-bg:      #282c34;
  --code-text:    #abb2bf;
  --link:         #c0392b;
  --sidebar-bg:   #f8f8f8;
  --hero-h:       640px;
  font-size: 16px;
}

body {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--dark-nav);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  font-family: "Fira Mono", monospace;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--rust-orange);
  letter-spacing: 0.04em;
}

.site-header nav a {
  color: #ddd;
  margin-left: 1.8rem;
  font-family: "Fira Sans", sans-serif;
  font-size: 0.95rem;
}

.site-header nav a:hover { color: #fff; text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--dark-bg);
  color: #fff;
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-mascot {
  flex-shrink: 0;
  text-align: center;
}

.mascot-caption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
  font-family: "Fira Sans", sans-serif;
}

.hero h1 {
  font-family: "Fira Mono", monospace;
  font-size: 4rem;
  color: var(--rust-orange);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.hero .tagline {
  font-size: 1.4rem;
  color: #aaa;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: 4px;
  font-family: "Fira Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }

.btn-primary  { background: var(--rust-orange); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border: 2px solid #666; }

.hero-code {
  display: inline-block;
  text-align: left;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 6px;
  padding: 1.2rem 1.8rem;
  font-family: "Fira Mono", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Feature grid ────────────────────────────────────────────────────────── */
.features {
  padding: 4rem 0;
  background: #fff;
}

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

.feature h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--rust-orange2);
}

.feature p { color: var(--text-light); font-size: 0.97rem; }

/* ── Page layout (docs / learn) ──────────────────────────────────────────── */
.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  flex: 1;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
}

.sidebar-section-title {
  font-family: "Fira Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.sidebar-nav ul { list-style: none; }

.sidebar-nav li { margin: 0.3rem 0; }

.sidebar-nav a {
  font-family: "Fira Sans", sans-serif;
  font-size: 0.93rem;
  color: var(--text);
}

.sidebar-nav li.active a {
  color: var(--rust-orange2);
  font-weight: 600;
}

/* ── Prose ───────────────────────────────────────────────────────────────── */
.prose { flex: 1; min-width: 0; }

.prose h1 { font-size: 2rem; margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.prose h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0.5rem 0 1rem 1.5rem; }
.prose li { margin: 0.25rem 0; }
.prose code {
  font-family: "Fira Mono", monospace;
  font-size: 0.88em;
  background: #f3f3f3;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}
.prose pre code { background: none; padding: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark-nav);
  color: #888;
  padding: 1.2rem 0;
  text-align: center;
  font-family: "Fira Sans", sans-serif;
  font-size: 0.85rem;
  margin-top: auto;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .page-layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .hero h1 { font-size: 2.5rem; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-buttons { justify-content: center; }
}
