/* ============================================
   ARVANEL DOCS — LIGHT MODE COLOUR SYSTEM
   Based on Branding-CI-Guidelines v1.0
   ============================================ */

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

:root {
  /* Brand core (from CI guidelines) */
  --charcoal: #1A1C1E;
  --graphite: #2A2D31;
  --lime: #7FBF2E;
  --lime-light: #93CC4D;
  --lime-dark: #6AAA1F;
  --off-white: #F4F5F6;

  /* Docs light-mode tokens */
  --bg-page: #F4F5F6;
  --bg-surface: #FFFFFF;
  --bg-inset: #EDEEF0;
  --bg-nav: var(--charcoal);

  --text-primary: var(--charcoal);
  --text-secondary: #4A4E54;
  --text-muted: #8F9092;
  --text-inverse: var(--off-white);

  --accent: var(--lime);
  --accent-hover: var(--lime-light);
  --accent-subtle: rgba(127, 191, 46, 0.08);
  --accent-border: rgba(127, 191, 46, 0.25);

  --border: #E0E1E3;
  --border-strong: #CCCED1;

  --pro-bg: rgba(127, 191, 46, 0.08);
  --pro-border: rgba(127, 191, 46, 0.2);
  --pro-text: #4A8A12;

  --tip-bg: #EEF6FF;
  --tip-border: #B8D4F0;
  --tip-text: #1A5276;

  --warn-bg: #FFF8ED;
  --warn-border: #F0D6A0;
  --warn-text: #7A5A1E;

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --max-width: 1200px;
  --content-width: 760px;
  --font-heading: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.65rem); margin-top: 48px; margin-bottom: 16px; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }

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

a { color: var(--lime-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--lime); }

strong { font-weight: 600; color: var(--text-primary); }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

/* ============================================
   NAVIGATION (dark bar — matches landing page)
   ============================================ */
.docs-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0;
}

.docs-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
}

.docs-nav-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--off-white);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-decoration: none;
}
.docs-nav-logo span { color: var(--lime); }
.docs-nav-logo .tm {
  font-size: 0.6em;
  font-weight: 400;
  color: #5A5F68;
  vertical-align: super;
  margin-left: 1px;
  line-height: 1;
}

.docs-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.docs-nav-links a {
  color: #9DA3AE;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.docs-nav-links a:hover { color: var(--off-white); }
.docs-nav-links a.active {
  color: var(--lime);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--off-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ============================================
   DOCS HERO / PAGE HEADER
   ============================================ */
.docs-hero {
  background: var(--charcoal);
  padding: 100px 0 48px;
  border-bottom: 3px solid var(--lime);
}

.docs-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.docs-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(127, 191, 46, 0.08);
  border: 1px solid rgba(127, 191, 46, 0.15);
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.docs-hero h1 {
  color: var(--off-white);
  margin-bottom: 12px;
}

.docs-hero p {
  color: #9DA3AE;
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================
   LAYOUT — SIDEBAR + CONTENT
   ============================================ */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
  align-items: start;
}

/* ---- Sidebar ---- */
.docs-sidebar {
  position: sticky;
  top: 80px;
}

.docs-sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 14px;
}

.docs-sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  border-left: 2px solid transparent;
}

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

.docs-sidebar-nav a.active {
  background: var(--accent-subtle);
  color: var(--lime-dark);
  border-left-color: var(--lime);
  font-weight: 600;
}

.docs-sidebar-nav .nav-step {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 18px;
}

.docs-sidebar-nav a.active .nav-step {
  color: var(--lime-dark);
}

.docs-sidebar-nav .nav-pro {
  margin-left: auto;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pro-text);
  background: var(--pro-bg);
  border: 1px solid var(--pro-border);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---- Content area ---- */
.docs-content {
  max-width: var(--content-width);
  min-width: 0;
}

/* ============================================
   DOCS CARDS — Table of Contents
   ============================================ */
.docs-toc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.docs-toc-card {
  display: block;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.docs-toc-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.docs-toc-card-step {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime-dark);
  margin-bottom: 8px;
}

.docs-toc-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.docs-toc-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.docs-toc-card .card-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--border-strong);
  transition: var(--transition);
  font-size: 1.1rem;
}

.docs-toc-card:hover .card-arrow {
  color: var(--lime);
  transform: translateY(-50%) translateX(3px);
}

/* ============================================
   INLINE PRO BADGE
   ============================================ */
.pro-inline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pro-text);
  background: var(--pro-bg);
  border: 1px solid var(--pro-border);
  padding: 1px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 2px;
  line-height: 1.6;
}

/* ============================================
   CALLOUT BOXES
   ============================================ */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 0.9rem;
  line-height: 1.7;
  border-left: 3px solid;
}

.callout p { margin-bottom: 0; color: inherit; }

.callout-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.callout-tip {
  background: var(--tip-bg);
  border-color: var(--tip-border);
  color: var(--tip-text);
}

.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.callout-pro {
  background: var(--pro-bg);
  border-color: var(--accent-border);
  color: var(--pro-text);
}

/* ============================================
   SCREENSHOT FRAME
   ============================================ */
.docs-screenshot {
  margin: 24px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.docs-screenshot-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.docs-screenshot-dot:nth-child(1) { background: #D94848; }
.docs-screenshot-dot:nth-child(2) { background: #D4A843; }
.docs-screenshot-dot:nth-child(3) { background: var(--lime); }

.docs-screenshot-label {
  margin-left: 10px;
  font-size: 0.72rem;
  color: #5A5F68;
  font-weight: 500;
  font-family: var(--font-heading);
}

.docs-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.docs-screenshot-caption {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-inset);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ============================================
   FREE / PRO COMPARISON TABLE
   ============================================ */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.docs-table th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.docs-table td {
  padding: 11px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table tr:last-child td { border-bottom: none; }
.docs-table .check { color: var(--lime-dark); font-weight: 700; }
.docs-table .x-mark { color: var(--text-muted); }

/* ============================================
   PREV / NEXT NAVIGATION
   ============================================ */
.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.docs-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  min-width: 200px;
}

.docs-pager-link:hover {
  border-color: var(--accent-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.docs-pager-link.next { text-align: right; margin-left: auto; }

.docs-pager-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.docs-pager-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-pager-link:hover .docs-pager-title {
  color: var(--lime-dark);
}

/* ============================================
   VERSION BADGE
   ============================================ */
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
}

.version-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

/* ============================================
   FOOTER
   ============================================ */
.docs-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.docs-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-footer-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.docs-footer-brand span { color: var(--lime); }

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

.docs-footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
}
.docs-footer-links a:hover { color: var(--text-secondary); }

.docs-footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-made {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 24px;
  }

  .docs-sidebar {
    position: relative;
    top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 32px;
  }

  .docs-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .docs-sidebar-nav a {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .docs-sidebar-nav a.active {
    border-left: none;
    border-bottom-color: var(--lime);
  }

  .docs-toc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .docs-hero { padding: 90px 0 36px; }
  .docs-pager { flex-direction: column; }
  .docs-pager-link { min-width: 0; }
  .docs-pager-link.next { text-align: left; }

  .docs-footer-inner {
    flex-direction: column;
    gap: 12px;
  }

  .docs-footer-links { flex-wrap: wrap; justify-content: center; }

  .docs-nav-links { display: none; }
  .nav-mobile-toggle { display: block; }

  .docs-nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 28, 30, 0.97);
    backdrop-filter: blur(20px);
    padding: 12px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 4px;
  }

  .docs-nav-links.mobile-open a {
    padding: 10px 0;
    display: block;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .docs-nav,
  .docs-sidebar,
  .docs-pager,
  .docs-footer { display: none; }

  .docs-layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .docs-hero {
    background: none;
    border-bottom: 2px solid #1A1C1E;
    padding: 20px 0;
  }

  .docs-hero h1 { color: #1A1C1E; }
  .docs-hero p { color: #4A4E54; }

  body { background: white; }
  .docs-screenshot { box-shadow: none; }
}
