/* ==========================================
   1. RESET & ACCESSIBILITY UTILITIES
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

  .arrow-line, .svg-pulse-dot, .pipeline-step, .pipeline-group-row, .badge-item, .packages-track {
    animation: none !important;
    transition: none !important;
  }

  .packages-slider {
    overflow-x: auto;
  }
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #0a0d12;
  --bg-dark-card: #121721;
  --bg-code: #0b0f19;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light-muted: #94a3b8;
  --text-white: #ffffff;

  --accent-green: #10b981;
  --accent-green-dark: #059669;
  --accent-green-bg: #ecfdf5;
  --accent-green-border: #a7f3d0;

  --border-light: #e2e8f0;
  --border-dark: #1e293b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-green-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--text-main);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.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;
}

.grid-bg {
  background-image: linear-gradient(to right, #f1f5f9 1px, transparent 1px),
                    linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
  background-size: 32px 32px;
}

.text-center {
  text-align: center;
}

/* ==========================================
   2. NAVIGATION BAR
   ========================================== */
.navbar {
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s ease;
}

.navbar.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-icon {
  width: 24px;
  height: 24px;
  background: var(--accent-green-dark);
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--accent-green-bg);
  color: var(--accent-green-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-green-border);
  font-weight: 600;
}

.version-tag:hover {
  background: #d1fae5;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-github-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-github-link:hover {
  color: var(--text-main);
}

.btn-get-started {
  background: var(--accent-green-dark);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.btn-get-started:hover {
  background: var(--accent-green);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  position: relative;
  transition: all 0.2s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
}

.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }

/* ==========================================
   3. HERO SECTION & BADGES
   ========================================== */
.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

/* EXPANDED SINGLE-LINE BADGE CONTAINER */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-full);
  color: var(--accent-green-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  white-space: nowrap;
  max-width: 100%;
  width: max-content;
  overflow-x: auto;
}

.tag-badge > .badge-item {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--accent-green-dark);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}

.tag-badge > .badge-item.active {
  background: var(--accent-green-dark);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.tag-badge > .badge-item:not(:last-child)::after {
  content: "•";
  margin-left: 12px;
  color: var(--accent-green-border);
  font-weight: bold;
  pointer-events: none;
}

.tag-badge > .badge-item.active::after {
  color: rgba(255, 255, 255, 0.5);
}

/* COMPACT HERO TRUST BADGES ROW */
.trust-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--accent-green-dark);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  line-height: 1.2;
}

.trust-badge:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.trust-badge-icon {
  color: var(--accent-green-dark);
  flex-shrink: 0;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--accent-green-dark);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-status-notice {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 24px;
}

.cta-status-notice {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: -16px;
  margin-bottom: 24px;
}

.notice-icon {
  color: var(--accent-green-dark);
  font-weight: bold;
}

.btn-dark {
  background: var(--text-main);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--text-main);
}

.btn-dark:hover {
  background: #1e293b;
}

.btn-light {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-light:hover {
  background: var(--bg-light);
  border-color: #cbd5e1;
}

.hero-footer-links {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hero-footer-links a:hover {
  text-decoration: underline;
}

/* Diagram Canvas Container */
.diagram-container {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  position: relative;
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diagram-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  position: relative;
}

.diagram-box {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #fafafa;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  position: relative;
  z-index: 2;
}

.box-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.box-label-light {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--accent-green-dark);
  font-weight: 600;
}

.pipeline-card {
  background: #fafafa;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 260px;
  position: relative;
  z-index: 2;
}

.pipeline-header {
  background: var(--accent-green-dark);
  color: white;
  text-align: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* ==========================================
   PIPELINE ROW TOP-TO-BOTTOM STEP ANIMATION
   ========================================== */
.pipeline-group-row {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  animation: stepGlowVertical 3.2s infinite ease-in-out;
}

.pipeline-group-row:last-child {
  margin-bottom: 0;
}

/* Staggered Top-to-Bottom Delays */
.pipeline-group-row:nth-child(2) { /* Failure Recovery */
  animation-delay: 0.2s;
}

.pipeline-group-row:nth-child(3) { /* Latency Control */
  animation-delay: 0.8s;
}

.pipeline-group-row:nth-child(4) { /* Load Protection */
  animation-delay: 1.4s;
}

.pipeline-group-row:nth-child(5) { /* Request Management */
  animation-delay: 2.0s;
}

/* Glow & subtle scale effect traveling down the stack */
@keyframes stepGlowVertical {
  0%, 100% {
    background: #ffffff;
    border-color: var(--border-light);
    transform: scale(1);
    box-shadow: none;
  }
  15% {
    background: var(--accent-green-bg);
    border-color: var(--accent-green-border);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  }
  30% {
    background: #ffffff;
    border-color: var(--border-light);
    transform: scale(1);
    box-shadow: none;
  }
}

.group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
}

.group-caps {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.response-box {
  border: 1px solid var(--accent-green-border);
  background: var(--accent-green-bg);
  color: var(--accent-green-dark);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.latency-tag {
  margin-top: 6px;
  font-size: 0.65rem;
  font-weight: normal;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-green-border);
  display: inline-block;
}

/* SVG Connecting Arrows & Embedded Pulse Dot */
.arrow-svg {
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.arrow-line {
  stroke: var(--accent-green-dark);
  stroke-width: 1.5;
  stroke-dasharray: 4 2;
  animation: dashFlow 1s linear infinite;
}

.arrow-head {
  fill: var(--accent-green-dark);
}

.svg-pulse-dot {
  fill: var(--accent-green-dark);
  filter: drop-shadow(0px 0px 4px rgba(16, 185, 129, 0.8));
}

@keyframes dashFlow {
  from { stroke-dashoffset: 12; }
  to { stroke-dashoffset: 0; }
}

/* ==========================================
   4. STATS STRIP
   ========================================== */
.stats-strip {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-item.highlight .stat-number {
  color: var(--accent-green-dark);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================
   5. WHY RESILI SECTION
   ========================================== */
.section-why {
  padding: 80px 0;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header-compact {
  max-width: 640px;
  margin: 0 auto 40px auto;
}

.section-header-compact h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.benefit-card p {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.benefit-card code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-light);
  padding: 2px 4px;
  border-radius: 4px;
}

/* ==========================================
   6. DARK SECTION: THE PROBLEM
   ========================================== */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 90px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.problem-left h2 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.problem-left p {
  color: var(--text-light-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.problem-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.problem-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 20px;
}

.problem-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-green);
}

.problem-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 0.8rem;
  color: var(--text-light-muted);
  line-height: 1.5;
}

/* ==========================================
   7. DEVELOPER EXPERIENCE (DOCS)
   ========================================== */
.section-dx {
  padding: 90px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
}

.dx-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.dx-left h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.dx-left p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.dx-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dx-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-main);
  font-weight: 500;
}

.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-green-bg);
  color: var(--accent-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

.code-window {
  background: var(--bg-code);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--border-dark);
}

.code-header {
  background: rgba(255,255,255,0.03);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.file-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light-muted);
}

.btn-code-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-code-copy:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.code-body {
  padding: 20px;
  overflow-x: auto;
}

.code-body pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #e2e8f0;
  margin: 0;
  white-space: pre;
}

.k { color: #f472b6; font-weight: 500; }
.f { color: #60a5fa; }
.s { color: #fde047; }
.c { color: #64748b; font-style: italic; }
.p { color: #34d399; }
.n { color: #fb923c; }

/* ==========================================
   8. CANONICAL PIPELINE FLOW STRIP
   ========================================== */
.section-pipeline-strip {
  padding: 60px 0;
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-pipeline-strip h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pipeline-strip-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px auto;
}

.canonical-pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.canonical-step {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.canonical-step.target {
  background: var(--accent-green-bg);
  border-color: var(--accent-green-border);
  color: var(--accent-green-dark);
}

.step-num {
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flow-arrow {
  color: var(--text-light-muted);
  font-size: 0.8rem;
}

/* ==========================================
   9. USE-CASE STRIP
   ========================================== */
.section-usecases {
  padding: 48px 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.usecases-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.usecase-chip {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-icon {
  font-size: 0.9rem;
}

/* ==========================================
   10. POLICIES SECTION
   ========================================== */
.section-policies {
  padding: 90px 0;
  background: var(--bg-white);
}

.policies-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.policies-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.policies-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.policies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.policy-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.policy-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-green-bg);
  color: var(--accent-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.policy-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.policy-card p {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.policy-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-green-dark);
  background: var(--accent-green-bg);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

/* ==========================================
   11. PACKAGES SECTION (DARK)
   ========================================== */
.section-packages {
  background: var(--bg-dark);
  color: #fff;
  padding: 90px 0;
}

.packages-header {
  margin-bottom: 48px;
}

.packages-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.packages-header p {
  color: var(--text-light-muted);
  font-size: 0.95rem;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.packages-slider {
  overflow: hidden;
  margin: 0 -4px;
}

.packages-track {
  display: flex;
  width: max-content;
  animation: packagesMarquee 36s linear infinite;
}

.packages-group:nth-of-type(2) .packages-track {
  animation-duration: 42s;
}

.packages-slider:hover .packages-track,
.packages-slider:focus-within .packages-track {
  animation-play-state: paused;
}

.packages-slider .packages-grid {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  width: max-content;
  gap: 16px;
  padding-right: 16px;
}

.packages-slider .package-card {
  flex: 0 0 300px;
  width: 300px;
}

@keyframes packagesMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.package-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.package-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.package-card .pkg-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-green);
  display: block;
  overflow-wrap: anywhere;
}

.pkg-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255,255,255,0.08);
  color: var(--text-light-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.package-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.package-card p {
  font-size: 0.775rem;
  color: var(--text-light-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.pkg-install-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pkg-install-block code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-pkg-copy {
  background: transparent;
  border: none;
  color: var(--text-light-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-pkg-copy:hover {
  color: #ffffff;
}

.pkg-card-links {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-green);
}

.pkg-card-links a:hover {
  text-decoration: underline;
}

/* ==========================================
   12. QUALITY SECTION
   ========================================== */
.section-quality {
  padding: 90px 0;
  background: var(--bg-white);
}

.quality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.quality-left h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.quality-left p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.quality-checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-item {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-bullet {
  color: var(--accent-green-dark);
  font-weight: bold;
}

.quality-right-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.quality-card {
  background: #fafafa;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quality-stat {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-green-dark);
  margin-bottom: 4px;
}

.quality-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================
   13. ROADMAP SECTION
   ========================================== */
.section-roadmap {
  padding: 80px 0;
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.roadmap-stage {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.roadmap-stage.active {
  border-color: var(--accent-green-border);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.stage-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg-light);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.roadmap-stage.active .stage-tag {
  background: var(--accent-green-bg);
  color: var(--accent-green-dark);
}

.roadmap-stage h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.stage-list {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-list li::before {
  content: "• ";
  color: var(--accent-green-dark);
}

/* ==========================================
   14. FINAL CTA SECTION & PACKAGE SELECTOR
   ========================================== */
.section-cta {
  padding: 90px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.cta-content {
  max-width: 680px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.pm-selector-container {
  margin-bottom: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
}

.pm-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-light);
  padding: 4px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--border-light);
  border-bottom: none;
}

.pm-tab {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
}

.pm-tab.active {
  background: var(--bg-white);
  color: var(--text-main);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.install-box {
  background: #fafafa;
  border: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.prompt-symbol {
  color: var(--accent-green-dark);
  font-weight: bold;
}

.install-box code {
  color: var(--text-main);
  flex-grow: 1;
  text-align: left;
  margin-left: 8px;
}

.btn-cta-copy {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cta-copy:hover {
  background: var(--accent-green-bg);
  border-color: var(--accent-green-border);
  color: var(--accent-green-dark);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cta-sublinks {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--accent-green-dark);
}

.cta-sublinks a:hover {
  text-decoration: underline;
}

/* ==========================================
   15. FOOTER
   ========================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light-muted);
  padding: 32px 0;
  font-size: 0.775rem;
  border-top: 1px solid var(--border-dark);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  font-weight: 700;
  color: #fff;
}

.footer-copyright {
  color: var(--text-light-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================
   15b. LLM SECTION (reuses policies/dx patterns)
   ========================================== */
.section-llm {
  padding: 90px 0;
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.llm-example {
  margin-top: 56px;
}

.llm-diagram {
  margin-bottom: 48px;
}

.llm-diagram .diagram-flow {
  justify-content: center;
  gap: 16px;
}

.llm-diagram .arrow-svg {
  width: 56px;
  flex: 0 0 auto;
}

.llm-diagram .diagram-box,
.llm-diagram .pipeline-card,
.llm-diagram .response-box {
  flex: 0 0 auto;
}

.llm-diagram .latency-tag + .latency-tag {
  margin-left: 4px;
}

.roadmap-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.dx-footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 20px;
}

.dx-footnote a {
  color: var(--accent-green-dark);
  font-weight: 600;
}

.dx-footnote a:hover {
  text-decoration: underline;
}

.packages-group + .packages-group {
  margin-top: 40px;
}

.cta-alt-install {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 26px;
}

.cta-alt-install a {
  color: var(--accent-green-dark);
  font-weight: 600;
}

.cta-alt-install a:hover {
  text-decoration: underline;
}

/* Inline code within body copy, matching .benefit-card code */
.dx-footnote code,
.policies-header p code,
.cta-alt-install code,
.cta-status-notice code,
.pipeline-strip-desc code,
.section-subtitle code,
.stage-list code,
.policy-card code,
.quality-left p code {
  font-family: var(--font-mono);
  font-size: 0.925em;
  background: rgba(15, 23, 42, 0.05);
  padding: 1px 4px;
  border-radius: 4px;
}

.packages-header p code,
.package-card p code {
  font-family: var(--font-mono);
  font-size: 0.925em;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

/* ==========================================
   16. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 960px) {
  .hero-grid, .problem-grid, .policies-header, .dx-grid, .quality-grid {
    grid-template-columns: 1fr;
  }
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .policies-grid, .packages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .problem-right {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-container {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    align-items: stretch;
  }

  .nav-container.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-get-started {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .policies-grid, .packages-grid, .stats-grid, .quality-right-grid, .benefits-grid, .roadmap-grid, .quality-checklist-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .diagram-flow {
    flex-direction: column;
    gap: 16px;
  }
  .arrow-svg {
    transform: rotate(90deg);
  }
  .canonical-pipeline-flow {
    flex-direction: column;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
  .trust-badge-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .trust-badge {
    justify-content: center;
  }
}