/* Oculus Documentation - Shared Stylesheet */

:root {
  --primary: #0ea5e9;
  --accent: #22d3ee;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #263348;
  --text: #e2e8f0;
  --muted: #64748b;
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --border: #334155;
  --code-bg: #000000;
  --radius: 8px;
  --radius-lg: 12px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Typography ─────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

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

strong { font-weight: 600; color: var(--text); }
em { font-style: italic; color: var(--accent); }

/* ─── Navigation ─────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

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

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #000;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

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

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

.nav-cta {
  background: var(--primary);
  color: #000 !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
}

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

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding: 0;
}

.nav-mobile-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Breadcrumbs ────────────────────────────────────────────── */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .current { color: var(--text); }

/* ─── Prev / Next Nav ────────────────────────────────────────── */

.prev-next-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.prev-next-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0;
}

.prev-next-nav a:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.prev-next-nav .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.prev-next-nav .title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.25rem;
}

.prev-next-nav .next {
  text-align: right;
  align-items: flex-end;
}

.prev-next-nav .placeholder { visibility: hidden; }

@media (max-width: 640px) {
  .prev-next-nav { grid-template-columns: 1fr; }
}

/* ─── Layout ─────────────────────────────────────────────────── */

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

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.page-header {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem;
}

.page-header .label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 600px;
}

/* ─── Content Layout (sidebar + main) ───────────────────────── */

.content-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
}

.sidebar {
  position: sticky;
  top: 80px;
}

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

.sidebar-nav .section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.75rem 0.75rem 0.25rem;
  margin-top: 0.5rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  border-left: 2px solid transparent;
}

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

.sidebar-nav a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(14, 165, 233, 0.08);
}

.doc-content {
  min-width: 0;
}

.doc-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.doc-content h2:first-child {
  margin-top: 0;
}

.doc-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  scroll-margin-top: 80px;
}

.doc-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.doc-content p {
  color: #cbd5e1;
  line-height: 1.8;
}

.doc-content ul, .doc-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
  color: #cbd5e1;
}

.doc-content li {
  margin-bottom: 0.375rem;
  line-height: 1.7;
}

/* ─── Code ───────────────────────────────────────────────────── */

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.75;
}

.code-block {
  position: relative;
}

.code-block .copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.code-block .copy-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Syntax hint colors */
.token-keyword { color: #c084fc; }
.token-string  { color: #86efac; }
.token-comment { color: var(--muted); font-style: italic; }
.token-func    { color: #7dd3fc; }
.token-flag    { color: var(--accent); }
.token-var     { color: #fcd34d; }

/* ─── Cards ──────────────────────────────────────────────────── */

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

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

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(14, 165, 233, 0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ─── Grid ───────────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

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

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ─── Badges / Tags ──────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-primary  { background: rgba(14, 165, 233, 0.15); color: var(--primary); border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-accent   { background: rgba(34, 211, 238, 0.12); color: var(--accent); border: 1px solid rgba(34, 211, 238, 0.25); }
.badge-success  { background: rgba(34, 197, 94, 0.12); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-warning  { background: rgba(234, 179, 8, 0.12); color: var(--warning); border: 1px solid rgba(234, 179, 8, 0.25); }
.badge-muted    { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(14, 165, 233, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

/* ─── Tables ─────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

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

thead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

th {
  text-align: left;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: #cbd5e1;
  vertical-align: top;
}

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

tbody tr:hover { background: rgba(255,255,255,0.02); }

td code { font-size: 0.8rem; }

/* ─── Callouts ───────────────────────────────────────────────── */

.callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 3px solid;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.callout-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }

.callout-info    { background: rgba(14,165,233,0.08);  border-color: var(--primary); }
.callout-success { background: rgba(34,197,94,0.08);   border-color: var(--success); }
.callout-warning { background: rgba(234,179,8,0.08);   border-color: var(--warning); }
.callout-error   { background: rgba(239,68,68,0.08);   border-color: var(--error); }

.callout-info p, .callout-success p,
.callout-warning p, .callout-error p { color: var(--text); }

/* ─── Install Tabs ───────────────────────────────────────────── */

.tab-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
}

.tab-header {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-panel pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

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

.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(14,165,233,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(14,165,233,0.3);
  border-radius: 999px;
  background: rgba(14,165,233,0.06);
}

.hero h1 {
  margin-bottom: 0.5rem;
}

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

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: var(--muted);
  margin: 1rem 0 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ─── Section Headers ────────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-header h2 { margin-bottom: 0.75rem; }

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

/* ─── Terminal mockup ─────────────────────────────────────────── */

.terminal {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-bar {
  background: var(--surface);
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  line-height: 1.8;
}

.terminal-body .prompt { color: var(--primary); }
.terminal-body .cmd    { color: var(--text); }
.terminal-body .out    { color: var(--muted); }
.terminal-body .info   { color: var(--accent); }
.terminal-body .ok     { color: var(--success); }

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

.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-mobile-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 0.75rem 0.875rem; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .container { padding: 0 1rem; }
  .page-header { padding: 2.5rem 0 2rem; }
  .content-layout { padding: 2rem 0; }
}

/* ─── Misc utilities ─────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.text-primary  { color: var(--primary); }
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--muted); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-error    { color: var(--error); }

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
