/* Netra – website styles (responsive) */
:root {
  --bg: #0a0e14;
  --bg-card: #0f1419;
  --bg-elevated: #151b23;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00d9a5;
  --accent-dim: #00d9a540;
  --accent-hover: #00f0b5;
  --border: #21262d;
  --code-bg: #161b22;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 65ch;
}

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

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

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

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg) !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--bg) !important;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover {
  background: var(--bg-elevated);
}

@media (max-width: 768px) {
  .site-header .container { padding: 0 1rem; }
  .menu-toggle {
    display: flex;
    margin-left: auto;
  }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-cta { justify-content: center; margin-top: 0.25rem; }
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 8vw, 6rem) 0;
  text-align: center;
}

@media (max-width: 480px) {
  .hero { padding: 2rem 0; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; margin-bottom: 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { justify-content: center; }
  .hero-code { margin-top: 1.5rem; margin-left: 0; margin-right: 0; }
  .hero-code pre { padding: 1rem; font-size: 0.8rem; }
  .stack-list { margin: 1.25rem 0; gap: 0.5rem; }
  .stack-badge { font-size: 0.8rem; padding: 0.35rem 0.75rem; }
}

.hero h1 {
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .accent { color: var(--accent); -webkit-text-fill-color: var(--accent); }

.hero p {
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

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

/* Code block hero */
.hero-code {
  margin-top: 2.5rem;
  text-align: left;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-code pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  color: var(--text);
}

.hero-code .prompt { color: var(--accent); }

/* Features grid */
.features {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .features { padding: 2rem 0; }
  .features h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }
}

.features h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
}

/* Stack list */
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0;
}

.stack-badge {
  padding: 0.4rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

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

@media (max-width: 480px) {
  .site-footer { padding: 1.25rem 0; margin-top: 2rem; }
  .site-footer p { font-size: 0.85rem; }
}

/* Docs layout */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
  min-height: calc(100vh - 64px);
  position: relative;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  padding-right: 1rem;
}

@media (max-width: 900px) {
  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 85vw);
    height: 100vh;
    z-index: 200;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1rem 0 2rem 1rem;
    padding-top: 5rem;
    margin: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .docs-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
  }
  .docs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .docs-sidebar-overlay.is-open {
    display: block;
    opacity: 1;
  }
  .docs-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
  }
  .docs-sidebar-toggle:hover {
    background: var(--border);
    border-color: var(--text-muted);
  }
}

@media (min-width: 901px) {
  .docs-sidebar-toggle,
  .docs-sidebar-overlay { display: none !important; }
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (max-width: 900px) {
  .docs-sidebar nav {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .docs-sidebar .nav-section { margin-top: 1rem; }
  .docs-sidebar .nav-section:first-child { margin-top: 0; }
}

.docs-sidebar a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.docs-sidebar .nav-section {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  padding-left: 0.6rem;
}

@media (max-width: 900px) {
  .docs-sidebar a {
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

.docs-content {
  max-width: 720px;
  min-width: 0;
}

@media (max-width: 480px) {
  .docs-content { padding: 0 0.25rem; }
  .docs-content h1 { font-size: 1.5rem; }
  .docs-content h2 { font-size: 1.25rem; margin-top: 2rem; }
  .docs-content h3 { font-size: 1.1rem; }
}

.docs-content h2 {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.docs-content h2:first-child { border-top: none; padding-top: 0; }

/* Code in docs */
.docs-content pre,
.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.docs-content code {
  background: var(--code-bg);
  padding: 0.2em 0.45em;
  border-radius: 4px;
  color: var(--accent);
}

.docs-content pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  margin: 1rem 0;
}

@media (max-width: 480px) {
  .docs-content pre {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    border-radius: var(--radius-sm);
  }
  .docs-content pre code { font-size: 0.8rem; }
  .docs-content code { font-size: 0.8rem; }
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* Tables */
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

/* Table scroll wrapper for mobile */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.table-wrapper table { margin: 0; }

.docs-content th,
.docs-content td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.docs-content th {
  color: var(--text-muted);
  font-weight: 600;
}

.docs-content tr:last-child td { border-bottom: none; }

@media (max-width: 600px) {
  .docs-content th,
  .docs-content td {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
  .docs-content td:first-child { white-space: normal; max-width: 140px; }
}

/* Lists */
.docs-content ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.docs-content li { margin-bottom: 0.35rem; }

/* Mobile docs sidebar - legacy row layout removed in favor of drawer */
