/* =============================================
   LLUW — docs.css  (Documentation Site)
   Scheme: Black · White · Red
   Self-contained — no dependency on portal CSS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --bg:            #0a0a0a;
  --bg-surface:    #111111;
  --bg-card:       #181818;
  --bg-hover:      #202020;
  --border:        #242424;
  --border-subtle: #1e1e1e;

  --red:           #e63030;
  --red-dark:      #b52222;
  --red-glow:      rgba(230,48,48,0.18);

  --text:          #f2f2f2;
  --text-muted:    #888;
  --text-dim:      #444;

  --font-display:  'Bebas Neue', sans-serif;
  --font:          'DM Sans', sans-serif;
  --mono:          'DM Mono', monospace;

  --radius:        12px;
  --radius-sm:     7px;

  --sidebar-w:     240px;
  --nav-h:         60px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.nav-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--red);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.nav-logo-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  letter-spacing: 0.5px;
}

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

.nav-links a {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-hover); }

.btn-nav {
  background: var(--red);
  color: #fff;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-nav:hover { background: var(--red-dark); box-shadow: 0 0 20px var(--red-glow); }

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

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

/* ── SIDEBAR ── */
.docs-sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 28px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 6px 8px;
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.sidebar-link:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-link.active { background: var(--red-glow); color: var(--text); border-left: 2px solid var(--red); margin-left: -2px; }
.sidebar-link svg { flex-shrink: 0; color: var(--text-dim); }
.sidebar-link.active svg { color: var(--red); }

/* ── MAIN CONTENT ── */
.docs-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  padding: 48px 56px 80px;
  max-width: 860px;
}

/* ── ARTICLE TYPOGRAPHY ── */
.doc-section {
  margin-bottom: 72px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.doc-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--red);
  margin-bottom: 10px;
}

.doc-section h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.0;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.doc-section > p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 660px;
  margin-bottom: 32px;
}

.doc-divider {
  height: 1px;
  background: var(--border);
  margin: 56px 0;
}

/* Article body */
.doc-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
}

.doc-body h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-top: 28px;
  margin-bottom: 10px;
}

.doc-body p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.doc-body ul, .doc-body ol {
  padding-left: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-body ul li, .doc-body ol li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.7;
}

.doc-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 11px;
  top: 3px;
}

.doc-body ol { counter-reset: item; }
.doc-body ol li { counter-increment: item; }
.doc-body ol li::before {
  content: counter(item) '.';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  top: 1px;
}

/* ── CARDS in docs ── */
.doc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s;
}
.doc-card:hover { border-color: #333; }

.doc-card-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 14px;
}

.doc-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.doc-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }

.doc-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.doc-card-link:hover { color: var(--red-dark); }

/* ── CALLOUT BOX ── */
.callout {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
}
.callout-info  { border-left-color: #3b82f6; }
.callout-warn  { border-left-color: #f59e0b; }
.callout-good  { border-left-color: #34d399; }

.callout-icon { flex-shrink: 0; margin-top: 1px; }
.callout p { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; margin: 0; }
.callout strong { color: var(--text); }

/* ── CODE BLOCKS ── */
.code-block {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 16px 0;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.code-block pre {
  padding: 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: #c8c8c8;
  line-height: 1.65;
  overflow-x: auto;
}

code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--red);
}

/* ── STEP LIST ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0;
}

.step {
  display: flex;
  gap: 18px;
  padding-bottom: 28px;
  position: relative;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 36px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  position: relative;
  z-index: 1;
}

.step-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.step-body p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}

/* ── SPEC TABLE ── */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-table th {
  padding: 12px 18px;
  text-align: left;
  background: var(--bg-card);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.spec-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table tbody tr:hover { background: var(--bg-hover); }
.spec-table td:first-child { font-weight: 600; color: var(--text); }
.spec-table td .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--red-glow);
  border: 1px solid rgba(230,48,48,0.25);
  color: var(--red);
}

/* ── PAGE HERO ── */
.doc-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 56px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.doc-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 80% 100% at 0% 50%, black 30%, transparent 100%);
}

.doc-hero-content { position: relative; }

.doc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.97;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.doc-hero p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
}

/* ── FOOTER ── */
.docs-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 56px;
  margin-left: var(--sidebar-w);
}

.docs-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.docs-footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
}

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

.docs-footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.docs-footer-links a:hover { color: var(--text); }

.docs-footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  width: 100%;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .doc-cards { grid-template-columns: 1fr; }
  .docs-main { padding: 36px 32px 60px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 100;
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }

  .docs-main {
    margin-left: 0;
    padding: 28px 20px 60px;
  }

  .docs-footer {
    margin-left: 0;
    padding: 32px 20px;
  }

  .doc-hero { padding: 36px 20px 32px; }
  .doc-hero h1 { font-size: clamp(36px, 10vw, 52px); }
}
