/* ============================================================
   Vision Studio — Shared Styles
   ============================================================ */

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

:root {
  --bg:              #F1F5F9;
  --surface:         #FFFFFF;
  --border:          #E2E8F0;
  --border-subtle:   #F1F5F9;
  --text:            #0F172A;
  --text-secondary:  #475569;
  --text-muted:      #94A3B8;
  --accent:          #2563EB;
  --accent-hover:    #1D4ED8;
  --accent-light:    #EFF6FF;
  --accent-border:   #BFDBFE;
  --nav-bg:          #0F172A;
  --nav-border:      rgba(255,255,255,0.07);
  --nav-text:        #94A3B8;
  --nav-text-active: #F1F5F9;
  --green:           #16A34A;
  --red:             #DC2626;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --r-sm:  3px;
  --r:     5px;
  --r-lg:  8px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);

  --nav-h: 64px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navbar ──────────────────────────────────────────────── */

.site-nav {
  height: var(--nav-h);
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--nav-border);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  height: 54px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--nav-text);
  text-decoration: none;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  transition: color 0.12s, background 0.12s;
}

.nav-links a:hover {
  color: var(--nav-text-active);
  background: rgba(255,255,255,0.07);
}

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

.nav-links a.nav-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  margin-left: 10px;
  padding: 5px 14px;
}

.nav-links a.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ── Page wrapper ─────────────────────────────────────────── */

.page-wrapper {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 64px 0 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.hero-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 3px 9px;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 30px;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  border-radius: var(--r);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1;
}

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

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

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

.btn-secondary:hover {
  background: var(--bg);
  border-color: #CBD5E1;
}

/* ── Spec panel (hero right col) ──────────────────────────── */

.spec-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}

.spec-panel-heading {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text);
}

.spec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ── Sections ─────────────────────────────────────────────── */

.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.section-sub {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin: 0 0 36px;
  max-width: 520px;
  line-height: 1.6;
}

/* ── Feature cards ────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 7px;
}

.feature-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── Workflow steps ───────────────────────────────────────── */

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

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.step-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ── Wiki layout ──────────────────────────────────────────── */

.wiki-layout {
  display: grid;
  grid-template-columns: 212px 1fr;
  flex: 1;
  min-height: calc(100vh - var(--nav-h) - 61px); /* minus footer */
}

.wiki-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

.wiki-sidebar-group {
  margin-bottom: 4px;
}

.wiki-sidebar-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 18px 4px;
  display: block;
}

.wiki-sidebar a {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 18px;
  border-left: 2px solid transparent;
  transition: color 0.1s, background 0.1s, border-color 0.1s;
}

.wiki-sidebar a:hover {
  color: var(--text);
  background: var(--bg);
}

.wiki-sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-light);
}

.wiki-content {
  padding: 40px 52px 60px;
  max-width: 780px;
}

.wiki-page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.wiki-page-sub {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.wiki-section {
  margin-bottom: 44px;
}

.wiki-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.wiki-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 12px;
}

.wiki-section ul,
.wiki-section ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.wiki-section li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 3px;
}

.wiki-section strong {
  color: var(--text);
  font-weight: 600;
}

code.inline {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: var(--r-sm);
}

.callout {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  padding: 13px 16px;
  margin: 14px 0;
}

.callout p {
  font-size: 13.5px !important;
  color: var(--text) !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}

.box-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.box-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
}

.box-card-name {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 5px;
}

.box-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ── App page nav override ────────────────────────────────── */

.app-page-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}
