:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --secondary: #6366f1;
  --surface: #fcfdff;
  --surface-soft: #f3f6ff;
  --surface-muted: #eef2fb;
  --ink: #0f172a;
  --ink-soft: #1f2a3d;
  --muted: #445069;
  --border: #cad3e6;
  --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --focus-ring: rgba(29, 78, 216, 0.35);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

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

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface-muted);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
  overflow: hidden;
}

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

a:hover,
a:focus-visible {
  color: var(--primary-dark);
}

a:focus-visible {
  outline: 3px solid var(--focus-ring);
  border-radius: 6px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 3vw, 3rem) 4rem;
}

.surface-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

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

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 10px 25px rgba(29, 78, 216, 0.18);
}

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

.nav-link {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--muted);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(29, 78, 216, 0.12);
}

main {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2rem, 6vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.06), rgba(99, 102, 241, 0.08));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(29, 78, 216, 0.12);
  color: var(--primary-dark);
  font-weight: 600;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 15px 35px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.35);
}

.btn-secondary {
  background: var(--surface-soft);
  color: var(--primary);
  border-color: rgba(29, 78, 216, 0.25);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: #e2e8f6;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.metric-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.metric-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.35rem;
}

.section {
  padding: clamp(2rem, 6vw, 3rem);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--muted);
  max-width: 52ch;
}

.card-grid,
.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card,
.feature-card {
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card h3,
.feature-card h4 {
  color: var(--ink);
}

.card p,
.feature-card p,
.feature-card li {
  color: var(--muted);
}

.component-block + .component-block {
  margin-top: 1.75rem;
}

.card-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.highlight-box {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
}

.highlight-box h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

.highlight-box ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

/* Info grid for feature comparisons and lists */
.info-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 1.5rem 0;
}

.info-card {
  background: var(--surface-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.info-card h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.info-card ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.info-card ul li::before {
  content: '→';
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(29, 78, 216, 0.12);
  color: var(--primary-dark);
}

.screenshot-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 2px dashed rgba(68, 80, 105, 0.35);
  border-radius: var(--radius);
  background: rgba(236, 240, 252, 0.7);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.screenshot-slot::before {
  content: attr(data-label);
}

.screenshot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  margin: 1.5rem auto;
  max-width: 600px;
  position: relative;
}

.screenshot::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: rgba(29, 78, 216, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.screenshot:hover::before {
  opacity: 1;
}

.screenshot a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: zoom-in;
  position: relative;
}

.screenshot a:hover,
.screenshot a:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.15);
}

.screenshot a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.screenshot img {
  max-width: 100%;
  display: block;
}

.screenshot figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 23, 42, 0.5);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.inline-code {
  font-family: var(--font-mono);
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
}

.callout {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid rgba(29, 78, 216, 0.2);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.callout h2 {
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.callout p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

.audience-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.audience-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem;
  box-shadow: var(--shadow-soft);
  width: fit-content;
}

.audience-switch button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.audience-switch button[aria-selected='true'] {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.15), rgba(99, 102, 241, 0.2));
  color: var(--primary-dark);
}

.audience-switch button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.audience-panel {
  display: grid;
  gap: 0.8rem;
}

.audience-panel[hidden] {
  display: none;
}

.audience-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.audience-panel li {
  color: var(--muted);
}

@media (max-width: 768px) {
  .audience-switch {
    width: 100%;
    justify-content: space-between;
  }

  .audience-switch button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

footer {
  margin-top: 3rem;
  text-align: center;
  color: rgba(100, 116, 139, 0.85);
  font-size: 0.9rem;
}

footer a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero {
    padding: 2rem;
  }

  .page-shell {
    padding: 1.75rem 1.25rem 3rem;
  }
}
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.lightbox-backdrop[aria-hidden="false"] {
  display: flex;
}

.lightbox-content {
  max-width: min(1200px, 90vw);
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  color: var(--muted);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Page Navigation - Floating Mini-Nav */
.page-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  max-width: 200px;
}

.page-nav.active {
  display: flex;
}

.page-nav-link {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.page-nav-link:hover {
  background: var(--surface-soft);
  color: var(--ink-soft);
  border-left-color: var(--primary);
}

.page-nav-link.active {
  color: var(--primary);
  background: rgba(29, 78, 216, 0.1);
  border-left-color: var(--primary);
}

@media (max-width: 1024px) {
  .page-nav {
    display: none !important;
  }
}

/* Sticky Sidebar for Documentation Pages */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.docs-sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.docs-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.docs-sidebar-link {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.docs-sidebar-link:hover {
  background: var(--surface-soft);
  color: var(--primary);
}

.docs-sidebar-link.active {
  color: var(--primary);
  background: rgba(29, 78, 216, 0.12);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
}

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 2rem;
  }

  .docs-sidebar-title {
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
  }

  .docs-sidebar-title::after {
    content: '▼';
    position: absolute;
    right: 0;
    transition: transform 0.2s ease;
  }

  .docs-sidebar.collapsed .docs-sidebar-title::after {
    transform: rotate(-90deg);
  }

  .docs-sidebar.collapsed .docs-sidebar-nav {
    display: none;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 90;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(29, 78, 216, 0.4);
}

.scroll-to-top:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}
