/* ============================================
   InkLink Docs — Design System
   Matching inklinkup.com brand
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #1a1a2e;
  background: #f8f9fb;
}

a {
  color: #4a6cf7;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #3451d1;
}

/* ============================================
   Typography — Schibsted Grotesk for headings
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: #0d0f1c;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.875rem;
  margin-bottom: 0.875rem;
  margin-top: 0;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: #3a3f5c;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: #3a3f5c;
}

li strong {
  color: #0d0f1c;
}

.lead {
  font-size: 1.125rem;
  color: #4a4f6a;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.nav-container {
  max-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 32px;
  width: auto;
}

.docs-badge {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a6cf7;
  background: #eef2ff;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.nav-center {
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}

.search-container-nav {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-nav {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.search-input-nav {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: 'Archivo', sans-serif;
  background: #f3f4f6;
  color: #1a1a2e;
  transition: all 0.2s;
  cursor: pointer;
}

.search-input-nav:focus {
  outline: none;
  border-color: #4a6cf7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #9ca3af;
  background: #e5e7eb;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  pointer-events: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link-btn {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3a3f5c;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link-btn:hover {
  color: #0d0f1c;
  background: #f3f4f6;
}

.nav-btn-download {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #0d0f1c;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-btn-download:hover {
  background: #1a1f3a;
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #0d0f1c;
}

/* ============================================
   Layout
   ============================================ */

.docs-layout {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  width: 280px;
  min-width: 280px;
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-inner {
  padding: 1.5rem 0;
}

.sidebar-search-mobile {
  display: none;
  padding: 0 1.25rem 1rem;
}

.search-input-sidebar {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'Archivo', sans-serif;
  background: #f9fafb;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-heading {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  padding: 0.75rem 1.5rem 0.4rem;
}

.sidebar-link {
  display: block;
  font-size: 0.875rem;
  color: #4a4f6a;
  padding: 0.4rem 1.5rem;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.5;
}

.sidebar-link:hover {
  color: #0d0f1c;
  background: #f8f9fb;
}

.sidebar-link.active {
  color: #4a6cf7;
  background: #eef2ff;
  border-left-color: #4a6cf7;
  font-weight: 500;
}

/* ============================================
   Main Content
   ============================================ */

.docs-main {
  flex: 1;
  margin-left: 280px;
  min-width: 0;
}

.docs-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 4rem;
}

.doc-section {
  scroll-margin-top: 80px;
}

.section-badge {
  display: inline-block;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a6cf7;
  background: #eef2ff;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 3rem 0;
}

/* ============================================
   Cards & Components
   ============================================ */

.info-card {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: #eef2ff;
  border-radius: 12px;
  border-left: 4px solid #4a6cf7;
  margin: 1.25rem 0;
}

.info-card-icon {
  flex-shrink: 0;
  color: #4a6cf7;
  margin-top: 2px;
}

.info-card-content {
  font-size: 0.9375rem;
  color: #1e3a5f;
  line-height: 1.6;
}

.tip-card {
  padding: 1rem 1.25rem;
  background: #f0fdf4;
  border-radius: 12px;
  border-left: 4px solid #22c55e;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
  color: #14532d;
  line-height: 1.6;
}

.warning-card {
  padding: 1rem 1.25rem;
  background: #fef3c7;
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
  color: #78350f;
  line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  background: #f0f2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.feature-card-icon svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}

.feature-card h4 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Role Cards */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.role-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.role-card:hover {
  border-color: #4a6cf7;
  box-shadow: 0 4px 16px rgba(74, 108, 247, 0.1);
}

.role-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.role-card h4 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.role-card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0;
}

/* Steps */
.steps {
  margin: 1.5rem 0;
}

.step {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0d0f1c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.step-content h4 {
  margin-bottom: 0.25rem;
  margin-top: 0.25rem;
}

.step-content p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Status Table */
.status-table {
  margin: 1.25rem 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9375rem;
  color: #3a3f5c;
}

.status-badge {
  display: inline-block;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
}

.status-requested { background: #fef3c7; color: #92400e; }
.status-counter { background: #fce7f3; color: #9d174d; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-progress { background: #e0e7ff; color: #3730a3; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* ============================================
   Footer
   ============================================ */

.docs-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.docs-footer p {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0;
}

.docs-footer-links {
  display: flex;
  gap: 1.5rem;
}

.docs-footer-links a {
  font-size: 0.875rem;
  color: #6b7280;
}

.docs-footer-links a:hover {
  color: #0d0f1c;
}

/* ============================================
   Search Modal
   ============================================ */

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal.open {
  display: flex;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.search-modal-content {
  position: relative;
  width: 90%;
  max-width: 560px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-modal-input-wrap {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.search-icon-modal {
  flex-shrink: 0;
  color: #9ca3af;
  margin-right: 0.75rem;
}

.search-input-modal {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Archivo', sans-serif;
  color: #0d0f1c;
  background: transparent;
}

.search-input-modal::placeholder {
  color: #9ca3af;
}

.search-modal-esc {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.search-results {
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #0d0f1c;
  transition: background 0.1s;
  cursor: pointer;
  text-decoration: none;
}

.search-result-item:hover,
.search-result-item.focused {
  background: #f3f4f6;
}

.search-result-section {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #4a6cf7;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.search-result-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
}

.search-result-empty {
  padding: 2rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ============================================
   Responsive
   ============================================ */

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

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

  .nav-right {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-search-mobile {
    display: block;
  }

  .docs-main {
    margin-left: 0;
  }

  .docs-content {
    padding: 1.5rem 1.25rem 3rem;
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .docs-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .docs-content {
    padding: 1rem 1rem 2.5rem;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.sidebar-overlay.open {
  display: block;
}
