/* ─── Imports ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500&display=swap');

/* ─── Variables ───────────────────────────────────────── */
:root {
  --sidebar-bg:   #000000;
  --sidebar-w:    280px;
  --accent:       #74797c;
  --accent-dim:   #2e6f8e;
  --text-main:    #1a1a1a;
  --text-muted:   #3e4c4c;
  --border:       #e5e7eb;
  --bg:           #ffffff;
  --bg-off:       #f8f9fa;
  --mono:         'IBM Plex Mono', monospace;
  --sans:         'IBM Plex Sans', sans-serif;
}

/* ─── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text-main); background: var(--bg); }

/* ─── Nav ─────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 56px;
  background: var(--sidebar-bg);
  display: flex; align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-nav .brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.08em;
  text-decoration: none;
  margin-right: auto;
}
.site-nav .brand span { color: var(--accent); }
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.781);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--accent); }

/* ─── Hero (Home) ─────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 8rem 10vw 6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 10vw 6rem;
  gap: 3rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Left side */
.hero-left {
  flex: 1;
  max-width: 600px;
}

/* Right side */
.hero-right {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-right img {
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  opacity: 0.9;
}
@media (max-width: 900px) {
  .hero-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .hero-left {
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }
}.hero-right img {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--mono);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary-custom {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
  display: inline-block;
}
.btn-primary-custom:hover { background: var(--accent-dim); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Features strip ──────────────────────────────────── */
.features { padding: 5rem 10vw; background: var(--bg-off); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 2.5rem; margin-top: 3rem; }
.feature-card { padding: 0; }
.feature-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.feature-card h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; }

/* ─── Docs Layout ─────────────────────────────────────── */
.docs-wrapper {
  display: flex;
  min-height: 100vh;
  padding-top: 56px;
}

/* Sidebar */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  position: fixed;
  top: 56px; left: 0; bottom: 0;
  overflow-y: auto;
  padding: 2rem 0 4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.sidebar-section { margin-bottom: 0.25rem; }
.sidebar-group-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251, 249, 249, 0.932);
  padding: 1.4rem 1.5rem 0.5rem;
  display: block;
}
.sidebar-link {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.768);
  text-decoration: none;
  padding: 0.42rem 1.5rem 0.42rem 1.5rem;
  border-left: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  line-height: 1.4;
}
.sidebar-link:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.03); }
.sidebar-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(74,159,196,0.07); }

/* Collapsible dev-notes sub-items */
.sidebar-sub { padding-left: 0.75rem; display: none; }
.sidebar-sub.open { display: block; }
.sidebar-toggle {
  cursor: pointer;
  user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-toggle .chevron {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s;
}
.sidebar-toggle.open .chevron { transform: rotate(90deg); }

/* Docs main content */
.docs-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 3.5rem clamp(2rem, 6vw, 5rem) 6rem;
  max-width: 820px;
}

.doc-section { margin-bottom: 4rem; scroll-margin-top: 80px; }
.doc-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}
.doc-section h2 {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}
.doc-section h3 { font-size: 1rem; font-weight: 500; margin: 1.75rem 0 0.6rem; }
.doc-section p { font-size: 0.92rem; color: #374151; line-height: 1.8; margin-bottom: 0.85rem; }
.doc-section ul { margin: 0.5rem 0 1rem 1.25rem; }
.doc-section li { font-size: 0.9rem; color: #374151; line-height: 1.75; margin-bottom: 0.25rem; }

/* Code blocks */
.code-block {
  background: #0d1117;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.06);
}
.code-block code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #c9d1d9;
  line-height: 1.7;
  white-space: pre;
}
.code-kw { color: #ff7b72; }
.code-str { color: #a5d6ff; }
.code-comment { color: #6e7681; }
.code-fn { color: #d2a8ff; }
.code-num { color: #79c0ff; }

/* Callout / note box */
.callout {
  background: rgba(74, 160, 196, 0.402);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  
  border-radius: 0 4px 4px 0;
  margin: 1.25rem 0;
}
.callout-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 0.4rem;
  display: block;
}
.callout p { font-size: 0.88rem; margin: 0; color: #374151; }

/* ─── Download Page ───────────────────────────────────── */
.download-hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 8rem 10vw 6rem;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 860px;
}
.dl-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dl-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,159,196,0.08); }
.dl-os {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.dl-card h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.35rem; }
.dl-card p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.dl-card .btn-primary-custom { width: 100%; text-align: center; font-size: 0.72rem; }

.dl-note {
  margin-top: 2.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
}
.dl-note a { color: var(--accent); text-decoration: none; }
.dl-note a:hover { text-decoration: underline; }

/* ─── About Page ──────────────────────────────────────── */
.about-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 7rem 2rem 6rem;
}
.about-wrap h1 { font-family: var(--mono); font-size: 2rem; font-weight: 600; margin-bottom: 2rem; }
.about-wrap p { font-size: 0.95rem; line-height: 1.85; color: #374151; margin-bottom: 1.25rem; }
.about-wrap h2 { font-family: var(--mono); font-size: 1rem; font-weight: 600; margin: 2.5rem 0 0.75rem; color: var(--text-main); }

/* ─── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--sidebar-bg);
  color: rgb(255, 255, 255);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 1.5rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem;
}
.site-footer a { color: var(--accent); text-decoration: none; }

/* ─── Utilities ───────────────────────────────────────── */
.pt-nav { padding-top: 56px; }
hr.thin { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .docs-sidebar { display: none; }
  .docs-content { margin-left: 0; }
  .hero { padding: 7rem 6vw 4rem; }
  .features { padding: 4rem 6vw; }
  .site-nav { padding: 0 1rem; }
  .nav-links a { padding: 0.35rem 0.6rem; font-size: 0.68rem; }
}