/* an5-brand:start — generated from an5Brand/tokens.json, do not edit */
:root {
  --an5-gradient-start: #38bdf8;
  --an5-gradient-end: #6366f1;
  --an5-gradient: linear-gradient(135deg, var(--an5-gradient-start) 0%, var(--an5-gradient-end) 100%);
  --an5-on-badge: #ffffff;
  --an5-on-surface: #c5c5c5;
  --an5-cyan-rgb: 56,189,248;
  --an5-blue-rgb: 99,102,241;
  --an5-badge-ratio: 1.7308;
  --an5-badge-radius: 8;
}
/* an5-brand:end */

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

:root {
  --bg: #070b14;
  --bg-2: #0d1220;
  --bg-3: #111827;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(var(--an5-blue-rgb),0.3);
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --cyan: var(--an5-gradient-start);
  --cyan-dark: #0ea5e9;
  --blue: var(--an5-gradient-end);
  --purple: #a855f7;
  --green: #22d3ee;
  --orange: #fb923c;
  --pink: #ec4899;
  --red: #f87171;
  --yellow: #fbbf24;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 60px rgba(var(--an5-cyan-rgb),0.12);
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 68px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }
img { max-width: 100%; height: auto; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: rgba(var(--an5-cyan-rgb),0.3); border-radius: 3px; }

/* ─── Nav ────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav.scrolled { background: rgba(7,11,20,0.96); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.logo-badge {
  background: var(--an5-gradient);
  color: #fff; padding: 3px 8px; border-radius: 6px;
  font-size: 0.85rem; font-weight: 900; letter-spacing: 0.5px;
}
.logo-text { color: var(--text); }
.nav-links {
  display: flex; align-items: center; gap: 8px; list-style: none; margin-left: auto;
}
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500; transition: var(--transition);
  display: inline-flex; align-items: center;
}
.nav-links a:hover { color: var(--text); background: var(--bg-3); }
.nav-github {
  display: inline-flex !important; align-items: center; gap: 6px;
  background: var(--bg-3) !important; border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.nav-github:hover { border-color: var(--border-hover) !important; }
.nav-toggle { display: none; }

/* ─── Container ──────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(var(--an5-cyan-rgb),0.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation: float1 8s ease-in-out infinite;
}
.glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(var(--an5-blue-rgb),0.1) 0%, transparent 70%);
  bottom: -50px; right: 10%;
  animation: float2 10s ease-in-out infinite;
}
.glow-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 70%);
  top: 40%; right: 5%;
  animation: float1 12s ease-in-out infinite reverse;
}
@keyframes float1 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-30px)} }
@keyframes float2 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(20px)} }

.hero .container { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(var(--an5-cyan-rgb),0.08); border: 1px solid rgba(var(--an5-cyan-rgb),0.2);
  color: var(--cyan); padding: 6px 14px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.3px;
  width: fit-content;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.8)} }

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4.5rem); font-weight: 900;
  line-height: 1.15; letter-spacing: -0.03em; max-width: 700px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 50%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.2rem); color: var(--text-muted);
  max-width: 560px; line-height: 1.7;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-docs-link {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.hero-docs-link a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-stats {
  display: flex; align-items: center; gap: 32px;
  padding: 24px 0; margin-top: 8px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--cyan); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Floating code window */
.hero-code-float {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  width: 460px; animation: float1 8s ease-in-out infinite;
}
@media (max-width: 1100px) { .hero-code-float { display: none; } }

/* ─── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600;
  font-size: 0.92rem; transition: all 0.2s; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  color: #fff; box-shadow: 0 4px 20px rgba(var(--an5-cyan-rgb),0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(var(--an5-cyan-rgb),0.4); }
.btn-outline {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: rgba(var(--an5-cyan-rgb),0.05); }

/* ─── Code Windows ────────────────────────────────────────────────────────────── */
.code-window {
  background: #0d1220; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
  max-width: 100%; min-width: 0;
}
.code-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f57; }
.yellow { background: #ffbc2e; }
.green { background: #28c840; }
.code-filename { margin-left: 8px; font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono); }
.code-content {
  padding: 20px; font-family: var(--mono); font-size: 0.82rem;
  line-height: 1.7; overflow-x: auto; white-space: pre;
  -webkit-overflow-scrolling: touch;
}

/* Syntax colors */
.c-keyword { color: #c792ea; }
.c-fn { color: #82aaff; }
.c-var { color: #e2e8f0; }
.c-str { color: #c3e88d; }
.c-prop { color: #89ddff; }
.c-comment { color: #546e7a; font-style: italic; }
.c-punct { color: #89ddff; }
.c-op { color: #89ddff; }
.c-bool { color: #ff9cac; }
.c-num { color: #f78c6c; }
.c-type { color: #ffcb6b; }

/* ─── Sections ────────────────────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-2); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  background: rgba(var(--an5-cyan-rgb),0.08); border: 1px solid rgba(var(--an5-cyan-rgb),0.2);
  color: var(--cyan); padding: 4px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; }
.section-subtitle { color: var(--text-muted); margin-top: 12px; font-size: 1.05rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ─── Features Grid ───────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; gap: 16px; } }

.feature-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--an5-cyan-rgb),0.03), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; flex-shrink: 0;
}
.feature-icon svg { width: 24px; height: 24px; display: block; flex-shrink: 0; }
.icon-blue { background: rgba(var(--an5-blue-rgb),0.15); color: #818cf8; }
.icon-cyan { background: rgba(var(--an5-cyan-rgb),0.12); color: var(--cyan); }
.icon-purple { background: rgba(168,85,247,0.12); color: #c084fc; }
.icon-green { background: rgba(34,211,238,0.12); color: var(--green); }
.icon-orange { background: rgba(251,146,60,0.12); color: var(--orange); }
.icon-pink { background: rgba(236,72,153,0.12); color: var(--pink); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ─── Quick Start Tabs ────────────────────────────────────────────────────────── */
.quickstart-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 10px 20px; border-radius: 8px;
  font-family: var(--font); font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; min-height: 44px;
}
.tab-btn:hover { color: var(--text); border-color: var(--border-hover); }
.tab-btn.active {
  background: rgba(var(--an5-cyan-rgb),0.1); border-color: rgba(var(--an5-cyan-rgb),0.4);
  color: var(--cyan); font-weight: 600;
}
.tab-panels { max-width: 760px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.code-block {
  background: #0d1220; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  font-family: var(--mono); font-size: 0.85rem;
  line-height: 1.7; overflow-x: auto; white-space: pre;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

/* ─── Packages Grid ───────────────────────────────────────────────────────────── */
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .packages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .packages-grid { grid-template-columns: 1fr; } }
/* Grid items default to min-width:auto → nowrap children (e.g. .pkg-install)
   would stretch the track past the viewport on mobile. Force them to shrink. */
.features-grid > *, .packages-grid > * { min-width: 0; }

.pkg-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all 0.3s; cursor: pointer;
}
.pkg-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow); }
.pkg-registry {
  display: inline-block; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; width: fit-content;
}
.npm { background: rgba(203,56,55,0.15); color: #f87171; }
.pypi { background: rgba(var(--an5-cyan-rgb),0.12); color: var(--cyan); }
.vscode { background: rgba(var(--an5-blue-rgb),0.15); color: #818cf8; }
.vscode-alt { background: rgba(148,163,184,0.15); color: #94a3b8; }
.golang { background: rgba(0,173,216,0.15); color: #00add8; }
.example { background: rgba(16,185,129,0.15); color: #34d399; }
.pkg-name { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; color: var(--text); }
.pkg-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.pkg-desc code { background: rgba(255,255,255,0.05); padding: 1px 5px; border-radius: 4px; font-size: 0.8rem; }
.pkg-install {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 7px; font-size: 0.78rem;
  color: var(--text-muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono);
}

/* ─── Extension section ───────────────────────────────────────────────────────── */
.ext-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
/* Grid items default to min-width:auto → long <pre> lines would stretch the
   track past the viewport on mobile. Force them to shrink + scroll inside. */
.ext-container > * { min-width: 0; }
.ext-preview { min-width: 0; max-width: 100%; }
@media (max-width: 800px) { .ext-container { grid-template-columns: 1fr; gap: 36px; } }
.ext-info .section-title { text-align: left; }
.ext-features { list-style: none; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.ext-features li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.ext-features svg { width: 18px; height: 18px; color: var(--cyan); flex-shrink: 0; }
.ext-features code { background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }
.ext-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ─── Databases grid ──────────────────────────────────────────────────────────── */
.db-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.db-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-width: 140px; transition: all 0.3s; flex: 1 1 140px; max-width: 200px;
}
.db-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow); }
.db-logo { font-size: 2rem; }
.db-name { font-weight: 600; font-size: 0.9rem; text-align: center; }
.db-status { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.3px; }
.status-stable { background: rgba(34,197,94,0.12); color: #4ade80; }
.status-beta { background: rgba(var(--an5-cyan-rgb),0.12); color: var(--cyan); }

/* ─── Footer ──────────────────────────────────────────────────────────────────── */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 320px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.2s;
}
.footer-social a:hover { color: var(--cyan); border-color: var(--border-hover); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; flex: 1; max-width: 640px; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.88rem; color: var(--text-muted); transition: color 0.2s; display: inline-block; padding: 2px 0; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  margin-top: 48px; padding: 24px; border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }

/* ─── Mobile Responsiveness ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 36px; }
  .container { padding: 0 16px; }

  /* Mobile Nav Dropdown */
  .nav-links {
    display: flex; position: fixed; top: var(--nav-h); left: 12px; right: 12px;
    background: rgba(13, 18, 32, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: var(--radius);
    flex-direction: column; padding: 16px; gap: 6px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    opacity: 0; pointer-events: none; transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links.open {
    opacity: 1; pointer-events: auto; transform: translateY(0);
  }
  .nav-links a {
    padding: 12px 16px; border-radius: 8px; font-size: 0.95rem; width: 100%;
  }
  .nav-github { margin-top: 4px; justify-content: center; }

  /* Mobile Toggle Button */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; background: transparent; border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; padding: 8px; transition: all 0.2s;
  }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
  .nav-toggle.open { border-color: var(--border-hover); background: var(--bg-3); }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Hero Mobile */
  .hero { min-height: auto; padding: calc(var(--nav-h) + 24px) 0 50px; }
  .hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    text-align: center; padding: 16px 0; margin-top: 0;
  }
  .stat-divider { display: none; }
  .stat-num { font-size: 1.5rem; }

  /* Footer Mobile */
  .footer-inner { flex-direction: column; gap: 36px; }
  .footer-brand { max-width: 100%; }
  .footer-links { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; max-width: 100%; }
}

@media (max-width: 580px) {
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-actions { flex-direction: column; gap: 10px; width: 100%; }
  .hero-actions .btn { width: 100%; }

  .quickstart-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .quickstart-tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }

  .code-block { padding: 16px; font-size: 0.78rem; border-radius: var(--radius); }

  .db-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .db-card { max-width: 100%; min-width: 0; padding: 20px 16px; }

  .ext-info .section-title { text-align: center; }
  .ext-features li { font-size: 0.85rem; }
  .ext-actions { flex-direction: column; width: 100%; }
  .ext-actions .btn { width: 100%; }

  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 380px) {
  .footer-links { grid-template-columns: 1fr; }
}
