/* =========================================================================
   Vastra Platform Documentation — Design System
   Matches www.vaagatech.com visual language:
   IBM Plex Sans · Light paper body · Crisp white panels
   Cobalt accents · Amber signal dots · Deep void aurora hero/footer
   ========================================================================= */

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

:root {
  --color-paper: #f2f4f7;
  --color-panel: #ffffff;
  --color-ink: #0b1220;
  --color-muted: #4b5568;
  --color-void: #10243f;
  --color-void-soft: #1a3560;
  --color-cobalt: #1d4ed8;
  --color-cobalt-bright: #3b82f6;
  --color-signal: #f59e0b;
  --color-haze: #c7d2fe;

  --border-color: rgba(11, 18, 32, 0.08);
  --border-color-light: rgba(255, 255, 255, 0.12);
  --border-focus: #1d4ed8;

  --text-primary: #0b1220;
  --text-secondary: #4b5568;
  --text-muted: #64748b;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--color-paper);
  background-image: linear-gradient(180deg, #f7f8fa 0%, #f2f4f7 45%, #e8ecf1 100%);
  color: var(--color-ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-text {
  color: var(--color-ink);
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-cobalt);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(29, 78, 216, 0.15);
  font-family: var(--font-mono);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-link:hover {
  color: var(--color-cobalt);
  background: rgba(29, 78, 216, 0.04);
}

.nav-link.active {
  color: var(--color-cobalt);
  background: rgba(29, 78, 216, 0.08);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-cobalt);
  color: #fff;
  border: 1px solid var(--color-cobalt);
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.2);
}

.btn-primary:hover {
  background: #1e40af;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--color-ink);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-cobalt);
  color: var(--color-cobalt);
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-void) 0%, #0d1e35 50%, var(--color-void-soft) 100%);
  color: #fff;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.18), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.08), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color-light);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-haze);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color-light);
}

.hero-metric-val {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.hero-metric-lbl {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections & Cards */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--color-ink);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.25s;
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.04);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 78, 216, 0.25);
  box-shadow: 0 8px 24px -4px rgba(11, 18, 32, 0.08);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--color-ink);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Code & Tables */
.table-wrapper {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

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

th, td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--color-ink);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

pre {
  background: var(--color-void);
  color: #f1f5f9;
  padding: 1.25rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  line-height: 1.5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(11, 18, 32, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--color-void);
  color: #94a3b8;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-col h5 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

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

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

.footer-col a {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Navigation & Toggles */
.nav-toggle {
  display: none;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--color-ink);
  cursor: pointer;
  padding: 0;
}

.nav-toggle svg {
  display: block;
}

.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; line-height: 1.2; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .nav-desktop { display: none !important; }
  .header-actions { display: none !important; }
  .nav-toggle { display: inline-flex !important; }
  .header-inner { height: 56px; }
  .logo-badge { display: none; }

  .mobile-nav.open {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 32px rgba(11, 18, 32, 0.12);
    padding: 1rem 1.25rem;
    z-index: 99;
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
  }

  .mobile-nav a.active {
    background: rgba(29, 78, 216, 0.08);
    color: var(--color-cobalt);
    font-weight: 600;
  }

  .mobile-nav-cta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    background: var(--color-cobalt);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.65rem;
  }

  .hero { padding: 3.5rem 0 3rem; }
  .hero-desc { font-size: 1rem; }
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  .section { padding: 3rem 0; }
  .section-title { font-size: 1.5rem; }
  .grid-cards { grid-template-columns: 1fr; }
  .card { padding: 1.25rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
