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

/* ── Design Tokens ── */
:root {
  --bg: #09090b;
  --bg-card: #18181b;
  --bg-card-hover: #1e1e22;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.12);
  --orange: #f97316;
  --cyan: #06b6d4;
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-github-group {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  color: var(--text-muted);
}

.nav-github-group svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-github-group a {
  font-size: 0.8rem !important;
}

.nav-github-sep {
  color: var(--border);
  font-size: 0.9rem;
  user-select: none;
}

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

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.nav-cta:hover {
  background: var(--accent-light) !important;
  transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
  padding: 160px 24px 100px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 100vw);
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  max-width: 800px;
  margin: 0 auto 24px;
  letter-spacing: -0.03em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions + .hero-actions {
  margin-top: 16px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

/* ── Terminal Box ── */
.terminal-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.terminal-box:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.terminal-box .prompt {
  color: var(--green);
}

.terminal-box .cmd {
  color: var(--text);
}

.terminal-box .copy-hint {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s;
}

.terminal-box:hover .copy-hint {
  opacity: 1;
}

.install-commands {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: min(100%, 720px);
  margin: 0 auto;
}

.install-method-toggle {
  display: inline-flex;
  align-self: center;
  flex-shrink: 0;
  padding: 1px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  gap: 1px;
}

.install-method-btn {
  padding: 3px 9px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.65;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.install-method-btn:hover:not(.is-active) {
  opacity: 0.9;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.install-method-btn.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(250, 250, 250, 0.72);
}

.install-method-btn:focus-visible {
  outline: 1px solid rgba(129, 140, 248, 0.45);
  outline-offset: 1px;
}

.install-panel {
  width: 100%;
}

.terminal-box--curl {
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
}

.terminal-box--curl .cmd {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ── Logos Row ── */
.logos-section {
  padding: 60px 24px 40px;
  text-align: center;
}

.logos-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.logos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0.6;
}

.logos-row span {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logos-row svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── Sections (shared) ── */
section {
  padding: 100px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section--alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* ── Steps Grid (How It Works) ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s;
}

.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.step-card:hover::before {
  opacity: 1;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-glow);
  color: var(--accent-light);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.step-number--green {
  background: var(--green-glow);
  color: var(--green);
}

.step-number--orange {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
}

.step-number--cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.feature-icon.purple {
  background: var(--accent-glow);
}

.feature-icon.green {
  background: var(--green-glow);
}

.feature-icon.orange {
  background: rgba(249, 115, 22, 0.12);
}

.feature-icon.cyan {
  background: rgba(6, 182, 212, 0.12);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* ── Architecture Diagram ── */
.arch-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Flow Diagram ── */
.flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.flow-row--bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 0 8%;
}

.flow-row--flux {
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.flow-node {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  flex: 1;
  max-width: 200px;
}

.flow-node-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.04);
}

.flow-node--accent .flow-node-icon { color: var(--accent-light); }
.flow-node--cyan .flow-node-icon { color: var(--cyan); }
.flow-node--green .flow-node-icon { color: var(--green); }

.flow-node h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.flow-node--accent h4 { color: var(--accent-light); }
.flow-node--cyan h4 { color: var(--cyan); }
.flow-node--green h4 { color: var(--green); }

.flow-node p {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Flow diagram arrows (CSS-native, no SVG) ── */
.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  flex-shrink: 0;
}

/* Horizontal right-pointing arrow */
.arrow-h {
  position: relative;
  display: flex;
  align-items: center;
  width: 36px;
  height: 2px;
}

.arrow-h::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, var(--green) 40%, var(--green));
  opacity: 0.45;
  border-radius: 1px;
  animation: flow-arrow-line-light 3s ease-in-out infinite;
}

.arrow-h::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--green);
  opacity: 0.65;
  animation: flow-arrow-head-light 3s ease-in-out infinite;
}

/* Horizontal left-pointing arrow */
.arrow-h--left::before {
  background: linear-gradient(to left, transparent, var(--green) 40%, var(--green));
}

.arrow-h--left::after {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 6px solid var(--green);
}

@keyframes flow-arrow-line-light {
  0%,
  100% {
    opacity: 0.38;
    box-shadow: none;
  }
  50% {
    opacity: 0.62;
    box-shadow:
      0 0 10px rgba(34, 197, 94, 0.2),
      0 0 4px rgba(34, 197, 94, 0.35);
  }
}

@keyframes flow-arrow-head-light {
  0%,
  100% {
    opacity: 0.52;
    filter: brightness(0.95);
  }
  50% {
    opacity: 0.88;
    filter: brightness(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow-h::before,
  .arrow-h::after,
  .arrow-v::before,
  .arrow-v::after {
    animation: none;
  }
}

/* Vertical down-pointing arrow */
.arrow-v {
  position: relative;
  width: 2px;
  height: 32px;
  flex-shrink: 0;
}

.arrow-v::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--green) 40%, var(--green));
  opacity: 0.45;
  border-radius: 1px;
  animation: flow-arrow-line-light 3s ease-in-out infinite;
}

.arrow-v::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--green);
  opacity: 0.65;
  animation: flow-arrow-head-light 3s ease-in-out infinite;
}

.flow-outcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.flow-outcome-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  width: 100%;
}

.flow-outcome-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.flow-outcome-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.flow-flux-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  flex: 1;
  max-width: 220px;
}

.flow-flux-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.flow-flux-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.flow-flux-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-flux-list li {
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── Architecture Detail Sections ── */
.arch-detail {
  margin-top: 56px;
}

.arch-detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.arch-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.arch-detail-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s;
}

.arch-detail-card:hover {
  border-color: var(--accent);
}

.arch-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.arch-detail-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.arch-detail-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.arch-repo-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.arch-repo-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.arch-repo-header h4 {
  margin-bottom: 4px !important;
}

.arch-repo-url {
  font-size: 0.78rem;
  color: var(--accent-light);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.arch-repo-url:hover {
  opacity: 1;
  text-decoration: underline;
}

.arch-repo-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.7;
}

/* ── Two-repo sync connector ── */
.repo-strategy {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.repo-strategy .arch-detail-card {
  flex: 1;
  min-width: 0;
}

.arch-detail-card--muted {
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
}

.arch-detail-card--muted h4 {
  color: var(--text-muted);
}

.arch-detail-card--muted p {
  color: var(--text-muted);
  opacity: 0.7;
}

.repo-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  flex-shrink: 0;
}

.repo-bidir-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Wider horizontal stroke between repo cards */
.arrow-h--repo {
  width: 52px;
}

.repo-sync-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  opacity: 0.45;
  line-height: 1;
}

@media (max-width: 900px) {
  .repo-strategy {
    flex-direction: column;
    align-items: stretch;
  }

  .repo-connector {
    flex-direction: row;
    justify-content: center;
    padding: 20px 0;
    gap: 24px;
  }

  .repo-bidir-arrow {
    gap: 12px;
  }

  .repo-bidir-arrow .arrow-h--repo {
    width: 2px;
    height: 44px;
  }

  .repo-bidir-arrow .arrow-h--repo::before {
    background: linear-gradient(to bottom, transparent, var(--green) 40%, var(--green));
  }

  .repo-bidir-arrow .arrow-h--repo::after {
    right: auto;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--green);
    border-bottom: none;
  }
}

.arch-repo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  transition: color 0.2s, border-color 0.2s;
}

.arch-repo-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.arch-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arch-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.arch-step:hover {
  border-color: var(--accent);
}

.arch-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.arch-step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.arch-step p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Components Grid ── */
.components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.component-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.component-card:hover {
  border-color: var(--accent);
}

.component-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.component-dot.required {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

.component-dot.optional {
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent-glow);
}

.component-dot.dns {
  background: var(--orange);
}

.component-card--more {
  border-style: dashed;
  background: transparent;
}

.component-card--more:hover {
  background: var(--bg-card);
}

.component-more-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px dashed var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.component-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.component-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Legend ── */
.legend {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── AI Section ── */
.ai-section {
  text-align: center;
}

.section-desc--centered {
  margin-left: auto;
  margin-right: auto;
}

.ai-tools {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.ai-tool {
  padding: 20px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.ai-tool:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100vw);
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .section-title {
  max-width: 700px;
  margin: 0 auto 20px;
}

.cta-section .section-desc {
  margin: 0 auto 40px;
  text-align: center;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

/* ── Footer ── */
footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

footer a:hover {
  color: var(--text);
}

/* ── Clipboard Tooltip ── */
.copied-tooltip {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--green);
  color: var(--bg);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
}

.copied-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Docs Overlay ── */
.docs-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  display: none;
  flex-direction: column;
}

.docs-overlay.active {
  display: flex;
}

.docs-topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(12px);
}

.docs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.docs-back:hover {
  color: var(--text);
  background: var(--bg-card);
}

.docs-topbar-title {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}

.docs-topbar-gitlab {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}

.docs-topbar-gitlab:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.docs-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.docs-sidebar {
  width: 260px;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.docs-sidebar-section {
  padding: 0 16px;
  margin-bottom: 8px;
}

.docs-sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 8px 12px;
  font-weight: 600;
}

.docs-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.docs-sidebar a:hover {
  color: var(--text);
  background: var(--bg-card);
}

.docs-sidebar a.active {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.docs-sidebar a .doc-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.6;
}

.docs-sidebar a.active .doc-icon {
  opacity: 1;
}

.docs-content {
  flex: 1;
  overflow-y: auto;
  padding: 48px 64px 80px;
}

.docs-content-inner {
  max-width: 780px;
  margin: 0 auto;
}

.docs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.docs-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.docs-error {
  padding: 24px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 0.9rem;
  line-height: 1.6;
}

.docs-error code {
  background: rgba(239, 68, 68, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
}

/* ── Markdown Rendered Content ── */
.md-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.2;
}

.md-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.md-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 12px;
}

.md-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

.md-content p {
  margin: 0 0 16px;
  color: var(--text-muted);
  line-height: 1.75;
}

.md-content a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.md-content a:hover {
  border-bottom-color: var(--accent-light);
}

.md-content strong {
  color: var(--text);
  font-weight: 600;
}

.md-content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--accent-light);
}

.md-content pre {
  margin: 0 0 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
}

.md-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.md-content ul,
.md-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
  color: var(--text-muted);
}

.md-content li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.md-content li code {
  font-size: 0.82em;
}

.md-content blockquote {
  margin: 0 0 16px;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.md-content blockquote p {
  margin: 0;
  color: var(--text);
}

.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.9rem;
}

.md-content th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.md-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.md-content td code {
  font-size: 0.8em;
}

.md-content tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.md-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.md-content .mermaid-container {
  margin: 20px 0;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow-x: auto;
}

.md-content .mermaid-container svg {
  max-width: 100%;
  height: auto;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.animate-d1 { animation-delay: 0.1s; }
.animate-d2 { animation-delay: 0.2s; }
.animate-d3 { animation-delay: 0.3s; }
.animate-d4 { animation-delay: 0.4s; }

/* ── Mobile Hamburger ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.docs-back span {
  display: inline;
}

@media (max-width: 900px) {
  .docs-back span {
    display: none;
  }
}
.docs-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Docs Sidebar Overlay (mobile drawer backdrop) ── */
.docs-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 160;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-toggle svg {
  display: block;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 101;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

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

.nav-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.nav-mobile-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}

.nav-mobile-links a:hover,
.nav-mobile-links a:active {
  color: var(--text);
  background: var(--bg-card);
}

.nav-mobile-links .nav-cta {
  margin: 16px 24px 0;
  text-align: center;
  border-bottom: none;
  border-radius: 8px;
  background: var(--accent);
  color: white !important;
  font-weight: 600;
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

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

/* ── Responsive ── */
@media (max-width: 1100px) {
  .nav-links {
    gap: 14px;
  }

  .nav-links .nav-section-link {
    display: none;
  }
}

@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }

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

  .arch-detail-grid {
    grid-template-columns: 1fr;
  }

  .nav-links--desktop {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .docs-menu-btn {
    display: flex;
  }

  .docs-topbar-gitlab {
    display: none;
  }

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

  .docs-sidebar {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 161;
    background: var(--bg);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 0;
  }

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

  .docs-content {
    padding: 32px 20px 60px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 100px 16px 48px;
  }

  .hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 32px;
    padding: 0 4px;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 5px 12px;
    margin-bottom: 24px;
  }

  section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-desc {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .terminal-box {
    display: flex;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.8rem;
    gap: 8px;
    border-radius: 10px;
  }

  .terminal-box .cmd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }

  .terminal-box .copy-hint {
    display: none;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

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

  .hero-actions + .hero-actions {
    margin-top: 12px !important;
  }

  .logos-section {
    padding: 32px 16px 24px;
  }

  .logos-row {
    gap: 16px 24px;
  }

  .logos-row span {
    font-size: 0.85rem;
  }

  .logos-row svg {
    width: 20px;
    height: 20px;
  }

  .step-card {
    padding: 24px 20px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .component-card {
    padding: 16px 18px;
  }

  .flow-diagram {
    padding: 24px 16px;
    gap: 16px;
  }

  .flow-row--top {
    flex-direction: column;
    gap: 0;
  }

  .flow-row--top .flow-arrow {
    padding: 10px 0;
  }

  .flow-row--top .flow-arrow .arrow-h,
  .flow-row--top .flow-arrow .arrow-h--left {
    width: 2px;
    height: 36px;
    transform: none;
  }

  .flow-row--top .flow-arrow .arrow-h::before {
    background: linear-gradient(to bottom, transparent, var(--green) 40%, var(--green));
  }

  .flow-row--top .flow-arrow .arrow-h::after {
    right: auto;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--green);
    border-bottom: none;
  }

  .flow-row--top .flow-arrow .arrow-h--left::before {
    background: linear-gradient(to bottom, transparent, var(--green) 40%, var(--green));
  }

  .flow-row--top .flow-arrow .arrow-h--left::after {
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--green);
    border-bottom: none;
    border-right: none;
  }

  .flow-node {
    max-width: 100%;
    width: 100%;
  }

  .flow-row--bottom {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 12px;
  }

  .flow-row--flux {
    flex-direction: column;
    gap: 0;
  }

  .flow-row--flux .flow-arrow {
    padding: 10px 0;
  }

  .flow-row--flux .flow-arrow .arrow-h {
    width: 2px;
    height: 36px;
  }

  .flow-row--flux .flow-arrow .arrow-h::before {
    background: linear-gradient(to bottom, transparent, var(--green) 40%, var(--green));
  }

  .flow-row--flux .flow-arrow .arrow-h::after {
    right: auto;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--green);
    border-bottom: none;
  }

  .flow-flux-card {
    max-width: 100%;
    width: 100%;
  }

  .arch-detail {
    margin-top: 40px;
  }

  .arch-detail-card {
    padding: 20px 18px;
  }

  .arch-step {
    padding: 18px 16px;
    gap: 14px;
  }

  .ai-tools {
    gap: 10px;
    margin-top: 24px;
  }

  .ai-tool {
    padding: 12px 0;
    font-size: 0.9rem;
    flex: 1 1 calc(50% - 10px);
    text-align: center;
    min-width: 0;
  }

  .components-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .legend {
    gap: 16px;
  }

  .cta-section .section-title {
    font-size: 1.4rem;
  }

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

  .cta-actions .terminal-box {
    margin-bottom: 0;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta-buttons .btn-primary,
  .cta-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  footer {
    padding: 32px 16px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  footer p {
    font-size: 0.8rem;
  }

  .docs-topbar {
    padding: 0 16px;
  }

  .docs-topbar-title {
    font-size: 0.875rem;
  }

  .docs-topbar-gitlab span {
    display: none;
  }

  .docs-content {
    padding: 20px 16px 40px;
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }

  .md-content h1 {
    font-size: 1.5rem;
  }

  .md-content h2 {
    font-size: 1.15rem;
    margin: 32px 0 12px;
  }

  .md-content pre {
    padding: 12px 14px;
    font-size: 0.78rem;
  }

  .md-content table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .md-content th,
  .md-content td {
    padding: 8px 10px;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .terminal-box {
    font-size: 0.72rem;
    padding: 10px 12px;
  }

  .ai-tool {
    flex: 1 1 100%;
  }

  .logos-row {
    gap: 12px 20px;
  }

  .step-card {
    padding: 20px 16px;
  }
}
