/* ===== Voiceworks Toolkit — GitHub Pages Stylesheet ===== */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.15);
  --border: #30363d;
  --code-bg: #161b22;
  --success: #3fb950;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --nav-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

/* ===== Navigation ===== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-brand svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

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

.nav-github {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.nav-github:hover {
  color: var(--text-primary);
}

.nav-github svg {
  width: 24px;
  height: 24px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ===== Layout ===== */

main {
  padding-top: var(--nav-height);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ===== Hero ===== */

.hero {
  padding: 120px 0 100px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-dim) 0%, transparent 60%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

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

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ===== Section Headers ===== */

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Feature Cards Grid ===== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== Feature Detail Sections (features.html) ===== */

.feature-section {
  padding: 64px 0;
}

.feature-section + .feature-section {
  border-top: 1px solid var(--border);
}

.feature-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-section > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.0625rem;
}

.feature-list {
  display: grid;
  gap: 24px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}

.feature-item h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ===== Placeholder Images ===== */

.placeholder-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.placeholder-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(139, 92, 246, 0.03) 10px,
    rgba(139, 92, 246, 0.03) 20px
  );
}

.placeholder-img span {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  background: rgba(13, 17, 23, 0.6);
  border-radius: var(--radius);
}

/* ===== Tech Badges ===== */

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===== Code Blocks ===== */

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 16px 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
}

p code, li code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ===== Tables ===== */

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

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

td {
  color: var(--text-secondary);
}

td code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ===== Steps / Install Guide ===== */

.steps {
  display: grid;
  gap: 32px;
  counter-reset: step;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 24px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.step p:last-child {
  margin-bottom: 0;
}

/* ===== Manual / Content Pages ===== */

.content {
  padding: 48px 0 80px;
}

.content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.content > .lead {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: 48px;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.content ul, .content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.content li {
  margin-bottom: 8px;
}

.callout {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

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

.callout strong {
  color: var(--accent);
}

/* ===== Footer ===== */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

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

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

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 12px;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero .tagline {
    font-size: 1.0625rem;
  }

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

  section {
    padding: 48px 0;
  }

  .hero {
    padding: 80px 0 60px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .tech-badges {
    gap: 8px;
  }
}
