/*
 * Vura Docs — styles.css
 * Design tokens ported from vura/sites/landing/index.html.
 * Layout chrome ported from what-fw/docs-site pattern.
 */

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

/* ─── Design Tokens ─── */
:root {
  --bg-deep: #111110;
  --bg: #1a1a18;
  --bg-raised: #222220;
  --bg-surface: #2a2a28;
  --text: #f0efe8;
  --text-secondary: #9d9d93;
  --text-muted: #6b6b63;
  --accent: #3ecf8e;
  --accent-hover: #34b87d;
  --accent-dim: rgba(62, 207, 142, 0.12);
  --accent-orange: #ee5d34;
  --accent-orange-dim: rgba(238, 93, 52, 0.12);
  --accent-blue: #5b9ef5;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sidebar-width: 260px;
  --nav-height: 60px;
}

[data-theme="light"] {
  --bg-deep: #f5f0e8;
  --bg: #ece7df;
  --bg-raised: #ffffff;
  --bg-surface: #f5f0e8;
  --text: #1a1a18;
  --text-secondary: #4a4a42;
  --text-muted: #6b6b63;
  --accent: #2ba86e;
  --accent-hover: #239b62;
  --accent-dim: rgba(43, 168, 110, 0.12);
  --accent-orange-dim: rgba(238, 93, 52, 0.1);
  --border: rgba(0, 0, 0, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ─── Nav ─── */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(17, 17, 16, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

[data-theme="light"] nav.site-nav {
  background: rgba(236, 231, 223, 0.9);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.logo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

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

/* ─── Theme Toggle ─── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ─── Layout ─── */
.layout {
  display: flex;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.mobile-docs-container { display: none; }

.sidebar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 24px 0 40px;
  border-right: 1px solid var(--border);
  background: var(--bg-deep);
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-heading {
  padding: 0 20px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.sidebar-nav li a {
  display: block;
  padding: 5px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

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

.sidebar-nav li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

/* ─── Content ─── */
.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 48px 56px 80px;
  max-width: 800px;
}

.content h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

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

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

.content a:hover { text-decoration: underline; }

.content ul, .content ol {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

/* ─── Code Blocks ─── */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.content pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 20px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.content :not(pre) > code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.content pre code {
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
  font-size: 1em;
}

/* ─── Callouts ─── */
.callout {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 20px;
  border-left: 3px solid;
  font-size: 0.9rem;
}

.callout-note {
  background: rgba(91, 158, 245, 0.08);
  border-left-color: var(--accent-blue);
  color: var(--text-secondary);
}

.callout-tip {
  background: var(--accent-dim);
  border-left-color: var(--accent);
  color: var(--text-secondary);
}

.callout-warning {
  background: var(--accent-orange-dim);
  border-left-color: var(--accent-orange);
  color: var(--text-secondary);
}

/* ─── Footer ─── */
footer.site-footer {
  margin-left: var(--sidebar-width);
  padding: 24px 56px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

footer.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* Landing page footer (no sidebar offset) */
footer.site-footer.no-sidebar {
  margin-left: 0;
  padding: 24px 32px;
}

/* ─── Landing Chrome (no sidebar) ─── */
.landing-body {
  padding-top: var(--nav-height);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .mobile-docs-container { display: block; }
  .mobile-docs-nav { border-bottom: 1px solid var(--border); }
  .mobile-docs-nav > summary {
    padding: 12px 24px;
    min-height: 48px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
  }
  .mobile-docs-nav > summary:focus-visible,
  .mobile-docs-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
  }
  .mobile-docs-nav > nav { padding: 12px 0; }
  .mobile-docs-nav .sidebar-nav li a { padding: 10px 24px; }
  .content { margin-left: 0; padding: 32px 24px 60px; }
  footer.site-footer { margin-left: 0; padding: 20px 24px; }
}

/* ─── Landing Sections ───
   The landing page (pages/index.html) uses these section classes; everything
   below builds on the design tokens above. Docs pages never use them. */

.landing-body section {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

.landing-body section > p {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 16px;
}

.landing-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text);
}

.landing-body a {
  color: var(--accent);
  text-decoration: none;
}

.landing-body a:hover { text-decoration: underline; }

.landing-body section :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.landing-body pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.landing-body pre code {
  font-family: var(--font-mono);
  color: var(--text);
}

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding-top: 96px;
  padding-bottom: 40px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 820px;
  margin: 0 auto 20px;
}

.hero-sub {
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.landing-body .install-cmd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--accent);
}

.landing-body .btn-secondary {
  display: inline-block;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s, border-color 0.2s;
}

.landing-body .btn-secondary:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── The one-line change ─── */
.code-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.code-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ─── Ladder strip ─── */
ol.ladder {
  list-style: none;
  counter-reset: rung;
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

ol.ladder li a {
  display: block;
  padding: 14px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  line-height: 1.9;
  transition: border-color 0.2s, background 0.2s;
}

ol.ladder li a::before {
  counter-increment: rung;
  content: counter(rung);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 14px;
}

ol.ladder li a:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--accent-dim);
}

ol.ladder strong { color: var(--text); }

/* ─── Pillars ─── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.pillar h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.pillar p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── License + closing ─── */
.license-commitment {
  text-align: center;
}

.license-commitment p {
  max-width: 680px;
  margin: 0 auto;
}

.closing-cta {
  text-align: center;
  padding-bottom: 96px;
}

.closing-cta p { margin-top: 16px; }

@media (max-width: 900px) {
  .hero { padding-top: 64px; }
  .code-compare { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
}
