/* ============================================
   soniqo.audio — Documentation Styles
   ============================================ */

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

/* --- Theme Variables --- */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-sidebar: #f4f5f6;
  --bg-code: #f0f2f4;
  --bg-code-block: #1e1e2e;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --border: #e2e4e8;
  --border-light: #eef0f2;
  --text-primary: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8b8da3;
  --text-code: #e06c75;
  --text-inverse: #ffffff;
  --accent: #e8610c;
  --accent-hover: #d35500;
  --accent-subtle: rgba(232, 97, 12, 0.08);
  --accent-border: rgba(232, 97, 12, 0.25);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 260px;
  --header-height: 60px;
}

[data-theme="dark"] {
  --bg-primary: #0f0f17;
  --bg-secondary: #16161f;
  --bg-sidebar: #12121a;
  --bg-code: #1a1a26;
  --bg-code-block: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-light: #222233;
  --text-primary: #e4e4ef;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b82;
  --text-code: #f0a070;
  --text-inverse: #0f0f17;
  --accent: #f08030;
  --accent-hover: #f59050;
  --accent-subtle: rgba(240, 128, 48, 0.1);
  --accent-border: rgba(240, 128, 48, 0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* --- Typography --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-top: 2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

code {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-code);
  color: var(--text-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--bg-code-block);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  position: relative;
}

pre code {
  background: none;
  color: #abb2bf;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Layout --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  height: 32px;
  width: 32px;
  border-radius: 6px;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-title span {
  color: var(--text-muted);
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.15s;
}
.header-link:hover { color: var(--text-primary); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
:root .icon-sun { display: none; }
:root .icon-moon { display: block; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.menu-toggle svg { width: 18px; height: 18px; }

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 50;
  transition: transform 0.25s ease;
}

.sidebar-section {
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}

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

.sidebar-nav a {
  display: block;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.1s;
}

.sidebar-nav a:hover {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 500;
  border-left: 2px solid var(--accent);
  margin-left: -2px;
}

/* --- Main Content --- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* --- Landing Page --- */
.landing {
  margin-left: 0;
}

/* Hero */
.hero-compact {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem 0;
}

.hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.hero-row h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.hero-row .btn {
  flex-shrink: 0;
}

.hero-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hero-install {
  position: relative;
  flex: 1;
  min-width: 0;
}

.hero-install pre {
  margin-bottom: 0;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem;
}

.hero-install code {
  font-size: 0.78rem;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-inverse);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.copy-btn:hover { color: #abb2bf; }
.copy-btn svg { width: 16px; height: 16px; }

/* Two-column body: features (left) + sidebar (right) */
.home-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.home-main {
  min-width: 0;
}

/* Grid sections with labels */
.grid-section {
  margin-bottom: 1.25rem;
}

.grid-section:last-child {
  margin-bottom: 0;
}

.grid-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 0.15rem;
}

/* Feature grid — compact 2-col */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* Category left-border colors */
.feature-card.cat-stt { border-left-color: #3b82f6; }
.feature-card.cat-stt:hover { border-left-color: #3b82f6; }
.feature-card.cat-tts { border-left-color: #8b5cf6; }
.feature-card.cat-tts:hover { border-left-color: #8b5cf6; }
.feature-card.cat-s2s { border-left-color: var(--accent); }
.feature-card.cat-s2s:hover { border-left-color: var(--accent); }
.feature-card.cat-llm { border-left-color: #10b981; }
.feature-card.cat-llm:hover { border-left-color: #10b981; }
.feature-card.cat-analysis { border-left-color: #10b981; }
.feature-card.cat-analysis:hover { border-left-color: #10b981; }

.feature-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.4;
}

.feature-card .tag {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: var(--accent-subtle);
  color: var(--accent);
  margin-top: 0.4rem;
  margin-right: 0.25rem;
}

/* Sidebar blocks */
.home-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
}

.sidebar-block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sidebar-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar-block-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}
.sidebar-block-link:hover { color: var(--accent-hover); }

.sidebar-block-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Blog list (sidebar) */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.blog-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.1s;
}

.blog-item:hover {
  background: var(--accent-subtle);
}

.blog-item-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.blog-item:hover .blog-item-title {
  color: var(--accent);
}

.blog-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Performance list (sidebar) */
.perf-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.perf-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.perf-row-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 3.5rem;
}

.perf-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.perf-row-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
}

.perf-row-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Landing sections (Privacy, Architecture, Roadmap) --- */
.landing-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.landing-container {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.landing-section h2 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.section-lead {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.section-lead code {
  font-size: 0.8em;
}

.section-lead a {
  font-weight: 500;
}

/* Architecture grid */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.arch-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.arch-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.arch-list li {
  font-size: 0.8rem;
  color: var(--text-primary);
  padding: 0.2rem 0;
}

.arch-list li.arch-soon {
  color: var(--text-muted);
}

.arch-list li.arch-soon::after {
  content: " (soon)";
  font-size: 0.65rem;
  font-style: italic;
}

.arch-tag {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: var(--accent-subtle);
  color: var(--accent);
  vertical-align: middle;
}

/* Roadmap */
.roadmap-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.roadmap-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.roadmap-version {
  font-weight: 500;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}

.roadmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.roadmap-list li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.45;
}

.roadmap-done::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
  font-size: 0.75rem;
}

.roadmap-wip::before {
  content: "\25CB";
  position: absolute;
  left: 0.1rem;
  color: var(--accent);
  font-size: 0.7rem;
}

.roadmap-list code {
  font-size: 0.75em;
}

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

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

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
}

/* --- Callouts --- */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}

.callout p { margin-bottom: 0; color: var(--text-primary); }

.callout-title {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* --- Copy button on code blocks --- */
.code-block {
  position: relative;
}

.code-block .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.code-block:hover .copy-btn {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
  }

  .content-container {
    padding: 1.5rem 1rem 3rem;
  }

  .hero-compact {
    padding: 1.25rem 1rem 0;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .hero-right {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-link:not(:first-child):not(:last-child) {
    display: none;
  }

  .home-body {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 2rem;
  }

  .home-sidebar {
    position: static;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-section {
    padding: 0 1rem;
  }

  .arch-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .roadmap-cols {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-install pre {
    overflow-x: auto;
  }
}

