/* ============================================
   VaagaTech VaagaGraph 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
   ============================================ */

/* === Fonts === */
@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');

/* === Design Tokens === */
: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;
}

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

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

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;
  position: relative;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--color-cobalt);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-cobalt-bright);
}

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

ul {
  list-style: none;
}

::selection {
  background: color-mix(in oklab, var(--color-cobalt) 28%, white);
  color: var(--color-ink);
}

/* === Accessibility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Utility & Typography === */
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

.font-display {
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
}

.font-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-cobalt { color: var(--color-cobalt); }
.text-signal { color: var(--color-signal); }
.text-muted { color: var(--color-muted); }
.text-haze { color: var(--color-haze); }
.text-panel { color: var(--color-panel); }
.text-ink { color: var(--color-ink); }
.text-balance { text-wrap: balance; }

/* === Scroll Reveal Animation === */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* === Header / Navigation === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(11, 18, 32, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  text-decoration: none;
}

.logo img {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-ink);
  transition: color 0.2s;
}

.logo-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-cobalt);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(29, 78, 216, 0.2);
}

.logo:hover .logo-text { color: var(--color-cobalt); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
}

.nav-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--color-ink);
  background: rgba(11, 18, 32, 0.03);
}

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

.nav-cta {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.4rem 0.85rem;
  margin-left: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--color-ink);
  color: var(--color-panel) !important;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(11, 18, 32, 0.1);
}

.nav-cta:hover {
  background: var(--color-void-soft);
  transform: translateY(-1px);
}

.nav-toggle {
  display: inline-flex;
  min-height: 2.5rem;
  min-width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: #ffffff;
  cursor: pointer;
  color: var(--color-ink);
  padding: 0;
  transition: all 0.2s ease;
}

@media (min-width: 900px) {
  .nav-toggle { display: none !important; }
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 4.25rem;
  inset-inline: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  padding: 1.5rem;
  border-top: 1px solid rgba(11, 18, 32, 0.08);
  z-index: 99;
  overflow-y: auto;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink);
}

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

/* === Hero Section (Dark Void Canvas with Aurora) === */
.hero-section {
  position: relative;
  background: var(--color-void);
  color: var(--color-panel);
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.surface-aurora {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 15% 20%, rgba(29, 78, 216, 0.35), transparent 60%),
              radial-gradient(55% 45% at 85% 15%, rgba(59, 130, 246, 0.25), transparent 55%),
              radial-gradient(50% 40% at 70% 80%, rgba(245, 158, 11, 0.15), transparent 60%),
              linear-gradient(155deg, #10243f 0%, #0d1e35 45%, #08111e 100%);
}

.aurora-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(52px);
  pointer-events: none;
}

.aurora-orb-a {
  background: rgba(59, 130, 246, 0.3);
  width: 24rem;
  height: 24rem;
  top: -6rem;
  right: 8%;
}

.aurora-orb-b {
  background: rgba(245, 158, 11, 0.18);
  width: 18rem;
  height: 18rem;
  bottom: 5%;
  left: 5%;
}

.aurora-orb-c {
  background: rgba(29, 78, 216, 0.25);
  width: 20rem;
  height: 20rem;
  top: 30%;
  left: 30%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: radial-gradient(ellipse 65% 60% at 50% 40%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 40%, black 20%, transparent 80%);
}

.signal-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5rem;
  background: linear-gradient(to top, rgba(16, 36, 63, 0.9), transparent);
}

.hero-signal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cobalt-bright) 25%, var(--color-signal) 50%, var(--color-cobalt) 75%, transparent);
  opacity: 0.85;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 54rem;
  margin: 0 auto;
  text-align: center;
}

.hero-brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-signal);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 9999px;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .hero-title { font-size: 3.5rem; }
}

.hero-title .highlight {
  background: linear-gradient(135deg, #60a5fa 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-haze);
  max-width: 44rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary-light {
  background: #ffffff;
  color: var(--color-ink) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.btn-primary-light:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-primary {
  background: var(--color-cobalt);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.btn-primary:hover {
  background: var(--color-cobalt-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-ink) !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.04);
}
.btn-secondary:hover {
  background: var(--color-paper);
  border-color: rgba(11, 18, 32, 0.16);
}

/* === Content Sections === */
.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 768px) {
  .section {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }
}

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

.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-ink);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
@media (min-width: 768px) {
  .section-title { font-size: 2.35rem; }
}

.section-lead {
  font-size: 1.05rem;
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 48rem;
}

/* === Cards & Panels === */
.feature-card, .product-card, .panel-card {
  background: var(--color-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03), 0 10px 24px rgba(11, 18, 32, 0.02);
  transition: all 0.25s ease;
  position: relative;
}

.feature-card:hover, .product-card:hover, .panel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 78, 216, 0.3);
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.08), 0 16px 36px rgba(11, 18, 32, 0.04);
}

.feature-card h3, .product-card h3, .panel-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.feature-card p, .product-card p, .panel-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.18);
  color: var(--color-cobalt);
}

.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-signal);
  display: inline-block;
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-cobalt);
  border: 1px solid rgba(29, 78, 216, 0.2);
  margin-bottom: 1rem;
}

/* === Grids === */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

.grid-3, .features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .grid-3, .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3, .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* === Code Box / Dark Terminal === */
.code-box {
  background: var(--color-void);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #f8fafc;
  overflow-x: auto;
  line-height: 1.65;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.code-box code {
  font-family: inherit;
}

/* === Tables === */
.table-container {
  background: var(--color-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03);
  margin: 1.5rem 0 2.5rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.comparison-table th {
  background: #f8fafc;
  color: var(--color-ink);
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--color-muted);
  vertical-align: middle;
}

.comparison-table tr:hover td {
  background: rgba(29, 78, 216, 0.02);
}

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

.check-yes {
  color: #059669;
  font-weight: 700;
}

.check-no {
  color: #dc2626;
  font-weight: 500;
}

/* === API Endpoint Specs === */
.api-card {
  background: var(--color-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(11, 18, 32, 0.02);
}

.api-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.method-get {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.method-post {
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(29, 78, 216, 0.25);
}

.method-del {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-ink);
}

/* === Studio Demo Specific === */
.studio-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
  min-height: 620px;
}
@media (max-width: 900px) {
  .studio-container { grid-template-columns: 1fr; }
}

.canvas-container {
  background: #08111e;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.console-box {
  background: #08111e;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #60a5fa;
  max-height: 140px;
  overflow-y: auto;
}

/* === Footer (Void Dark Aurora Canvas matching www.vaagatech.com) === */
.site-footer {
  position: relative;
  background: var(--color-void);
  color: var(--color-panel);
  padding: 4.5rem 0 2.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.footer-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.75fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.footer-brand-desc {
  font-size: 0.95rem;
  color: var(--color-haze);
  line-height: 1.6;
  max-width: 22rem;
  margin-bottom: 1rem;
}

.footer-brand-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-cobalt-bright);
}
.footer-brand-email:hover {
  color: #93c5fd;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-haze);
  transition: color 0.2s;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
