
/* ============================================
   Aexyr DOCS — Stylesheet
   AxonStellar Platform Documentation
   ============================================ */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #0f0f1a;
  --bg-tertiary: #141422;
  --bg-card: #12121f;
  --bg-card-hover: #1a1a2e;
  --bg-code: #0d0d18;
  --border-primary: #1e1e3a;
  --border-accent: #2a2a4a;
  --text-primary: #e0e0f0;
  --text-secondary: #9090b0;
  --text-muted: #606080;
  --accent-cyan: #00f0ff;
  --accent-purple: #b347d9;
  --accent-pink: #ff2d7b;
  --accent-green: #00ff88;
  --accent-amber: #ffb347;
  --accent-blue: #4488ff;
  --gradient-hero: linear-gradient(135deg, #0a0a12 0%, #1a0a2e 50%, #0a1a2e 100%);
  --gradient-card: linear-gradient(145deg, #12121f 0%, #0f0f1a 100%);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.15);
  --shadow-glow-purple: 0 0 20px rgba(179, 71, 217, 0.15);
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p { color: var(--text-secondary); font-size: 1.05rem; }
a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; text-shadow: 0 0 8px var(--accent-cyan); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; border-bottom: 1px solid var(--border-primary); }
.section:last-child { border-bottom: none; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: 1.2rem; color: var(--text-primary);
}
.navbar-brand img { height: 32px; width: auto; }
.navbar-brand .version {
  font-size: 0.7rem; color: var(--accent-cyan); background: rgba(0,240,255,0.1);
  padding: 2px 8px; border-radius: 999px; font-family: var(--font-mono);
}
.nav-links { display: none; gap: 1.5rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); text-shadow: none;
}
/* Hamburger toggle button — hidden on desktop */
.nav-mobile-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 1px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(60deg); }
.nav-mobile-toggle.open span:nth-child(2) { transform: translateY(0); }
.nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-60deg); }

/* Mobile slide-down menu — hidden by default */
.mobile-menu { position: fixed; top: 64px; left: 0; right: 0; background: rgba(5, 5, 16, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 999; display: flex; flex-direction: column; align-items: flex-end; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.mobile-menu.open { max-height: 500px; padding: 16px 24px; border-bottom: 1px solid rgba(0, 240, 255, 0.08); }
.mobile-menu-link { font-size: 1rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); transition: color 0.3s ease; display: block; width: 100%; text-align: right; }
.mobile-menu-link:hover { color: var(--text-primary); }

/* ── Hero ── */
.hero {
  min-height: 85vh; display: flex; align-items: center; justify-content: center;
  background: #050510; position: relative; overflow: hidden;
  padding-top: 64px;
}
/* hero::before removed — replaced by synapse canvas animation */

/* Synapse animation canvas */
#synapse-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* hero-content z-index merged into main rule */
.hero-content {
  position: relative; z-index: 1; text-align: center; max-width: 800px; padding: 2rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,240,255,0.08); border: 1px solid rgba(0,240,255,0.2);
  padding: 6px 16px; border-radius: 999px; font-size: 0.85rem;
  color: var(--accent-cyan); font-family: var(--font-mono); margin-bottom: 1.5rem;
}
.hero-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green);
  animation: pulse 2s infinite;
}
.hero h1 {
  font-size: 3.5rem; margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 .accent { -webkit-text-fill-color: var(--accent-cyan); }
.hero .subtitle {
  font-size: 1.25rem; color: #ffffff; margin-bottom: 2.5rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.95rem; cursor: pointer; transition: var(--transition); border: none;
}
.btn-primary {
  background: var(--accent-cyan); color: #000;
}
.btn-primary:hover {
  background: #fff; box-shadow: 0 0 30px rgba(0,240,255,0.4); transform: translateY(-2px);
  color: #000; text-shadow: none;
}
.btn-secondary {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-accent);
}
.btn-secondary:hover {
  border-color: var(--accent-purple); color: var(--accent-purple); text-shadow: none;
  transform: translateY(-2px);
}

/* hero-image removed — replaced by synapse canvas */
/* hero-image img removed */

/* ── Cards ── */
.card {
  background: var(--gradient-card); border: 1px solid var(--border-primary);
  border-radius: var(--radius); padding: 2rem; transition: var(--transition);
  position: relative; overflow: hidden;
}
.card:hover {
  border-color: var(--border-accent); transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0; transition: var(--transition);
}
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.card-icon.cyan { background: rgba(0,240,255,0.1); color: var(--accent-cyan); }
.card-icon.purple { background: rgba(179,71,217,0.1); color: var(--accent-purple); }
.card-icon.pink { background: rgba(255,45,123,0.1); color: var(--accent-pink); }
.card-icon.green { background: rgba(0,255,136,0.1); color: var(--accent-green); }
.card-icon.amber { background: rgba(255,179,71,0.1); color: var(--accent-amber); }
.card-icon.blue { background: rgba(68,136,255,0.1); color: var(--accent-blue); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; }

.cards-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.cards-grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards-grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); }
.cards-grid-2x2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
.cards-grid-2x2 > .card {
  width: 100%;
  min-width: 0;
}

/* ── Section Headers ── */
.section-header { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-header .label {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent-cyan); margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; }

/* ── Code Blocks ── */
pre {
  background: var(--bg-code); border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm); padding: 1.25rem 1.5rem;
  overflow-x: auto; font-family: var(--font-mono); font-size: 0.88rem;
  line-height: 1.6; color: var(--text-primary); margin: 1rem 0;
}
code {
  font-family: var(--font-mono); font-size: 0.88em;
}
p code, li code, td code {
  background: rgba(0,240,255,0.08); color: var(--accent-cyan);
  padding: 2px 6px; border-radius: 4px; font-size: 0.85em;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 8px 16px; font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-mono);
}
.code-header + pre { border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 0; }
.code-header .lang { color: var(--accent-purple); font-weight: 600; }
.copy-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-primary);
  color: var(--text-muted); padding: 3px 10px; border-radius: 4px;
  font-size: 0.75rem; cursor: pointer; transition: var(--transition);
  font-family: var(--font-mono);
}
.copy-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.copy-btn.copied { color: var(--accent-green); border-color: var(--accent-green); }

/* ── Tables ── */
.table-wrapper { overflow-x: auto; margin: 1rem 0; border-radius: var(--radius-sm); border: 1px solid var(--border-primary); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th {
  background: var(--bg-tertiary); color: var(--accent-cyan);
  font-weight: 600; text-align: left; padding: 12px 16px;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
  font-family: var(--font-mono); white-space: nowrap;
}
td { padding: 10px 16px; border-top: 1px solid var(--border-primary); color: var(--text-secondary); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Tooltips ── */
.tooltip-trigger {
  position: relative; border-bottom: 1px dashed var(--accent-cyan);
  cursor: help; display: inline;
}
.tooltip-trigger .tooltip-content {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm); padding: 12px 16px; width: 300px;
  font-size: 0.85rem; color: var(--text-secondary); z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-glow-cyan);
  opacity: 0; visibility: hidden; transition: var(--transition);
  pointer-events: none; line-height: 1.5;
}
.tooltip-trigger .tooltip-content::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--accent-cyan);
}
.tooltip-trigger:hover .tooltip-content { opacity: 1; visibility: visible; }
.tooltip-content strong { color: var(--accent-cyan); }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-primary); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  padding: 10px 20px; background: none; border: none; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Accordion ── */
.accordion { border: 1px solid var(--border-primary); border-radius: var(--radius-sm); overflow: hidden; margin: 1rem 0; }
.accordion-item { border-bottom: 1px solid var(--border-primary); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
  width: 100%; padding: 14px 20px; background: var(--bg-tertiary);
  border: none; color: var(--text-primary); font-size: 0.95rem;
  font-weight: 600; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; transition: var(--transition); text-align: left;
}
.accordion-header:hover { background: var(--bg-card-hover); }
.accordion-header .icon { transition: transform 0.3s; font-size: 0.8rem; color: var(--accent-cyan); }
.accordion-item.open .accordion-header .icon { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  background: var(--bg-card);
}
.accordion-item.open .accordion-body { max-height: 2000px; }
.accordion-body-inner { padding: 16px 20px; }

/* ── Callouts ── */
.callout {
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  margin: 1rem 0; display: flex; gap: 12px; font-size: 0.92rem;
}
.callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.callout-info { background: rgba(68,136,255,0.08); border-left: 3px solid var(--accent-blue); }
.callout-warning { background: rgba(255,179,71,0.08); border-left: 3px solid var(--accent-amber); }
.callout-danger { background: rgba(255,45,123,0.08); border-left: 3px solid var(--accent-pink); }
.callout-success { background: rgba(0,255,136,0.08); border-left: 3px solid var(--accent-green); }
.callout-info .callout-icon { color: var(--accent-blue); }
.callout-warning .callout-icon { color: var(--accent-amber); }
.callout-danger .callout-icon { color: var(--accent-pink); }
.callout-success .callout-icon { color: var(--accent-green); }

/* ── Badges & Tags ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 0.75rem;
  font-weight: 600; font-family: var(--font-mono);
}
.badge-cyan { background: rgba(0,240,255,0.12); color: var(--accent-cyan); }
.badge-purple { background: rgba(179,71,217,0.12); color: var(--accent-purple); }
.badge-green { background: rgba(0,255,136,0.12); color: var(--accent-green); }
.badge-amber { background: rgba(255,179,71,0.12); color: var(--accent-amber); }
.badge-pink { background: rgba(255,45,123,0.12); color: var(--accent-pink); }

/* ── Network Diagram ── */
.network-diagram {
  background: var(--bg-code); border: 1px solid var(--border-primary);
  border-radius: var(--radius); padding: 2rem; margin: 1.5rem 0;
  font-family: var(--font-mono); font-size: 0.85rem;
  line-height: 1.8; overflow-x: auto; color: var(--text-secondary);
}
.network-diagram .highlight { color: var(--accent-cyan); font-weight: 700; }
.network-diagram .port { color: var(--accent-purple); }
.network-diagram .label { color: var(--accent-amber); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: var(--border-accent);
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -2rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-cyan); border: 2px solid var(--bg-primary);
}
.timeline-item h4 { margin-bottom: 0.25rem; }
.timeline-item p { font-size: 0.9rem; }

/* ── Search ── */
.search-box {
  position: relative; max-width: 400px; margin: 0;
}
.search-box input {
  width: 100%; padding: 10px 16px 10px 40px;
  background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.9rem; outline: none; transition: var(--transition);
}
.search-box input:focus { border-color: var(--accent-cyan); box-shadow: var(--shadow-glow-cyan); }
.search-box input::placeholder { color: var(--text-muted); }
.search-box .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem;
}

/* ── Floating TOC ── */
.toc {
  position: fixed; right: 2rem; top: 100px; width: 220px;
  background: var(--bg-card); border: 1px solid var(--border-primary);
  border-radius: var(--radius); padding: 1.25rem; z-index: 500;
  max-height: calc(100vh - 140px); overflow-y: auto;
}
.toc h4 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.toc a {
  display: block; padding: 4px 0; font-size: 0.82rem; color: var(--text-muted);
  transition: var(--transition); border-left: 2px solid transparent; padding-left: 10px;
}
.toc a:hover, .toc a.active {
  color: var(--accent-cyan); border-left-color: var(--accent-cyan); text-shadow: none;
}
.toc a.sub { padding-left: 22px; font-size: 0.78rem; }

/* ── Footer ── */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-primary);
  padding: 3rem 0 2rem;
  position: relative;
  text-align: left;
}
.footer .axon-footer-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent 50%, var(--accent-purple), transparent);
  opacity: 0.3;
}
.footer .footer-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  text-align: left;
}
.footer .footer-brand {
  flex: 0 1 320px;
  text-align: left;
}
.footer .footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 300px;
  margin-top: 0.75rem;
  line-height: 1.8;
  text-align: left;
}
.footer .footer-brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.footer .footer-brand a img {
  height: 42px;
  max-height: 42px;
  width: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.footer .footer-col {
  text-align: left;
}
.footer .footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  text-align: left;
}
.footer .footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
  text-align: left;
}
.footer .footer-col a:hover { color: var(--accent-cyan); }
.footer .footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer .footer-bottom .axon-footer-border {
  position: relative;
  margin-bottom: 1.5rem;
}
.footer .axon-footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}
.footer .footer-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Animations ── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ── Responsive ── */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* ── Feature Image Sections ── */
.feature-image-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; margin: 2rem 0;
}
.feature-image-section.reverse { direction: rtl; }
.feature-image-section.reverse > * { direction: ltr; }
.feature-image-section img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ── Stat Boxes ── */
.stats-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.stat-box {
  text-align: center; padding: 1.5rem 2rem; background: var(--bg-card);
  border: 1px solid var(--border-primary); border-radius: var(--radius);
  min-width: 160px;
}
.stat-box .number {
  font-size: 2.5rem; font-weight: 800; font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-box .label {
  font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem;
}

/* ── Process Flow ── */
.flow-steps { display: flex; gap: 0; align-items: center; justify-content: center; flex-wrap: wrap; margin: 2rem 0; }
.flow-step {
  padding: 12px 20px; background: var(--bg-card); border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm); text-align: center; font-size: 0.88rem;
  font-weight: 600; min-width: 120px;
}
.flow-arrow { color: var(--accent-cyan); font-size: 1.5rem; padding: 0 4px; }

/* ── JSON Example Blocks ── */
.json-key { color: var(--accent-purple); }
.json-string { color: var(--accent-green); }
.json-number { color: var(--accent-amber); }
.json-bool { color: var(--accent-pink); }
.json-comment { color: var(--text-muted); font-style: italic; }
.code-keyword { color: var(--accent-purple); }
.code-function { color: var(--accent-cyan); }
.code-string { color: var(--accent-green); }
.code-comment { color: var(--text-muted); }

/* ── Utility: 2-column grid (used for inner card grids) ── */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-First Overrides
   All mobile fixes contained here. Desktop rules untouched.
   ══════════════════════════════════════════════════════════ */

/* ── Hide TOC on smaller screens ── */
/* ── Desktop: show nav links, hide hamburger ── */
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-mobile-toggle { display: none; }
  .mobile-menu { display: none; }
}

@media (max-width: 1400px) {
  .toc { display: none; }
}

/* ── Tablet adjustments ── */
@media (max-width: 900px) {
  .stats-row {
    gap: 1rem;
  }
  .stat-box {
    min-width: 130px;
    padding: 1rem 1.25rem;
  }
  .stat-box .number {
    font-size: 2rem;
  }
}

/* ── Mobile: 768px and below ── */
@media (max-width: 768px) {

  /* ── Prevent horizontal scroll on mobile ── */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* ── Typography ── */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  p { font-size: 0.95rem; }

  /* ── Layout ── */
  .section { padding: 2.5rem 0; }
  .container { padding: 0 1rem; }
  .section-header { margin-bottom: 2rem; }
  .section-header p { font-size: 1rem; }

  /* ── Navbar ── */
  .navbar { padding: 0 1rem; }
  /* ── Mobile hamburger toggle (touch target sizing) ── */
  .nav-mobile-toggle {
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }
  .mobile-menu.open {
    padding: 12px 16px;
  }
  .mobile-menu-link {
    padding: 14px 0;
    font-size: 1.05rem;
  }

  /* ── Hero ── */
  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 3rem;
  }
  .hero-content { padding: 1.5rem 0.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
    margin-bottom: 1rem;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* ── Stats Row ── */
  .stats-row {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .stat-box {
    min-width: unset;
    width: 100%;
    max-width: 320px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }
  .stat-box .number {
    font-size: 1.8rem;
    min-width: 60px;
  }
  .stat-box .label {
    margin-top: 0;
    font-size: 0.8rem;
  }

  /* ── Cards & Grids ── */
  .grid-2col { grid-template-columns: 1fr; }
  .cards-grid,
  .cards-grid-2,
  .cards-grid-3 {
    grid-template-columns: 1fr;
  }
  .cards-grid-2x2 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.25rem;
  }

  /* ── Feature Image Sections ── */
  .feature-image-section,
  .feature-image-section.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.5rem;
  }

  /* ── Flow Steps ── */
  .flow-steps {
    flex-direction: column;
    align-items: center;
  }
  .flow-step {
    width: 100%;
    max-width: 300px;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }

  /* ── Tabs ── */
  .tabs {
    gap: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  /* ── Tables ── */
  .table-wrapper {
    margin: 0.75rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  table { font-size: 0.82rem; }
  th { padding: 10px 12px; font-size: 0.75rem; }
  td { padding: 8px 12px; }

  /* ── Code Blocks ── */
  pre {
    font-size: 0.78rem;
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: var(--radius-sm);
  }
  .code-header {
    padding: 6px 12px;
    font-size: 0.72rem;
  }

  /* ── Network Diagram ── */
  .network-diagram {
    font-size: 0.72rem;
    padding: 0.75rem;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Accordion ── */
  .accordion-header {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  .accordion-body-inner {
    padding: 12px 14px;
  }

  /* ── Callouts ── */
  .callout {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* ── Tooltips ── */
  .tooltip-trigger .tooltip-content {
    width: 250px;
    left: 0;
    transform: none;
  }

  /* ── Badges ── */
  .badge {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  /* ── Buttons ── */
  .btn {
    padding: 10px 20px;
    font-size: 0.88rem;
  }

  /* ── Timeline ── */
  .timeline {
    padding-left: 1.5rem;
  }
  .timeline-item::before {
    left: -1.5rem;
    width: 10px;
    height: 10px;
  }

  /* ── Footer ── */
  .footer {
    padding: 2rem 0 1.5rem;
  }
  .footer .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .footer .footer-brand {
    flex: 1 1 100%;
    text-align: center;
  }
  .footer .footer-brand p {
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .footer .footer-col {
    text-align: center;
  }
  .footer .footer-col h4,
  .footer .footer-col a {
    text-align: center;
  }
  .footer .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

}

/* ── Small mobile: 480px and below ── */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .hero .subtitle { font-size: 0.88rem; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.05rem; }
  .section { padding: 2rem 0; }
  .container { padding: 0 0.75rem; }
  .stat-box {
    padding: 0.75rem 1rem;
  }
  .stat-box .number {
    font-size: 1.5rem;
  }
  pre {
    font-size: 0.72rem;
    padding: 0.75rem;
  }
  .network-diagram {
    font-size: 0.65rem;
    padding: 0.5rem;
  }
  table { font-size: 0.75rem; }
  th { padding: 8px 10px; font-size: 0.7rem; }
  td { padding: 6px 10px; }
  .tab-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}
