/* ═══════════════════════════════════════
   THE MUSTER — SHARED STYLESHEET
   War Room Aesthetic
   ═══════════════════════════════════════ */

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #0f1017;
  --bg-card: #13141b;
  --bg-card-hover: #1a1b24;
  --text-primary: #e4e6eb;
  --text-secondary: #9aa0a8;
  --text-muted: #6b7280;
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --accent-glow: rgba(88,101,242,0.25);
  --amber: #c9954a;
  --amber-light: #d4a74a;
  --amber-glow: rgba(201,149,74,0.2);
  --amber-glow-strong: rgba(201,149,74,0.35);
  --military-green: #4a6b4a;
  --border: #1e2028;
  --border-warm: #2a2520;
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Cinzel', 'Georgia', serif;
  --max-w: 1120px;
}

/* ═══════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   HEX GRID BACKGROUND PATTERN
   ═══════════════════════════════════════ */
.hex-bg {
  position: relative;
  overflow: hidden;
}
.hex-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16l28-16 28 16v34L28 66zm0 0l28 16v34L28 100V66' fill='none' stroke='rgba(201,149,74,0.06)' stroke-width='0.8'/%3E%3C/svg%3E");
  background-size: 56px 100px;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
.nav-toggle { display: none; }
.nav-label {
  display: none;
  background: none; border: none; color: var(--text-primary);
  cursor: pointer; padding: 8px;
}
.nav-label svg { width: 24px; height: 24px; }
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,11,16,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--amber);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.04em;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* Nav dropdown for docs */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}
.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  opacity: 0.6;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 180px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  color: var(--text-primary);
  background: rgba(201,149,74,0.06);
}

@media (max-width: 768px) {
  .nav-label { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }
  .nav-toggle:checked ~ .nav .nav-links { display: flex; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 0.25rem;
    background: rgba(255,255,255,0.03);
  }
}

/* ═══════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
}
.btn-secondary:hover {
  border-color: var(--amber-light);
  background: rgba(201,149,74,0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   SECTION HELPERS
   ═══════════════════════════════════════ */
section { padding: 6rem 0; }
.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin-bottom: 0.75rem;
  text-align: center;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  margin: 1rem auto 0;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-flourish {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }
.footer-made { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.5rem; }

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════
   DOC PAGES — LAYOUT
   ═══════════════════════════════════════ */
.doc-hero {
  position: relative;
  padding: 4rem 0 3rem;
  background: radial-gradient(ellipse 70% 50% at 30% 40%, rgba(201,149,74,0.08) 0%, transparent 70%),
              radial-gradient(ellipse 50% 60% at 70% 60%, rgba(88,101,242,0.04) 0%, transparent 70%),
              var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.doc-hero .container {
  max-width: 900px;
}
.doc-hero-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--military-green);
  margin-bottom: 0.5rem;
}
.doc-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}
.doc-hero h1 span { color: var(--amber); }
.doc-hero p {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* Doc layout: sidebar + content */
.doc-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  max-width: 1050px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* Sidebar */
.doc-sidebar {
  position: relative;
}
.doc-sidebar-inner {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.doc-sidebar-nav {
  list-style: none;
}
.doc-sidebar-nav li {
  margin-bottom: 0.15rem;
}
.doc-sidebar-nav a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-decoration: none;
}
.doc-sidebar-nav a:hover {
  color: var(--text-secondary);
  background: rgba(201,149,74,0.04);
  text-decoration: none;
}
.doc-sidebar-nav a.active {
  color: var(--amber);
  border-left-color: var(--amber);
  background: rgba(201,149,74,0.06);
  font-weight: 500;
}
.doc-sidebar-back {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.doc-sidebar-back:hover {
  color: var(--amber);
  text-decoration: none;
}
.doc-sidebar-back::before {
  content: '← ';
}

/* Mobile doc nav */
.doc-mobile-nav {
  display: none;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.doc-mobile-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.doc-mobile-nav select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa0a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

@media (max-width: 868px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1rem 4rem;
  }
  .doc-sidebar {
    display: none;
  }
  .doc-mobile-nav {
    display: block;
  }
}

/* Content area */
.doc-content {
  max-width: 750px;
}
.doc-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  letter-spacing: 0.01em;
  line-height: 1.3;
  scroll-margin-top: 80px;
}
.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.doc-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.doc-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.doc-content ul, .doc-content ol {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.doc-content li {
  margin-bottom: 0.4rem;
}
.doc-content strong {
  color: var(--text-primary);
  font-weight: 600;
}
.doc-content a {
  color: var(--accent);
}

/* Command blocks — terminal style */
.cmd-block {
  background: #0c0d12;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 1.25rem 0;
  overflow: hidden;
}
.cmd-block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #111219;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cmd-block-body {
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.cmd-block-body .cmd {
  color: #c9954a;
}
.cmd-block-body .cmd-output {
  color: var(--text-secondary);
}
.cmd-block-body .cmd-success {
  color: #6fbf73;
}
.cmd-block-body .cmd-muted {
  color: var(--text-muted);
}
.cmd-block-body .cmd-highlight {
  color: #8cb4ff;
}

/* Inline code */
.doc-content code {
  background: rgba(201,149,74,0.1);
  color: var(--amber);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  font-weight: 500;
}

/* Step lists */
.step-list {
  counter-reset: steps;
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}
.step-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}
.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: rgba(201,149,74,0.1);
  border: 1px solid rgba(201,149,74,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--amber);
}

/* Info / tip callouts */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.65;
  border-left: 3px solid;
}
.callout-info {
  background: rgba(88,101,242,0.06);
  border-left-color: var(--accent);
  color: var(--text-secondary);
}
.callout-tip {
  background: rgba(74,107,74,0.08);
  border-left-color: var(--military-green);
  color: var(--text-secondary);
}
.callout-warning {
  background: rgba(201,149,74,0.06);
  border-left-color: var(--amber);
  color: var(--text-secondary);
}
.callout strong {
  color: var(--text-primary);
}

/* Code block terminal wrapper styling */
.doc-content pre {
  background: #0c0d12;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 3rem 1rem 1rem;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  overflow-x: auto;
  position: relative;
  line-height: 1.5;
}
.doc-content pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: normal;
  display: inline;
}
